diff --git a/app/Controllers/Opd_prescription.php b/app/Controllers/Opd_prescription.php
index 534234f..3e48b36 100644
--- a/app/Controllers/Opd_prescription.php
+++ b/app/Controllers/Opd_prescription.php
@@ -2278,6 +2278,12 @@ class Opd_prescription extends BaseController
$data[$restrictionField] = trim((string) $this->request->getPost('dosage_restriction'));
}
+ foreach (['dosage', 'dosage_when', 'dosage_freq', 'dosage_where', 'no_of_days', 'qty', 'remark'] as $dosageField) {
+ if (in_array($dosageField, $fields, true)) {
+ $data[$dosageField] = trim((string) $this->request->getPost($dosageField));
+ }
+ }
+
if ($id > 0) {
$this->db->table($table)->where('id', $id)->update($data);
$savedId = $id;
diff --git a/app/Views/billing/ipd/discharge_create.php b/app/Views/billing/ipd/discharge_create.php
index 5486d58..a2f8700 100644
--- a/app/Views/billing/ipd/discharge_create.php
+++ b/app/Views/billing/ipd/discharge_create.php
@@ -749,20 +749,18 @@ $allergyStatusNoKnown = in_array($allergyStatusNormalized, ['no known drug aller
Drug Allergy / ADR (NABH)
-
Required: Drug Allergy Status is mandatory. If status is Known, Drug Allergy Details are mandatory.
-
+
-
+
@@ -3476,8 +3474,8 @@ $allergyStatusNoKnown = in_array($allergyStatusNormalized, ['no known drug aller
var status = (statusEl.value || '').trim();
var details = detailsEl ? (detailsEl.value || '').trim() : '';
if (status === '') {
- markNabhFieldError(form, '#drug_allergy_status', 'Drug Allergy Status is required as per NABH documentation.');
- return false;
+ statusEl.value = 'Allergies Not Known';
+ status = 'Allergies Not Known';
}
if (status.toLowerCase() === 'known' && details === '') {
markNabhFieldError(form, '#drug_allergy_details', 'Drug Allergy Details are required when Drug Allergy Status is Known.');
diff --git a/app/Views/billing/opd_medicince_workspace.php b/app/Views/billing/opd_medicince_workspace.php
index 4f0407f..a104a59 100644
--- a/app/Views/billing/opd_medicince_workspace.php
+++ b/app/Views/billing/opd_medicince_workspace.php
@@ -100,6 +100,39 @@
+
+
Prescription Defaults (auto-fills on consult form)