Commit Graph

442 Commits

Author SHA1 Message Date
dfb669e8ed Fix ABHA Management panels and facility QR print 2026-08-13 23:40:57 +05:30
3ce584ddc8 Use QR scanner modal only for ABHA QR registration 2026-08-13 20:10:03 +05:30
6a6895ce35 Add ABHA QR scan registration flow 2026-08-13 19:51:14 +05:30
3470244061 Keep ABHA modals open until closed by operator 2026-08-13 19:35:58 +05:30
ea1945d842 Skip match modal when ABHA already linked 2026-08-13 19:29:07 +05:30
167a68362a Distinguish official ABHA card from generated fallback 2026-08-13 19:05:36 +05:30
3e70ff8c4a Redesign ABHA Aadhaar creation flow 2026-08-13 17:11:48 +05:30
73ad7ef11f Store ABHA card and improve patient comparison 2026-08-13 11:30:02 +05:30
a5447cb83a Complete ABHA account verification flow 2026-08-13 10:36:20 +05:30
870fed5dcd fix: correct medical org grid columns 2026-08-12 15:32:09 +05:30
6ad28dd960 fix: restore medical payout routes and labels 2026-08-12 15:24:23 +05:30
d289bb5be1 feat: add OT workflow and allow zero payments 2026-08-12 13:38:25 +05:30
4ca463cc1e feat: add payment editing and fix discharge templates 2026-08-10 14:48:33 +05:30
681ad44a69 fix: show access denied page for permission failures 2026-08-10 12:30:32 +05:30
711b093487 feat: add IPD nursing and discharge permissions 2026-08-10 00:55:18 +05:30
bd9b1771a9 feat: add clinical drill-down dashboards
Add interactive OPD, IPD, and diagnosis dashboards with historical date ranges, KPI summaries, doctor and department workload, referral breakdowns, and diagnostic workflow statuses.
2026-08-10 00:21:55 +05:30
9872e1c726 refactor: show management status as toasts
Route User Management and Role Master action results through fixed top-right notifications, including SPA partial responses, validation failures, session actions, and network errors.
2026-08-09 23:58:59 +05:30
8f25904a13 refactor: streamline user permission management
Move per-user permissions into row actions, add contextual module permission guides, show selected-user details, and relocate online sessions to the profile menu.
2026-08-09 23:45:35 +05:30
c263b9e4ac feat: add role and session access controls
Add configurable role management, expanded project permission coverage, secured module routes, and single-active-session enforcement with online user administration.
2026-08-09 23:21:16 +05:30
b2926d5a0b Add discharge diagnosis and narrative template masters
Integrate Final Diagnosis with canonical disease master data and add reusable My/Master template CRUD for discharge narrative sections, including summary investigations, course, other advice, and discharge summary.
2026-08-09 19:50:05 +05:30
b39688dade Fix IPD discharge form interactions
Restore surgery and procedure bindings after SPA updates, validate procedure dates without SQL errors, and prevent medicine autocomplete Enter from submitting while preserving layout and autofill.
2026-08-09 19:05:05 +05:30
ea28bfa837 Improve discharge medication template output
Render class-only discharge medication tables with salt and medicine advice, and persist generic salt data from medicine search.
2026-08-09 13:45:50 +05:30
ee87802af1 Add IPD medical bill type controls
Filter IPD pharmacy credit bills, add package/include toggles with admission validation, and provide an inline invoice detail view.
2026-08-08 08:33:53 +05:30
561c0d9fc3 Add package checkbox for IPD pharmacy bill inclusion 2026-08-07 15:23:57 +05:30
a10acec63f Fix IPD package tab reload URL after package actions 2026-08-07 15:07:56 +05:30
d5c7d1030c Show patient grid controls and scope datatable search to filtered results 2026-08-07 12:32:21 +05:30
5f443f307a Enhance patient search and enforce refer master validation 2026-08-07 12:24:48 +05:30
780ebaa263 feat: add referral search to patient and IPD flows
Load referral master data into patient registration/edit screens, persist patient referby, expose searchable referral inputs in patient and IPD forms, and make referral title editable as free text in referral master CRUD.
2026-08-07 11:18:50 +05:30
dcc366444b feat: show New Update Available badge when GitHub has newer commits
- Add checkForUpdates() with 10-minute cached GitHub API check
- Add fetchLatestCommitInfo() to get latest commit SHA + message from GitHub API
- Save deployed commit SHA to writable/deployed_commit.txt after each deploy
- Invalidate update cache on successful deploy so next check is always fresh
- Button turns yellow + red NEW badge when update available
- Show commit message and short SHA diff (deployed → latest) in alert
- Show green 'Up to date' with deployed SHA when already current
- GitHub API rate limit safe: checks once per 10 mins via file cache
2026-08-04 04:03:09 +05:30
41f07357d2 fix: clean up orphaned running entries, add timeout handling
- Remove initial 'running' history entry (orphans when PHP times out)
- Add purgeStaleRunning() to mark old 'running' entries as 'timeout' on next deploy
- Add set_time_limit(300) to prevent PHP timeout during large ZIP download
- Add timestamps to log file entries for easier debugging
- Include ZIP size and source URL in success detail
- History now keeps last 20 entries (was 12)
- Show dash instead of blank for entries with no detail
- Style 'timeout' status same as 'failed' (red pill)
2026-08-04 03:59:38 +05:30
3fed2b6740 fix: prevent modal hang/fade by moving it outside refreshable panel div
- Move detail modal from system_ops_panel.php to system_ops.php
- Modal is now outside #systemOpsPanel so panel refresh never destroys it
- Skip refreshPanel() while modal is open (prevents backdrop desync)
- Add hidden.bs.modal handler to clean up lingering backdrop and body classes
- Fix show.bs.modal handler to correctly read data-detail via jQuery .data()
- Add white-space:pre-wrap to detail content for readable log output
2026-08-04 03:55:27 +05:30
f349b33001 feat: show all network interfaces with type badges (LAN/VPN/Public)
- readNetworkStatus() now returns array of all interfaces instead of single string
- Parses 'ip addr' output (with ifconfig fallback) for all IPv4 interfaces
- Each interface classified as LAN / VPN / Public by name and IP range
- VPN detected by interface prefix: wg*, tun*, tap*, vpn*
- RFC1918 ranges (192.168.x, 10.x, 172.16-31.x) shown as LAN
- Display: icon + IP + interface name badge + type label per row
- Handles NAT servers showing both local LAN and VPN IPs simultaneously
2026-08-04 03:45:51 +05:30
1073ab8aca feat: graphical RAID display, remove server action buttons
- Remove Restart Web, Restart PHP-FPM, Shutdown, Reboot buttons
- Remove runServerAction() library method and action() controller
- Remove /system-ops/action route (no longer needed)
- Parse /proc/mdstat into structured array (name, level, health, drives)
- Show each RAID array as a card with colored drive icons per-slot
- Green drive = healthy, red = failed, blue = spare
- Show rebuild progress bar when array is rebuilding
- Internet status shown as colored badge with wifi icon
- Services shown as colored badges (green=running, grey=other)
2026-08-04 03:39:49 +05:30
eb81f1999f refactor: remove git-based update method, keep only direct GitHub deployment
- Remove 'Update HMS (Git)' button and related functionality
- Remove runUpdate() method from SystemOperations
- Remove update() controller method
- Remove /setting/admin/system-ops/update route
- Remove setup_git_config.sh (no longer needed)
- Keep 'Deploy from GitHub' button as the only update method
- Rationale: Direct GitHub deployment is more reliable and requires no git config

