Quellcode durchsuchen

Patient dashboard - Dx & PMHx sections

Vijayakrishnan vor 4 Jahren
Ursprung
Commit
8292cfce61

+ 3 - 1
public/css/style.css

@@ -825,4 +825,6 @@ body .node input[type="number"] {
     padding: 3px 8px;
     border-bottom-left-radius: 5px;
 }
-
+.w-60px {
+    width: 60px;
+}

+ 1 - 7
resources/views/app/patient/partials/dx-table-row.blade.php

@@ -3,7 +3,6 @@
         <td class="px-2">{{$line->content_text}}</td>
         <td class="px-2">{{ @$line->contentDetail()->{"ICD"} }}</td>
         <td class="px-2">{{ @$line->contentDetail()->{"Chronic or Acute"} }}</td>
-        <td class="px-2">{!! @$line->contentDetail()->{"IsCurrent"} ? '<b>Yes</b>' : 'No' !!}</td>
         <td class="px-2">{{ @$line->contentDetail()->{"Prognosis"} }}</td>
         <td class="px-2">{{ @$line->contentDetail()->{"History"} }}</td>
         <td class="px-2">{{ @$line->contentDetail()->{"Treatment Goal"} }}</td>
@@ -21,6 +20,7 @@
                                 <input type="hidden" name="uid" value="{{ $line->uid }}">
                                 <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
                                 <input type="hidden" name="category" value="dx">
+                                <input type="hidden" name="IsCurrent" value="1">
                                 <div class="mb-2">
                                     <input type="text" class="form-control form-control-sm" name="ICD"
                                            value="{{ @$line->contentDetail()->{"ICD"} }}" placeholder="ICD">
@@ -38,12 +38,6 @@
                                             {{ @$line->contentDetail()->{"Chronic or Acute"} === 'Acute' ? 'selected' : '' }} value="Acute">Acute</option>
                                     </select>
                                 </div>
-                                <div class="mb-2">
-                                    <label class="m-0 text-left d-flex align-items-center">
-                                        <input type="checkbox" name="IsCurrent" {{ @$line->contentDetail()->{"IsCurrent"} ? 'checked' : '' }}>
-                                        <span class="ml-1">Is Current?</span>
-                                    </label>
-                                </div>
                                 <div class="mb-2">
                                     <input type="text" class="form-control form-control-sm" name="Prognosis"
                                            value="{{ @$line->contentDetail()->{"Prognosis"} }}" placeholder="Prognosis">

+ 79 - 21
resources/views/app/patient/partials/dx-table.blade.php

@@ -1,12 +1,25 @@
-<div class="border-top pt-2">
+<?php
+$currentDxs = new \Illuminate\Support\Collection();
+$previousDxs = new \Illuminate\Support\Collection();
+foreach($dxInfoLines as $line) {
+    if(@$line->contentDetail()->{"IsCurrent"}) {
+        $currentDxs->add($line);
+    }
+    else {
+        $previousDxs->add($line);
+    }
+}
+?>
+<div class="pt-3 mb-3">
     <div class="d-flex align-items-center pb-2">
-        <h4 class="font-weight-bold m-0">Dx and Focus Areas</h4>
+        <h4 class="font-weight-bold m-0">Current Dx / Focus Areas</h4>
         <span class="mx-2 text-secondary">|</span>
         <div moe wide>
             <a start show class="">Add</a>
             <form url="/api/clientInfoLine/create">
                 <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
                 <input type="hidden" name="category" value="dx">
+                <input type="hidden" name="IsCurrent" value="1">
                 <div class="mb-2"><input type="text" class="form-control form-control-sm" name="ICD" value="" placeholder="ICD"></div>
                 <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Title"></div>
                 <div class="mb-2">
