Stream: implementers
Topic: Check that a specific code occurs at least once in a coda...
Moritz Kähler (Oct 19 2020 at 12:41):
Hi all,
I want to define a profile on observation resource, that allows multiple coding's within Observation.code. But the profile should check that a specific code appears at least once in the coding list. Additional undefined codes are allowed.
I could achieve this by creating a slice with min cardinality = 1. But I wonder weather there is an easier way without slicing.
Thank you in advance!
Lloyd McKenzie (Oct 19 2020 at 15:25):
Use patternCodeableConcept with a pattern that defines the desired coding. Pattern allows other codings to be present
Moritz Kähler (Oct 21 2020 at 16:39):
Would you recommend to use patternCodableConcept instead of slicing?
Lloyd McKenzie (Oct 21 2020 at 19:45):
It's less work to maintain and somewhat easier for implementers to read, so yes.
David Pyke (Oct 21 2020 at 19:52):
Where can I find docs on patternCodableConcept?
Lloyd McKenzie (Oct 21 2020 at 19:54):
There aren't any specific to patternCodeableConcept. There's documentation in the core spec on ElementDefinition.pattern[x].
David Pyke (Oct 21 2020 at 19:54):
That's a start. I can work with that
Richard Townley-O'Neill (Oct 22 2020 at 05:45):
On complex elements with a fixed[x] omitted elements are prohibited, with pattern[x] they are unconstrained.
Richard Townley-O'Neill (Oct 22 2020 at 05:46):
That interpretation has worked OK for me, so far.
Moritz Kähler (Oct 26 2020 at 13:49):
Thanks for the replies. But I'm not able to create this patterns. Could you provide a pattern to replace the slicing on Observation.code.coding in this example? ( https://simplifier.net/healthyme/bloodpressure)
Last updated: Apr 12 2022 at 19:14 UTC