The FHIR API
CommCare offers a FHIR R4 API. It returns responses in JSON.
The FHIR API is not yet targeted at external users. API users must be superusers.
The API focuses on the Patient resource. The endpoint for a Patient
To search for the patient’s Observations, the API accepts the
“patient_id” search filter. For example,
Using the FHIR API
Dimagi offers tools to help others use the CommCare HQ FHIR API:
A CommCare HQ Sandbox
The sandbox is a suite of Docker containers that launches a complete CommCare HQ instance and the services it needs:
Clone the CommCare HQ repository:
$ git clone https://github.com/dimagi/commcare-hq.git
Launch CommCare HQ using the script provided:
$ scripts/docker runserver
CommCare HQ is now accessible at
A Reference API Client
A simple example of a web service that calls the CommCare HQ FHIR API to retrieve patient data is available as a reference.