FHIR Chat · Interpretation for obs-7 rule, Observation · implementers

Stream: implementers

Topic: Interpretation for obs-7 rule, Observation


view this post on Zulip Constantin Corman (Jun 29 2021 at 11:13):

Hello!
We have a dilemma regarding how we should interpret the rule obs-7 present for Observation:
“If Observation.code is the same as an Observation.component.code then the value element associated with the code SHALL NOT be present”
We wonder if for this rule we should compare
1. Observation.code.coding.code with Observation.componenet.code.coding.code
2. Observation.code.coding with Observation.componenet.code.coding
3. The entire tree Observation.code vs Observation.component.code

If we compare the entire tree then the example below would respect the rule because Observation.code.text is different from Observation.component.code.text, even if Observation.code.coding = Observation.component.coding:

Observation.code
"code": {
"text": "text",
"coding": [
{
"system": http://loinc.org,
"code": "9279-1",
"display": "Respiratory rate"
}
]
},

Observation.component.code

"code": {
"text": "some text",
"coding": [
{
"system": http://loinc.org,
"code": "9279-1",
"display": "Respiratory rate"
}
]
},

If I validate the example above on http://clinfhir.com/validateResource.html with “Ontoserver R4” then obs-7 rule will fail (we have the same code.coding)
I validated the example above with “FHIR test 4” on the same site and received no errors.

The question is: is it the rule wrongly expressed ( it should state “If Observation.code.coding is the same as an Observation.component.code.coding...") or the validators don’t do the write comparison and we should actually compare Observation.code vs Observation.component[x].code ?

Thanks in advance!

view this post on Zulip Lloyd McKenzie (Jun 29 2021 at 13:54):

It's looking for a match on any of the codings. If there's a coding in the Observation.code that is the same as a coding in an Observation.component.code, the invariant will trigger. What's in CodeableConcept.text doesn't matter. I don't know whether the compare on the coding pays any attention to Coding.display.


Last updated: Apr 12 2022 at 19:14 UTC