Guest User

Untitled

a guest
Mar 10th, 2017
57
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.63 KB | None
  1. CREATE VIEW `concept_view` AS
  2.   SELECT
  3.     `openmrs`.`concept`.`concept_id`              AS `concept_id`,
  4.     `concept_full_name`.`name`                    AS `concept_full_name`,
  5.     `concept_short_name`.`name`                   AS `concept_short_name`,
  6.     `openmrs`.`concept_class`.`name`              AS `concept_class_name`,
  7.     `openmrs`.`concept_datatype`.`name`           AS `concept_datatype_name`,
  8.     `openmrs`.`concept`.`retired`                 AS `retired`,
  9.     `openmrs`.`concept_description`.`description` AS `description`,
  10.     `openmrs`.`concept`.`date_created`            AS `date_created`
  11.   FROM (((((`openmrs`.`concept`
  12.     LEFT JOIN `openmrs`.`concept_name` `concept_full_name` ON ((
  13.       (`concept_full_name`.`concept_id` = `openmrs`.`concept`.`concept_id`) AND
  14.       (`concept_full_name`.`concept_name_type` = 'FULLY_SPECIFIED') AND (`concept_full_name`.`locale` = 'en') AND
  15.       (`concept_full_name`.`voided` = 0)))) LEFT JOIN `openmrs`.`concept_name` `concept_short_name` ON ((
  16.     (`concept_short_name`.`concept_id` = `openmrs`.`concept`.`concept_id`) AND
  17.     (`concept_short_name`.`concept_name_type` = 'SHORT') AND (`concept_short_name`.`locale` = 'en') AND
  18.     (`concept_short_name`.`voided` = 0)))) LEFT JOIN `openmrs`.`concept_class`
  19.       ON ((`openmrs`.`concept_class`.`concept_class_id` = `openmrs`.`concept`.`class_id`))) LEFT JOIN
  20.     `openmrs`.`concept_datatype`
  21.       ON ((`openmrs`.`concept_datatype`.`concept_datatype_id` = `openmrs`.`concept`.`datatype_id`))) LEFT JOIN
  22.     `openmrs`.`concept_description`
  23.       ON ((`openmrs`.`concept_description`.`concept_id` = `openmrs`.`concept`.`concept_id`)))
RAW Paste Data Copied