Explorar el Código

Erx UI - LAB & IMAGING

Vijayakrishnan hace 3 años
padre
commit
235b18eac0

+ 1 - 1
resources/views/app/patient/prescriptions/drug-form.blade.php

@@ -1,7 +1,7 @@
 <div class="stag-popup stag-popup-sm mcp-theme-1" stag-popup-key="prescription-popup-DRUG">
     <form method="POST" action="">
         <h3 class="stag-popup-title mb-2">
-            <span>Add Drug Prescription</span>
+            <span>Drug Prescription</span>
             <a href="#" class="ml-auto text-secondary"
                onclick="return closeStagPopup()"><i class="fa fa-times-circle"></i></a>
         </h3>

+ 30 - 0
resources/views/app/patient/prescriptions/imaging-form.blade.php

@@ -0,0 +1,30 @@
+<div class="stag-popup stag-popup-sm mcp-theme-1" stag-popup-key="prescription-popup-IMAGING">
+    <form method="POST" action="">
+        <h3 class="stag-popup-title mb-2">
+            <span>Imaging Prescription</span>
+            <a href="#" class="ml-auto text-secondary"
+               onclick="return closeStagPopup()"><i class="fa fa-times-circle"></i></a>
+        </h3>
+        <div class="mb-2">
+            <label class="text-sm text-secondary mb-1">Test</label>
+            <input type="text" class="form-control form-control-sm min-width-unset"
+                   v-model="currentPrescription_IMAGING.clinicalDetailJson.test">
+        </div>
+        <div class="mb-2">
+            <label class="text-sm text-secondary mb-1">ICDS</label>
+            <input type="text" class="form-control form-control-sm min-width-unset"
+                   v-model="currentPrescription_IMAGING.clinicalDetailJson.icds">
+        </div>
+        <div class="mb-2">
+            <label class="text-sm text-secondary mb-1">Memo</label>
+            <input type="text" class="form-control form-control-sm min-width-unset"
+                   v-model="currentPrescription_IMAGING.clinicalDetailJson.memo">
+        </div>
+        <div class="d-flex align-items-center justify-content-center mt-3">
+            <button type="button" class="btn btn-sm btn-primary mr-2" v-on:click.prevent="savePrescription()">Submit
+            </button>
+            <button type="button" class="btn btn-sm btn-default border" onclick="return closeStagPopup()">Cancel
+            </button>
+        </div>
+    </form>
+</div>

+ 79 - 29
resources/views/app/patient/prescriptions/index.blade.php

@@ -3,9 +3,13 @@
 @section('inner-content')
     <div id="prescriptions-{{$patient->id}}">
         <div class="d-flex align-items-baseline pt-2">
-            <h6 class="my-0 font-weight-bold text-secondary">Prescriptions</h6>
+            <h6 class="my-0 font-weight-bold text-secondary font-size-14">Prescriptions</h6>
             <span class="mx-2 text-secondary">|</span>
-            <a v-on:click.prevent="newPrescription('DRUG')">+ Drug</a>
+            <a href="#" v-on:click.prevent="newPrescription('DRUG')">+ Drug</a>
+            <span class="mx-2 text-secondary">|</span>
+            <a href="#" v-on:click.prevent="newPrescription('LAB')">+ Lab</a>
+            <span class="mx-2 text-secondary">|</span>
+            <a href="#" v-on:click.prevent="newPrescription('IMAGING')">+ Imaging</a>
         </div>
         <table class="table table-striped table-sm table-bordered mt-2 mb-0">
             <thead>
@@ -15,9 +19,9 @@
                 <th class="px-2 text-secondary border-bottom-0">Clinical</th>
                 <th class="px-2 text-secondary border-bottom-0">Logistics</th>
                 <th class="px-2 text-secondary border-bottom-0">Prescriber</th>
+                <th class="px-2 text-secondary border-bottom-0">Sign</th>
                 <th class="px-2 text-secondary border-bottom-0">Pro Status</th>
                 <th class="px-2 text-secondary border-bottom-0">Client Status</th>
