On this page

core.medicationcheckoutitemresult

Home > @medplum/core > MedicationCheckoutItemResult

MedicationCheckoutItemResult interface​

Per-line outcome from a cart checkout. A single bad line is reported here as failed rather than rolling back the lines that already queued.

Signature:

export interface MedicationCheckoutItemResult 

Properties​

Property

Modifiers

Type

Description

duplicate?

readonly

boolean

(Optional) True when the line was **not** added because the same drug was already in the vendor's cart (the vendor-recommended duplicate check matched). Reported as status: 'queued' with this flag set so the caller can surface it.

error?

readonly

string

(Optional)

medicationRequestId

readonly

string

replaced?

readonly

boolean

(Optional) True when the draft changed after an earlier checkout staged it, so its old line was taken out of the vendor's cart and the draft was staged again. Only set on status: 'queued' items. vendorLineId is then the new line; with duplicate also set, the drug is already on another line, no line was added for this draft and vendorLineId is absent.

status

readonly

'queued' | 'failed'

vendorLineId?

readonly

string

(Optional) Vendor per-line reference returned at checkout, for diagnostics/audit. The concrete meaning is vendor-specific: a cart-item id for cart-based vendors (ScriptSure MedCart rxId) or a per-prescription id for queue-based ones. Optional because the vendor may not mint one at add time. On a failed item it names the draft's out-of-date line, still in the vendor's cart, so the approval widget shows the draft's previous version.