Prescription
Extract structured data from medical prescriptions including patient details, medication, dosage, and prescriber information.
The fields this preset extracts.
patient_namestringFull legal name of the patient.
patient_dobstringPatient's date of birth, in ISO-8601 format (YYYY-MM-DD).
prescriber_namestringFull 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_namestringName of the medication prescribed (generic or brand name).
dosagestringStrength and form of the medication (e.g., '500mg tablet', '10ml liquid').
frequencystringDosing frequency (e.g., 'twice daily', 'every 6 hours', 'once daily at bedtime').
quantityintegerNumber of units (tablets, capsules, ml) to dispense.
refillsintegerNumber of refills authorized for this prescription.
date_prescribedstringDate the prescription was issued, in ISO-8601 format (YYYY-MM-DD).
instructionsstringSpecial instructions or warnings for the patient.
curl -X POST 'https://app.staging.xberg.io/v1/extract' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'file=@your-document.pdf' \
--form-string 'options={"preset":"prescription"}'- Call mode
- Text only
- Citations
- Enabled
- Version
- v1
The instructions Xberg gives the AI model when it extracts this document type.
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. If the document does not match this preset, return {}. Extract only values supported by the document. Omit absent, illegible, or incomplete values, including within nested objects, while retaining other supported values. Do not infer, guess, supply defaults, or calculate missing values. Omit dates whose complete year, month, and day are not explicit. Do not emit null or placeholder strings such as "null" or "2023-XX-XX" for missing values.