Overview
Marmar exposes a pragmatic FHIR v4 surface so tenants can synchronize clinical data without bespoke transformers. We currently support the following resource types in both directions:- Patient
- MedicationStatement
- MedicationRequest
- Condition
- AllergyIntolerance
- Observation
- Encounter
X-Tenant-Code and X-API-Key headers and return
standard FHIR JSON payloads (application/fhir+json).
Submit clinical bundles
UsePOST /v1/fhir/$submit to ingest a FHIR Bundle (collection, batch, or transaction). Each entry
is validated, normalized, and persisted. The response contains an OperationOutcome and per-resource
counters so you can reconcile successes versus failures.
Supported resources
- Patient → updates the Marmar patient profile (external IDs are honoured).
- MedicationStatement → upserts active medications that power assessment inputs.
- MedicationRequest, Condition, AllergyIntolerance, Observation, Encounter → stored as raw FHIR JSON and retrievable through the search/read API.
OperationOutcome.issue with severity=error
and the offending resource remains untouched.
Retrieve a resource
UseGET /v1/fhir/{resourceType}/{id} for direct reads. Marmar returns the latest copy of the resource
in native FHIR form or an OperationOutcome with 404 if it is missing.
Search resources
GET /v1/fhir/{resourceType} returns a FHIR search bundle (type=searchset). Available filters vary per
resource:
| Resource | Query params |
|---|---|
| Patient | identifier |
| MedicationStatement | patient, status |
| MedicationRequest | patient, status |
| Condition | patient, status |
| AllergyIntolerance | patient, status |
| Observation | patient, category, code |
| Encounter | patient, status |
total and individual bundle entries so you can page client-side. For larger data
sets, apply filtering early or request resources in batches.
Error handling
- Validation failures →
400withOperationOutcomeexplaining the first failure. - Missing resources →
404withOperationOutcome. - Authentication failures →
401withOperationOutcome.
OperationOutcome before assuming a bundle was fully processed.