0

Is there a complete or partial JSON schema for HL7 FHIR resources? I saw this. http://www.interopen.org/candidate-profiles/care-connect/CareConnect-AllergyIntolerance-1.html

But the JSON scchema is not available. This is also not functioning.

sowmiyaksr
  • 169
  • 5
  • 18

3 Answers3

2

JSON schemas will be published as a standard part of release 3. You can find the current draft here: http://build.fhir.org/fhir.schema.json.zip

There's still a bit of fine-tuning to do. Feedback welcome.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Am using this. For an simple input like this { "resourceType": "AllergyIntolerance", "identifier" : "01", "patient" : { "reference" : "Patient/0002" } } , I get invalid json. Since the schema cannot resolve, DomainResource.schema.json#/definitions/DomainResource. Similarly for Reference.schema.json. Do I need to edit the id part of schema to point my local file? this one , "id": "http://hl7.org/fhir/json-schema/AllergyIntolerance" – sowmiyaksr Jan 03 '17 at 07:56
  • I changed the "$ref" too, to point the local schema files. Now working for me. Thank you @Lloyd – sowmiyaksr Jan 03 '17 at 18:32
1

You may try this: https://github.com/glennjones/hapi-swagger and obtain the json schemas from swagger.json.

erosb
  • 2,943
  • 15
  • 22
1

You can run on your computer terminal:

sudo curl -i -H "Accept: [VER-HEAD]" https://your-fhir-base-url/metadata
  • use "application/json+fhir" for DSTU2 compatible
  • use "application/fhir+json" for anything greater than STU2

And the response will return JSON data on your terminal

akiespenc
  • 305
  • 3
  • 8