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.
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
| Key | Type in sample | Purpose and sample meaning |
|---|---|---|
chief_complaints | string | Narrative: the main reasons for the visit. Here: perianal pain and a growth noticed during defecation. |
history_of_presenting_illness | string | Narrative: 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_history | string | Narrative: 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_medications | string | Narrative: treatments taken before this consultation. Here: Ayurvedic treatment for 2–3 months. Separate from the new prescription array. |
personal_history | string | Narrative: personal habits and relevant lifestyle/history. Heading only in this sample. |
obstetric_history | string | Narrative: pregnancy and childbirth history. Here: second delivery approximately 10 years ago. Display also depends on female patient gender and assessment preferences. |
examination_findings | string | Narrative: clinician's observed examination findings. Here: a fissure at 6 o'clock and skin tags at 6 and 12 o'clock. |
procedure | string | Narrative: procedure-related documentation. Heading only; it does not establish that the surgery mentioned in the plan was performed. |
investigations | string | Narrative: investigation-related text. Heading only here. The investigation resolver can accept an array under this name, but this sample supplies a string and assessment: []. |
diagnosis | string | Diagnostic text: chronic anal fissure. The generated diagnosis formatter reads response, not this top-level key directly; the sample does not contain response. |
recommendations | string | Narrative: general care advice. Here: the recorded warm-water sitz bath instruction. |
diet | string | Narrative: diet and hydration advice. Here: fruits and fluids. The internal assessment preference label is Diet. |
follow_up | string | Narrative: return-visit advice. Heading only. Separate from the structured appointment date and time below. |
plan | string | Narrative: intended management and procedures. Here: advised surgery and initiation of medical management. This text alone does not schedule a procedure. |
continue_current_medications | boolean | Intended 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_medications | null | Intended metadata for medicines to omit. No omission information is supplied. No direct handling or non-null item schema is established by the reviewed form. |
assessment | array | Structured investigation orders, despite the name. Empty here. See the investigation item fields below. |
medication_templates | array of objects | New prescription rows. Two rows are supplied: Lactihep powder and Lox lidocaine jelly. Each row can populate the medicine editor and prescription output. |
blood_borne | object | Infection-related metadata with seven named entries. All are null. No dedicated consumption of this object was found in this outpatient component. |
vitals | array | Structured vital signs and supported health-history fields. Empty here, so no patient measurements are supplied. See the code-supported row fields below. |
detected_language | string | Language metadata. The sample wraps ta (Tamil) in a Markdown label. This component does not directly use it to select the interface language. |
family_history_notes | string | Narrative: relevant illnesses in relatives. Heading only. The assessment section is named “Family History” and uses the family_history preference. |
additional_response | string | Main 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_uri | string | Cloud 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_diagnosis | array | Structured coded diagnoses. Empty here; no ICD code is supplied. Used by the ICD editor when enabled. |
diagnosis_free_text | string | Uncoded diagnosis text for the ICD-enabled diagnosis workflow. Empty here; it is separate from top-level diagnosis. |
cross_dr_id | array | Doctors selected for opinion/cross referral. Empty here. Supports resolvable doctor/practitioner IDs or structured referral objects. |
admission_dr_id | array | Doctors selected for admission referral. Empty here. Uses the same normalized referral object fields as cross referrals. |
followup_date | null | Structured follow-up appointment date. No date supplied. Separate from follow_up prose; the form converts day/month/year values for the date input. |
followup_time | string | Structured follow-up time in HH:mm form. Here 00:00; with no follow-up date, this does not establish a scheduled midnight appointment. |
drug_allergies | array | Drug-allergy records used by the allergy editor when enabled. Empty means no supplied rows, not confirmed absence of drug allergies. |
food_allergies | array | Food-allergy records. Empty here. Shares the allergy row schema below. |
other_allergies | array | Other 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 key | Type in sample | Purpose and supplied values |
|---|---|---|
medication_name | string | Combined/display medication name. May contain generic name, brand, strength, and dosage form. Supplied as the Lactihep name and the lidocaine/Lox name. |
medication_type | string | Dosage form: powder or gel. Can map to drug_type in downstream prescription payloads. |
dosage | string | Free-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. |
route | string | Administration route: Oral or Rectal. Used by the route editor and prescription output. |
frequency_morning | string | Morning schedule slot: powder "0"; jelly "1". A nonzero value may carry an amount/unit; it is not necessarily a count of administrations. |
frequency_afternoon | string | Afternoon schedule slot: "0" for both, so no afternoon amount is specified in this schedule. |
frequency_evening | string | Evening schedule slot: "0" for both. |
frequency_night | string | Night schedule slot: powder "1 spoon"; jelly "1". The parser supports a numeric portion with unit text. |
duration | string | How long to use the medicine, such as “3 days.” Empty for both; no treatment duration is supplied. |
instructions | string | Additional administration instructions. Powder: mix one spoon with water at night. Jelly: the recorded local application instruction after sitz bath twice daily. |
when_to_take | string | Meal timing, such as before food, after food, or with food. Empty for both. Separate from time-of-day schedule slots. |
vaccine | boolean | Whether the prescription row is a vaccine. false for both. |
is_stat | boolean | Flag for an immediate/stat dose. false for both. |
is_once_only | boolean | Flag for a one-time dose. false for both. |
is_sos | boolean | Flag for as-needed/SOS use. false for both. |
quantity | null | Dispensing 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_date | string | Prescription start date: 05/11/2026 for both, meaning 5 November 2026 in the form's day/month/year convention. |
medication_end_date | string | Prescription end date. Empty for both; no end date supplied. |
actual_medication_name | string | Original/acquired medication name retained for correction and editing workflows: Lactihep or Lox Gel. It can differ from the formatted display name. |
auto_correct | boolean | Medication correction metadata, also used for editor highlighting. false for both. This flag alone does not prove that the medicine name was clinically verified. |
brand_name | string | Structured brand/product name. Used with brand/generic display preferences instead of parsing the combined name when available. |
generic_name | string | Structured 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_llm | boolean | Indicates 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_value | string; second row only | Numeric portion of the supplied dosage: "30". Used with the unit in structured processing. Not present in the powder row. |
unit | string; second row only | Unit 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 key | Meaning |
|---|---|
hiv | Human immunodeficiency virus-related status/result metadata. |
hcv | Hepatitis C virus-related status/result metadata. |
hbv | Hepatitis B virus-related status/result metadata. |
syphilis | Syphilis-related status/result metadata. |
htlv | Human T-lymphotropic virus-related status/result metadata. |
malaria | Malaria-related status/result metadata. |
cmv | Cytomegalovirus-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 key | Purpose |
|---|---|
template_tests | String: investigation/test name, for example CBC. |
remarks | String: 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 key | Purpose |
|---|---|
id | Row identifier assigned from the row index by the frontend formatter. |
pulse | Pulse measurement. |
systolicBP | Systolic blood pressure. |
diastolicBP | Diastolic blood pressure. |
position | Position associated with the vital measurement. |
oxygenSaturation | Oxygen saturation measurement. |
temperature | Body temperature; its unit must be established by the relevant UI/configuration. |
respRate | Respiratory rate. |
height | Height measurement. |
weight | Weight measurement. |
chestCircumference | Chest circumference; also accepts input alias chest_circumference. |
headCircumference | Head circumference; also accepts input alias head_circumference. |
bloodSugar | Blood glucose measurement. |
bmi | Body mass index value. |
abnormalPulse | Stored pulse abnormality marker. |
abnormalOxygen | Stored oxygen abnormality marker. |
abnormalSystolic | Stored systolic pressure abnormality marker. |
cancer | Stored cancer history/condition entry. |
epilepsy | Stored epilepsy history/condition entry. |
arthritis | Stored arthritis history/condition entry. |
hyperthyrodism | Stored hyperthyroidism entry. Preserve this exact spelling used by the code. |
kidneyDiseases | Stored kidney disease entry. |
cardiacDiseases | Stored cardiac disease entry. |
diabetesMellitus | Stored diabetes mellitus entry. |
asthma | Stored asthma entry. |
hypertension | Stored hypertension entry. |
hypothyroidism | Stored hypothyroidism entry. |
dyslipidemia | Stored dyslipidemia entry. |
allergy | Legacy/general allergy entry; separate from the structured allergy arrays. |
cancerDate | Date associated with the cancer entry. |
epilepsyDate | Date associated with the epilepsy entry. |
arthritisDate | Date associated with the arthritis entry. |
hyperthyrodismDate | Date associated with the hyperthyroidism entry; retain exact spelling. |
kidneyDiseasesDate | Date associated with the kidney disease entry. |
cardiacDiseasesDate | Date associated with the cardiac disease entry. |
diabetesMellitusDate | Date associated with the diabetes entry. |
asthmaDate | Date associated with the asthma entry. |
hypertensionDate | Date associated with the hypertension entry. |
hypothyroidismDate | Date associated with the hypothyroidism entry. |
dyslipidemiaDate | Date associated with the dyslipidemia entry. |
allergyDate | Date associated with the general allergy entry. |
lab_report | Object: 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 key | Purpose |
|---|---|
icd_type | Coding system identifier; defaults to the configured ICD key, or icd_10. |
icd_code | Selected diagnosis code. |
icd_name | Diagnosis description. The hook also accepts diagnosis as a name fallback. |
icd_active_from | Active-from date for the coded entry. Also accepts active_from and matching spaced CSV labels. |
icd_active_to | Active-to date for the coded entry. Also accepts active_to and matching spaced CSV labels. |
icd_is_active | Boolean 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 key | Purpose |
|---|---|
doctor_id | Doctor identifier used to match the selected doctor. |
speciality_id | Specialty identifier; defaults to 0 when absent in the normalizer. |
speciality_name | Display name of the doctor's specialty. |
practitioner_id | Practitioner identifier normalized using the doctor identifier as fallback. |
start_date | Referral start date; defaults to the current date in day/month/year form when absent. |
end_date | Referral 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 key | Purpose |
|---|---|
name | Allergen name. |
informed_by | Source/person who reported the allergy. |
severity | Severity normalized to uppercase: MILD, MODERATE, or SEVERE. Other values normalize to empty text. |
status | Clinical allergy status: SUSPECTED or CONFIRMED, normalized to uppercase. Other values normalize to empty text. Separate from date-derived is_active. |
start_date | Allergy start date. Normalized to ISO date for editing and day/month/year for saving. |
end_date | Allergy end date, or null. Converted like the start date when present. |
code | Allergen/catalog code. |
description | Allergy description or additional detail. |
active_from | Active-from date for the entry. Also read from normalized “ACTIVE FROM” CSV labels. |
active_to | Active-to date for the entry. Also read from normalized “ACTIVE TO” CSV labels. |
is_active | Boolean 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. |