The FHIR Patient resource defines demographics, care providers, and other administrative information about a person receiving care at a health organization. The Patient resource can be thought of as the starting point for many different client application workflows; often, a workflow will begin with a patient query and selection, and the server ID will be used to drive additional queries for diagnostic and care-related information.

FHIR Resource: Patient

Supported Attributes

Field NameComments
External Identifier (Can be a custom system declared by the user).
link Required


API Reference - Patient

Check out the FHIR RESTful Patient API in the Sandbox environment.

FHIR Operations

The following operations are currently supported:

1. Read

HTTP RequestMethodAction
/Patient/{ID}GETRetrieve patient by ID

2. Search

HTTP RequestMethodAction
/Patient?[parameter={value}]GETRetrieve Patient resources meeting the specified search criteria

Search Parameters:

identifierTokenPatient Identifier (MRN)
familyStringPatient Family Name
givenStringPatient Given Name
birthdateStringPatient DOB (in YYYY-MM-DD format)
genderTokenPatient Gender (F/M)
address-postalcodeStringPatient Postal (zip) code


2.1. Search patients updated since March 2019

2.2. Search patient by HG Global ID

2.3 Search patient by External MRN
identifier=<CUSTOM CODE SYSTEM>|A3dr234112

2.4 Search patient by Custom Code System (External ID)
identifier=<CUSTOM CODE SYSTEM>|A3dr234112

2.5 Search patient by SSN

2.6 Search patient by name

2.7 Search all male patients who were born after October 1998 and whose given name contains ‘Alex’

2.8 Search patients with the exact string ‘Smith Johnson’. Exact searching is case sensitive

3. Create

HTTP RequestMethodAction
/PatientPOSTCreates patient resource

The following attributes are required:



3.1 Add an external MRN for the patient

An external MRN can be associated with the patient. This MRN can be used to retrieve the patient FHIR resource as in example 2.3. The external MRN is also visible within the patient chart in the Health Gorilla UI and is sent to external laboratories when orders are placed from within Health Gorilla. The MRN is placed inside of the identifier attribute for the patient along with a customer code system. This code system can be your own company's URL for example.

"identifier": [
            "type": {
                "coding": [
                        "system": "",
                        "code": "MR",
                        "display": "Medical record number"
                "text": "Medical record number"
          	"system": "{{CUSTOM CODE SYSTEM}}",
            "value": "{{mrn}}"

3.2 Add an external identifier for the patient

Additional identifiers can be associated with a patient. Identifiers require the following attributes:

  • "system"
  • "value"
    These identifiers can be used in retrieving a Patient resource as described in section 2.4. They are not visible in the patient chart inside the Health Gorilla User Interface.
"identifier": [
            "system": "<SYSTEM_NAME>",
            "value": "<EXTERNAL IDENTIFIER>"

3.3. Conditional create

This method also supports conditional create. To use it, you need to set additional header:
If-None-Exist: [search parameters]

Supported parameters:

  • given
  • family
  • gender
  • birthdate
If-None-Exist: given=Rajesh&family=Koothrappali&gender=male&birthdate=1981-01-30

4. Update

/Patient/{ID}PUTUpdates patient resource

Update operation supports ‘Optimistic Locking’
See for more details.

If passed resource does not exist then it will be created (HTTP 201).

5. Export C-CDA

You can export patient's full medical history as a single C-CDA document.

HTTP RequestMethodAction
/Patient/{ID}/$export-ccdaGETGenerate C-CDA CCD document.

You can specify the client timezone by passing it in the ‘tz’ attribute.

The result contains a link to a binary resource (CCD XML) that can be downloaded.


This operations can take a long time to complete, therefore it must be performed asynchronously.

    "resourceType": "Parameters",
    "parameter": [
            "name": "url",
            "valueString": ""
            "name": "contentType",
            "valueString": "text/xml"
            "name": "format",
            "valueCoding": {
                "system": "urn:oid:",
                "code": "urn:ihe:pcc:xphr:2007",
                "display": "HL7 CCD Document"
            "name": "size",
            "valuePositiveInt": 1258668
            "name": "checksum",
            "valueString": "274dc07eedb00fadcbb9876958e65d67"
            "name": "expiredAt",
            "valueDateTime": "2019-11-13T12:31:01+03:00"

6. Return all the information related to one patient

Health Gorilla implements FHIR $everything operation that can be used to retrieve all the information related to a given patient.

/Patient/{ID}/$everythingGETRead all records related to the specified patient.

Supported parameters:

startdateThe date range relates to care dates. Return all records relating to care provided in a certain date range
enddateThe date range relates to care dates. Return all records relating to care provided in a certain date range.
_sincedatetimeResources updated after this period will be included in the response.
_typecodeOne or more parameters, each containing one or more comma-delimited FHIR resource types to include in the return resources.


6.1. Return all DiagnosticReports, Observations, Immunizations, Encounters updated since 2019-09-01$everything

6.2. Return all information for the specified patient$everything