Patient Everything ($everything)

The $everything operation returns the complete set of FHIR resources associated with a patient, including all clinical data collected or aggregated for that patient across encounters, care settings, and connected networks.

This operation is supported in both FHIR R4 and FHIR STU3, but is most commonly used in STU3 to retrieve a longitudinal view of the patient’s chart and is often called after running $p360-retrieve.

Use Cases

  • Retrieve the full clinical history for a patient
  • Export structured FHIR data into a downstream system
  • Perform record review or reconciliation at time of encounter

Base URLs

  • Production: https://api.healthgorilla.com/fhir/R4/Patient/{id}/$everything
  • Sandbox: https://sandbox.healthgorilla.com/fhir/R4/Patient/{id}/$everything

Authentication

All requests require OAuth 2.0 authentication using a Bearer Token. Unauthorized requests return 401 Unauthorized responses.

Required Scopes

  • patient.read
  • Additional read scopes may be required to access returned resources (e.g., observation.read, condition.read)

For more information, go to: OAuth 2.0 Authentication

Method

MethodOperationDescription
GETPatient EverythingRetrieves the full clinical record for the specified patient

Returns

Returns all clinical FHIR resources associated with a given patient ID, including:

  • Observations
  • Conditions
  • DiagnosticReports
  • MedicationRequests
  • Immunizations
  • Procedures
  • Encounters
  • And more

Search Parameters

ParameterTypeDescription
startdateFilters based on the period.start value of resources
enddateFilters based on the period.end value of resources
_sincedateFilters based on the last modified date of the resource (meta.lastUpdated)

Use start and end when the goal is to retrieve resources about an event that occurred in a time window (for example, encounters). Use _since to retrieve only new or updated records.

Example Request

GET /fhir/R4/Patient/123456/$everything?start=2023-01-01&end=2023-12-31

Pagination Support

Large $everything responses are paginated. Responses include a Bundle with a link.relation="next" URL for retrieving the next page.

You may also use _count, _offset, or _cursor to manually control pagination if needed.

Asynchronous Handling

If a query is large or long-running, the API may return a 202 Accepted response instead of completing immediately. In this case, a Content-Location header contain the polling URL is returned.

Clients need to poll the Content-Location URL until the operation completes. When ready, the server will respond with a 200 OK and a FHIR Bundle, or an appropriate OperationOutcome on error.

Example Response

HTTP/1.1 202 Accepted
Content-Location: /fhir/R4/async/requests/abc123

Polling Request

GET /fhir/R4/async/requests/abc123

Continue polling this URL until you receive a final response.

Error Handling

The $everything operation returns standard FHIR OperationOutcome structures in the event of errors.

Examples:

  • 401 Unauthorized — token missing or expired
  • 404 Not Found — patient ID not found
  • 500 Internal Server Error — query failed

For more information, go to: Error Handling