Ver Fonte

Erx UI - Go to newly added pres automatically

Vijayakrishnan há 3 anos atrás
pai
commit
72aeedaa36

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

@@ -268,9 +268,9 @@
                 $prescription->hcpProDisplayName = $prescription->hcpPro ? $prescription->hcpPro->displayName() : '-';
                 $prescription->hcpProUid = $prescription->hcpPro ? $prescription->hcpPro->uid : '';
 
-//                if(!!@$currentErx && $currentErx->uid === $prescription->uid) {
-//
-//                }
+                if(!!@$currentErx && $currentErx->uid === $prescription->uid) {
+                    $currentPrescription = $prescription;
+                }
             }
             ?>
 
@@ -286,7 +286,7 @@
                         currentPrescriptionType: '',
 
                         // selected
-                        currentPrescription:  null,
+                        currentPrescription:  <?= $currentPrescription ?>,
 
                         // for editing clinical details
                         currentPrescription_DRUG: {
@@ -517,7 +517,7 @@
                                         if(!hasResponseError(_data)) {
                                             toastr.success('Prescription added');
                                             closeStagPopup();
-                                            fastReload();
+                                            fastLoad('/patients/view/{{$patient->uid}}/prescriptions/' + this.currentPrescriptionType.toLowerCase() + '/' + _data.data);
                                         }
                                     }, 'json');
                                     break;