-                <th class="px-2 text-secondary border-bottom-0">Sign</th>
                 <th class="px-2 text-secondary border-bottom-0"></th>
             </tr>
             </thead>
@@ -29,12 +33,16 @@
                     <div class="d-flex align-items-baseline">
                         <a class="mr-2" href="#" v-on:click.prevent="editClinicalDetails(prescription)"><i class="fa fa-edit on-hover-opaque"></i></a>
                         <div v-if="prescription.clinical_detail_json" class="d-inline-flex align-items-baseline">
-                            <div class="d-flex align-items-baseline">
+                            <div class="d-flex align-items-baseline" v-if="prescription.erx_category === 'DRUG'">
                                 <b class="mr-2">@{{prescription.clinical_detail_json.medication ?? '-'}}</b>
                                 <span class="text-secondary mr-1">@{{prescription.clinical_detail_json.strength ?? '-'}}</span>
                                 <span class="text-secondary mr-1">@{{prescription.clinical_detail_json.amount ?? '-'}}</span>
                                 <span class="text-secondary mr-1">@{{prescription.clinical_detail_json.route ?? '-'}}</span>
                             </div>
+                            <div class="d-flex align-items-baseline" v-if="prescription.erx_category === 'LAB' || prescription.erx_category === 'IMAGING'">
+                                <b class="mr-2">@{{prescription.clinical_detail_json.test ?? '-'}}</b>
+                                <span class="text-secondary mr-1">@{{prescription.clinical_detail_json.icds ?? '-'}}</span>
+                            </div>
                         </div>
                         <div v-else>-</div>
                     </div>
@@ -53,14 +61,16 @@
                     </div>
                 </td>
                 <td class="px-2">@{{prescription.hcpProDisplayName}}</td>
+                <td class="px-2"></td>
                 <td class="px-2">@{{prescription.pro_declared_status}}</td>
                 <td class="px-2">@{{prescription.client_declared_status}}</td>
                 <td class="px-2"></td>
-                <td class="px-2"></td>
             </tr>
             </tbody>
         </table>
         @include('app.patient.prescriptions.drug-form')
+        @include('app.patient.prescriptions.lab-form')
+        @include('app.patient.prescriptions.imaging-form')
         @include('app.patient.prescriptions.logistics-form')
     </div>
     <script>
@@ -107,6 +117,31 @@
                                 purpose: '',
                             }
                         },
