-1

I have to send a json message for fhir patient resource's, which is having the identifier element sliced into further as epiNo , and CivilNo with discriminator as "use", eg: epiNo as use="official" and civilid as use="usual"

how to send "identifier": with these two values?

Jas
  • 1

1 Answers1

0

When sending an instance, slicing is not visible. Slicing is something that happenes when creating a profile (i.e. a StructureDefinition instance). In your Patient instance, you'd simply have two (or maybe more) occurrences in the "identifier" array, with one having "use": "official" and one having "use": "usual"

Note that if you want specific identifiers, you may want to consider slicing by Identifier.type or Identifier.system, as there are numerous identifiers that could have a use of "official" or "usual" that aren't the ones you listed.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • actually i wanted to make one of the identifier as mandatory ie, epiNo(official) as a mandatory(1..1) and the other one as optional.for this purpose i sliced identifier and added these two elements and made one of them mandatory. when am sending an instance as "identifier"[{{"use":"official","value":"12345"},{"use":"usual","value":"crno12345"}}] – Jas Jan 04 '17 at 16:56
  • actually i wanted to make one of the identifier as mandatory ie, epiNo(official) as a mandatory(1..1) and the other one as optional.for this purpose i sliced identifier and added these two elements and made one of them mandatory. when am sending an instance as "identifier"[{{"use":"official","value":"12345"},{"use":"usual","value":"crno12345"}}] .This throws error that patient.identifier expects minimum=1 found=0. i am not able to make out what exactly is wrong,whether the format in sending the instance or there could be a problem with the slicing made in the mypatient profile. – Jas Jan 04 '17 at 17:04
  • Are you using the latest and greatest validator? (the one from build.fhir.org) If the profile's been defined properly, your instance should be fine. Can you attach your instance and the profile you're validating against? – Lloyd McKenzie Jan 04 '17 at 18:42