Medical Record

Structured extraction preset for clinical documents including encounters, vitals, diagnoses, medications, procedures, and lab results. Captures ICD-10/CPT codes, allergies, and assessment-and-plan sections with full medical coding support.

The fields this preset extracts.

patientobject
namestring

Patient full legal name.

date_of_birthstring

Patient date of birth (ISO-8601).

sexstring

Biological sex (M=male, F=female, X=other, U=unknown).

mrnstring

Medical record number unique to the healthcare organization.

addressstring

Patient residential address.

phonestring

Patient contact telephone number.

providerobject
encounterobject
datestring

Encounter date (ISO-8601).

typestring

Encounter type (office_visit/telehealth/emergency/inpatient_admission/inpatient_discharge/urgent_care/follow_up/consultation/lab_only/imaging_only/other).

reasonstring

Chief reason for encounter.

attending_providerstring

Name of attending physician.

chief_complaintstring

Patient's chief complaint or primary reason for visit.

history_of_present_illnessstring

Detailed narrative of present illness history.

vitalsobject
allergiesarray

Array of known allergies.

medicationsarray

Array of current and past medications.

problemsarray

Array of current and past diagnoses.

proceduresarray

Array of procedures performed.

lab_resultsarray

Array of laboratory test results.

imagingarray

Array of imaging studies and findings.

assessment_and_planstring

Clinical assessment summary and treatment plan.

follow_upobject
curl
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":"medical_record"}'
Call mode
Text and vision
Citations
Enabled
Version
v1

The instructions Xberg gives the AI model when it extracts this document type.

Extract clinical data from the medical record. Record ICD-10 and CPT codes exactly as documented—do not infer, normalize, or correct codes. Dates must be ISO-8601 format. Vital signs should be integers where specified (heart rate, blood pressure, respiratory rate) or numbers (temperature, oxygen saturation). Do not diagnose or interpret findings beyond what is explicitly stated. Capture patient demographics, encounter details, chief complaint, medications with status, allergies with severity levels, problems with active/resolved/chronic status, procedures, lab results with abnormal flags, imaging findings, and follow-up plan. Never supplement missing information. 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.

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

We value your privacy

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