GNU Health/Using the FHIR REST server

From Wikibooks, open books for an open world
Jump to navigation Jump to search

FHIR Overview[edit | edit source]

Fast Healthcare Interoperability Resources (FHIR) is a standard for exchanging healthcare information electronically developed by HL7. The standard defines a common interface for medical software interoperability. For more reading, look at the FHIR standard.

URL Structure[edit | edit source]

The FHIR standard defines a REST API, a set of interactions with each resource. Each resource handles different types of information. Currently, the GNU Health FHIR server supports 12 resources:

  • Conformance: Describes the server's FHIR capabilities.
  • Patient: Patient information, like email, address, SSN, etc.
  • DiagnosticReport: Completed lab tests, but not the data
  • Observation: Lab data, like Uric Acid values
  • Practitioner: Health professionals and their information
  • Procedure: Surgeries/operations
  • Condition: Diseases/diagnoses
  • FamilyHistory: Family histories of patients
  • Medication: Medications (not prescriptions!)
  • MedicationStatement: Medications taken by a patient
  • Immunization: Immunizations
  • Organization: Institutions, departments, companies, etc.

Each resource has its own endpoint. For example, the Patient endpoint is found at /Patient, the DiagnosticReport endpoint at /DiagnosticReport, and so on. The only exception to this naming schema is the Conformance endpoint which is found at / and /metadata.

The interactions use HTTP verbs. Simple read and search interactions with GET, and so on.

For further reading into the REST design, read the documentation

Note: Currently, the GNU Health FHIR server has no write functionality.

Authentication[edit | edit source]

All resources, except for Conformance, require authentication. The server authenticates with the user credentials of the underlying GNU Health/Tryton server. Login with your user credentials at /auth/login. Logout at /auth/logout. There is a simple welcome page for logged-in users at /auth/home.

Searching / Listing[edit | edit source]

To search a resource, simply add arguments to the endpoint to refine the search. For example, /Patient, will return all the patients on the server. /Patient?name=ana will return all the patients with Ana in their name.

Note: Many search criteria for the GNU Health FHIR server are not supported yet. Refer to the FHIR documentation for more information.

Test Server Examples[edit | edit source]

Some examples with the community FHIR server (may need to sign in):



FHIR REST server · Synchronization Guide