Stream: shorthand
Topic: regex in coding.code
Bob Milius (Mar 19 2020 at 15:24):
I posted a question in the IG Creation stream about constraining a Observation.valueCodeableConcept.coding.code to a regular expression. @Mark Kramer showed an example using shorthand which will be available with sushi soon. Would I be able to do something like this?
* valueCodeableConcept.coding ^slicing.discriminator.type = #value * valueCodeableConcept.coding ^slicing.discriminator.path = "system" * valueCodeableConcept.coding ^slicing.rules = #open * valueCodeableConcept.coding ^slicing.description = "slicing on valueCodeableConcept" * valueCodeableConcept.coding contains GL 1..1 MS * valueCodeableConcept.coding[GL].system = "https://glstring.org" * valueCodeableConcept.coding[GL].code obeys GLSC Invariant: GLSC Severity: #warning Description: "Use GL String Code to report HLA genotype" Expression: "matches('^hla#')"
Nick Freiter (Mar 19 2020 at 15:54):
@ Bob Milius Invariant
s are actually available and released in SUSHI v0.10.0
. Sorry for the confusion on that. The FSH that you have posted above looks valid to my eye, so I'd try running it through SUSHI. If you have an older version of SUSHI and need to update, npm install -g fsh-sushi
should do that for you.
Bob Milius (Mar 19 2020 at 16:30):
@Nick Freiter thanks!
Sushi ran without errors. I'll see if some of my examples validate against the IG.
Last updated: Apr 12 2022 at 19:14 UTC