Clinic partitions
Ava EMR is multi-tenant at the clinic level, and the FHIR API makes that explicit in the URL:
{issuer}/fhir/r4/{partition_id}
Every clinic — including your synthetic sandbox — is its own partition with its own FHIR base URL. There is no cross-partition endpoint: a token is issued for one partition and resource ids are only meaningful within it.
What this means for your code
- Never hardcode a base URL. Take
issfrom the launch parameters (and the token response's context) each time — an app installed at ten clinics sees ten different base URLs. - Scope your caches and stored ids by partition.
Patient/abcin one clinic is unrelated toPatient/abcin another. - Discovery is per-issuer. Fetch
.well-known/smart-configurationandmetadatafrom the issuer that launched you, not from a cached copy for a different clinic.
Your sandbox behaves exactly like a production clinic in this respect, so an integration that works there generalizes: the only thing that changes at each installation is the pair of issuer and partition id the launch hands you.