-
Enhancement
-
Resolution: Answered
-
Moderate
-
None
Currently, the QDM is a flat model; it does not allow for attributes to have a complex type. Every attribute must be a date, code, number, string, etc. This limitation is demonstrated in the "Encounter, Performed" data type attributes:
- facility location
- facility location arrival datetime
- facility location departure datetime
CQL allows complex attributes to be easily traversed using dot notation. Using the example above, instead of having the three attributes, "Encounter, Performed" could have a single "facility location" attribute that is of a complex type having the following sub attributes:
- type
- arrival datetime
- departure datetime
In CQL, you could access them like this:
["Encounter, Performed": "Inpatient"] E where E."facility location"."arrival datetime" during "Measurement Period"
This approach would be especially valuable in representing encounter diagnoses and principal procedures (although that is admittedly a more significant change than facility location).