Ingest
Ingest FHIR R5
Submits a FHIR R5 Bundle or a single resource. The response is a receipt: ingestion continues after it is returned, so poll the ingestion to follow it. The version is part of the path because a Bundle does not state which FHIR release it is written against.
Usage
import { ContextEngineClient } from "@clinia/context-engine-js";
// Initialize the client
const client = new ContextEngineClient({
baseUrl: process.env.CLINIA_WORKSPACE,
auth: {
clientId: process.env.CLINIA_CLIENT_ID,
clientSecret: process.env.CLINIA_CLIENT_SECRET,
},
});
// Call the API, with the request body the API reference documents
const { data, error } = await client.ingest.ingestFhirR5("<patient-id>", body);
// Print the response
console.log(data ?? error);The environment variables are set in Install and authenticate, for JavaScript or Python.
API reference
POST /v1/patients/{patientId}/ingestions/fhir/r5 documents the parameters, the request body and the responses.