FHIR Chat · representing patternIdentifier · shorthand

Stream: shorthand

Topic: representing patternIdentifier


view this post on Zulip Giorgio Cangioli (Apr 21 2020 at 15:25):

what is the way to represent this with fsh ?

<element id="Practitioner.identifier">
      <path value="Practitioner.identifier"/>
      <slicing>
        <discriminator>
          <type value="pattern"/>
          <path value="$this"/>
        </discriminator>

<.......>

    <element id="Practitioner.identifier:codiceFiscale">
      <path value="Practitioner.identifier"/>
      <sliceName value="codiceFiscale"/>
        <patternIdentifier>
            <system value="http://hl7.it/sid/codiceFiscale"/>
        </patternIdentifier>
    </element>

view this post on Zulip Jean Duteau (Apr 21 2020 at 15:33):

Profile: GiorgioPractitioner
Parent: Practitioner

  • identifier ^slicing.discriminator.type = #pattern
  • identifier ^slicing.discriminator.path = "$this"
  • identifier ^slicing.rules = #open
  • identifier contains codiceFiscale 0..1
  • identifier[codiceFiscale].system = "http://hl7.it/sid/codiceFiscale"

view this post on Zulip Jean Duteau (Apr 21 2020 at 15:34):

that doesn't end up with exactly what you have, but I think it is equivalent

view this post on Zulip Giorgio Cangioli (Apr 21 2020 at 15:35):

thanks Jean

view this post on Zulip Giorgio Cangioli (Apr 21 2020 at 15:41):

this is what I suppose I did.. but if I'm not wrong this puts the pattern at the system level.

view this post on Zulip Giorgio Cangioli (Apr 21 2020 at 15:43):

The problem is that in this case an error is returned when my example is validated during the build.
The same instance is instead properly validated when I use the syntax described above (with the pattern at the identifier level).

... I'll investigate further to see if i did anything wrong on my side :-)

view this post on Zulip Jean Duteau (Apr 21 2020 at 15:43):

do you want to send me your sample and I can see what I did wrong? :)

view this post on Zulip Jean Duteau (Apr 21 2020 at 15:47):

hmm, you are right. that's not the right way to define the pattern

view this post on Zulip Jean Duteau (Apr 21 2020 at 15:50):

This works and gives you exactly what you had...

  • identifier ^slicing.discriminator.type = #pattern
  • identifier ^slicing.discriminator.path = "$this"
  • identifier ^slicing.rules = #open
  • identifier contains codiceFiscale 0..1
  • identifier[codiceFiscale] ^patternIdentifier.system = "http://hl7.it/sid/codiceFiscale"

view this post on Zulip Giorgio Cangioli (Apr 21 2020 at 15:54):

:tada: thanks now it works :-)


Last updated: Apr 12 2022 at 19:14 UTC