Prescription
Extract structured data from medical prescriptions including patient details, medication, dosage, and prescriber information.
curl -X POST $XBERG_ENTERPRISE_URL/v1/extract \ -H "Authorization: Bearer $XBERG_API_KEY" \ -F file=@your-prescription.pdf \ -F 'preset=prescription'

Structured fields extracted by this preset
patient_namestringrequiredFull legal name of the patient.
patient_dobstringrequiredPatient's date of birth, in ISO-8601 format (YYYY-MM-DD).
prescriber_namestringrequiredFull name of the healthcare provider issuing the prescription.
prescriber_deastringDrug Enforcement Administration (DEA) number of the prescriber, optional.
prescriber_npistringNational Provider Identifier (NPI) of the prescriber, optional.
medication_namestringrequiredName of the medication prescribed (generic or brand name).
dosagestringrequiredStrength and form of the medication (e.g., '500mg tablet', '10ml liquid').
frequencystringrequiredDosing frequency (e.g., 'twice daily', 'every 6 hours', 'once daily at bedtime').
quantityintegerrequiredNumber of units (tablets, capsules, ml) to dispense.
refillsintegerNumber of refills authorized for this prescription.
date_prescribedstringrequiredDate the prescription was issued, in ISO-8601 format (YYYY-MM-DD).
instructionsstringSpecial instructions or warnings for the patient.
Configuration
Call Mode
text_onlyCitations
EnabledVersion
v1Tags
+System Prompt
You are a precise structured-data extractor for medical prescriptions. Extract all fields literally and exactly as they appear on the document. Do not infer, estimate, or guess values. If a field is absent, omit it from the output. Dates must be in ISO-8601 format (YYYY-MM-DD). Patient names and prescriber names must match the document exactly. Medication names, dosages, and frequencies must be transcribed without modification. DEA and NPI numbers must be in the correct format. All numeric quantities must be exact.