@@ -16,11 +29,69 @@
                         <option value="Acute">Acute</option>
                     </select>
                 </div>
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="Prognosis" value="" placeholder="Prognosis"></div>
+                <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="History" value="" placeholder="History"></textarea></div>
+                <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="Treatment Goal" value="" placeholder="Treatment Goal"></textarea></div>
+                <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="Treatment Plan" value="" placeholder="Treatment Plan"></textarea></div>
+                <div class="d-flex align-items-center">
+                    <button class="btn btn-sm btn-primary mr-2" type="button" submit>Save</button>
+                    <button class="btn btn-sm btn-default mr-2 border" type="button" cancel>Cancel</button>
+                </div>
+            </form>
+        </div>
+        <span class="mx-2 text-secondary">|</span>
+        <div moe>
+            <a start show class="">Multi</a>
+            <form url="/api/clientInfoLine/createMultiple">
+                <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                <input type="hidden" name="category" value="dx">
+                <input type="hidden" name="IsCurrent" value="1">
+                <div class="mb-2">
+                    <textarea class="form-control form-control-sm" rows="8" name="contentTexts" value="" placeholder="Dx & Focus Areas *" required></textarea>
+                </div>
+                <div class="d-flex align-items-center">
+                    <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
+                    <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                </div>
+            </form>
+        </div>
+    </div>
+    <table class="table table-striped table-sm table-bordered mb-0">
+        <thead>
+        <tr>
+            <th class="px-2 text-secondary">Title</th>
+            <th class="px-2 text-secondary">ICD</th>
+            <th class="px-2 text-secondary w-60px">Chr/Act</th>
+            <th class="px-2 text-secondary">Prognosis</th>
+            <th class="px-2 text-secondary">History</th>
+            <th class="px-2 text-secondary">Goal</th>
+            <th class="px-2 text-secondary w-25">Plan</th>
+            <th class="px-2 text-secondary delete-column">&nbsp;</th>
+        </tr>
+        </thead>
+        <tbody>
+        @include('app.patient.partials.dx-table-row', ['dxRows' => $currentDxs])
+        </tbody>
+    </table>
+</div>
+<div class="pt-3">
+    <div class="d-flex align-items-center pb-2">
+        <h4 class="font-weight-bold m-0">PMHx</h4>
+        <span class="mx-2 text-secondary">|</span>
+        <div moe wide>
+            <a start show class="">Add</a>
+            <form url="/api/clientInfoLine/create">
+                <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                <input type="hidden" name="category" value="dx">
+                <input type="hidden" name="IsCurrent" value="0">
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="ICD" value="" placeholder="ICD"></div>
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Title"></div>
                 <div class="mb-2">
-                    <label class="m-0 text-left d-flex align-items-center">
-                        <input type="checkbox" name="IsCurrent" value="">
-                        <span class="ml-1">Is Current?</span>
-                    </label>
+                    <select name="Chronic or Acute" class="form-control form-control-sm pl-1">
+                        <option value="">Chronic or Acute (select one)</option>
+                        <option value="Chronic">Chronic</option>
+                        <option value="Acute">Acute</option>
+                    </select>
                 </div>
                 <div class="mb-2"><input type="text" class="form-control form-control-sm" name="Prognosis" value="" placeholder="Prognosis"></div>
                 <div class="mb-2"><textarea type="text" class="form-control form-control-sm" name="History" value="" placeholder="History"></textarea></div>
@@ -38,6 +109,7 @@
             <form url="/api/clientInfoLine/createMultiple">
                 <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
                 <input type="hidden" name="category" value="dx">
+                <input type="hidden" name="IsCurrent" value="1">
                 <div class="mb-2">
                     <textarea class="form-control form-control-sm" rows="8" name="contentTexts" value="" placeholder="Dx & Focus Areas *" required></textarea>
                 </div>
@@ -53,8 +125,7 @@
         <tr>
             <th class="px-2 text-secondary">Title</th>
             <th class="px-2 text-secondary">ICD</th>
-            <th class="px-2 text-secondary">Chr/Act</th>
-            <th class="px-2 text-secondary">Current?</th>
+            <th class="px-2 text-secondary w-60px">Chr/Act</th>
             <th class="px-2 text-secondary">Prognosis</th>
             <th class="px-2 text-secondary">History</th>
             <th class="px-2 text-secondary">Goal</th>
@@ -63,19 +134,6 @@
         </tr>
         </thead>
         <tbody>
-        <?php
-            $currentDxs = new \Illuminate\Support\Collection();
-            $previousDxs = new \Illuminate\Support\Collection();
-            foreach($dxInfoLines as $line) {
-                if(@$line->contentDetail()->{"IsCurrent"}) {
-                    $currentDxs->add($line);
-                }
-                else {
-                    $previousDxs->add($line);
-                }
-            }
-        ?>
-        @include('app.patient.partials.dx-table-row', ['dxRows' => $currentDxs])
         @include('app.patient.partials.dx-table-row', ['dxRows' => $previousDxs])
         </tbody>
     </table>