All features In-patient & De-addiction
In-patient & De-addiction

In-patient care, wards & de-addiction — technical details

The IPD module (/ipd/) is a standalone sub-application with its own database schema (database_ipd.sql + database_ipd_v2.sql), its own login (staff PIN-based for ward terminals, full login for doctors), and its own navigation. It shares the patients and prescriptions tables with the main app. The de-addiction suite runs inside the IPD module and is included as a plan-level add-on.

MHCA 2017 NDPS Act 1985 CIWA-Ar COWS India Pharmacy Act

Ward & bed management

Ward model

ipd_wards defines wards (name, type: general/acute/ICU/de-addiction, capacity). ipd_beds maps individual beds to wards (bed number, status: available/occupied/maintenance). The bed board (ipd/pages/bed_management.php) renders a real-time occupancy grid.

Admissions

ipd_admissions: each admission links a patient to a bed, an admitting doctor, admission date, diagnosis at admission, and a ward. Transfers between beds or wards create a new admission row linked to the original via a transfer_from_id column.

State-specific profiles

ipd_state_profiles stores form and documentation rules that differ by Indian state (e.g., which MHCA sub-forms are required). ipd_state_profile_history tracks changes to these profiles for audit purposes.

Ward terminal login

ipd/pages/ward_login.php and ipd/includes/quick_login.php allow nursing staff to log into a shared ward terminal using a PIN (ipd_staff_pins), without entering a full username/password — reducing friction on a busy ward.

Clinical documentation

Progress notes

ipd_progress_notes: daily or event-triggered notes by any clinical team member. Notes support free text and structured fields (SOAP format optional). The ipd/api/sign_note.php endpoint handles e-signature.

Nursing charts

ipd_nursing_charts: structured observation records (temperature, pulse, BP, SpO₂, intake, output) entered by nursing staff at defined intervals. Rendered as a tabular chart with colour-coded out-of-range values.

Medication Administration Record (MAR)

ipd_mar records each medication administration: drug, dose, route, time scheduled, time given, nurse ID, and any reason for deviation. ipd/api/mar.php serves the live MAR board, updated every 30 seconds via polling.

Treatment plans

ipd_treatment_plans: goal-based treatment plans linked to an admission, with problem list, planned interventions, and review dates. Supports multi-disciplinary contributions.

MDT meetings

ipd_mdt_meetings: multi-disciplinary team meeting records (date, attendees, decisions, next review date) linked to a patient admission. PDFs are generated for the patient file.

Safety, risk & compliance

Risk assessments

risk_assessments: structured risk assessments (suicide risk, violence risk, fall risk, ligature risk). ipd/pages/ligature_risk.php is a dedicated form for the ligature-point assessment required in psychiatric wards. ipd/pages/risk_assessment.php covers the general risk workflow.

Seclusion & restraint

ipd/pages/seclusion_restraint.php: records each episode of seclusion or physical restraint (start time, end time, reason, authorising doctor, nursing observations at required intervals, patient rights read). Required under the MHCA 2017.

Observation scheduler

ipd/pages/obs_scheduler.php: assigns an observation level (1:1, 15-min checks, hourly) to a patient and generates a schedule that nursing staff sign off against. Incomplete observations raise a notification.

Incidents

ipd_incidents: any ward incident (fall, self-harm, aggression, elopement) is logged with category, severity, staff involved, actions taken, and outcome. Reports are available for governance review.

Leave passes

ipd_leave_passes: short-term leave from the ward, with date/time out, expected return, responsible escort, and actual return time. Required for MHCA compliance in voluntary and involuntary admissions.

ECT register

ipd_ect_sessions: each ECT session log including anaesthetic details, stimulus parameters, seizure duration, and clinical response. ipd/pages/ect_register.php renders the register in a standard clinical format.

MHCA documents & e-signature

Form registry

