Stream: shorthand
Topic: Extension on a Profile
Brian Kaney (Jun 17 2020 at 19:01):
Hi folks -- I am trying to do this sort of thing, but I could be confused:
Profile: DataElementObservation
Parent: Observation
Description: "Base data element using Observation, adds in CPG valueExpression and instantiates case feature behavior"
* ^meta.profile[0] = http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-casefeaturedefinition
* ^experimental = true
* ^extension
contains http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-inferenceExpression
named inferenceExpression 0..1 MS
E.g. add an extension to the StructureDefinition itself. There are syntax errors mismatched input 'contains' expecting '='
. I assume I don't know what I am doing...
David Pyke (Jun 17 2020 at 19:04):
You don't need the ^ before extension.
Brian Kaney (Jun 17 2020 at 19:05):
David Pyke said:
You don't need the ^ before extension.
I want the extension on the structure definition itself though
Chris Moesel (Jun 17 2020 at 19:06):
@Brian Kaney -- but you don't want to constrain the SD to say it may contain that extension then, right? You actually want to add the extension with a value to the SD representing that profile. Is that right?
Brian Kaney (Jun 17 2020 at 19:07):
In this case I want to constrain the SD. Hey @Bryn Rhodes do you think you could help explain this a bit more?
Chris Moesel (Jun 17 2020 at 19:15):
To constrain an SD, then you need to profile StructureDefinition
-- because you can only constrain things you inherit. When you create a profile on Observation
, you can only constrain Observation
itself. The profile on Observation is an instance of an SD, so it only makes sense to set values in the SD, not to constrain it... Unless I'm really misunderstanding something here.
Brian Kaney (Jun 17 2020 at 19:34):
I see, this I think works:
Profile: BaseDataElement
Parent: http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-casefeaturedefinition
* extension
contains http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-inferenceExpression
named inferenceExpression 0..1 MS
Profile: DataElementObservation
Parent: Observation
Description: "Data element using Observation, adds in CPG valueExpression and instantiates case feature behavior"
* ^meta.profile[0] = http://company/StructureDefinition/BaseDataElement
* ^experimental = true
Bryn Rhodes (Jun 17 2020 at 21:17):
Right, what we're saying with cpg-caseFeatureDefinition is that it defines extensions on StructureDefinition to allow you to specify the inference expression for the data element. But if I'm reading that BaseDataElement right, it's not saying anything more than is already said by the cpg-casefeaturedefinition profile (that inferenceExpression is a mustSupport 0..1 extension), right?
Brian Kaney (Jun 17 2020 at 23:45):
Yea @Bryn Rhodes , I am pruning down the example to get the structure correct.
Last updated: Apr 12 2022 at 19:14 UTC