Explorar o código

ERx UI updates

Vijayakrishnan %!s(int64=3) %!d(string=hai) anos
pai
achega
b25fb3c436
Modificáronse 1 ficheiros con 19 adicións e 4 borrados
  1. 19 4
      resources/views/app/patient/prescriptions/list.blade.php

+ 19 - 4
resources/views/app/patient/prescriptions/list.blade.php

@@ -214,7 +214,7 @@
                     <tr v-for="drug in existingDrugs" v-if="notAlreadyAdded(drug.data.name)">
                         <td class="width-200px">@{{ drug.data.name }}</td>
                         <td class="bg-white py-0 px-0">
-                            <input type="text" class="form-control form-control-sm min-width-unset rounded-0 border-0 shadow-none" v-model="drug.instructions">
+                            <input type="text" class="form-control form-control-sm min-width-unset rounded-0 border-0 shadow-none" v-model="drug.data.instructions">
                         </td>
                         <td class="width-70px bg-white py-0 px-0">
                             <input type="text" class="form-control form-control-sm min-width-unset rounded-0 border-0 shadow-none" v-model="drug.data.dispense">
@@ -253,7 +253,19 @@
                     <div class="row mb-2">
                         <div class="col-12">
                             <label class="text-sm text-secondary mb-0">Name</label>
-                            <input type="text" data-name="name" class="form-control form-control-sm min-width-unset" stag-suggest="" stag-suggest-bottom-left="" stag-suggest-ep="/fdb-med-suggest-v2/json" required="" stag-suggest-initialized="1"><div class="stag-suggestions-container position-relative"><div class="suggestions-outer stag-suggestions position-absolute d-none"></div></div>
+                            <input type="text" data-name="name" class="form-control form-control-sm min-width-unset"
+                                   stag-suggest="" stag-suggest-bottom-left=""
+                                   stag-suggest-ep="/fdb-med-suggest-v2/json" required="">
+                            <div class="stag-suggestions-container position-relative">
+                                <div class="suggestions-outer stag-suggestions position-absolute d-none"></div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="row mb-2">
+                        <div class="col-12">
+                            <label class="text-sm text-secondary mb-0">Instructions To Pharmacist</label>
+                            <input type="text" data-name="instructions"
+                                   class="form-control form-control-sm min-width-unset">
                         </div>
                     </div>
                     <div class="row mb-2">
@@ -420,7 +432,9 @@ GROUP BY erx_category");
             }
             if($point->lastChildPlan && $point->lastChildPlan->data) {
                 $parsedPlan = json_decode($point->lastChildPlan->data);
-                $point->instructions = trim(strip_tags($parsedPlan->value));
+                if($point->data) {
+                    $point->data->instructions = trim(strip_tags($parsedPlan->value));
+                }
             }
         }
 
@@ -1161,7 +1175,7 @@ GROUP BY erx_category");
                             medication: existing.data.name,
                             dispense: existing.data.dispense,
                             refills: existing.data.refills,
-                            instructions: existing.instructions,
+                            instructions: existing.data.instructions,
                         });
                         this.currentPrescription.clinical_detail_json.items = JSON.parse(JSON.stringify(this.currentPrescription.clinical_detail_json.items));
                         let temp = this.currentPrescription;
@@ -1268,6 +1282,7 @@ GROUP BY erx_category");
 
                                         let newERxItem = {
                                             medication: form.find('[data-name="name"]').val(),
+                                            instructions: form.find('[data-name="instructions"]').val(),
                                             dispense: form.find('[name="dispense"]').val(),
                                             refills: form.find('[name="refills"]').val(),
                                         };