Stream: inferno
Topic: Single Patient API Observation Tests
Alexander Zautke (Nov 02 2020 at 17:47):
I'm currently trying to pass the all Observation tests in the Single Patient API collection. When using only Observations with "effectiveDateTime", I get an (expected) warning saying that no resource was provided with effectivePeriod in it. However, as soon as I upload an Observation using effectivePeriod, I get the following error message:
"Invalid Observation: Observation.effective.ofType(Period): vs-1: if Observation.effective[x] is dateTime and has a value then that value shall be precise to the day [($this as dateTime).toString().length() >= 8]"
The needed precision is given. Any pointers on what might cause the issue? pediatric-weight-for-height-test.json
Yunwei Wang (Nov 02 2020 at 17:56):
This is a constraint defined in FHIR Vital Sign Profile:
image.png
Yunwei Wang (Nov 02 2020 at 17:58):
I am not sure if this FHIRPath is correct. When the value is Period type, ($this as dateTime)
would return empty based on my limited knowledge about FHIRPath. Maybe @Grahame Grieve can weight in on this
Alexander Zautke (Nov 04 2020 at 15:53):
What would be the recommendation going forward?
Robert Scanlon (Nov 04 2020 at 17:48):
We are still looking into this. We had just updated our reference data set to include effectivePeriod, and ran into the exact problem you are seeing, which makes me think it is a problem with the FHIRPath in the vital-sign profile, or the HL7 Validator (and not your data). But we are still looking into it.
Alexander Zautke (Nov 04 2020 at 17:49):
Thank you for the update!
Robert Scanlon (Nov 04 2020 at 17:51):
@Eric Haas -- does this invariant look right to you?
Eric Haas (Nov 04 2020 at 18:22):
I'm no fhirpath expert but lemme test it and see. ( Suprised it has been undiscovered this long.)
Eric Haas (Nov 04 2020 at 19:13):
I think it needs to be:
Observation.effectiveDateTime implies Observation.effectiveDateTime.toString().length() >= 8
I am not in front of a PC to test it out (not aware of OSX testing tools)
@Grahame Grieve ?
Made a tracker to correct J#29654
Robert Scanlon (Nov 04 2020 at 19:43):
Thanks @Eric Haas! Not to jump ahead, but assuming this is the problem/solution, would fixing this require a FHIR v4.0.2 be published?
Eric Haas (Nov 04 2020 at 19:58):
this is a FHIR4b or FHIR5
Yunwei Wang (Nov 05 2020 at 14:37):
There is a similar discussion https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Observation.20FHIRPath.20expressions.3F
Robert Scanlon (Nov 05 2020 at 14:55):
I am concerned how long this will take to make it back into US Core @Eric Haas, if this kind of fix is targeted at FHIR4b/FHIR5. I assume it will be some time before US Core is updated to point to FHIR4b/FHIR5? And in the meantime the use of Observation.effectivePeriod is non-conformant (assuming the FHIRPath is wrong as we suspect).
Yunwei Wang (Nov 05 2020 at 15:03):
@Eric Haas We also found the same FHIRPath is used in us-core-1 constraint in US Core Lab Result profile
I created FHIR-29658 for US Core. Can you put it in discussion at next US Core call?
Eric Haas (Nov 05 2020 at 16:40):
Robert Scanlon said:
I am concerned how long this will take to make it back into US Core Eric Haas, if this kind of fix is targeted at FHIR4b/FHIR5. I assume it will be some time before US Core is updated to point to FHIR4b/FHIR5? And in the meantime the use of Observation.effectivePeriod is non-conformant (assuming the FHIRPath is wrong as we suspect).
I cannot do anything to speed up the process, w can't just change the core. So need to deal with as a known issue.
Yunwei Wang (Nov 06 2020 at 18:43):
Here is the information I collected from different sources:
- Next FHIR release is R4B which will fix the the vs-1 constraint
- Next US Core release is Q2 2021 which will fix the us-core-1 constraint
- US Core 2021 release is based on R4 v4.0.1, not R4B
Unless there is way to back port this fix to R4 v4.0.1, this issue will not be fully addressed before US Core 2022 release.
Grahame Grieve (Nov 12 2020 at 10:43):
I agree that the FHIRPath is wrong
Last updated: Apr 12 2022 at 19:14 UTC