srinath
srinath

Reputation: 2998

custom key value pair in fhir json

i have mapped around 20 fields from the sample data. All of them come under Observation category. I have a field/Label which we created to denote each patient.

"PatientLabel" : 0

I understand FHIR is all about fixed set of items. But, is there a way to include this in FHIR Json. i would need this information while processing.

  "extension": [
  {
    "name": "PatientLabel",
    "value": 0
  }

tried the above one.. FHIR validator is throwing error

Upvotes: 0

Views: 474

Answers (1)

Lloyd McKenzie
Lloyd McKenzie

Reputation: 6803

Extensions don't have a 'name', they have a 'url'. Also, 'value' is a polymorphic type, so you'd need "valueInteger" or "valueDecimal". That said, "0" seems an unusual value for something titled "patient label". Normally, the Patient would be in the Observation.subject. If you just have a label and not a reference, you could use subject.display and not need an extension at all...

Upvotes: 1

Related Questions