FHIR Chat · USCore Model Info Extensions Question · cql

Stream: cql

Topic: USCore Model Info Extensions Question


view this post on Zulip Matt Sargent (Oct 14 2020 at 18:52):

I was looking over the USCore Model Info (from here: https://github.com/cqframework/cqf-tooling/blob/master/src/main/resources/org/opencds/cqf/tooling/modelinfo/uscore-modelinfo-3.1.0.xml) and I had a question about a couple of the USCore extensions.

BirthSexExtension has a baseType of System.String (https://github.com/cqframework/cqf-tooling/blob/50f199cd1a23a1c0c372e3e0a08574d21d5a250c/src/main/resources/org/opencds/cqf/tooling/modelinfo/uscore-modelinfo-3.1.0.xml#L108), whereas EthnicityExtension has a baseType of USCore.Extension (https://github.com/cqframework/cqf-tooling/blob/50f199cd1a23a1c0c372e3e0a08574d21d5a250c/src/main/resources/org/opencds/cqf/tooling/modelinfo/uscore-modelinfo-3.1.0.xml#L793).

My gut feeling would have been that both extensions would have the baseType of USCore.Extension. Does anyone have insight into why they have the different baseTypes? Is it because the BirthSexExtension is simple enough that you only ever really care about it having a single string value? Or should they both have baseTypes of Extension and this is some sort of error when creating the model info?

view this post on Zulip Bryn Rhodes (Oct 15 2020 at 21:30):

Yes, in the USCore model info, what we're doing is raising the extension/slice definitions to first class elements, so for simple extensions, we just use the actual type of the extension. The "target" element provides a mapping back to the underlying FHIR structures, and that mapping is expanded by the CQL-to-ELM translator so that underlying engines can still run the ELM directly against FHIR.


Last updated: Apr 12 2022 at 19:14 UTC