Pārlūkot izejas kodu

Visit UI - Segment specific review form/summary for problems

Vijayakrishnan 3 gadi atpakaļ
vecāks
revīzija
aabf47cc50

+ 71 - 0
resources/views/app/patient/segment-templates/_review/problem/edit-review.php

@@ -0,0 +1,71 @@
+<?php
+$parsedReview = null;
+if ($point->lastChildReview && $point->last_child_review_point_scoped_note_id === $note->id) {
+    $parsedReview = json_decode($point->lastChildReview->data);
+}
+?>
+<div visit-moe relative>
+    <a start show href="#">Edit</a>
+    <form url="/api/visitPoint/upsertChildReview" class="mcp-theme-1 min-width-500px" right>
+        <input type="hidden" name="uid" value="<?= $point->uid ?>">
+        <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
+        <input type="hidden" name="data">
+
+        <p class="mb-2"><b>Review</b></p>
+
+        <div class="mb-2">
+            <label class="text-secondary text-sm mb-1">Explain the problem.</label>
+            <textarea data-name="problem_explanation" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->problem_explanation : '' ?></textarea>
+        </div>
+        <?php if ($point->lastChildReview && $point->last_child_review_point_scoped_note_id !== $note->id): ?>
+            <div class="mb-2">
+                <label class="text-secondary text-sm mb-1">What happened between today and our last visit?</label>
+                <textarea data-name="events_between_last_visit_and_this" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->events_between_last_visit_and_this : '' ?></textarea>
+            </div>
+            <div class="mb-2">
+                <label class="text-secondary text-sm mb-1">How did it go with the plan I gave you?</label>
+                <textarea data-name="current_plan_status" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->current_plan_status : '' ?></textarea>
+            </div>
+            <div class="mb-2">
+                <label class="text-secondary text-sm mb-1">What barriers have you felt following the plan?</label>
+                <textarea data-name="barriers_following_current_plan" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->barriers_following_current_plan : '' ?></textarea>
+            </div>
+        <?php endif; ?>
+        <div class="mb-2">
+            <label class="text-secondary text-sm mb-1">How long have you had this?</label>
+            <textarea data-name="how_long" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->how_long : '' ?></textarea>
+        </div>
+        <div class="mb-2">
+            <label class="text-secondary text-sm mb-1">When does it get worse?</label>
+            <textarea data-name="when_worse" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->when_worse : '' ?></textarea>
+        </div>
+        <div class="mb-2">
+            <label class="text-secondary text-sm mb-1">When does it get better?</label>
+            <textarea data-name="when_better" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->when_better : '' ?></textarea>
+        </div>
+        <div class="mb-2">
+            <label class="text-secondary text-sm mb-1">What have you done for treatment?</label>
+            <textarea data-name="treatments_done" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->treatments_done : '' ?></textarea>
+        </div>
+        <div class="mb-2">
+            <label class="text-secondary text-sm mb-1">How does it affect your ADLs?</label>
+            <textarea data-name="how_it_affects_ADLs" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->how_it_affects_ADLs : '' ?></textarea>
+        </div>
+        <div class="mb-2">
+            <label class="text-secondary text-sm mb-1">How do you cope?</label>
+            <textarea data-name="how_cope" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->how_cope : '' ?></textarea>
+        </div>
+        <div class="mb-2">
+            <label class="text-secondary text-sm mb-1">How does this affect you emotionally?</label>
+            <textarea data-name="how_affect_emotionally" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->how_affect_emotionally : '' ?></textarea>
+        </div>
+        <div class="mb-2">
+            <label class="text-secondary text-sm mb-1">Memo</label>
+            <textarea data-name="memo" class="form-control form-control-sm" rows="1"><?= $parsedReview ? @$parsedReview->memo : '' ?></textarea>
+        </div>
+        <div>
+            <button submit class="btn btn-sm btn-primary mr-2">Save</button>
+            <button cancel class="btn btn-sm btn-default border">Cancel</button>
+        </div>
+    </form>
+</div>

+ 66 - 0
resources/views/app/patient/segment-templates/_review/problem/last-review.php

