core.parameterstomedicationcheckoutresponse
Home > @medplum/core > parametersToMedicationCheckoutResponse
parametersToMedicationCheckoutResponse() function
Decodes the Parameters response from the $checkout-medications custom operation into a typed MedicationCheckoutResponse. Throws INVALID_MEDICATION_CHECKOUT_RESPONSE when required top-level fields are missing.
The repeating items parameter is collected across every occurrence (each is one queued/failed line); the scalar approvalUrl / vendorPatientId are read once.
exclusive is decoded fail-closed, since a client opens the approval widget without a warning on true: it is true only when every exclusive value is true and no retained, failed, or unparseable unstaged line comes with it.
Signature:
export declare function parametersToMedicationCheckoutResponse(params: Parameters): MedicationCheckoutResponse;
Parameters
Parameter | Type | Description |
|---|---|---|
params | Parameters | The |
Returns:
A vendor-neutral MedicationCheckoutResponse.