Presentation is loading. Please wait.

Presentation is loading. Please wait.

Update on the GELLO Expression and Query Language Margarita Sordo Brigham and Women’s Hospital Harvard Medical School HL7 Clinical Decision Support TC.

Similar presentations


Presentation on theme: "Update on the GELLO Expression and Query Language Margarita Sordo Brigham and Women’s Hospital Harvard Medical School HL7 Clinical Decision Support TC."— Presentation transcript:

1 Update on the GELLO Expression and Query Language Margarita Sordo Brigham and Women’s Hospital Harvard Medical School HL7 Clinical Decision Support TC

2 15-Jan-03HL7 @ San Antonio2 What is GELLO?  Expression language Decision criteria, abstractions, formulae  Query language Maps data in external systems to variables in expressions Analogous to read statements in Arden’s data slot  Embedded language To be used as part of other specs  MLM, guidelines, RIM derivation expression, template constraints, etc.

3 15-Jan-03HL7 @ San Antonio3 Model Arden Syntax Guideline (Sequential Knowledge) RIM Expressions (Ontology) Templates Object-oriented data model GELLO Q&E vMR GELLO Q&E GELLO Q&E GELLO Q&E

4 15-Jan-03HL7 @ San Antonio4 Requirements (1) 1. Work with an object-oriented data structure compatible with the RIM  Should support different data models: RMIMs? (such as VMR) 2. Be platform independent 3. Be easy to write and read for defined class of users 4. Be usable in different ‘applications’ (Arden MLMs, guidelines, templates, …)

5 15-Jan-03HL7 @ San Antonio5 Requirements (2) 5. Leverage existing standard frameworks/languages where possible 6. Be side-effects free 7. Built-in data types (if any) should be compatible with those defined by HL7 8. Be extensible  classes must be compatible with the RIM and language framework

6 15-Jan-03HL7 @ San Antonio6 Current work  GELLO is based on the Object Constraint Language (OCL) Part of UML spec Object Management Group standard  OCL is a language for specifying invariants on classes and its member attributes and functions  Maps to our needs and requirements Not a complete programming language Side-effects free

7 15-Jan-03HL7 @ San Antonio7 GELLO Objects and Properties  All expressions in GELLO have a type: Basic type Model type  Classifiers (Classes in the data model) have properties. These properties can be: an attribute a side-effect free method

8 15-Jan-03HL7 @ San Antonio8 Examples  Queries Observation.select(coded_concept=’03245’) Observation.selectSorted(coded_concept=“C0428279”)  Expressions The variables calcium and phosphate are not null calcium.notEmpty() and phosphate.notEmpty() The patient has renal failure and the product of calcium and phosphate exceeds a threshold signifying osteodystrophy renal_failure and calcium_phosphate_product > threshold_for_osteodystrophy

9 15-Jan-03HL7 @ San Antonio9 Pending Issues – Proposed Solutions  Scoping of temporary variables  Basic data types  Collections  Collection operators  Tuples  Declarativeness of queries  Joins

10 15-Jan-03HL7 @ San Antonio10 Issues -Variables Variables: Temporary storage location with limited scope  Creating a variable Class.new(parameters)  Assigning a value to a variable let potassium : PhysicalQuantity = PhysicalQuantity.new(70,”dl”)  Variable values cannot be changed.  The scope of a variable is the portion of a program where the declared entity is valid and can be referred to. The scoping rules must be defined separately by each embedding application.

11 15-Jan-03HL7 @ San Antonio11 Issues –Basic Data Types OCL has boolean, string, integer, and real as basic data types. This conflicts with HL7’s basic datatypes  We keep boolean and string as the basic data types in GELLO and use Integer and Real data types from HL7 data model.  HL7 data model should provide all the supporting operators for Integer and Real data types consistent with the semantics of GELLO operators.  Integer data type is not needed as a GELLO basic data type. GELLO does not handle arrays – GELLO uses collections--, and any return value from a query with type integer can be mapped to the data model. The same holds for reals.

12 15-Jan-03HL7 @ San Antonio12 Issues –Collections (1) OCL’s collection types overlap with HL7’s collection types. OCL has special syntax (  ) and useful operators (e.g., isEmpty, select) associated with collections. Collection types are to be supported by HL7 RIM data model. OCL-like collection operators must be added to collection classes in the HL7 RIM data model. Observation.select(coded_concept=’03245’) Notation problem with the previous example. Observation is not a collection class select is a collection method

13 15-Jan-03HL7 @ San Antonio13 Issues –Collections (2) We propose a generic collection class as part of the HL7 RIM data model. All classes in the data model can inherit the associated methods. We do not need to reintroduce the ‘arrow’ notation’. Collection types in HL7 should handle a singleton as a collection with one element Collection Class Select() selectLast() sortedBy() Observation value: ANY derivation… Act mood_cd: CS id: ll

14 15-Jan-03HL7 @ San Antonio14 Issues –Collection Operators (1) Collection Class select() selectLast() selectFirst() isEmpty() sortedBy() …  All classes in the data model can inherit the methods contained in the Collection class.  The used notation is the ‘dot’ notation for accessing object properties. Observation.select(coded_concept=’03245’) Observation.selectLast(coded_concept=“C0428279”)  These queries do not imply any order in the execution. Similar methods need to be defined for sorting and retrieving information.

15 15-Jan-03HL7 @ San Antonio15 Issues –Collection Operators (2) We are moving away from OCL notation for Collections –the ‘arrow’ notation, but are preserving the ‘dot’ notation of an Object Oriented data model. OCL ‘arrow’ notation: Observation →select(coded_concept=’03245’) Object Oriented ‘dot’ notation: Observation.select(coded_concept=’03245’)

16 15-Jan-03HL7 @ San Antonio16 Issues –Declarativeness of Queries  OCL’s query syntax is currently limited. It is being enhanced. Observation.select(coded_concept=“C0428279”).sort() implies that all observations with coded_concept=“C0428279” are first selected and then sorted.  We propose an interim solution, the addition of methods like selectSorted() so the above query would be: Observation.selectSorted(coded_concept=“C0428279”) Similar methods need to be defined for sorting and retrieving information.

17 15-Jan-03HL7 @ San Antonio17 Issues -Tuples  The tuple type should be added to and fully supported by the HL7 RIM data model.  A tuple combines elements with different types into an aggregate type.  Tuples are useful for queries returning multiple elements with different types like in joins and Cartesian products. medicationlab testdate coumadin 4mg inr = 3.8 01.01.02 coumadin 2mg inr = 2.5 01.10.02 tuples

18 15-Jan-03HL7 @ San Antonio18 Issues -Joins  OCL query syntax is limited to querying single classes only  Before defining the mechanisms for joins and Cartesian products we need to resolve other issues: Basic data types Collection operators to perform the join operation Tuple type as an aggregate type to store the result of a join operation.

19 Thank you


Download ppt "Update on the GELLO Expression and Query Language Margarita Sordo Brigham and Women’s Hospital Harvard Medical School HL7 Clinical Decision Support TC."

Similar presentations


Ads by Google