Pārlūkot izejas kodu

Sleep study - results-comm-to-patient

Vijayakrishnan 2 gadi atpakaļ
vecāks
revīzija
902230ce7c

+ 5 - 0
app/Models/Client.php

@@ -160,6 +160,11 @@ class Client extends Model
         return $this->hasOne(Note::class, 'id', 'watch_pat_study_ordered_note_id');
     }
 
+    public function watchPatResultsCommunicatedToPatientNote()
+    {
+        return $this->hasOne(Note::class, 'id', 'watch_pat_results_communicated_to_patient_note_id');
+    }
+
     public function stickyNoteUpdatedBySession()
     {
         return $this->hasOne(AppSession::class, 'id', 'sticky_note_updated_by_session_id');

+ 38 - 0
resources/views/app/patient/sleep-study/results-comm-to-patient.blade.php

@@ -0,0 +1,38 @@
+<div class="d-flex px-3 py-2 bg-light align-items-baseline border-bottom">
+    <h4 class="font-weight-bold text-nowrap m-0">Results Communicated to Patient</h4>
+    <div moe class="ml-3">
+        <a start show href="#"><i class="fa fa-edit"></i> Edit</a>
+        <form url="/api/client/updateWatchPatResultsCommunicatedToPatient" hook="refreshSleepStudyStep">
+            <input type="hidden" name="uid" value="{{$patient->uid}}">
+            <div class="font-weight-bold font-size-14 text-secondary border-bottom pb-2 mb-2 text-nowrap">Results Communicated to Patient</div>
+
+            <div class="mb-2">
+                <div class="mb-1">Note:</div>
+                <select name="watchPatResultsCommunicatedToPatientNoteUid" class="form-control form-control-sm">
+                    <option value="">-- select --</option>
+                    @foreach($patient->notes as $note)
+                        <option value="{{$note->uid}}" {{$patient->watchPatResultsCommunicatedToPatientNote && $patient->watchPatResultsCommunicatedToPatientNote->uid === $note->uid ? 'selected' : '' }}>
+                            {{$note->hcpPro ? $note->hcpPro->displayName() : 'Note'}} ({{friendly_date_time($note->effective_dateest, false)}})
+                        </option>
+                    @endforeach
+                </select>
+            </div>
+
+            <div class="mt-2 border-top pt-2 text-center">
+                <button class="btn btn-primary btn-sm" submit>Submit</button>
+                <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+            </div>
+        </form>
+    </div>
+</div>
+
+<div class="px-3 pt-2 pb-1">
+    Note:
+    @if($patient->watchPatResultsCommunicatedToPatientNote)
+        <b>
+            {{$patient->watchPatResultsCommunicatedToPatientNote->hcpPro ? $patient->watchPatResultsCommunicatedToPatientNote->hcpPro->displayName() : 'Note'}} ({{friendly_date_time($patient->watchPatResultsCommunicatedToPatientNote->effective_dateest, false)}})
+        </b>
+    @else
+        <b>-</b>
+    @endif
+</div>