Result: Single, simpler deployment method that always works
2026-08-04 03:27:22 +05:30
f3b8e28312 feat: add direct GitHub deployment as alternative to git pull
- New 'Deploy from GitHub' button downloads latest code directly
- No git configuration required - more reliable for git-unfriendly servers
- Automatically syncs changed files (skips .git, vendor, writable)
- Both methods available: git pull (if configured) or direct GitHub download
- Each has a clear confirmation dialog explaining the method
- Handles temporary extraction and cleanup automatically

This solves HMS deployment when git is not accessible to PHP process
2026-08-04 03:17:46 +05:30
0e6cf1664d feat: add HMS Features link on login page
- Added "View HMS Features & Capabilities" link below the login card
- Copied HMS_FEATURES_PRESENTATION.html to public/ so it is accessible
  via base_url without auth (same pattern as software-use-license.html)
- Link opens in a new tab
2026-08-04 02:05:09 +05:30
4d7ae0d669 docs: add HMS feature presentation (HTML + Markdown)
- HMS_FEATURES_PRESENTATION.html: full styled presentation with cover,
  professional introduction, 11 feature sections, tech stack, compliance,
  print/PDF button, and proper @media print A4 layout
- HMS_FEATURES_PRESENTATION.md: plain Markdown version of the same content
- system_ops.php: fix confirm dialog text for Update HMS button
2026-08-04 02:02:26 +05:30
155c3ec4b5 feat: add error details modal to update history
- Added "Details" column to Update History table
- Shows info icon button when error details are available
- Clicking button opens a modal with full error message
- Details displayed in pre-formatted text for easy reading
- Helps diagnose why HMS updates failed or timed out

