Architecture & Data Model
A practical reference for the core entities, relationships, security controls, subscriptions, add-ons, devices, AI context, and audit visibility required to run the full IdeaDunes healthcare platform cleanly at scale.
Platform modules mapped into the schema
Role-aware journeys tied to records
Subscription and expansion motions
API routes supported by the model
Design Principles
Every clinical, financial, AI, and audit object is scoped to the correct tenant, branch, department, and user role so data stays separated and secure.
Appointments, encounters, labs, billing, pharmacy, and documents stay interconnected across the full care journey for both demo-safe and live tenant states.
Plans, subscriptions, add-ons, service entitlements, devices, and support layers are modeled as first-class business entities instead of afterthoughts.
Core Clinical Tables
| Table | Important fields | Purpose |
|---|---|---|
| tenants | id, tenant_code, name, facility_type, locale, timezone, plan_code, status | Top-level business and deployment boundary |
| branches | tenant_id, branch_name, city, state, address, contact_no | Multi-branch and network facility structure |
| patients | tenant_id, uhid, abha_id, first_name, last_name, gender, dob, mobile, consent_status | Master patient identity and demographic profile |
| appointments | tenant_id, patient_id, provider_id, slot_time, queue_no, channel, status | Scheduling, reminder, and follow-up orchestration |
| encounters | tenant_id, patient_id, encounter_type, doctor_id, department_id, visit_status, diagnosis_code | OPD, IPD, emergency, telemedicine, and visit history |
| clinical_notes | encounter_id, note_type, soap_json, vitals_json, allergy_json, medication_json | Clinical documentation and contextual EMR continuity |
| documents | tenant_id, patient_id, encounter_id, doc_type, file_path, source_device, verified_by | Consent forms, scans, summaries, IDs, MRD records |
Billing, Claims & Revenue
| Table | Important fields | Purpose |
|---|---|---|
| invoices | tenant_id, patient_id, invoice_no, gross_amount, discount, net_amount, payer_type | Patient billing and package charging |
| payments | invoice_id, mode, reference_no, received_amount, collected_by, posted_at | Collections and reconciliation |
| claims | tenant_id, patient_id, scheme_code, tpa_name, claim_status, submitted_at, approved_amount | PM-JAY, RGHS, insurance, and TPA workflows |
| subscriptions | tenant_id, plan_code, billing_cycle, user_seats, storage_limit, renewal_at, status | SaaS plan control and renewals |
| subscription_addons | subscription_id, addon_code, addon_type, quantity, monthly_fee, activation_status | AI, compliance, hardware, migration, support, and white-label upsells |
| service_orders | tenant_id, service_type, delivery_scope, owner_team, sla_target, commercial_status | Implementation, training, migration, and managed services |
Devices, Printing & Sync
| Table | Important fields | Purpose |
|---|---|---|
| devices | tenant_id, branch_id, device_type, serial_no, driver_profile, ip_address, health_status | Printers, scanners, kiosks, barcode devices, tablets, biometric units |
| print_jobs | tenant_id, device_id, template_code, job_type, status, requested_by, rendered_at | Prescription, label, bill, consent, and discharge printing |
| scan_ingest_queue | tenant_id, patient_id, source_device, ingest_status, ocr_state, verified_at | Scanned document capture and processing |
| offline_sync_batches | tenant_id, device_id, sync_token, event_count, uploaded_at, conflict_state | Offline form autosave and later synchronization |
Security, AI & Audit
| Table | Important fields | Purpose |
|---|---|---|
| users | tenant_id, role_code, email, mobile, last_login_at, mfa_enabled, status | Access control and role-specific visibility |
| role_permissions | role_code, module_code, action_code, scope_type, granted_by | Role-based authorization mapping |
| audit_events | tenant_id, actor_id, module, action, entity_type, entity_id, ip, created_at | Who did what, when, where, and to which record |
| ai_sessions | tenant_id, actor_id, context_type, patient_id, confidence, action_taken, reviewed_by | Assistant context, suggestion traceability, and approvals |
| security_incidents | tenant_id, severity, source, summary, opened_at, resolved_at, owner | Threat monitoring and security response visibility |
Linked References
Get Started Today
Join hundreds of hospitals and clinics using IdeaDunes to streamline operations, improve patient care, and grow revenue. Start your free trial — no credit card required.
No credit card required • Free onboarding • Cancel anytime
Role Quick Start
Executives, hospital teams, partners, government buyers, and patient-facing users can jump directly to their correct next step from anywhere in the web experience.