# Create Medication Request Create a new medication request for a patient. This endpoint initiates the prescription and fulfillment process. Notes: - Patient and practitioner must already exist in the system - Medication details must be valid - The request will be validated against the clinic's available medications Endpoint: POST /api/external/medication-order Version: 1.0.0 Security: ApiKeyAuth ## Request fields (application/json): - `patient_id` (string, required) ID of the patient Example: "550e8400-e29b-41d4-a716-446655440001" - `practitioner_id` (string, required) ID of the practitioner Example: "550e8400-e29b-41d4-a716-446655440001" - `clinic_id` (string, required) ID of the clinic Example: "550e8400-e29b-41d4-a716-446655440001" - `carrier_id` (string, required) ID of the shipping carrier (from GET /api/external/carriers) Example: "se-3818360" - `service_id` (string, required) ID of the shipping service (from GET /api/external/carriers/{carrierId}/services) Example: "fedex_ground" - `is_refrigerated` (boolean) Is refrigerated Example: true - `shipment_group_id` (string) Shipment group ID Example: "550e8400-e29b-41d4-a716-446655440001" - `medication_requests` (array, required) Array of medication requests - `medication_requests.medication` (string, required) Name of the medication Example: "Aspirin" - `medication_requests.dose` (string, required) Dose of the medication Example: "100mg" - `medication_requests.unit_of_measure` (string) Unit of measure (recommended). If omitted, NovaMed will attempt to derive this from the dose string (e.g. "0.25 mg" -> "mg"). Example: "mg" - `medication_requests.quantity` (number, required) Quantity of the medication Example: 100 - `medication_requests.refills` (string) Number of refills Example: "3" - `medication_requests.direction` (string, required) Direction of the medication Example: "Take 1 tablet by mouth daily" - `medication_requests.days_supply` (number) Days supply Example: 30 - `medication_requests.flavor` (string) Flavor of the medication Example: "Orange" - `medication_requests.notes` (string) Notes for the medication Example: "Patient has a history of allergies" - `medication_requests.do_not_refill` (boolean) Do not refill Example: true - `medication_requests.do_not_fill` (boolean) Do not fill Example: true - `medication_requests.patient_contact_requested` (boolean) Patient contact requested Example: true - `medication_requests.reason_for_compounding` (string) Reason for compounding Example: "Patient has a history of allergies" - `medication_requests.reason_for_compounding_additional_context` (string) Additional context for reason for compounding Example: "Patient has a history of allergies" ## Response 200 fields (application/json): - `success` (boolean) Example: true - `data` (object) - `data.medication_request_id` (string) Unique identifier for the medication request Example: "880e8400-e29b-41d4-a716-446655440003" - `message` (string) Example: "Medication request created successfully" ## Response 400 fields (application/json): - `success` (boolean) - `error` (object) - `error.message` (string) Human-readable error message Example: "Validation error" - `error.details` (object) Additional error details Example: {} ## Response 401 fields (application/json): - `success` (boolean) - `error` (object) - `error.message` (string) Human-readable error message Example: "Validation error" - `error.details` (object) Additional error details Example: {} ## Response 404 fields (application/json): - `success` (boolean) - `error` (object) - `error.message` (string) Human-readable error message Example: "Validation error" - `error.details` (object) Additional error details Example: {}