Browse Source

Individual pages for rx, dx, care-team & history [WIP]

Vijayakrishnan 5 years ago
parent
commit
d45da06159

+ 69 - 5
resources/views/app/patient/care-team.blade.php

@@ -1,10 +1,74 @@
 @extends ('layouts.patient')
 
-
-@section('section-title')
-    Care Team
-@endsection
+<?php $infoLines = json_decode($patient->info_lines);?>
+<?php $infoLines = !$infoLines ? [] : $infoLines; ?>
 
 @section('inner-content')
-    CONTENT
+    <div class="">
+        <div class="d-flex align-items-center" moe>
+            <h4 class="mr-3 mb-3 font-weight-normal">Care Team</h4>
+            <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+            <form url="/api/clientInfoLine/create">
+                <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                <input type="hidden" name="category" value="care_team">
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Name"></div>
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="Specialty" value="" placeholder="Specialty"></div>
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="Organization" value="" placeholder="Organization"></div>
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="Phone" value="" placeholder="Phone"></div>
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="Fax" value="" placeholder="Fax"></div>
+                <div class="mb-2"><input type="date" class="form-control form-control-sm" name="Next Appointment" value="" placeholder="Next Appointment"></div>
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="Memo" value="" placeholder="Memo"></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>
+        <table class="table table-striped table-sm table-bordered">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">Name</th>
+                <th class="px-2 text-secondary">Specialty</th>
+                <th class="px-2 text-secondary">Organization</th>
+                <th class="px-2 text-secondary">Phone</th>
+                <th class="px-2 text-secondary">Fax</th>
+                <th class="px-2 text-secondary">Next Appointment</th>
+                <th class="px-2 text-secondary">Memo</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "care_team")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2">{{ $line->contentDetail->{"Specialty"} }}</td>
+                            <td class="px-2">{{ $line->contentDetail->{"Organization"} }}</td>
+                            <td class="px-2">{{ $line->contentDetail->{"Phone"} }}</td>
+                            <td class="px-2">{{ $line->contentDetail->{"Fax"} }}</td>
+                            <td class="px-2">{{ $line->contentDetail->{"Next Appointment"} }}</td>
+                            <td class="px-2">{{ $line->contentDetail->{"Memo"} }}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
 @endsection

+ 2 - 2
resources/views/app/patient/dashboard.blade.php

@@ -5,7 +5,7 @@
 @endsection
 
 @section('inner-content')
-    <div>
+    {{--<div>
         <h1>Sample info line moe</h1>
         <div moe>
             <form show url="/api/clientInfoLine/create">
@@ -16,7 +16,7 @@
                 <button submit>Submit</button>
             </form>
         </div>
-    </div>
+    </div>--}}
 
     <div>
         <h1>Sample measurement moe</h1>

+ 72 - 5
resources/views/app/patient/dx-and-focus-areas.blade.php

@@ -1,10 +1,77 @@
 @extends ('layouts.patient')
 
-
-@section('section-title')
-    Dx and Focus Areas
-@endsection
+<?php $infoLines = json_decode($patient->info_lines);?>
+<?php $infoLines = !$infoLines ? [] : $infoLines; ?>
 
 @section('inner-content')
-    CONTENT
+    <div class="">
+        <div class="d-flex align-items-center" moe>
+            <h4 class="mr-3 mb-3 font-weight-normal">Dx and Focus Areas</h4>
+            <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+            <form url="/api/clientInfoLine/create">
+                <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                <input type="hidden" name="category" value="dx">
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Title"></div>
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="ICD" value="" placeholder="ICD"></div>
+                <div class="mb-2">
+                    <select name="Chronic or Acute" class="form-control form-control-sm pl-1">
+                        <option>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="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" submit>Save</button>
+                    <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                </div>
+            </form>
+        </div>
+        <table class="table table-striped table-sm table-bordered">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">Title</th>
+                <th class="px-2 text-secondary">ICD</th>
+                <th class="px-2 text-secondary">Chronic or Acute</th>
+                <th class="px-2 text-secondary">Prognosis</th>
+                <th class="px-2 text-secondary">Treatment Goal</th>
+                <th class="px-2 text-secondary">Treatment Plan</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "dx")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</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->{"Prognosis"} }}</td>
+                            <td class="px-2">{{ $line->contentDetail->{"Treatment Goal"} }}</td>
+                            <td class="px-2">{{ $line->contentDetail->{"Treatment Plan"} }}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
 @endsection

+ 476 - 5
resources/views/app/patient/history.blade.php

@@ -1,10 +1,481 @@
 @extends ('layouts.patient')
 
-
-@section('section-title')
-    History
-@endsection
+<?php $infoLines = json_decode($patient->info_lines);?>
+<?php $infoLines = !$infoLines ? [] : $infoLines; ?>
 
 @section('inner-content')
