Outpatient JSON: every key explained

For the multiple-doctor recording response, see Multi-source Outpatient JSON: every key explained, including per-row doctor attribution and all nested fields in that sample.

Reference for the supplied consultation payload, checked against OutpatientDataTemplate.tsx and its supporting modules. Reviewed 6 November 2026. Describes data and application behavior; it does not validate the prescribed treatment.

How to read this document

medication_templates[].route means the route key inside each medication object. An array can contain zero, one, or many objects. Both medication objects use the same field definitions; the second also supplies dosage_value and unit.

"" means empty text, [] means no supplied rows, and null means no supplied value. These do not establish a negative clinical finding. false is a boolean flag, while "0" is a string used in the medication schedule.

Scope of verification: “Narrative” below means the information belongs in a clinical text section. The component's narrative formatter reads additional_response or prepared canonical assessment content, not every top-level narrative key separately. “Metadata” identifies keys whose clinical meaning can be explained but whose handling is not established by this component. Supported child fields for empty arrays come from the code, not from invented patient data.

All 33 top-level keys in your payload

KeyType in samplePurpose and sample meaning
chief_complaintsstringNarrative: the main reasons for the visit. Here: perianal pain and a growth noticed during defecation.
history_of_presenting_illnessstringNarrative: onset, duration, recurrence, symptom characteristics, associated symptoms, and relieving factors. Here: recurrent pain, its relation to defecation, no reported bleeding, and prior stool hardness.
past_medical_historystringNarrative: previous illnesses and relevant medical history. The sample contains only a heading, so no history details are supplied. The assessment preference uses patient_history.
past_medicationsstringNarrative: treatments taken before this consultation. Here: Ayurvedic treatment for 2–3 months. Separate from the new prescription array.
personal_historystringNarrative: personal habits and relevant lifestyle/history. Heading only in this sample.
obstetric_historystringNarrative: pregnancy and childbirth history. Here: second delivery approximately 10 years ago. Display also depends on female patient gender and assessment preferences.
examination_findingsstringNarrative: clinician's observed examination findings. Here: a fissure at 6 o'clock and skin tags at 6 and 12 o'clock.
procedurestringNarrative: procedure-related documentation. Heading only; it does not establish that the surgery mentioned in the plan was performed.
investigationsstringNarrative: investigation-related text. Heading only here. The investigation resolver can accept an array under this name, but this sample supplies a string and assessment: [].
diagnosisstringDiagnostic text: chronic anal fissure. The generated diagnosis formatter reads response, not this top-level key directly; the sample does not contain response.
recommendationsstringNarrative: general care advice. Here: the recorded warm-water sitz bath instruction.
dietstringNarrative: diet and hydration advice. Here: fruits and fluids. The internal assessment preference label is Diet.
follow_upstringNarrative: return-visit advice. Heading only. Separate from the structured appointment date and time below.
planstringNarrative: intended management and procedures. Here: advised surgery and initiation of medical management. This text alone does not schedule a procedure.
continue_current_medicationsbooleanIntended instruction flag about continuing existing medicines. Here false. No direct handling was found in this component; do not interpret it as an implemented instruction to stop every medicine.
omit_medicationsnullIntended metadata for medicines to omit. No omission information is supplied. No direct handling or non-null item schema is established by the reviewed form.
assessmentarrayStructured investigation orders, despite the name. Empty here. See the investigation item fields below.
medication_templatesarray of objectsNew prescription rows. Two rows are supplied: Lactihep powder and Lox lidocaine jelly. Each row can populate the medicine editor and prescription output.
blood_borneobjectInfection-related metadata with seven named entries. All are null. No dedicated consumption of this object was found in this outpatient component.
vitalsarrayStructured vital signs and supported health-history fields. Empty here, so no patient measurements are supplied. See the code-supported row fields below.
detected_languagestringLanguage metadata. The sample wraps ta (Tamil) in a Markdown label. This component does not directly use it to select the interface language.
family_history_notesstringNarrative: relevant illnesses in relatives. Heading only. The assessment section is named “Family History” and uses the family_history preference.
additional_responsestringMain clinical narrative consumed by the assessment formatter, normally Markdown with named sections; the normalizer also accepts an object. Empty here. Separate top-level text is not automatically concatenated by the frontend fallback formatter.
phonetic_uristringCloud storage reference for medication-correction CSV data. The supplied gs://…/medication_autocorrect.csv is used by the correction workflow, not as a patient-facing image or attachment.
icd_diagnosisarrayStructured coded diagnoses. Empty here; no ICD code is supplied. Used by the ICD editor when enabled.
diagnosis_free_textstringUncoded diagnosis text for the ICD-enabled diagnosis workflow. Empty here; it is separate from top-level diagnosis.
cross_dr_idarrayDoctors selected for opinion/cross referral. Empty here. Supports resolvable doctor/practitioner IDs or structured referral objects.
admission_dr_idarrayDoctors selected for admission referral. Empty here. Uses the same normalized referral object fields as cross referrals.
followup_datenullStructured follow-up appointment date. No date supplied. Separate from follow_up prose; the form converts day/month/year values for the date input.
followup_timestringStructured follow-up time in HH:mm form. Here 00:00; with no follow-up date, this does not establish a scheduled midnight appointment.
drug_allergiesarrayDrug-allergy records used by the allergy editor when enabled. Empty means no supplied rows, not confirmed absence of drug allergies.
food_allergiesarrayFood-allergy records. Empty here. Shares the allergy row schema below.
other_allergiesarrayOther allergy records, such as environmental triggers. Empty here. Shares the allergy row schema below.

