FHIR data flow
Ingestion
Section titled “Ingestion”The FHIR Transformer is a separate healthtag/fhir-transformer image. It reads hospital/HosXP data according to its own mapping and database configuration, creates FHIR resources, and writes them to FHIR_SERVER_URL (normally the internal HAPI URL).
Patient retrieval
Section titled “Patient retrieval”-
A HealthTAG Lambda function running on AWS posts
promptCareIdandtokento the Hospital API. -
The API posts
{ promptCareId }toHEALTHTAG_API_URL/validate-accessand forwardstokeninAuthorization. -
The response is expected to include
readerPublicKey,ownerPublicKey, andownerPHR. -
The API searches HAPI through
FHIR_URL. It sends the hospital-managedFHIR_API_KEYin theapikeyheader:Patient?identifier=https%3A%2F%2Fhealthtag.io%7C<PROMPT_CARE_ID>&_format=json -
It takes the first Patient entry and requests:
Patient/<FHIR_ID>/$everything?_format=json&_count=9999 -
It returns
{ "resources": <bundle.entry> }.
The code does not paginate past _count=9999, distinguish multiple matching patients, or return a standard OperationOutcome for lookup failures. Integrations must account for these current limitations.
Identifier contract
Section titled “Identifier contract”The lookup depends on the exact identifier system https://healthtag.io. Validate transformed Patient resources before testing the API.
See Kong routes and authentication for the gateway configuration used by these requests.

