Skip to main content
Every inference request picks both a verbosity (how much detail per medication) and a format (the overall shape of the response). These are orthogonal — pick whichever combination fits your use case.

Format at a glance

formatWhat you getBest for
inferred_list (default)Our proprietary JSON: { medications, provenance?, meta }Portal / dashboard UIs, CDS engines, human-readable debugging
fhir_bundleFHIR R4 Bundle of MedicationRequest (+ Provenance at full verbosity)EHR ingest (Epic, Cerner, Athena), FHIR-native stores
fhir_arrayFlat array of FHIR resourcesPipelines, 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; only format changes):
{
  "format": "<format>",
  "verbosity": "standard",
  "resources": [
    {
      "resourceType": "MedicationRequest",
      "id": "mr-1",
      "status": "active",
      "intent": "order",
      "authoredOn": "2026-03-05",
      "medicationCodeableConcept": {
        "coding": [{ "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "617312" }]
      }
    }
  ]
}

format: "inferred_list" — our shape

{
  "medications": [
    {
      "id": "med_abc123",
      "display_name": "Atorvastatin 40 MG Oral Tablet",
      "rxnorm_code": "617312",
      "status": "active",
      "confidence": 0.95,
      "sig": "Take 1 tablet by mouth daily",
      "dosage": { "...": "..." },
      "indication": { "...": "..." },
      "last_activity_date": "2026-03-05T00:00:00Z"
    }
  ],
  "meta": {
    "request_id": "...",
    "ruleset_version": "2026-04-15.v5",
    "as_of": "...",
    "processing_time_ms": 187,
    "input_resource_count": 1,
    "output_medication_count": 1
  }
}

format: "fhir_bundle" — FHIR R4 Bundle

{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "entry": [
    {
      "fullUrl": "urn:uuid:med_abc123",
      "resource": {
        "resourceType": "MedicationRequest",
        "id": "med_abc123",
        "status": "active",
        "intent": "order",
        "medicationCodeableConcept": {
          "text": "Atorvastatin 40 MG Oral Tablet",
          "coding": [{ "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "617312", "display": "Atorvastatin 40 MG Oral Tablet" }]
        },
        "authoredOn": "2026-03-05T00:00:00Z",
        "dosageInstruction": [{ "text": "Take 1 tablet by mouth daily", "...": "..." }],
        "extension": [
          { "url": "https://medlistiq.com/fhir/extensions/inference-confidence", "valueDecimal": 0.95 }
        ]
      }
    }
  ]
}

format: "fhir_array" — flat list

[
  {
    "resourceType": "MedicationRequest",
    "id": "med_abc123",
    "...": "..."
  }
]
At 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:
HeaderWhat
x-request-idRequest ID, for trace correlation
x-ruleset-versionThe ruleset version that ran (YYYY-MM-DD.vN)
x-as-ofTimestamp used as “now” for time-sensitive rules
x-processing-time-msHow long the inference took
x-input-resource-countHow many resources were in your request
x-output-medication-countHow many medications came out
These headers are set on every response (including 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:
minimalstandardfull
inferred_listbody meta; compact medsbody meta; codes + dosagebody meta + provenance dict
fhir_bundlemeta in headers; thin MedicationRequestsmeta in headers; full MedicationRequestsmeta in headers; adds Provenance resources
fhir_arraythin MedicationRequests, flatfull MedicationRequests, flatflat 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 URLWhereWhat
https://medlistiq.com/fhir/extensions/inference-confidenceOn MedicationRequest (standard / full)valueDecimal 0–1
https://medlistiq.com/fhir/extensions/inference-evidenceOn Provenance (full only)valueString evidence tag
https://medlistiq.com/fhir/extensions/inference-enrichmentOn Provenance (full only)Nested extension: field, reason, value
These live under our root namespace so future IG publication can reference them as-is.