Every field in medication_templates[]

These 25 unique keys cover both supplied medication objects. Optional keys need not appear in every row. Prescription processing may derive or rename fields for other APIs; this table describes the supplied input names.

Child keyType in samplePurpose and supplied values
medication_namestringCombined/display medication name. May contain generic name, brand, strength, and dosage form. Supplied as the Lactihep name and the lidocaine/Lox name.
medication_typestringDosage form: powder or gel. Can map to drug_type in downstream prescription payloads.
dosagestringFree-text dose/amount: 1 spoon or 30gm. The application also uses this in strength/quantity processing. The jelly's 30 g value describes the supplied amount/package text and must not automatically be treated as the amount per application.
routestringAdministration route: Oral or Rectal. Used by the route editor and prescription output.
frequency_morningstringMorning schedule slot: powder "0"; jelly "1". A nonzero value may carry an amount/unit; it is not necessarily a count of administrations.
frequency_afternoonstringAfternoon schedule slot: "0" for both, so no afternoon amount is specified in this schedule.
frequency_eveningstringEvening schedule slot: "0" for both.
frequency_nightstringNight schedule slot: powder "1 spoon"; jelly "1". The parser supports a numeric portion with unit text.
durationstringHow long to use the medicine, such as “3 days.” Empty for both; no treatment duration is supplied.
instructionsstringAdditional administration instructions. Powder: mix one spoon with water at night. Jelly: the recorded local application instruction after sitz bath twice daily.
when_to_takestringMeal timing, such as before food, after food, or with food. Empty for both. Separate from time-of-day schedule slots.
vaccinebooleanWhether the prescription row is a vaccine. false for both.
is_statbooleanFlag for an immediate/stat dose. false for both.
is_once_onlybooleanFlag for a one-time dose. false for both.
is_sosbooleanFlag for as-needed/SOS use. false for both.
quantitynullDispensing quantity. Null for both, meaning none is supplied. The application has quantity calculations, but this input alone does not provide a final amount to dispense.
medication_start_datestringPrescription start date: 05/11/2026 for both, meaning 5 November 2026 in the form's day/month/year convention.
medication_end_datestringPrescription end date. Empty for both; no end date supplied.
actual_medication_namestringOriginal/acquired medication name retained for correction and editing workflows: Lactihep or Lox Gel. It can differ from the formatted display name.
auto_correctbooleanMedication correction metadata, also used for editor highlighting. false for both. This flag alone does not prove that the medicine name was clinically verified.
brand_namestringStructured brand/product name. Used with brand/generic display preferences instead of parsing the combined name when available.
generic_namestringStructured generic ingredient text. Empty for the powder; LIDOCAINE (2% W/V) for the jelly. Empty does not imply the product has no ingredient.
med_from_llmbooleanIndicates that the medication is not in our medication list and needs color highlighting so the doctor can identify and review it. Powder true, jelly false.
dosage_valuestring; second row onlyNumeric portion of the supplied dosage: "30". Used with the unit in structured processing. Not present in the powder row.
unitstring; second row onlyUnit attached to the structured dosage value: gm. Can feed downstream uom. Not present in the powder row.

Every field in blood_borne

All seven sample values are null. No positive result, negative result, test date, or test method can be inferred. The outpatient component does not establish the allowed non-null value format.

Child keyMeaning
hivHuman immunodeficiency virus-related status/result metadata.
hcvHepatitis C virus-related status/result metadata.
hbvHepatitis B virus-related status/result metadata.
syphilisSyphilis-related status/result metadata.
htlvHuman T-lymphotropic virus-related status/result metadata.
malariaMalaria-related status/result metadata.
cmvCytomegalovirus-related status/result metadata.

Fields inside assessment[] when populated

The sample is empty. The repository schema supplies the following two primary fields per investigation order.

Child keyPurpose
template_testsString: investigation/test name, for example CBC.
remarksString: investigation preparation, conditions, or instructions.

The resolver also accepts a string item as a test name. For object inputs it recognizes test-name aliases investigation_name, investigation_type, test_name, and name; instruction aliases are preparation_instructions and instructions. It preserves extra input properties rather than defining a closed item schema. The first array among its recognized top-level keys wins, including an empty assessment array.

Fields inside vitals[] when populated

The sample contains no rows. These are fields handled by the component's vital normalization, including its extended health-history fields. Measurements are copied as supplied; the input does not establish a universal unit convention. Examples below describe fields only, not this patient's measurements.

