Commit Graph

52 Commits

Author SHA1 Message Date
23cca1f9ba feat(abdm): proper FHIR bundles for lab reports and IPD discharge
- FhirR4Builder: rewrite buildLabReportBundle() with DiagnosticReportLab
  profile, structured Observation valueQuantity/valueString, reference
  ranges, interpretation codes, Binary+DocumentReference for HTML report,
  Encounter resource, HFR-based bundle identifier system

- FhirR4Builder: rewrite buildDischargeSummaryBundle() with optional
  Practitioner/Organization params, structured ABDM sections (chief
  complaints 422843007, medical history 1003642006, investigations
  721981007, procedures 1003640003, medications 721912009, follow-up
  736271009), HFR-based bundle identifier system

- AbdmGateway: shareIpdDischargeBundle() now builds a real
  DischargeSummaryRecord FHIR bundle and posts via pushRecord()
  (POST /v3/records/push) instead of the stale shareIpdDischargeBundle()

- AbdmGateway: shareDiagnosisReportBundle() now builds a real
  DiagnosticReportRecord FHIR bundle and posts via pushRecord()
  instead of the stale shareDiagnosisReportBundle()

- AbdmGateway: add getHospitalProfileForFhir() and mapLabTypeToTitle()
  helpers; fix pre-existing undefined \ bug in
  getActiveConsentRecord()

- Add ABDM_FHIR reference package, AbdmBridgeLog controller/view,
  bridge record migration, debug scripts and misc UI/settings updates
2026-05-23 04:41:59 +05:30
32c1dc20e1 feat: Clinical Master workspace — Complaints + Diagnosis edit with SNOMED CT search 2026-05-20 01:25:01 +05:30
a56e8a5776 feat: SNOMED background coding pipeline + ABDM Coding Panel
- Add opd_coding_queue + opd_snomed_suggestions migrations
- Add ProcessSnomedCoding spark command (cron: snomed:process-coding)
  Extracts clinical phrases, matches local SNOMED FULLTEXT, saves suggestions
- Add AbdmCodingPanel controller: index/review/confirm/reject/correct/mark_fhir_ready/tip_check
- Add coding_panel + coding_panel_review views (Bootstrap 5, AJAX actions)
- Inject queue trigger in opd_prescription_save (fail-open, ON DUPLICATE KEY)
- Add consult form tip badge: polls tip_check 4s after save, shows review link
- Add AbdmCodingPanel routes behind abdm permission filter
- Various ABDM gateway, FHIR, ABHA, SNOMED library updates
2026-05-19 20:40:27 +05:30
0628f8f813 feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix
ABDM OPD Queue (today):
- New EAtriaBridgeConnector: opdQueueFetch/opdTokenCreate/opdTokenUpdateStatus + patch() helper
- New AbdmOpdQueue controller: index/list/fetchQueue/createToken/updateTokenStatus/processScannedToken
  - fetchQueue syncs gateway tokens into abdm_opd_tokens (local DB) and enriches with HMS patient data
  - processScannedToken auto-finds/creates patient_master record from ABHA scan data, marks token CALLED
- New migration: abdm_opd_tokens table (gateway_token_id, source, status, patient_id, opd_id, processed_at)
- New view: abdm/opd_queue.php - reception screen with auto-refresh 30s, HMS Patient column (green row when OPD registered)
- Sidebar: ABDM OPD Queue nav link added
- Routes: AbdmOpdQueue with abdmPermFilter

ABHA Register tab (earlier this session):
- New Abha controller: initiate/verifyOtp/communication/verifyCommOtp/validateAbha/card + autoCreateOrFindPatient
- New views: abha/card.php, partials/abha_create_panel.php, partials/abha_otp_modal.php
- Patient_V.php: ABHA Register tab with 4-method wizard (ABHA number, QR scan, facility QR, mobile OTP)

Patient ABHA search fix:
- Patient::search() now detects ABHA column (abha_id/abha_no/abha/abha_address) and searches by it

