Stream: IG creation
Topic: is this FHIR Path translation correct?
Eric Haas (Jun 28 2020 at 01:53):
We have a tracker to change :
the invariant for "A code in Condition.category SHOULD be from US Core Condition Category Codes value set."
from:
where(category in 'http://hl7.org/fhir/us/core/ValueSet/us-core-condition-category').exists()
to:
where(category.memberOf('http://hl7.org/fhir/us/core/ValueSet/us-core-condition-category')).exists()
I tested it and am not getting any build errors but also not getting expected best practice notice in QA using either syntax above. I'm not really concerned about the failure to get a best practice warning if is a tooling issue. (can live with that). I am more concerned if the FHIR Path is wrong.
FYI the salient part in the SD is here:
constraint:
- extension:
- url: 'http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice'
valueBoolean: true
key: us-core-1
severity: warning
human: >-
A code in Condition.category SHOULD be from US Core Condition Category
Codes value set.
expression: >-
where(category.memberOf('http://hl7.org/fhir/us/core/ValueSet/us-core-condition-category')).exists()
xpath: (no xpath equivalent)
Eric Haas (Jun 29 2020 at 21:05):
also a tracker to change this:
($this.agent.who.resolve().is Practitioner or Device) implies exists()
to
"(($this.agent.who.resolve() is Practitioner) or ($this.agent.who.resolve() is Device)) implies exists()"
but again not able to test - there is no error in ig when element missing and reference is Practitioner
does it look correct
Eric Haas (Jun 29 2020 at 21:06):
is there a way to test it outside of IG ?
Grahame Grieve (Jun 29 2020 at 21:20):
I don't know of a way to test this one
Last updated: Apr 12 2022 at 19:14 UTC