FHIR Chat · string binding · shorthand

Stream: shorthand

Topic: string binding


view this post on Zulip Jens Villadsen (Dec 06 2021 at 15:29):

Is there an easy way to state that a string (value on Identifier) should be treated as a uuid type - or should I just write an invariant that does the datatype check?

view this post on Zulip Jens Villadsen (Dec 06 2021 at 15:37):

Like this ... https://build.fhir.org/ig/hl7dk/dk-core/branches/1.1.0/StructureDefinition-dk-core-kombit-org-identifier.html#constraints

view this post on Zulip Jens Villadsen (Dec 06 2021 at 15:39):

Its the same as the invariant here: http://build.fhir.org/datatypes.html#uuid

view this post on Zulip Chris Moesel (Dec 06 2021 at 19:17):

I think you need to apply the invariant. Luckily, in FSH, you can define an invariant like this once and then apply it in multiple places. I suppose you also might be able to profile string and put the invariant on its root element, but I don't know if other tools would expect a profile on a primitive type -- so that could be risky.


Last updated: Apr 12 2022 at 19:14 UTC