ipd/includes/mhca_forms_registry.php defines all MHCA 2017 statutory forms (Form 1, 3, 4, 5, 6, and state-specific variants). Each form is rendered as a fillable HTML template.

E-signature flow

ipd/pages/mhca_esign.php + ipd/api/mhca_pdf_save.php: a clinician reviews the filled form, signs electronically (drawn signature captured as a PNG blob or typed name with timestamp), and the form is rendered to a signed PDF stored in ipd_mhca_documents.

Multi-language support

ipd/includes/mhca_translate.php + ipd_mhca_translation_cache: MHCA forms can be rendered in regional languages. Translations are cached per form-language pair. A translation cache miss triggers a new translation (AI-assisted), which is then cached permanently.

Patient rights log

ipd_patient_rights_log: records every instance of a patient's rights being read to them (as required by MHCA 2017), with timestamp and witnessing staff member.

De-addiction suite (IPD add-on)

Intake assessment

ipd_deaddiction_assessment: structured intake form capturing substance use history, dependence severity, physical health, mental health comorbidities, and family/social history. Score is calculated for AUDIT (alcohol) or equivalents for other substances.

Withdrawal monitoring

ipd_withdrawal_monitoring: timed, scored assessments using CIWA-Ar (Clinical Institute Withdrawal Assessment for Alcohol, revised) for alcohol withdrawal and COWS (Clinical Opiate Withdrawal Scale) for opioid withdrawal. Score trends are charted over the withdrawal episode. Severe scores trigger an automatic clinical alert.

OST dispensing

ipd/pages/ost_dispensing.php: records daily dispensing of opioid substitution therapy (buprenorphine/naloxone or methadone) — dose, time dispensed, staff dispensing, and patient observation at time of dispensing. Feeds into the NDPS register automatically.

Take-home requests

ipd_takehome_requests: patients stable on OST can request take-home doses. Requests go through an approval workflow (supervisor review) before take-home doses are dispensed and logged.

Urine drug screening (UDS)

ipd_uds_tests: scheduled and ad-hoc urine drug screening, with substances tested, result (positive/negative/dilute/invalid per substance), and date. Positive results trigger a notification to the treating team.

NDPS register

ipd_ndps_register: the legally required register under India's NDPS Act 1985 for controlled substances (primarily opioids) used in treatment. Each entry links to the OST dispense record. ipd/pages/ndps_register.php renders the register in the format required for drug inspector visits.

Craving tracker

ipd/pages/craving_tracker.php: patients rate cravings on a visual scale at defined intervals. Trend data is used in MDT meetings and in the discharge summary.

Family therapy sessions

ipd/pages/family_therapy.php: structured records of family therapy sessions (therapist, family members present, session goals, notes, outcome) linked to the patient admission.

Follow-up scheduling

ipd_followups: post-discharge follow-up appointments are scheduled before discharge and tracked here. Missed follow-ups appear in the de-addiction compliance dashboard.

De-addiction compliance dashboard

ipd/pages/dadd_compliance.php: aggregate view of the programme — patients in treatment, UDS pass/fail rates, OST compliance rates, follow-up attendance, and dropout rates. Exportable as PDF for licence renewal submissions.

Discharge & billing

Discharge summaries

ipd/pages/discharge.php generates a structured discharge summary (admitting diagnosis, treatment given, medications on discharge, follow-up instructions). The summary is available for download as a PDF via ipd/pages/ipd-reports-export.php.

IPD billing

ipd_charges: daily ward charges (bed, nursing, procedures) are accumulated and reconciled with pharmacy dispenses and lab orders at discharge. ipd/pages/ipd_billing.php produces the final IPD bill, which can be pushed to the main billing module.

AI-generated IPD reports

ipd/api/ai_report.php: generates narrative clinical summaries of an IPD stay (progress, treatment response, discharge status) using the AI pipeline, for inclusion in insurance claims or referral letters.

Ready to see it in action?

The demo has real sample data — appointments, patients, prescriptions — so you can explore freely.

Try the demo ← All features