Skip to content

Instantly share code, notes, and snippets.

@niquola
Last active December 10, 2023 09:45
Show Gist options
  • Save niquola/b7bce73d581425f147bad4a6f674a363 to your computer and use it in GitHub Desktop.
Save niquola/b7bce73d581425f147bad4a6f674a363 to your computer and use it in GitHub Desktop.
FHIR & OpenAPI questions

FHIR to OpenAPI translation

FHIR specify set of Resources with dataelements with specific datatype as informational model - StructureDefinition resource. So we have to convert StructureDefinition into JSON schema.

Also FHIR has specification of REST API by convention - http://hl7.org/fhir/http.html, and ability to extend API by custom Operations - http://hl7.org/fhir/operationslist.html

So we could generate swagger document from http://hl7.org/fhir/capabilitystatement.html and list of operations.

JSON schema

Convertion of Primitives

FHIR has set of primitive and complex types - http://hl7.org/fhir/datatypes.html

Polymorphic/Union types (Choice in terms of FHIR)

FHIR has the notion of union types (choice).

Current representation in JSON is postfix notation:

http://build.fhir.org/formats.html#choice

Terminology bindings

Operations

Primitive Extensions

References

Operations / REST API

@swapnilbjadhav
Copy link

Hey @niquola what extensions you have added to the capability statement json schema to work? Can you share it even i am trying to incroporate it in my FHIR server itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment