FHIR $everything
FHIR has the option to query everything associated to an individual patient. This is useful when transmitting batch data or getting the full patient history. 1upHealth supports the $everything FHIR endpoint.
Although the $everything endpoint is in the FHIR standard, many other servers do not support it due to the additional complexity it adds behind the scenes. Many of our customers have requested it and we also believe in it's usefulness. Therefore any app can query $everything via the 1upHealth FHIR API.
To query everything simply hit this endpoint with the patient's id, fhir version type (dstu2/stu3/r4) and their bearer access token.
1
curl -X GET 'https://api.1up.health/{fhirVersion}/Patient/{patient_id}/$everything' \
2
-H "Authorization: Bearer accesstokenaccesstoken"
Copied!
The query works behind the scenes by iterating through all the resources in alphabetical order and providing them in the FHIR bundle response 10 at a time. You can then paginate over the bundle to get additional resources. The total count will also be available in the response so you know how many pages deep to go.
Please note $everything request endpoint is case sensitive, and should be lower case.

FHIR R4 $everything Search Parameters

For FHIR R4 only we support the following search parameters:
Parameter
Description
Example
_type
Allows you to specify which types of resources will be included in the response.
โ€‹
For example, _type=Encounter would return only Encounter resources associated with the patient.
/r4/Patient/{PatientId}/$everything?_type=Observation,Encounter
_since
Will return only resources that have been modified since the time provided based on meta.lastUpdated
/r4/Patient/{PatientId}/$everything?_since=2021-05-27T05:00:00Z
start
Specifying the start date will pull in resources where their clinical date is after the specified start date. If no start date is provided, all records before the end date are in scope. This will filter out resources that have date attributes. However, it will not filter resources that don't have date attributes (e.g. Patient, Group, FamilyMemberHistory). In other words those resources referencing the patient will always be returned
/r4/Patient/{PatientId}/$everything?start=2021-05-27T05:00:00Z
end
Specifying the end date will pull in resources where their clinical date is before the specified end date. If no end date is provided, all records after the start date are in scope. This will filter out resources that have date attributes. However, it will not filter resources that don't have date attributes (e.g. Patient, Group, FamilyMemberHistory). In other words those resources referencing the patient will always be returned
/r4/Patient/{PatientId}/$everything?end=2021-12-27T05:00:00Z

$everything start end Resource Attribute Mapping

Account
servicePeriod.start
AdverseEvent
date
AllergyIntolerance
recordedDate
Appointment
start
AppointmentResponse
start
AuditEvent
period.start
Basic
created
BodyStructure
NO_DATE
CarePlan
period.start
CareTeam
period.start
ChargeItem
occurrenceDateTime, occurrencePeriod.start, occurrenceTiming.event
Claim
billablePeriod.start
ClaimResponse
created
ClinicalImpression
date
Communication
sent
CommunicationRequest
occurrenceDateTime, occurrencePeriod.start
Composition
date
Condition
recordedDate
Consent
dateTime
Coverage
period.start

delete $everything (beta)

You can also delete all patient data (fhir resources) at once by making a DELETE request to the same endpoint. In this way you can delete all patient data with less time and effort rather than making delete request for every resource type using our FHIR delete endpoint.
To query everything simply hit this endpoint with the patient's id, fhir version type (dstu2/stu3/r4) and their bearer access token.
1
curl -X DELETE 'https://api.1up.health/{fhirVersion}/Patient/{patient_id}/$everything' \
2
-H "Authorization: Bearer accesstokenaccesstoken"
Copied!