Stream: implementers
Topic: fhirpath in profiles
Jens Villadsen (Oct 31 2019 at 12:21):
how much is fhirpath used in profiles as a matter to express business requirements? Is it considered exotic or best practice to do so. Lets say that I need to do a profile on eg appointment, and I need two extensions: one for having a responsible careteam and another extension to hold a list of participating careteams. If it is a business requirement that the responsible careteam must always be present in the as part of the participating careteams, it would be possible to add this constraint as a fhirpath constraint. I'm just wondering here if that is considered exotic practice or if most others would place such logic in the actual code
Michel Rutten (Oct 31 2019 at 13:08):
I'd consider fhirpath as a fundamental and critical aspect of FHIR, certainly not exotic. Simplifier contains many profiles with user-defined fhirpath constraints. The FHIRPath engine implementations in both the Java & .NET FHIR API stacks are relatively stable and largely feature complete.
Just keep in mind that Fhirpath constraints are less explicit and readable in comparison to a slicing constraints. Generally, I'd recommend slicing constraints if the use case allows it, because slices can be clearly visualized in a tree rendering. However fhirpath constraints are much more powerful.
Jens Villadsen (Oct 31 2019 at 13:13):
I can't see how my mentioned example case can be expressed using slicing. Could you send me a link to some examples on simplifier where it is used.
PS - I've used fhirpath pretty much when expressing custom defined searchparameters - we just haven't used them as constraints on profiles before (besides the one's that are defined by the spec)
Michel Rutten (Oct 31 2019 at 13:39):
For example https://simplifier.net/NictizSTU3-Zib2017/nl-core-address (element postalCode
)
Jens Villadsen (Oct 31 2019 at 13:43):
thx - I ended up using
extension.where('http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-responsible').valueReference in participant.extension.where('http://example.org/fhir/StructureDefinition/ehealth-ext-careteam').valueReference or extension.where('http://hl7.org/fhir/responsible').valueReference in participant.actor.reference
for my case
Last updated: Apr 12 2022 at 19:14 UTC