Patient360 in the FHIR API

Patient360 is Health Gorilla's clinical data retrieval service that aggregates a patient’s records from connected data sources, including EHRs, HIEs, labs, and national networks. It is the prerequisite step for accessing longitudinal data through operations like $everything, $export-ccda, and standard FHIR queries.

How It Works

  1. Initiate retrieval using $p360-retrieve to locate and pull records from external networks and connected endpoints.
  2. Wait for completion — retrieval is asynchronous. Clients can monitor status using polling or webhooks.
  3. Access data using:
    • GET /Patient/{id}/$everything
    • POST /Patient/{id}/$export-ccda
    • Resource-specific queries (e.g., GET /Observation?patient={id})

Key Operations

OperationMethodDescriptionVersion
$p360-retrievePOSTInitiates record location and data retrieval for the patient.STU3
$everythingGETRetrieves all aggregated FHIR resources for the patient.R4 & STU3
$export-ccdaPOSTGenerates and returns a packaged CCDA document for the patient.R4

Required Scope

  • patient.read
  • patient.write (for $p360-retrieve)
  • Additional scopes (e.g., observation.read, documentreference.read) are required to query specific resource types after aggregation.

See: OAuth 2.0 Authentication

Usage Notes

  • $p360-retrieve must be called before querying the patient’s data unless retrieval has already been completed.
  • Webhooks can be used to notify clients when data aggregation is complete.
  • Health Gorilla automatically standardizes and deduplicates incoming records.

Merging STU3 Records

In Health Gorilla's STU3 implementation, the $merge operation allows clients to submit a resource (typically a DocumentReference) that should either create a new record or update an existing one if a match is found. This is primarily used for patient matching workflows in asynchronous, document-centric use cases.

Note: $merge is only supported in STU3 endpoints. There is no R4 equivalent for this operation.

Example Request

POST /fhir/DocumentReference/$merge
Authorization: Bearer {access_token}
Content-Type: application/fhir+json

{
  "resourceType": "DocumentReference",
  "status": "current",
  "subject": {
    "identifier": {
      "system": "https://www.healthgorilla.com",
      "value": "external-mrn-001"
    }
  },
  "content": [
    {
      "attachment": {
        "url": "Binary/abc123",
        "contentType": "application/pdf"
      }
    }
  ]
}