Import ECGs as FHIR
Imports one FHIR R4 `Observation` (or a `Bundle` of them) carrying the waveform as `valueSampledData` (per-lead components, MDC_ECG_ELEC_POTL_I preferred) — the interoperable path for any ECG device, AliveCor/Kardia exports and clinical systems. `interpretation` becomes the attributed classification. Idempotent on the Observation id.
Authorization
HTTPBearer In: header
Query Parameters
"ecg_device"Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/cardiac-events/ecg/fhir" \ -H "Content-Type: application/json" \ -d '{}'null{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string" } ]}Import an ECG from CSV POST
Body is the CSV text (`Content-Type: text/csv`): `key,value` header lines (`Recorded Date`, `Sample Rate`, optional `Unit` uV|mV, `Classification`, `Lead`, `Device`) followed by one sample per line. Reads Apple Health export ECG files (`electrocardiograms/ecg_*.csv`) as-is; name and date-of-birth lines are discarded.
Ingest heart-monitoring events from a device source POST
Accepts a vendor's raw push payload (a single event or a batch) and normalizes it via the adapter registered for the given `source`+`format` pair. Authenticated the same way as `/wearables/bulk-ingest` — a personal API key scoped `write_own` identifies which patient the events belong to, so the patient (not the clinic) controls the connection. `source` defaults to `cardiocomm_gems`; `format` is `rest` (CardioComm's own push shape) or `fhir` (a FHIR Observation/Bundle). Adding another device vendor means registering a new adapter — this endpoint doesn't change.