Datica Mock FHIR API

Start prototyping your cutting edge healthcare applications with the Datica Mock FHIR API

Datica Mock HL7 API

At Datica we think HL7 is the future of healthcare data integration, so we built the Datica Mock FHIR API to help developers prototype applications that work with FHIR JSON data. Below you'll find documentation with the routes we provide.

Available Resources

The available resources reflect five commonly used categories within the FHIR (HL7) specification. Want a resource added? Submit an issue in the repository here. Or send us an email

Resource
/patients
/allergyIntolerance
/medicationPrescription
/organization
/practitioners

Available Routes

The Datica Mock FHIR API supports ONLY the GET method similar to the current design and implementation of FHIR. Examples are listed in the table below.

General structure of routes

GET /{modelName}?[fields=a,b,c][&field1=thing1[&field2=thing2[&fieldN=thingN]]]

Key things to remember:

  • This will return a resourceType: Bundle containing all objects in that model’s JSON.
  • "fields" is a comma-separated list of the top-level fields to include for objects in the response. If not specified, all fields are returned.
  • Additional query parameters are compared against properties in each object to be returned. Only objects with the matching values are returned i.e. this is a filter

Patient

Route Example
/patients?id={id} /patients?id=676cbb3f-9676-4387-aded-fb39b01c8254
/patients?identifier.value={id} /patients?identifier.value=646484
/patients?name.family={lastname}&birthDate={dob}&gender.coding.display={Male/Female} /patients?name.family=Perez&birthDate=1999-01-30&gender.coding.display=Male
/patients?fields=identifier,gender,address,maritalStatus&name.family={lastname}&name.given={firstname}&telecom.value={phone} /patients?fields=identifier,gender,address,maritalStatus&name.family=Jackson&name.given=Jim&telecom.value=555-555-5555

Allergy Intolerance

Route Example
/allergyIntolerances?id={id} /allergyIntolerances?id=739cjds9-m046-1234-d1ng-lf6b901mq4j
/allergyIntolerances?subject.reference=patient/{patientId} /allergyIntolerances?subject.reference=patient/50243gks-8362-i380-kq04-37sl94j6
/allergyIntolerances?subject.reference=patient/{patientId}&status={status}&sensitivityType={sensitivityType} /allergyIntolerances?subject.reference=patient/50243gks-8362-i380-kq04-37sl94j6&status=confirmed&sensitivityType=allergy
/allergyIntolerances?fields=date,status,substance,type,criticality&subject.reference=patient/{patientId} /allergyIntolerances?fields=recordedDate,status,substance,sensitivityType,criticality&subject.reference=patient/7492cgz-kj67-n32v-zx74-74t58h02

Adverse Reaction

Route Example
/adverseReactions?id={id} /adverseReactions?id=74hdy3fb-j3nc-9234-d1ng-842bc92l
/adverseReactions?subject.reference=patient/{patientId} /adverseReactions?subject.reference=Patient/50243gks-8362-i380-kq04-37sl94j6
/adverseReactions?subject.reference=Patient/{patientId}&exposure.substance.reference=Substance/{substanceid}&symptom.code.coding.code={symptom} /adverseReactions?subject.reference=Patient/50243gks-8362-i380-kq04-37sl94j6&exposure.substance.reference=Substance/ba0e8c0e-df45-49c5-147-bba158db70b9&symptom.code.coding.code=T78.2
/adverseReactions?fields=id,date,exposure,symptom&subject.reference=Patient{patientId} /adverseReactions?fields=id,date,exposure,symptom&subject.reference=Patient/d4033832-ff62-4dd2-9465-e09a73f9683f

Medication Prescription

Route Example
/medicationPrescriptions?id={id} /medicationPrescriptions?id=762b25af-3087-4883-af9c-b26a40423ca6
/medicationPrescriptions?identifier.value={id} /medicationPrescriptions?identifier.value=895520
/medicationPrescriptions?patient.reference=patient/{patientid} /medicationPrescriptions?patient.reference=patient/8cc95829-996a-4f3e-9a6f-f9e65cae96ed
/medicationPrescriptions?prescriber.reference=Practitioner/{practitionerid}&medication.reference=medication/{medicationid} /medicationPrescriptions?prescriber.reference=Practitioner/add4de50-e32f-4d17-a9a2-4c9141cd3bc6&medication.reference=medication/23b3d94d-4f2d-43ab-b954-9cac42effa30
/medicationPrescriptions?fields=id,dateWritten,encounter&patient.reference={patientId} /medicationPrescriptions?fields=id,dateWritten,dispense&patient.reference=patient/8cc95829-996a-4f3e-9a6f-f9e65cae96ed

Organizations

Route Example
/organizations?id={id} /organizations?id=ce7509ca-bdc3-4198-b802-99845fd6d06d
/organizations?identifier.value={id} /patients?identifier.value=1386378
/organizations?name={name}&type.code={type}&active={true/false} /organizations?name=Fake%20Clinic&type.coding.code=V6
/organizations?fields=name,type,telecom,address&identifier.value={id} /organizations?fields=name,type,telecom,address&identifier.value=1386378

Practitioner

Route Example
/practitioners?id={id} /practitioners?id=97905b6a-0145-462c-ae56-314e0ed84a6d
/practitioners?identifier.value={id} /practitioners?identifier=A1423392
/practitioners?name.family={lastname}&birthDate={dob}&gender.coding.display={Male/Female} /practitioners?name.family=Miller&birthDate=1974-06-17&gender.coding.display=Female
/practitioners?specialty.coding.display={specialty}&qualification.code.coding.code={qualificationcode} /practitioners?specialty.coding.display=Cardiologist&qualification.code.coding.code=394603008
/practitioners?fields=id,telecom,organization,specialty&name.family={lastname}&birthDate={dob}&gender.coding.display={Male/Female} /practitioners?fields=id,telecom,organization,specialty&name.family=Miller&birthDate=1974-06-17&gender.coding.display=Female