ABDM Bridge infrastructure:
- EAtriaBridgeConnector: new connector for e-atria.in ABDM bridge gateway
- AbdmConnectorFactory/Interface updated
- AbdmGatewaySettings controller + view
- SNOMED/CSNOTK terminology service skeleton
- Finance payout OPD consult views
- Migration: AddAbdmPushFieldsToOpdAndPatient, CreateSnomedCoreTables
- Docs: abdm/ API specs, architecture, gateway guides
2026-05-16 04:21:31 +05:30
7ab37ad80d Finance: separate OPD Consult and Doctor Charges payout screens; compact dashboard cards; add IPD payout tracking migration 2026-05-01 21:02:57 +05:30
36d3fa843b Implement medical store credit payout workflow and optimize payout pool DataTable grouping 2026-04-30 01:42:03 +05:30
5717763496 Add user-based sidebar auto-hide setting, movable from hospital default
- Create user_settings table to store individual user preferences
- UserSettings model for get/set/delete user setting values
- Home::myProfile loads user settings with hospital defaults fallback
- Home::myProfileSave persists user settings to DB
- my_profile.php adds Sidebar Auto-Hide Delay field (0-60 seconds)
- welcome_message.php checks user settings first, then hospital default
- Setting value 0 = auto-hide disabled; blank = use hospital default
- Extensible table design for future user settings (color theme, etc)
2026-04-28 13:47:46 +05:30
bd274a3fc3 Add OPD appointment time capture and storage with date+time display 2026-04-28 07:59:47 +05:30
6ae9a3516f feat: add HealthPlix OPD sync flow with settings, diagnostics, and sync ID persistence 2026-04-27 08:32:51 +05:30
67b4006d39 fix: use db->getFieldNames() instead of hasField() in migration for reliable column existence check 2026-04-25 09:11:15 +05:30
d02244444e finance/storestock: implement cash submission audits, bank settlements, and opd payout tracking 2026-04-22 10:53:20 +05:30
eb13872f43 Finance bank audit: settlement tab/filter refinements, bank-only selection, and summary metrics 2026-04-21 19:06:16 +05:30
fbbecee3b4 feat(ipd-charges): group delete, sort order, Up/Down buttons, foldable billing panels
- Safe delete for empty IPD charge groups with CSRF-safe AJAX
- Migration: add sort_order to ipd_item_type (backfilled)
- Sort order UI on create/edit/list views; persist in controller/model
- Up/Down swap buttons on group list (AJAX swap endpoint + CSRF refresh)
- Fix 500 on edit screen: restore missing getItemTypeById() in ItemIpdModel
- IpdBillingModel: propagate sort_order ordering to ipd-charges and bill-details tabs
- Billing IPD Charges tab: Bedside Clinical/Nursing Charge and Doctor Visit Charge panels now collapsible, start collapsed
2026-04-18 06:56:38 +05:30
5ce3461a0c Update master DB schema snapshot 2026-04-15 09:55:13 +05:30
68288622a0 Update master schema/seed snapshots and Medical backpanel changes 2026-04-15 08:39:47 +05:30
e1968e4b1d db: Add opd_cont_paper_print column to doctor_master table 2026-04-10 13:28:03 +05:30
2795e6255c Add medicine search DB indexes and prefix query optimization 2026-04-08 19:49:51 +05:30
062fc7ab32 feat: Add ABDM Task Board module with ABHA workflow
- Add ABDM sidebar heading and Task Board nav link
- Create migration 000040: abdm_work_tasks table
- Add AbdmTaskBoard controller with backfill methods
- Add AbdmWorkTaskService for task creation/deduplication
- Add AbdmGateway controller for ABDM API integration
- Separate task types: patient_abha_create vs patient_abha_update
- Add lab_report_publish and radiology_report_publish task types
- Patient.php: auto-create ABDM tasks on registration
- Diagnosis.php: auto-create tasks on report verify/finalize
- Task board UI: 7 filter buttons with default Unupdated ABHA view
- Fix SQL crash in backfillLabRadiologyTasks (dynamic column detection)
- Improve load_form AJAX error display with HTTP status + response text
- Add ABDM routes in Routes.php
- Add FHIR R4 builder library updates
- Add bridge sync service updates
2026-04-05 23:42:24 +05:30
9d88aaa2a6 Implement ABDM identity storage and align OPD consult/medicine dose masters 2026-04-04 17:26:40 +05:30
46a22f6e02 OEM lab refresh: fix id=0 seed issue (NO_AUTO_VALUE_ON_ZERO) and add one-shot refresh command 2026-04-03 16:21:54 +05:30
1be7b51812 OEM: add spark command oem:export-lab-templates to regenerate seed files 2026-04-03 15:29:11 +05:30
f79d7f50c9 OEM seeder: lab & radiology report templates for fresh installs 2026-04-03 15:18:24 +05:30
d8f75b3a29 feat(stock): add modular hospital stock management with dashboard, masters, indents, purchase and reports 2026-04-02 10:28:38 +05:30
7b04c8e419 Add Echo modality to diagnosis navigation and charge group setup 2026-04-02 05:12:08 +05:30
f4891c0bb4 Fix profile master data loading and remove city_auto_u migration 2026-04-01 19:22:03 +05:30
14a5a4e79a Add InvestigationMasterSeeder: 85 lab tests + 15 investigation profiles 2026-04-01 18:52:40 +05:30
94e1253e40 Investigation Profile Master: CRUD and consult integration 2026-04-01 18:44:52 +05:30
771fa64778 Investigation Master: CRUD, favourites, specialization filter 2026-04-01 18:26:33 +05:30
fe1156b68a Fix billing invoice balance/payment flow and deduction UI 2026-04-01 07:23:29 +05:30
911e7b50a7 Add Ayushman package import, billing claim sheet, and reporting dashboards 2026-03-26 15:42:40 +05:30
d2400fc5c2 Make complaints master migration idempotent for existing codes 2026-03-21 16:03:12 +05:30
3e810dec74 Harden medical invoice backfill migration for zero-date strict mode 2026-03-21 16:00:41 +05:30
04c35365cb Fix item request SQL function migration for binlog-safe settings 2026-03-21 15:59:22 +05:30
00e7e377ac Make GST insurance migration idempotent for existing columns 2026-03-21 15:57:15 +05:30
300ec0e5cf feat: migrate OPD template flow to DB and apply related updates 2026-03-20 18:11:17 +05:30
47d7db6d8b refactor: remove Gemini integration and seed leakage paths
- Remove Gemini runtime fallback from OPD AI text generation and complaint drafting
- Remove legacy Gemini scan extraction path
- Update UI/provider labels to Azure/AI generic naming
- Make AI usage guardrail metrics provider-neutral (ai_today)
- Add seed export sanitization to exclude sensitive hospital_setting and audit entries
- Remove Gemini API audit entry from master seed JSON
2026-03-18 06:18:52 +05:30
4adc6d79d9 fix: redact Gemini key; exclude audit/log tables from seed exporter
- Redact AIzaSy Gemini key from clinical_audit_trail entries in seed JSON
- Add default never-export denylist to exportMasterSeedData() so that
  clinical_audit_trail, lab_log, bridge_sync_queue and session tables are
  always skipped when setup.seed.export_tables is not configured.
  This prevents API keys set via the admin UI from leaking into git via
  the audit trail even after being deleted from hospital_setting.