Child keyPurpose
idRow identifier assigned from the row index by the frontend formatter.
pulsePulse measurement.
systolicBPSystolic blood pressure.
diastolicBPDiastolic blood pressure.
positionPosition associated with the vital measurement.
oxygenSaturationOxygen saturation measurement.
temperatureBody temperature; its unit must be established by the relevant UI/configuration.
respRateRespiratory rate.
heightHeight measurement.
weightWeight measurement.
chestCircumferenceChest circumference; also accepts input alias chest_circumference.
headCircumferenceHead circumference; also accepts input alias head_circumference.
bloodSugarBlood glucose measurement.
bmiBody mass index value.
abnormalPulseStored pulse abnormality marker.
abnormalOxygenStored oxygen abnormality marker.
abnormalSystolicStored systolic pressure abnormality marker.
cancerStored cancer history/condition entry.
epilepsyStored epilepsy history/condition entry.
arthritisStored arthritis history/condition entry.
hyperthyrodismStored hyperthyroidism entry. Preserve this exact spelling used by the code.
kidneyDiseasesStored kidney disease entry.
cardiacDiseasesStored cardiac disease entry.
diabetesMellitusStored diabetes mellitus entry.
asthmaStored asthma entry.
hypertensionStored hypertension entry.
hypothyroidismStored hypothyroidism entry.
dyslipidemiaStored dyslipidemia entry.
allergyLegacy/general allergy entry; separate from the structured allergy arrays.
cancerDateDate associated with the cancer entry.
epilepsyDateDate associated with the epilepsy entry.
arthritisDateDate associated with the arthritis entry.
hyperthyrodismDateDate associated with the hyperthyroidism entry; retain exact spelling.
kidneyDiseasesDateDate associated with the kidney disease entry.
cardiacDiseasesDateDate associated with the cardiac disease entry.
diabetesMellitusDateDate associated with the diabetes entry.
asthmaDateDate associated with the asthma entry.
hypertensionDateDate associated with the hypertension entry.
hypothyroidismDateDate associated with the hypothyroidism entry.
dyslipidemiaDateDate associated with the dyslipidemia entry.
allergyDateDate associated with the general allergy entry.
lab_reportObject: normalized laboratory values. Its keys depend on the laboratory profile; the supplied payload contains no nested lab object to enumerate. Processing/display also depends on the vitals/lab feature configuration.

Fields inside icd_diagnosis[] when populated

No coded diagnoses are present in the sample. The diagnosis hook normalizes each structured row to these six fields.

Child keyPurpose
icd_typeCoding system identifier; defaults to the configured ICD key, or icd_10.
icd_codeSelected diagnosis code.
icd_nameDiagnosis description. The hook also accepts diagnosis as a name fallback.
icd_active_fromActive-from date for the coded entry. Also accepts active_from and matching spaced CSV labels.
icd_active_toActive-to date for the coded entry. Also accepts active_to and matching spaced CSV labels.
icd_is_activeBoolean calculated from the active-date range.

icd_key is additionally inspected by the hook when distinguishing coded and uncoded rows, but its normalizer populates the actual code from icd_code. Do not assume those two keys are interchangeable throughout the workflow. Rows with a diagnosis description and no code can contribute to free-text diagnosis content.

Fields inside cross_dr_id[] and admission_dr_id[]

Both sample arrays are empty. A populated item may be an ID matched against the doctor list or an object. The component normalizes each selected doctor to these fields.

Child keyPurpose
doctor_idDoctor identifier used to match the selected doctor.
speciality_idSpecialty identifier; defaults to 0 when absent in the normalizer.
speciality_nameDisplay name of the doctor's specialty.
practitioner_idPractitioner identifier normalized using the doctor identifier as fallback.
start_dateReferral start date; defaults to the current date in day/month/year form when absent.
end_dateReferral end date; defaults to null.

Fields inside drug_allergies[], food_allergies[], and other_allergies[]

All three arrays are empty in the sample. They share the following normalized row fields. Enabled allergy kinds are saved using plural keys in one payload and singular keys (drug_allergy, food_allergy, other_allergy) in the soft-OPD payload.

Child keyPurpose
nameAllergen name.
informed_bySource/person who reported the allergy.
severitySeverity normalized to uppercase: MILD, MODERATE, or SEVERE. Other values normalize to empty text.
statusClinical allergy status: SUSPECTED or CONFIRMED, normalized to uppercase. Other values normalize to empty text. Separate from date-derived is_active.
start_dateAllergy start date. Normalized to ISO date for editing and day/month/year for saving.
end_dateAllergy end date, or null. Converted like the start date when present.
codeAllergen/catalog code.
descriptionAllergy description or additional detail.
active_fromActive-from date for the entry. Also read from normalized “ACTIVE FROM” CSV labels.
active_toActive-to date for the entry. Also read from normalized “ACTIVE TO” CSV labels.
is_activeBoolean recomputed from the active-date range. Missing bounds are treated as open; invalid supplied bounds make the result false. This does not independently establish clinical allergy status.