120 likes | 242 Views
Applying the RIM/VMR to Elimination of the “{ }”. Robert A. Jenders, MD, MS 14 January 2003. Goal. Eliminate { } by standardizing database references Elements of standard query language data model vocabularies Writing MLMs with standard db references
E N D
Applying the RIM/VMR to Elimination of the “{ }” Robert A. Jenders, MD, MS 14 January 2003
Goal • Eliminate { } by standardizing database references • Elements of standard • query language • data model • vocabularies • Writing MLMs with standard db references • Write queries (without {}) against a standard data model, using a standard query language and vocab • Institution maintains mappings from standard to local db relations and vocabulary • Automated translation from standard db references to local ones using mappings
V2.5 “Intermediate Approach” • Keep curly braces • Introduce objects with dot notation (object.attribute) but no methods • Require arguments to current operators to be one of the current data types (even if an attribute of an object)
Encoding Standardized DB References • General model: select <attribute> from <object> where <attribute> <rel op> <vocab term>; • Advantage: Each attribute is a current Arden datatype. No alteration of operators is required. • Assumes SQL as the standard query language
Encoding Standardized DB References • Alternative (in keeping with “intermediate” v2.5 approach: Use dot notation in queries • General form: select <object.attribute> where <attribute> <rel op> <vocab term>; • Alternative: Derive entire objects (as groups of related attributes): select <object> where <attribute> <rel op> <vocab term>
Encoding Standardized DB References • Alternative: Eliminate curly braces entirely by eliminating “select” keyword and just using the “read” statement • Not consistent with v2.5 approach endorsed at last meeting • Example: mrn := read id from person;
Relevant RIM / VMR Classes entity: name, id, class code living subject: administrativeGenderCode, birthTime person: addr Examples mrn := read last {select id from person}; patient_name := read {select name from person};
Relevant RIM / VMR Classes RIM act: code, classCode (“OBS”), moodCode (“EVN”) observation: value, interpretationCode Example basophil_ratio := read {select value from observation where code = ‘11106-4’^’LOINC’ and classCode = ‘OBS’ and moodCode = ‘EVN’}; Note: Interpretation of “value” depends on data type, e.g., PQ = Physical Quantity = number + units.
Relevant RIM / VMR Classes VMR A_Observation: cd, value, status_cd Example basophil_ratio := read {select value from A_Observation where cd = ‘11106-4’^’LOINC’};
Beyond Queries: Defining Events • Use same syntax as stating vocabulary references within queries Example outpatient_visit := event {'9252'^'SNOMED-CT'};
Issues • Keep { } with “select …” or eliminate { } with “read …”? • What object to use in a query? • Possible rule: Use the class that has or inherits the fewest attributes needed for a query and that is closest to a leaf node. • How to refer to standard vocabularies? • Possible rule: ‘<code>’^’<vocabulary>’^’<version>’ • VMR vs RIM? • Include ability to retrieve entire objects or just object.attribute? • V2.5 or V3?
Next Steps? • Encode additional examples (PSM translation trial) • Others?