2026-03-18 06:13:30 +05:30
5cd045fbf3 chore: redact Azure API keys from master_seed_data.json 2026-03-18 06:07:58 +05:30
99e886df28 chore: normalize line endings in master_seed_data.json (CRLF→LF) 2026-03-18 06:03:52 +05:30
1856d990eb fix: add city_auto_u migration and fix HospitalProfile upload mkdir error
- Add migration 2026-03-18-000028_CreateCityAutoUTable.php to create
  the missing city_auto_u table (city, district, state columns) used
  by PatientModel::getCitySuggestions() — resolves 500 on /billing/patient/city

- Fix HospitalProfile::save() to check directory creation success before
  moving uploaded logo files; returns clean JSON error instead of
  throwing HTTPException when public/assets/images/ is not writable
2026-03-18 06:01:01 +05:30
df8c4c417c Seed Update 2026-03-18 05:17:47 +05:30
cfc44d6691 Update master schema and enable normal tracking for local changes 2026-03-18 05:00:57 +05:30
ee3193ce43 Add master seed data export and auto-apply during setup install - idempotent REPLACE mode prevents duplicates 2026-03-18 04:41:51 +05:30
09abb98d95 Update exported master schema 2026-03-18 03:17:00 +05:30
5c2177eabb Update server env and deployment fixes 2026-03-17 18:57:58 +05:30
d94797a433 Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
1dee940ac0 feat(diagnosis): add print templates with image upload and optimize PDF rendering 2026-03-15 06:50:44 +05:30
aa845ac5ff Add report panel updates and related billing/discharge enhancements 2026-03-10 02:43:35 +05:30
2127063c7f Add nursing scan-to-structured workflow and discharge UI polish 2026-03-09 00:12:04 +05:30
232cfa15b0 Add OPD performance indexes for appointment dashboard and list queries 2026-03-01 01:57:39 +05:30