Prescription

Medical & Health

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'
Sample Prescription document

Structured fields extracted by this preset

patient_namestringrequired

Full legal name of the patient.

patient_dobstringrequired

Patient's date of birth, in ISO-8601 format (YYYY-MM-DD).

prescriber_namestringrequired

Full name of the healthcare provider issuing the prescription.

prescriber_deastring

Drug Enforcement Administration (DEA) number of the prescriber, optional.

prescriber_npistring

National Provider Identifier (NPI) of the prescriber, optional.

medication_namestringrequired

Name of the medication prescribed (generic or brand name).

dosagestringrequired

Strength and form of the medication (e.g., '500mg tablet', '10ml liquid').

frequencystringrequired

Dosing frequency (e.g., 'twice daily', 'every 6 hours', 'once daily at bedtime').

quantityintegerrequired

Number of units (tablets, capsules, ml) to dispense.

refillsinteger

Number of refills authorized for this prescription.

date_prescribedstringrequired

Date the prescription was issued, in ISO-8601 format (YYYY-MM-DD).

instructionsstring

Special instructions or warnings for the patient.

Configuration

Call Mode

text_only

Citations

Enabled

Version

v1

Tags

prescriptionmedicationmedicalpharmacydosage
+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.

Open-source primitives, composed into one backend. Curated cohort of design partners. Apply to work with us.

Cookies

We value your privacy

Xberg uses cookies to improve your experience, personalize content, and analyze traffic. You can manage your preferences at any time.