Stream: IG creation
Topic: Period elements specified with CQL Extension
Christopher Schuler (Mar 26 2018 at 01:33):
I have several test resources in my IG that use the http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression extension to specify date elements (mainly Period) by executing a CQL expression. For example:
<period>
<start>
<extension url="http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression">
<valueString value="Today()"/>
</extension>
</start>
<end>
<extension url="http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression">
<valueString value="Today()"/>
</extension>
</end>
</period>
I have an operation in my FHIR server that returns the resource(s) populated with the evaluated extension value. I did this so my test data wouldn't become deprecated the next day.
The issue is that this is causing several errors, which don't stop the build, like the following:
If present, start SHALL have a lower value than endnull [start.empty() or end.empty() or (start <= end)]
Am I doing this incorrectly? Should my extension be an expression that returns a FHIR.Period instead, without specifying "start" and "end"?
Grahame Grieve (Mar 26 2018 at 02:09):
this is an error in the R3 invariant, and I don't think you can work around it
Last updated: Apr 12 2022 at 19:14 UTC