FHIR Chat · Constrain a string · conformance

Stream: conformance

Topic: Constrain a string


view this post on Zulip Rik Smithies (Aug 17 2021 at 16:52):

Is it possible to constrain a string to be one of a set of values? This is for Composition.section.title.
Ideally something like a preferred value set binding.

The only things I can think of are:

Neither seem good.

view this post on Zulip Lloyd McKenzie (Aug 17 2021 at 17:11):

You can put a value set on a string

view this post on Zulip Oliver Egger (Aug 17 2021 at 18:51):

@Rik Smithies we used the first approach for our document (section) titles: http://fhir.ch/ig/ch-emed/StructureDefinition-ch-emed-composition-medicationcard.html with a constraint:

($this='Medikationsplan' and %resource.language.startsWith('de')) or ($this='Plan de médication' and %resource.language.startsWith('fr')) or ($this='Piano farmacologico' and %resource.language.startsWith('it')) or ($this='Medication Card' and %resource.language.startsWith('en'))

we were not aware that you can bind a ValueSet to a string as @Lloyd McKenzie mentions, but for that we would need to create for each string a ValueSet and a CodeSystem for all titles and we would loose the language check.

view this post on Zulip Rik Smithies (Aug 18 2021 at 20:12):

thanks both. I have only just realised that there is any documentation for ElementDefinition elements, because the UML links that I always use are all broken... FHIR#33207

view this post on Zulip Kevin Mayfield (Aug 19 2021 at 07:24):

Have also started going down the same route as @Oliver Egger and using constraints.
image.png
https://simplifier.net/guide/nhsdigital/NHSDigital-Practitioner


Last updated: Apr 12 2022 at 19:14 UTC