+                        currentPrescription_LAB: {
+                            noteUid: null, // TODO: this won't be null if created from a note
+                            clientUid: '{{ $patient->uid }}',
+                            replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
+                            hcpProUid: '{{$pro->uid}}',
+                            erxCategory: 'LAB',
+                            clinicalDetailJson: {
+                                test: '',
+                                icds: '',
+                                memo: '',
+                            }
+                        },
+                        currentPrescription_IMAGING: {
+                            noteUid: null, // TODO: this won't be null if created from a note
+                            clientUid: '{{ $patient->uid }}',
+                            replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
+                            hcpProUid: '{{$pro->uid}}',
+                            erxCategory: 'IMAGING',
+                            clinicalDetailJson: {
+                                test: '',
+                                icds: '',
+                                memo: '',
+                            }
+                        },
+
 
                         currentPrescriptionLogistics: {
                             uid: '',
@@ -127,24 +162,41 @@
                         newPrescription: function(_type) {
                             this.currentPrescriptionAction = 'ADD';
                             this.currentPrescriptionType = _type;
-                            if (_type === 'DRUG') {
-                                this.currentPrescription_DRUG = {
-                                    noteUid: null, // TODO: this won't be null if created from a note
-                                    clientUid: '{{ $patient->uid }}',
-                                    replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
-                                    hcpProUid: '{{$pro->uid}}',
-                                    erxCategory: 'DRUG',
-                                    clinicalDetailJson: {
-                                        medication: '',
-                                        strength: '',
-                                        amount: '',
-                                        route: '',
-                                        frequency: '',
-                                        dispense: '',
-                                        refills: '',
-                                        purpose: '',
-                                    }
-                                }
+                            switch (_type) {
+                                case 'DRUG':
+                                    this.currentPrescription_DRUG = {
+                                        noteUid: null, // TODO: this won't be null if created from a note
+                                        clientUid: '{{ $patient->uid }}',
+                                        replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
+                                        hcpProUid: '{{$pro->uid}}',
+                                        erxCategory: 'DRUG',
+                                        clinicalDetailJson: {
+                                            medication: '',
+                                            strength: '',
+                                            amount: '',
+                                            route: '',
+                                            frequency: '',
+                                            dispense: '',
+                                            refills: '',
+                                            purpose: '',
+                                        }
+                                    };
+                                    break;
+                                case 'LAB':
+                                case 'IMAGING':
+                                    this.currentPrescription_LAB = {
+                                        noteUid: null, // TODO: this won't be null if created from a note
+                                        clientUid: '{{ $patient->uid }}',
+                                        replacesCancelledErxUid: null, // TODO: step-2 support UI to mark a new one as replacing a cancelled one
+                                        hcpProUid: '{{$pro->uid}}',
+                                        erxCategory: _type,
+                                        clinicalDetailJson: {
+                                            test: '',
+                                            icds: '',
+                                            memo: '',
+                                        }
+                                    };
+                                    break;
                             }
                             Vue.nextTick(() => {
                                 showStagPopup('prescription-popup-' + this.currentPrescriptionType, true);
@@ -153,12 +205,10 @@
                         editClinicalDetails: function(_prescription) {
                             this.currentPrescriptionAction = 'EDIT_CLINICAL';
                             this.currentPrescriptionType = _prescription.erx_category;
-                            if (this.currentPrescriptionType === 'DRUG') {
-                                this.currentPrescription_DRUG = {
-                                    uid: _prescription.uid,
-                                    clinicalDetailJson: JSON.parse(JSON.stringify(_prescription.clinical_detail_json))
-                                }
-                            }
+                            this['currentPrescription_' + this.currentPrescriptionType] = {
+                                uid: _prescription.uid,
+                                clinicalDetailJson: JSON.parse(JSON.stringify(_prescription.clinical_detail_json))
+                            };
                             Vue.nextTick(() => {
                                 showStagPopup('prescription-popup-' + this.currentPrescriptionType, true);
                             });

+ 30 - 0
resources/views/app/patient/prescriptions/lab-form.blade.php

@@ -0,0 +1,30 @@
+<div class="stag-popup stag-popup-sm mcp-theme-1" stag-popup-key="prescription-popup-LAB">
+    <form method="POST" action="">
+        <h3 class="stag-popup-title mb-2">
+            <span>Lab Prescription</span>
+            <a href="#" class="ml-auto text-secondary"
+               onclick="return closeStagPopup()"><i class="fa fa-times-circle"></i></a>
+        </h3>
+        <div class="mb-2">
+            <label class="text-sm text-secondary mb-1">Test</label>
+            <input type="text" class="form-control form-control-sm min-width-unset"
+                   v-model="currentPrescription_LAB.clinicalDetailJson.test">
+        </div>
+        <div class="mb-2">
+            <label class="text-sm text-secondary mb-1">ICDS</label>
+            <input type="text" class="form-control form-control-sm min-width-unset"
+                   v-model="currentPrescription_LAB.clinicalDetailJson.icds">
+        </div>
+        <div class="mb-2">
+            <label class="text-sm text-secondary mb-1">Memo</label>
+            <input type="text" class="form-control form-control-sm min-width-unset"
+                   v-model="currentPrescription_LAB.clinicalDetailJson.memo">
+        </div>
+        <div class="d-flex align-items-center justify-content-center mt-3">
+            <button type="button" class="btn btn-sm btn-primary mr-2" v-on:click.prevent="savePrescription()">Submit
+            </button>
+            <button type="button" class="btn btn-sm btn-default border" onclick="return closeStagPopup()">Cancel
+            </button>
+        </div>
+    </form>
+</div>