In a standard FHIR server, Patient/$everything and Patient/$summary are scoped to a single Patient resource. Flexpa extends this behavior for linked patients — when you use $PATIENT_ID with either operation, Flexpa automatically follows seealso links and aggregates data from all linked source patients into a single response.
Calling $everything or $summary with a specific Patient ID still returns data scoped to only that Patient.
#The $PATIENT_ID wildcard
$PATIENT_ID is a special wildcard that is replaced inline in the request URL with the consent-scoped destination Patient ID — the destinationPatientId of the first Patient Authorization on the access token's Consent. For IAL2 and IAL1 search Consents this is the master Patient ID; for standard OAuth Consents it is the single source Patient ID. The wildcard itself only swaps in this one ID; any inclusion of additional linked source Patients happens downstream during aggregated operations (for example, $everything and $summary) that follow Patient.link seealso references after the URL has been resolved. See Wildcard Parameters for more details.
#$everything
Aggregates raw FHIR resources from all linked patients into a single searchset Bundle:
- Flexpa resolves
$PATIENT_ID to the master Patient (IAL2-verified or IAL1 self-attested)
- The master's
seealso links are followed to discover all source Patients
$everything is fetched for each source Patient in parallel
- Results are deduplicated — if the same resource appears from multiple sources, only the first occurrence is kept
- A single searchset Bundle is returned with access control tags preserved on every resource
See Patient/$everything for full operation details.
#$summary
Follows the same aggregation as $everything, then generates an International Patient Summary (IPS) Bundle from the merged data. The IPS is a standardized clinical document containing allergies, medications, conditions, immunizations, and other key clinical data — structured for cross-border and cross-system portability.
See Patient/$summary for full operation details.