-    CONTENT
+    <div class="">
+        <div class="d-flex align-items-center" moe>
+            <h4 class="mr-3 mb-3 font-weight-normal">Medical History</h4>
+            <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+            <form url="/api/clientInfoLine/create">
+                <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                <input type="hidden" name="category" value="history_medical">
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="History"></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>
+        <table class="table table-striped table-sm table-bordered">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">History</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "history_medical")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+    {{-- history_surgical --}}
+    <div class="mt-4">
+        <div class="d-flex align-items-center pb-2">
+            <h4 class="mr-3 mb-3 font-weight-normal">Surgical History</h4>
+            <div moe>
+                <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+                <form url="/api/clientInfoLine/create">
+                    <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                    <input type="hidden" name="category" value="history_surgical">
+                    <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="History"></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">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">History</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "history_surgical")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+    {{-- history_family --}}
+    <div class="mt-4">
+        <div class="d-flex align-items-center pb-2">
+            <h4 class="mr-3 mb-3 font-weight-normal">Family History</h4>
+            <div moe>
+                <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+                <form url="/api/clientInfoLine/create">
+                    <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                    <input type="hidden" name="category" value="history_family">
+                    <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="History"></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">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">History</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "history_family")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+    {{-- history_social --}}
+    <div class="mt-4">
+        <div class="d-flex align-items-center pb-2">
+            <h4 class="mr-3 mb-3 font-weight-normal">Social History</h4>
+            <div moe>
+                <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+                <form url="/api/clientInfoLine/create">
+                    <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                    <input type="hidden" name="category" value="history_social">
+                    <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="History"></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">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">History</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "history_social")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+    {{-- history_ob_and_preg --}}
+    <div class="mt-4">
+        <div class="d-flex align-items-center pb-2">
+            <h4 class="mr-3 mb-3 font-weight-normal">OB & Pregnancy History</h4>
+            <div moe>
+                <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+                <form url="/api/clientInfoLine/create">
+                    <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                    <input type="hidden" name="category" value="history_ob_and_preg">
+                    <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="History"></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">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">History</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "history_ob_and_preg")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+    {{-- history_hospitalizations_procedures --}}
+    <div class="mt-4">
+        <div class="d-flex align-items-center pb-2">
+            <h4 class="mr-3 mb-3 font-weight-normal">Hospitalizations / Procedures History</h4>
+            <div moe>
+                <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+                <form url="/api/clientInfoLine/create">
+                    <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                    <input type="hidden" name="category" value="history_hospitalizations_procedures">
+                    <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="History"></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">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">History</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "history_hospitalizations_procedures")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+    {{-- history_screenings --}}
+    <div class="mt-4">
+        <div class="d-flex align-items-center pb-2">
+            <h4 class="mr-3 mb-3 font-weight-normal">Screenings History</h4>
+            <div moe>
+                <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+                <form url="/api/clientInfoLine/create">
+                    <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                    <input type="hidden" name="category" value="history_screenings">
+                    <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="History"></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">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">History</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "history_screenings")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+    {{-- history_colonoscopy --}}
+    <div class="mt-4">
+        <div class="d-flex align-items-center pb-2">
+            <h4 class="mr-3 mb-3 font-weight-normal">Colonoscopy History</h4>
+            <div moe>
+                <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+                <form url="/api/clientInfoLine/create">
+                    <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                    <input type="hidden" name="category" value="history_colonoscopy">
+                    <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="History"></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">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">History</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "history_colonoscopy")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+    {{-- history_mammogram --}}
+    <div class="mt-4">
+        <div class="d-flex align-items-center pb-2">
+            <h4 class="mr-3 mb-3 font-weight-normal">Mammogram History</h4>
+            <div moe>
+                <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+                <form url="/api/clientInfoLine/create">
+                    <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                    <input type="hidden" name="category" value="history_mammogram">
+                    <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="History"></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">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">History</th>
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "history_mammogram")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
 @endsection

+ 54 - 5
resources/views/app/patient/medications.blade.php

@@ -1,10 +1,59 @@
 @extends ('layouts.patient')
 
-
-@section('section-title')
-    Medications
-@endsection
+<?php $infoLines = json_decode($patient->info_lines);?>
+<?php $infoLines = !$infoLines ? [] : $infoLines; ?>
 
 @section('inner-content')
-    CONTENT
+    <div class="">
+        <div class="d-flex align-items-center" moe>
+            <h4 class="mr-3 mb-3 font-weight-normal">Medications</h4>
+            <a start show class="btn btn-sm btn-primary py-0 mb-3">+ Add</a>
+            <form url="/api/clientInfoLine/create">
+                <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                <input type="hidden" name="category" value="rx">
+                <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Medication"></div>
+                {{--<div class="mb-2"><input type="text" name="customField" value="" placeholder="Custom Field"></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>
+        <table class="table table-striped table-sm table-bordered">
+            <thead>
+            <tr>
+                {{--<th class="px-2 text-secondary">Category</th>--}}
+                <th class="px-2 text-secondary">Medication</th>
+                {{--<th class="px-2 text-secondary">Content Detail</th>--}}
+                <th class="px-2 text-secondary delete-column">&nbsp;</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($infoLines as $category => $lines)
+                @if($category === "rx")
+                    @foreach ($lines as $line)
+                        <tr>
+                            {{--<td class="px-2">{{$category}}</td>--}}
+                            <td class="px-2">{{$line->contentText}}</td>
+                            {{--<td class="px-2"><pre><?php print_r($line->contentDetail) ?></pre></td>--}}
+                            <td class="px-2 text-center delete-column">
+                                <div moe relative>
+                                    <a start show><i class="fa fa-trash text-danger"></i></a>
+                                    <form url="/api/clientInfoLine/remove" right>
+                                        <input type="hidden" name="uid" value="{{ $line->uid }}">
+                                        <p class="small">Are you sure you want to delete this entry?</p>
+                                        <div class="d-flex align-items-center">
+                                            <button class="btn btn-sm btn-danger mr-2" submit>Delete</button>
+                                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            </td>
+                        </tr>
+                    @endforeach
+                @endif
+            @endforeach
+            </tbody>
+        </table>
+    </div>
 @endsection