When an update fails, users can now click the info icon to see the exact
git error output, making troubleshooting much easier.
2026-08-03 17:03:23 +05:30
f9c0fd1a72 fix: simplify HMS update to only git pull and add timeout protection
Update improvements:
- Renamed button from "Update System" to "Update HMS"
- Changed update to run only 'git pull' (removed database migrations)
- Added 60-second timeout to prevent system hangup
- Better error messages for timeouts and failures
- Logs update status (running/success/failed/timeout) to history
- Confirmation dialog now says "Pull latest HMS code from repository?"

This ensures quick updates without long-running migrations that could hang
the admin interface. Database migrations can be run separately as needed.
2026-08-03 17:00:21 +05:30
3720da9b16 feat: add visual progress bars to resource usage and improve CPU detection
Resource Usage improvements:
- Added visual progress bars for CPU, RAM, and Disk usage
- Progress bars use Bootstrap styling (success/info/warning colors)
- Display percentage and detailed metrics (e.g., RAM 4 / 128 MB (3%))
- Bars animate smoothly with CSS transitions

CPU detection enhancements:
- Added fallback to /proc/stat parsing when shell commands unavailable
- Added fallback to PHP getrusage() for CPU time estimation
- CPU now displays even when shell_exec is disabled
- Graceful fallback chain ensures data is always available

Progress bar styling:
- Success (green) for CPU
- Info (blue) for RAM
- Warning (orange/yellow) for Disk
- All bars styled with height, rounded corners, and smooth transitions
2026-08-03 16:56:50 +05:30
096ce5e199 feat: add System Operations tile to admin dashboard and include helper library
- Added System Operations link to Admin dashboard (app/Views/Setting/Admin/index.php)
- Uses load_form_div to load the system operations page inline
- Added SystemOperations library for server status collection and actions
- Tile uses server icon (bi-server) and appears in the admin panel grid
- Link: javascript:load_form_div(base_url('setting/admin/system-ops'), 'maindiv', 'System Operations')
2026-08-03 16:50:00 +05:30
89b862db31 feat: add admin system operations panel with AJAX refresh and server monitoring
- Added SystemOps controller with index and panel endpoints for dynamic content refresh
- Created system_ops_panel.php fragment for AJAX-based UI updates (no full page reload)
- Implemented 30-second auto-refresh using AJAX instead of location.reload()
- Fixed health badge contrast by adding explicit dark text color (#1f2937)
- Added jQuery availability checks to prevent script errors on page load
- Included server overview, resource usage, services, events, and update history
- Integrated delegated event handlers for action buttons (Update, Restart, Reboot, Shutdown)
- All buttons are protected with confirmation dialogs
- Layout maintains NiceAdmin card styling and responsive design

Routes added:
- GET /admin/system-ops/panel - returns panel fragment for refresh
2026-08-03 16:47:41 +05:30
e473be3ae7 Fix diagnosis print template dual-PDF flow and settings save bug
- Diagnosis.php: resolve doctor mapping via ABDM Report Doctor Mapping,
  compile pathology/diagnosis reports into separate Letter Head and
  Plain Paper PDFs, add compiled-pdf-links endpoint
- Routes.php: add diagnosis/compiled-pdf-links route
- pathology_detail.php: render/persist dual compiled PDF buttons
- Setting/Template.php: per-modality Letter Head / Plain Paper template
  mapping via hospital_setting keys
- Setting/Template/index.php: fix tile links using load_form (which only
  replaces #main) instead of load_form_div, which broke every internal
  AJAX reload (template type switch, modality switch, reset) on the
  diagnosis/discharge/document print template settings pages
- diagnosis_print_settings.php: fix corrupted watermark_alpha number
  input (missing step attribute) that silently blocked form submission
  for templates with non-integer-step legacy values
2026-08-03 02:43:50 +05:30
f57da52725 Refine IPD bill group row colspan and bold styling 2026-08-01 16:44:55 +05:30
6be0df028e Highlight IPD bill group headers and subtotals 2026-08-01 16:36:54 +05:30
71a7875fe1 Format IPD bill print group headers and subtotals 2026-08-01 16:21:22 +05:30
49d83dd105 Add PATIENT_TITLE discharge placeholder 2026-08-01 16:13:13 +05:30
53bc924c06 Polish IPD bill labels and wording 2026-08-01 16:05:16 +05:30
151ea7a53f Refine IPD charge display and billing print outputs 2026-08-01 15:55:00 +05:30
ee9bb7b560 Fix ABHA card barcode print rendering 2026-08-01 03:57:43 +05:30