Prescriptions and Medications
Record prescription snapshots and find medications in the current chart view.
A prescription records what was ordered or sent at a point in time. Its medication details are a historical snapshot. A medication is an individual record on the patient's medication list, with directions, status, and dates that can be updated.
Creating a prescription also creates a medication. Do not follow a prescription create with a medication create for the same prescribing event.
Choose an endpoint
| Your situation | Endpoint |
|---|---|
| Record a prescription your system ordered or sent | Create Prescription |
| Read prescription snapshots on the chart timeline | List All Interactions, filtered by type=erx or type=rx |
| Migrate historical medication data from another system | Create Medication |
| Record a medication reported by a patient or pharmacy | Create Medication |
| Find a medication in the current chart view | List Patient Medications, optionally filtered by ndc |
| Retrieve or update a specific medication record | Show Medication or Update Medication |
Use medication endpoints for historical migrations. Do not create prescription events to backfill medication history.
Record a prescription
POST /api/provider/patients/{patient_id}/prescriptions
A user-scoped API key is required. One call creates an erx interaction and a medication record.
{
"prescription": {
"rx_id": "your-rx-4482",
"quantity": 30,
"refills": 2,
"event_timestamp": "2026-10-21T14:00:00Z",
"integration_record_id": "your-rx-4482",
"medication": {
"product_name": "Lisinopril",
"ndc": "00071015523",
"strength": "10",
"strength_uom": "mg",
"dosage_form": "tablet",
"sig_text": "Take 1 tablet by mouth daily",
"start_date": "2026-10-21"
}
}
}The response includes the persisted order snapshot:
{
"id": "inter-ab12C345DeF6GhI7",
"type": "erx",
"patient": { "id": "pat-ab12C345DeF6" },
"event_timestamp": "2026-10-21T14:00:00Z",
"created_at": "2026-10-21T14:00:00Z",
"updated_at": "2026-10-21T14:00:00Z",
"rx_id": "your-rx-4482",
"quantity": 30,
"refills": 2,
"medication": {
"product_name": "Lisinopril",
"ndc": "00071015523",
"rx_norm": null,
"strength": "10",
"strength_uom": "mg",
"dosage_form": "tablet",
"sig_text": "Take 1 tablet by mouth daily",
"start_date": "2026-10-21"
},
"integration_record_id": "your-rx-4482",
"integration_sync_status": "enabled"
}rx_idis required and identifies the prescription in your system.integration_record_idis a separate partner tracking field; using the same value for both is fine.- The top-level ID and timestamps belong to the interaction. The nested medication snapshot has no medication ID, status, end date, record timestamps, or medication integration fields.
- When supplied,
quantitymust be an integer of at least1, andrefillsmust be an integer of at least0. Arefillsvalue of0means no refills are authorized. Both fields are optional; omitted values appear asnullin the snapshot. quantityandrefillsdescribe the original order. Refills are the number authorized, not the number remaining. Prescription interactions do not track fulfillment, dispensing, or pharmacy fill events.- The nested snapshot contains only
product_name,ndc,rx_norm,strength,strength_uom,dosage_form,sig_text, andstart_date. Unavailable values arenull. - Later medication edits do not update the prescription snapshot. Do not use it to determine current medication status or directions.
Medication inputs are not all echoed in the prescription snapshot.
When you supplymedication.statusormedication.end_datein a prescription-create request, those values are saved on the created medication record; they are not ignored. They are intentionally excluded from the prescription snapshot returned by both Create Prescription and List All Interactions. For example, anend_dateof2026-11-01is available through the medication endpoints but does not appear in either prescription response. Read or update these lifecycle fields through the medication endpoints. The prescription snapshot does not track the medication's current status or end date.
Read prescription snapshots
GET /api/provider/interactions?type=erx&patient_id=pat-ab12C345DeF6
Prescription interactions include rx_id, quantity, refills, and the same nested medication snapshot structure as the create response. The list retains its standard interaction metadata, including patient_id, event_timestamp, and interaction status. That status describes the interaction, not the medication or fulfillment.
The snapshot fields apply to erx (partner, DoseSpot, and Veradigm) and rx (in-house) interactions. Available data varies by source and age. Missing historical values are null; they are not filled from a current medication record. There is no separate public Show Prescription endpoint.
Find the currently displayed medication
The medication list uses the chart UI's deduplication rules. Deduplication selects records for display; it does not merge their stored data. Among eligible prescriptions sharing an NDC, active medications take precedence, followed by the newest start date. Prescriptions created through the public API participate in these rules.
To find the currently displayed medication associated with a prescription's drug:
-
Read the NDC from the prescription snapshot, if present.
-
Fetch List Patient Medications with that NDC:
GET /api/provider/patients/{patient_id}/medications?ndc=00071015523 -
Inspect the returned records and select the relevant medication.
-
Use that result's ID for exact-record retrieval or updates.
ndc matches the stored code exactly. Preserve its leading zeros and any hyphen separators; segmented historical codes are accepted without normalization. It filters the deduplicated view before pagination; it does not reveal hidden duplicates. Do not assume an NDC uniquely identifies a stored medication: independently recorded medications can remain separate results.
If the snapshot has no NDC, or the filter returns no match, fetch the medication list without ndc and inspect the available names, strengths, directions, dates, and statuses. Page through the results as needed. Name and start-date search parameters are not supported.
How to use medication IDs
Medication IDs identify individual stored records, not an ongoing treatment. The record selected for display can change as prescriptions are added or medications are updated.
You may store an ID to reference that exact record. Do not assume a previously stored ID will always identify the medication currently displayed in Hint. Refresh the list whenever you need the current chart view, then use the selected result's ID. An exact-ID read does not redirect to a newer displayed record, and updating one record does not update every record grouped with it.
Medication endpoints also accept the integration_record_id assigned to a medication in place of its Hint ID. That identifies the same individual record; it does not follow changes in which record is displayed.
Create and maintain medications
Use Create Medication for migrations or reported medications without a new prescribing event:
{
"medication": {
"product_name": "Metformin",
"ndc": "00093104801",
"strength": "500",
"strength_uom": "mg",
"dosage_form": "tablet",
"sig_text": "Take 1 tablet by mouth twice daily with meals",
"start_date": "2024-01-08",
"status": "Active",
"integration_record_id": "your-med-991"
}
}product_name is required. status is Active or Complete and defaults to Active. Use YYYY-MM-DD for start_date and end_date, and separate strength from its unit ("500" and "mg").
To end a course, use Update Medication with status: "Complete". Medications cannot be deleted through the public API.
The list supports ndc, status, limit, and offset. X-Count is the number returned on this page; X-Total-Count is the total matching the filters after deduplication.
Updated 6 days ago