@@ -0,0 +1,66 @@
+<?php if ($point->lastChildReview): ?>
+    <?php $parsedReview = json_decode($point->lastChildReview->data); ?>
+    <div class="border px-2 py-1 bg-light">
+        <div class="mb-1">
+            <label class="text-secondary text-sm mb-0">Explain the problem.</label>
+            <div class="ml-2" data-name="problem_explanation"><?= $parsedReview ? @$parsedReview->problem_explanation : '' ?></div>
+        </div>
+        <?php if ($point->lastChildReview && $point->last_child_review_point_scoped_note_id !== $note->id): ?>
+            <div class="mb-1">
+                <label class="text-secondary text-sm mb-0">What happened between today and our last visit?</label>
+                <div class="ml-2" data-name="events_between_last_visit_and_this"><?= $parsedReview ? @$parsedReview->events_between_last_visit_and_this : '' ?></div>
+            </div>
+            <div class="mb-1">
+                <label class="text-secondary text-sm mb-0">How did it go with the plan I gave you?</label>
+                <div class="ml-2" data-name="current_plan_status"><?= $parsedReview ? @$parsedReview->current_plan_status : '' ?></div>
+            </div>
+            <div class="mb-1">
+                <label class="text-secondary text-sm mb-0">What barriers have you felt following the plan?</label>
+                <div class="ml-2" data-name="barriers_following_current_plan"><?= $parsedReview ? @$parsedReview->barriers_following_current_plan : '' ?></div>
+            </div>
+        <?php endif; ?>
+        <div class="mb-1">
+            <label class="text-secondary text-sm mb-0">How long have you had this?</label>
+            <div class="ml-2" data-name="how_long"><?= $parsedReview ? @$parsedReview->how_long : '' ?></div>
+        </div>
+        <div class="mb-1">
+            <label class="text-secondary text-sm mb-0">When does it get worse?</label>
+            <div class="ml-2" data-name="when_worse"><?= $parsedReview ? @$parsedReview->when_worse : '' ?></div>
+        </div>
+        <div class="mb-1">
+            <label class="text-secondary text-sm mb-0">When does it get better?</label>
+            <div class="ml-2" data-name="when_better"><?= $parsedReview ? @$parsedReview->when_better : '' ?></div>
+        </div>
+        <div class="mb-1">
+            <label class="text-secondary text-sm mb-0">What have you done for treatment?</label>
+            <div class="ml-2" data-name="treatments_done"><?= $parsedReview ? @$parsedReview->treatments_done : '' ?></div>
+        </div>
+        <div class="mb-1">
+            <label class="text-secondary text-sm mb-0">How does it affect your ADLs?</label>
+            <div class="ml-2" data-name="how_it_affects_ADLs"><?= $parsedReview ? @$parsedReview->how_it_affects_ADLs : '' ?></div>
+        </div>
+        <div class="mb-1">
+            <label class="text-secondary text-sm mb-0">How do you cope?</label>
+            <div class="ml-2" data-name="how_cope"><?= $parsedReview ? @$parsedReview->how_cope : '' ?></div>
+        </div>
+        <div class="mb-1">
+            <label class="text-secondary text-sm mb-0">How does this affect you emotionally?</label>
+            <div class="ml-2" data-name="how_affect_emotionally"><?= $parsedReview ? @$parsedReview->how_affect_emotionally : '' ?></div>
+        </div>
+        <div class="">
+            <label class="text-secondary text-sm mb-0">Memo</label>
+            <div class="ml-2" data-name="memo"><?= $parsedReview ? @$parsedReview->memo : '' ?></div>
+        </div>
+    </div>
+    <div class="text-secondary text-sm"></div>
+    <?php if ($point->last_child_review_point_scoped_note_id === $note->id): ?>
+        <span class="text-secondary text-sm">(reviewed on this note)</span>
+    <?php else: ?>
+        <a native target="_blank"
+           href="<?= route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $point->lastChildReviewNote]) ?>">
+            <?= friendlier_date_time($point->last_child_review_effective_date) ?>
+        </a>
+    <?php endif; ?>
+<?php else: ?>
+    <span class="text-secondary text-sm">None</span>
+<?php endif; ?>

+ 9 - 9
resources/views/app/patient/segment-templates/intake_problems/edit.blade.php

@@ -47,19 +47,19 @@ $problems = Point::getIntakePointsOfCategory($patient, 'PROBLEM', $note);
                 <td>
                     <?php
                     $point = $problem;
-                    include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
+                    include resource_path('views/app/patient/segment-templates/_review/problem/last-review.php');
                     ?>
                 </td>
                 <td>
                     <?php
-                        $point = $problem;
-                        include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
-                        ?>
-                    </td>
-                    <td>
-                        <?php
-                        $point = $problem;
-                    include resource_path('views/app/patient/segment-templates/_child_review/edit-review.php');
+                    $point = $problem;
+                    include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
+                    ?>
+                </td>
+                <td>
+                    <?php
+                    $point = $problem;
+                    include resource_path('views/app/patient/segment-templates/_review/problem/edit-review.php');
                     ?>
                 </td>
             </tr>