- Add 'Pain Level: X - Label' text above pain scale for debugging
- Helps identify if pain_value is being read correctly from database
- Fix comparison to use strict equality check for ===
- User can now see which pain level is actually being rendered
- Change checkmark to down arrow (▼) for better visibility in PDFs
- Increase arrow size to 20px and make it bold
- Use white background for non-selected boxes for stronger contrast
- Add thick black border (3px) on selected level for emphasis
- Selected box shows colored background with white text
- Increase selected label text size and make it bold black
- Clear visual distinction between selected (value 2 vs 4) levels now
- Add fallback to 'logo.png' when H_logo is not set in database or constants
- Prevents {{H_logo}} placeholder from appearing as literal text in print/PDF
- Resolves 400 Bad Request error when browser tries to load unreplaced placeholder
- Ensures prescription templates always have a valid logo path
- Add checkmark (✓) above the selected pain intensity level
- Use color gradient from green (No Pain) to red (Worst) for better visual clarity
- Highlight selected level with colored background and white text
- Thicker border on selected level for better emphasis
- Bold label text for selected intensity
- Makes pain scale selection immediately visible in printed/PDF prescriptions
- Convert diagnosis name from static text to editable input field
- Add event handlers for diagnosis name editing (input, blur, keydown)
- Users can now edit diagnosis text after adding it to the table
- Duration and Date remain editable as before
- Enter key moves focus from diagnosis to duration field
- Auto-sync with selectedDiagnosisItems and SNOMED JSON on edit
- Apply proper SNOMED styling (blue text) only when concept_id exists
- Convert complaint name from static text to editable input field
- Add event handlers for complaint name editing (input, blur, keydown)
- Users can now edit complaint text after adding it to the table
- Frequency, Severity, Duration remain editable as before
- Enter key moves focus from complaint to frequency field
- Auto-sync with selectedComplaintItems and SNOMED JSON on edit
- Add billing.patient.edit-name-anytime permission to AuthGroups
- Update patient edit time restriction from 12 hours to 24 hours
- Modify Person_Edit_V to check for edit-name-anytime permission
- Admin can now edit patient name field (input_name) even after 24-hour window
Created custom CSS file to enhance visibility on older displays:
- Darker border colors for all form controls (#555 instead of light grays)
- Enhanced contrast for inputs, selects, textareas
- Darker card borders (#999)
- Darker table and modal borders
- Better visibility for buttons, dropdowns, alerts
- Updated Select2, jQuery UI, and DataTables borders
Files changed:
- public/assets/css/custom-theme-dark-borders.css (NEW)
* Comprehensive dark border overrides with !important flags
* Covers all Bootstrap and custom components
- app/Views/welcome_message.php
* Included custom-theme-dark-borders.css after main style.css
- app/Views/auth/login.php
* Included custom-theme-dark-borders.css for login page
- app/Views/storestock/_niceadmin_theme.php
* Updated inline CSS border colors from light to dark
* Changed #ebeef4, #dfe3ea, #e9edf5 to #555, #666, #888, #999
Theme now provides better contrast for old LED monitors with darker,
more visible borders across all UI components.
Modified {{investigation}} to show both:
1. Textarea content (advise_investigation_notes) if present
2. Comma-separated test list from opd_prescription_investigation table
Both sources combined with newline separator when both exist.
{{Tadvise_test_list}} still available separately for backward compatibility.
Example combined output:
USG WHOLE ABDOMEN
CECT ABDOMEN
PAC
COMPLETE CARDIAC CHECK UP
PAP SMEAR
CBC (Complete Blood Count), ECG (Electrocardiogram), HBA1C, HBSAG, HCV, HIV I & II (Elisa), Liver Function Test (LFT), PT/INR, Renal Function Test (RFT), Urine Routine & Microscopy, X-Ray Chest (PA View)
Changed placeholder behavior to match user requirements:
- {{investigation}} = textarea content (advise_investigation_notes) only
- {{Tadvise_test_list}} = comma-separated test names from table
Removed HTML bullet list formatting. Now outputs plain comma-separated text.
Example output:
CBC (Complete Blood Count), ECG (Electrocardiogram), HBA1C, HBSAG, HCV,
HIV I & II (Elisa), Liver Function Test (LFT), PT/INR, Renal Function Test (RFT),
Urine Routine & Microscopy, X-Ray Chest (PA View)
Both placeholders are independent and can show content simultaneously.
When opd_prescription_investigation table is empty but investigation
textarea has content, parse textarea content (split by newlines) to
populate the test list.
This handles cases where tests are entered as free-text in the
"Advise Investigation" textarea instead of selecting from master list.
Parsing logic:
- Try rx_investigations table first
- If empty, split investigation textarea by newlines
- Filter out empty lines and 'null' values
- Build HTML bullet list from either source
Example textarea content:
USG WHOLE ABDOMEN
CECT ABDOMEN
PAC
COMPLETE CARDIAC CHECK UP
PAP SMEAR
Will render as:
• USG WHOLE ABDOMEN
• CECT ABDOMEN
• PAC
• COMPLETE CARDIAC CHECK UP
• PAP SMEAR
Added try-catch around mPDF WriteHTML to catch rendering errors.
Changed debug_html mode to output as text/html for better preview.
Logs mPDF errors and returns user-friendly error message.
This will help diagnose blank page issues with {{Tadvise_test_list}} placeholder.
Previous implementation only built test list when investigation textarea
was empty, preventing {{Tadvise_test_list}} from showing when textarea
had content.
Changes:
- Separated test list building from textarea population logic
- {{Tadvise_test_list}} now always populates when rx_investigations exists
- {{investigation}} still gets comma-separated fallback when textarea empty
- Both placeholders now work independently
Test list HTML output format:
<ul style="margin:3px 0 0 16px;padding:0;list-style-type:disc;">
<li>CBC (Complete Blood Count)</li>
<li>ECG (Electrocardiogram)</li>
<li>HBA1C</li>
</ul>
Created new OPD template placeholder to display investigation test names
as a formatted HTML list, separate from the textarea {{investigation}}.
Changes:
- app/Controllers/Opd.php:
* Added $rxInvestigationTestList variable in buildLegacyDashboardTemplateVars()
* Builds HTML <ul> list from rx_investigations test names
* Added 'Tadvise_test_list' token to return array
- app/Views/billing/opd_template_builder.php:
* Added 'Tadvise_test_list' to $opdConsultSet placeholder list
* Now appears in "OPD Consult" group in template builder
Usage in OPD templates:
- {{investigation}} = comma-separated test names (for textarea)
- {{Tadvise_test_list}} = formatted HTML bullet list of test names (for print/display)
Example output:
<ul style="margin:3px 0 0 16px;padding:0;list-style-type:disc;">
<li>CBC (Complete Blood Count)</li>
<li>USG WHOLE ABDOMEN</li>
<li>ECG (Electrocardiogram)</li>
</ul>
Root cause: 50k+ invoices had insurance_case_id='0', and MySQL string comparison '0'='C26060004997' matched (both convert to numeric 0).
Fix: Exclude NULL/empty/'0' insurance_case_id before comparison in:
- getOrganizationCaseInvoiceRows() union query
- updateOrgTotals() aggregate queries
Result: Case C26060004997 now returns 9 rows instead of 56,786 (memory crash fixed)