Stream: IG creation
Topic: pattern[x]
Brian Reinhold (Nov 21 2018 at 17:41):
Can someone point me to some documentation and/or example of how to use pattern[x] in slicing?
Lloyd McKenzie (Nov 21 2018 at 17:48):
The genomics reporting IG uses it a lot. What are you trying to do?
Brian Reinhold (Nov 21 2018 at 17:49):
The genomics reporting IG uses it a lot. What are you trying to do?
Trying a desperate attempt to get around the Error in discriminator at Observation.component:supplementalTypesComponent.code.coding: slicing found of which I have 100s
Lloyd McKenzie (Nov 21 2018 at 17:50):
Take a look at the profiles in the genomics-reporting IG.
Brian Reinhold (Nov 21 2018 at 17:55):
Take a look at the profiles in the genomics-reporting IG.
@Lloyd McKenzie I do not understand the spreadsheet rendering of StructureDefinitions. I have always needed to go to some other project that creates Structure definitions directly to try and find help. Maybe actual structure definitions are somewhere else than in the /resources dircetory?
I tried pulling this out of the spread sheet in hopes that it would lead to something
http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/device-fish-probe
but I just get 404 errors.
Kevin Power (Nov 21 2018 at 18:01):
You can get to them like this: http://build.fhir.org/ig/HL7/genomics-reporting/StructureDefinition-device-fish-probe.json
Brian Reinhold (Nov 21 2018 at 18:07):
You can get to them like this: http://build.fhir.org/ig/HL7/genomics-reporting/StructureDefinition-device-fish-probe.json
@Kevin Power that helped, not exactly an element definition that I am used to but is the jist of 'pattern' that the pattern itself is defined in the slice?
Lloyd McKenzie (Nov 21 2018 at 18:13):
The pattern is declared on the slice and reflects requirements the instance must match to be considered part of that slice.
Brian Reinhold (Nov 21 2018 at 18:21):
The pattern is declared on the slice and reflects requirements the instance must match to be considered part of that slice.
@Lloyd McKenzie I understand the concept its just the how to do the syntax. I am mapping certain PHD attributes to Observation.components. They are distinguished by the code.coding.code/system elements. Both the code and the system are fixed values to identify the slice. BUT I want to allow someone to express the same concept in a different coding system. For example, look at this component element
"component": [ { "code": { "coding": [ { "system": "urn:iso:std:iso:11073:10101", // Identifies the slice along with code 68193 "code": "68193" } // put an additional code system system/code value here if you want that expresses the same concept as above ], "text": "MDC_ATTR_SUPPLEMENTAL_TYPES" }, "valueCodeableConcept": { "coding": [ { "system": "urn:iso:std:iso:11073:10101", "code": "150588" } ], "text": "MDC_MODALITY_SPOT" } } ]
That is why I have a slice on the code.coding. Is that extra slicing unnecessary?
Brian Reinhold (Nov 21 2018 at 18:42):
I removed the slicing on the Observation.component.code.coding element. Maybe it is not needed. So my effort looks as follows:
<element id="Observation.component"> <path value="Observation.component" /> <slicing> <discriminator> <type value="pattern" /> <path value="code.coding.code" /> </discriminator> <rules value="open" /> </slicing> </element> <!-- SUPPLEMENTAL TYPES COMPONENT --> <element id="Observation.component:supplementalTypesComponent"> <path value="Observation.component" /> <sliceName value="supplementalTypesComponent" /> <short value="Supplemental Type: A further description of the measurement type." /> <definition value="some text." /> <comment value="More text" /> <patternCodeableConcept> <code> <coding> <system value="urn:iso:std:iso:11073:10101"/> <code value="68198"/> </coding> </code> </patternCodeableConcept> </element> <element id="Observation.component:supplementalTypesComponent.code.text"> <path value="Observation.component.code.text" /> <definition value="It is recommended to display at least the reference identifier for the Supplemental-Types which is MDC_ATTR_SUPPLEMENTAL_TYPES" /> </element> <element id="Observation.component:supplementalTypesComponent.code.coding"> <path value="Observation.component.code.coding" /> <min value="1" /> </element> <element id="Observation.component:supplementalTypesComponent.code.coding.system"> <path value="Observation.component.code.coding.system" /> <min value="1" /> <fixedUri value="urn:iso:std:iso:11073:10101" /> </element> <element id="Observation.component:supplementalTypesComponent.code.coding.code"> <path value="Observation.component.code.coding.code" /> <definition value="68193 is the 32-bit nomenclature code indicating a 'Supplemental-Types' value" /> <min value="1" /> <fixedCode value="68193" /> <binding> <strength value="required"/> <valueSet value="http://hl7.org/fhir/uv/phd/ValueSet/11073MDCobject"/> </binding> </element> <element id="Observation.component:supplementalTypesComponent.value[x]:valueCodeableConcept"> <path value="Observation.component.valueCodeableConcept" /> <sliceName value="valueCodeableConcept" /> <definition value="The information determined as a result of making the observation, if the information is a code." /> <min value="1" /> <type> <code value="CodeableConcept" /> </type> </element> and so-on
I hope this allows one to put in alternative coding systems ....
But now I get this error
The value provided ('68193') is not in the value set http://hl7.org/fhir/uv/phd/ValueSet/11073MDCobject (http://hl7.org/fhir/uv/phd/ValueSet/11073MDCobject, and a code is required from this value set) (error message = Access violation at address 0000000000B9CF8F in module 'FHIRServer.exe'. Read of address 0000000000000000) (see Tx log)
I will say that the code 68193 is in the value set referenced.
Lloyd McKenzie (Nov 21 2018 at 18:53):
Your path for the pattern should just be code, not code.coding.code. I.e. it needs to be the path to the element that contains the pattern. The pattern will ensure that one repetition of coding matches the sub-elements specified. It's totally fine to have other repetitions of coding that don't match.
Brian Reinhold (Nov 21 2018 at 22:19):
Your path for the pattern should just be code, not code.coding.code. I.e. it needs to be the path to the element that contains the pattern. The pattern will ensure that one repetition of coding matches the sub-elements specified. It's totally fine to have other repetitions of coding that don't match.
Thanks you. Will try
@Lloyd McKenzie Didn't work so well. Got many more errors.
Lloyd McKenzie (Nov 22 2018 at 05:22):
Which were?
Brian Reinhold (Nov 22 2018 at 11:54):
Which were?
The main error of interest is
/f:StructureDefinition/f:differential/f:element/f:patternCodeableConcept error Undefined element 'code'
which makes sense I would guess since the (pattern)CodeableConcept does not have a 'code' element. It has a coding.code element though.
I am getting in the order of 1000 errors with this (most of which are repeats). Is there a way I can get a list of these errors? Using code.coding.code it drops to 600
Brian Reinhold (Nov 22 2018 at 11:57):
@Lloyd McKenzie Can I add the binding to my pattern?
<patternCodeableConcept> <code> <coding> <system value="urn:iso:std:iso:11073:10101"/> <code value="68198"/> <binding> <strength value="required"/> <valueSet value="http://hl7.org/fhir/uv/phd/ValueSet/11073MDCobject"/> </binding> </coding> </code> </patternCodeableConcept>
The answer turns out to be NO
Lloyd McKenzie (Nov 22 2018 at 15:03):
Right. Because a CodeableConcept doesn't contain an element named "code", just an element named "coding".
Last updated: Apr 12 2022 at 19:14 UTC