Page History
Inpage_linkfix |
---|
The composite relationship views display active, inferred defining relationships of specified concepts accompanied by human-readable terms for each the selected concepts
Footnote Macro |
---|
The terms are displayed by using the Composite Description Views described in an earlier section of this guide. |
.
Defining Relationship View
For each snapshot view the SNOMED CT example database there are two view of the active, inferred defining relationships. The views select the id and either the fully specified name or preferred synonym for the concept identified in each of the defining columns (sourceId, typeId and destinationId). The characteristics of these views are shown in and a general template for the SQL definitions of these views is shown in . To create each of the views named in the table, the placeholders for {termtype} need to be replaced with values in the Specific Settings column of the table.
demonstrates the use of these views to select the active defining relationships of a specified concept with the id and preferred term for each of the referenced concepts.
Name
| Description | Specific Settings | ||
{termtype} | ||||
snap_rel_def_fsn | This view includes all active, inferred relationships of a concept specified by sourceId
. It selects the id and fully specified name for each of the concept identifiers (sourceId, typeId and destinationId) and the relationshipGroup number. | fsn | ||
snap_rel_def_pref | This view includes all active, inferred relationships of a concept specified by sourceId
. It selects the id and fully specified name for each of the concept identifiers (sourceId, typeId and destinationId) and the relationshipGroup number. | pref |
Code Block | ||||
---|---|---|---|---|
| ||||
CREATE VIEW `snap_rel_def_{viewtype}` AS
(SELECT `r`.`sourceId` `sourceId`,`src`.`Term` `sourceTerm`,`r`.`typeId` `typeId`,`typ`.`Term` `typeTerm`,`r`.`destinationId` `destinationId`,`dest`.`Term` `destinationTerm`,`r`.`relationshipGroup` `relationshipGroup`
FROM (((`snap_relationship` `r`
JOIN `snap_{viewtype}` `src` ON ((`r`.`sourceId` = `src`.`conceptId`))) JOIN `snap_{viewtype}` `typ` ON ((`r`.`typeId` = `typ`.`conceptId`))) JOIN `snap_{viewtype}` `dest` ON ((`r`.`destinationId` = `dest`.`conceptId`))) WHERE ((`r`.`active` = 1) AND (`r`.`characteristicTypeId` = 900000000000011006))); |
SQL Query | |||||||||||||
| |||||||||||||
Result | |||||||||||||
sourceId | sourceTerm | typeId | typeTerm | destinationId | destinationTerm | relationshipGroup | |||||||
6025007 | Laparoscopic appendectomy | 116680003 | Is a | 51316009 | Laparoscopic procedure | 0 | |||||||
6025007 | Laparoscopic appendectomy | 116680003 | Is a | 80146002 | Appendectomy | 0 | |||||||
6025007 | Laparoscopic appendectomy | 116680003 | Is a | 264274002 | Endoscopic operation | 0 | |||||||
6025007 | Laparoscopic appendectomy | 116680003 | Is a | 440588003 | Endoscopic procedure on appendix | 0 | |||||||
6025007 | Laparoscopic appendectomy | 260686004 | Method | 129304002 | Excision - action | 1 | |||||||
6025007 | Laparoscopic appendectomy | 405813007 | Procedure site - Direct | 66754008 | Appendix structure | 1 | |||||||
6025007 | Laparoscopic appendectomy | 425391005 | Using access device | 86174004 | Laparoscope | 1 |
...
Display Footnotes Macro |
---|