Skip to main content
POST
/
v1
/
medications
/
infer
Infer
curl --request POST \
  --url https://api.medlistiq.com/v1/medications/infer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resources": [
    {}
  ],
  "bundle": {},
  "as_of": "2023-11-07T05:31:56Z",
  "format": "inferred_list",
  "verbosity": "minimal",
  "statuses": []
}
'
{
  "medications": [
    {
      "id": "<string>",
      "display_name": "<string>",
      "confidence": 123,
      "rxnorm_code": "<string>",
      "rxnorm_system": "<string>",
      "sig": "<string>",
      "dosage": {
        "text": "<string>",
        "patient_instruction": "<string>",
        "timing": {
          "text": "<string>",
          "code": "<string>",
          "code_system": "<string>",
          "ncit_code": "<string>",
          "ncit_display": "<string>"
        },
        "when": [
          {
            "text": "<string>",
            "code": "<string>",
            "code_system": "<string>",
            "ncit_code": "<string>",
            "ncit_display": "<string>"
          }
        ],
        "duration": {
          "value": 123,
          "unit": "<string>",
          "display": "<string>"
        },
        "as_needed": true,
        "site": "<string>",
        "route": {
          "text": "<string>",
          "snomed_code": "<string>",
          "snomed_display": "<string>",
          "ncit_code": "<string>",
          "ncit_display": "<string>"
        },
        "method": {
          "text": "<string>",
          "snomed_code": "<string>",
          "snomed_display": "<string>",
          "ncit_code": "<string>",
          "ncit_display": "<string>"
        },
        "dose_quantity": {
          "value": 123,
          "unit": "<string>",
          "system": "<string>",
          "code": "<string>"
        },
        "dose_range": {
          "low_value": 123,
          "high_value": 123,
          "unit": "<string>"
        },
        "dose_form": "<string>"
      },
      "indication": {
        "text": "<string>",
        "snomed_code": "<string>",
        "snomed_display": "<string>",
        "icd10_code": "<string>",
        "icd10_display": "<string>"
      },
      "last_activity_date": "2023-11-07T05:31:56Z"
    }
  ],
  "provenance": {},
  "meta": {
    "request_id": "<string>",
    "ruleset_version": "<string>",
    "as_of": "2023-11-07T05:31:56Z",
    "processing_time_ms": 123,
    "input_resource_count": 123,
    "output_medication_count": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.medlistiq.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

MedListIQ API key (format: ml_...). Create one at Dashboard → API Keys.

Body

application/json
resources
Resources · object[]
bundle
Bundle · object
as_of
string<date-time> | null
format
enum<string>
default:inferred_list

Response envelope shape.

  • inferred_list (default): our proprietary JSON with medications, optional provenance dict, and meta in the body. Ergonomic for dashboards and CDS engines.
  • fhir_bundle: a FHIR R4 Bundle (type: searchset) of MedicationRequest resources, plus Provenance resources at verbosity=full. Meta moves to response headers.
  • fhir_array: a flat array of FHIR resources. MedicationRequest only at minimal/standard; mixed MedicationRequest + Provenance at full. Pipeline-friendly. Meta in response headers.
Available options:
inferred_list,
fhir_bundle,
fhir_array
verbosity
enum<string>
default:minimal
Available options:
minimal,
standard,
full
statuses
enum<string>[] | null

Optional status filter. When present, only medications with an inferred status in this list are returned. When omitted, all statuses are returned.

Available options:
active,
completed,
stopped,
cancelled,
unknown

Response

Inferred medication list. Default shape (format=inferred_list) is shown below — pick from the union by request verbosity: InferResponseMinimal (verbosity=minimal), InferResponseStandard (verbosity=standard), or InferResponseFull (verbosity=full, adds provenance dict). When format=fhir_bundle the body is a FHIR R4 Bundle of MedicationRequest (+ Provenance at full verbosity). When format=fhir_array it's a flat array of FHIR resources. See https://docs.medlistiq.com/guides/output-formats for examples and the response-header reference.

medications
InferredMedicationStandard · object[]
required
provenance
Provenance · object
required
meta
InferMeta · object
required