Skip to main content

core.medicationordersetrequesttoparameters

Home > @medplum/core > medicationOrderSetRequestToParameters

medicationOrderSetRequestToParameters() function

Encodes a MedicationOrderSetRequest as a FHIR Parameters body for the vendor-neutral $order-set-url custom operation (POST /fhir/R4/PlanDefinition/$order-set-url). Optional fields are omitted entirely so the wire payload mirrors the legacy executeBot plain-JSON shape the bot's parseInput helper would otherwise have to coerce.

vendorOrderSetId is encoded as valueInteger when numeric and valueString otherwise — keeping the operation usable by future vendors whose order-set ids are not numeric.

Signature:

export declare function medicationOrderSetRequestToParameters(req: MedicationOrderSetRequest): Parameters;

Parameters

Parameter

Type

Description

req

MedicationOrderSetRequest

Order-set request (vendor-neutral).

Returns:

Parameters

A Parameters resource ready to POST.