Title: GELLO Update
1(No Transcript)
2GELLO Update
- HL7 Working Group Meeting _at_ Baltimore
- 2nd October 2002
- Aziz Boxwala and Robert Greenes
- Brigham and Womens Hospital
- Harvard Medical School
3What is GELLO?
- Expression language
- Query language
- maps variables in expressions to data in external
systems - Embedded language
- Can be used as part of other specs
- MLM, guidelines, RIM, template constraints, etc.
- Goal is to facilitate sharing of knowledge
4Model
5Status report
- As of May 2002 meeting, we had agreed to bring
this to TC ballot - But decided to defer because of desire to
- Reduce complexity of syntax
- Make more compatible with generic language
specification efforts - Eliminate side effects in expressions
- Facilitate use as embedded language distinct from
other elements of an application, e.g., those
that do assignment or flow control - Revised language specification developed
- To be presented here
6Requirements - 1
- Work with an object-oriented data structure
compatible with the RIM - Should support different data models (such as
VMR) - Be platform independent
- Be easy to write and read for defined class of
users - Be usable in different applications (Arden
MLMs, guidelines, templates, ) - Leverage existing standard frameworks/languages
where possible
7Requirements - 2
- Be side-effects free
- Built-in data types (if any) should be compatible
with those defined in the RIM - Be extensible
- classes must be compatible with the RIM and
language framework - Be free of ambiguities
8Using OCL grammar
- Object Constraint Language
- Part of UML spec
- Object Management Group standard
- Language for specifying invariants on classes and
its member attributes and functions - Not a complete programming language
- Side-effects free
- Maps to our needs and requirements
9An example with an MLM
maintenance title Screening for elevated
calcium-phosphate product library purpose
provide an alert if the product of the blood
calcium and phosphorus exceeds a certain
threshold in the setting of renal failure
explanation An elevated Ca-PO4 product suggests
a tendency toward renal osteodystrophy and
predisposes to soft-tissue calcification
10MLM
knowledge data / trigger on Ca, PO4 or Cr
/ creatinine read last
'dam'"PDQRES2",'constraints'"C"
'32752' calcium read last
'dam'"PDQRES2",'constraints'"C"
'32109' phosphate read last
'dam'"PDQRES2",'constraints'"C"
'33824' creatinine_threshold 2
product_threshold 70
11MLM
logic if (creatinine is not number) or
(calcium is not number) or (phosphate is
not number) then conclude false
endif product calcium phosphate if
(creatinine gt creatinine_threshold) and
(product gt product_threshold) then
conclude true else conclude false
endif
12MLM in GELLO (data slot)
data creatinine Observation.allInstances-gt
select(coded_concept "C0428279") .sort(critical_
time.high).last() calcium
Observation.allInstances -gtselect(coded_concept
"C0428302") .sort(critical_time.high). last()
phosphate Observation.allInstances
-gtselect(coded_concept "C0428304") .sort(critic
al_time.high).last()
ListltObservationgt last(select obs from
Observation as obs where obs.service_cd.equals
(new Concept(MTH, C042879)) sort
descending obs.critical_time.high)
creatinine read last 'dam'"PDQRES2",'co
nstraints'"C" '32752'
There are ways to make the GELLO query syntax
easier for example by defining class/static
functions in VMR classes to retrieve
instances Observation.select(coded_concept
"C0428279").last()
13 MLM in GELLO (data slot)
renal_failure_threshold PhysicalQuantity.new(2.
0, "mg/dl") renal_failure if
creatinine-gtnotEmpty and creatine.observed_quan
tity gt renal_failure_threshold then
true else false endif threshold_for_osteodystroph
y 70 calcium_phosphate_product if
calcium-gtnotEmpty and phosphate-gtnotEmpty
then calcium.observed_quantity.value
phospate.observed_quantity.value else -1 endif
14 MLM in GELLO
logic renal_failure and calcium_phosphate_product
gt threshold_for_osteodystrophy
if (creatinine is not number) or (calcium is not
number) or (phosphate is not number) then
conclude false endif product
calcium phosphate if (creatinine gt
creatinine_threshold) and (product gt
product_threshold) then conclude true
else conclude false endif
15Implementation model
Application (e.g., Arden alert engine)
GELLO Interpreter
evaluate(ab)
result 7
Variable evaluator
valueOf(a)
5
Observation.allInstances-gtselect()
Data retrieval
resultCollection/tuple
16Issues
- Side-effect free language
- Constructors
- Restructuring of MLM Let expressions
- Built-in datatypes
- Same specification or different?
- Reconciling OCL standard lib with HL7 datatypes
- Writing back data
- Observation.write()
- Exception management