Format at a glance
format | What you get | Best for |
|---|---|---|
inferred_list (default) | Our proprietary JSON: { medications, provenance?, meta } | Portal / dashboard UIs, CDS engines, human-readable debugging |
fhir_bundle | FHIR R4 Bundle of MedicationRequest (+ Provenance at full verbosity) | EHR ingest (Epic, Cerner, Athena), FHIR-native stores |
fhir_array | Flat array of FHIR resources | Pipelines, data warehouses, streaming transforms |
Which to pick
Dashboard / portal UI
Use
inferred_list. Our shape is pre-shaped for rendering status badges,
confidence scores, and dosage sigs. FHIR is too verbose for UI.EHR integration
Use
fhir_bundle. Standard R4 Bundle you can route straight into your
FHIR store with no translation layer. Get Provenance resources for
free at verbosity=full.CDS engine / rule engine
Use
inferred_list with verbosity=full. You get the richest provenance
trail (evidence tags, enrichments) in the most ergonomic shape.Pipeline / warehouse
Use
fhir_array. Flat list of FHIR resources ingests cleanly into
BigQuery / DuckDB / Snowflake. Each row is resourceType + payload.Example: the same request in all three formats
Request (body is the same; onlyformat changes):
format: "inferred_list" — our shape
format: "fhir_bundle" — FHIR R4 Bundle
format: "fhir_array" — flat list
verbosity: "full", fhir_array becomes a union: MedicationRequest
resources followed by Provenance resources. Filter by resourceType to
separate them.
Where does the meta block go?
inferred_list keeps meta (request_id, ruleset_version, timing, counts)
inside the response body for backwards compatibility.
For FHIR formats, the response body is a pure FHIR payload — no wrapping
allowed. We move the same information to response headers:
| Header | What |
|---|---|
x-request-id | Request ID, for trace correlation |
x-ruleset-version | The ruleset version that ran (YYYY-MM-DD.vN) |
x-as-of | Timestamp used as “now” for time-sensitive rules |
x-processing-time-ms | How long the inference took |
x-input-resource-count | How many resources were in your request |
x-output-medication-count | How many medications came out |
inferred_list), so
you can use them uniformly regardless of format.
Combinations worth knowing
The two axes are fully orthogonal — every (verbosity, format) pair works:
minimal | standard | full | |
|---|---|---|---|
inferred_list | body meta; compact meds | body meta; codes + dosage | body meta + provenance dict |
fhir_bundle | meta in headers; thin MedicationRequests | meta in headers; full MedicationRequests | meta in headers; adds Provenance resources |
fhir_array | thin MedicationRequests, flat | full MedicationRequests, flat | flat mixed MedicationRequest + Provenance |
FHIR extensions we emit
Confidence and inference evidence are not standard FHIR fields, so we attach them as custom extensions (safe for FHIR-conformant parsers — they can ignore unknown extensions without error):| Extension URL | Where | What |
|---|---|---|
https://medlistiq.com/fhir/extensions/inference-confidence | On MedicationRequest (standard / full) | valueDecimal 0–1 |
https://medlistiq.com/fhir/extensions/inference-evidence | On Provenance (full only) | valueString evidence tag |
https://medlistiq.com/fhir/extensions/inference-enrichment | On Provenance (full only) | Nested extension: field, reason, value |