Quellcode durchsuchen

Update allergies, meds, probs, care team pages with new point based impl

Vijayakrishnan vor 3 Jahren
Ursprung
Commit
674dd9bf0c

+ 2 - 80
resources/views/app/patient/allergies.blade.php

@@ -1,83 +1,5 @@
 @extends ('layouts.patient')
-
+<?php $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1); ?>
 @section('inner-content')
-    {{--<div class="">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="font-weight-bold m-0">Allergies</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <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="allergy">
-                    <div class="mb-2"><input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Allergy"></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">Allergy</th>
-                <th class="px-2 text-secondary">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                <tr>
-                    <td class="px-2">{{$line->content_text}}</td>
-                    <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                    <td class="px-2 text-center delete-column">
-                        <span moe relative class="mr-2">
-                            <a class="on-hover-opaque" start show title="Edit">
-                                <i class="font-size-11 fa fa-edit"></i>
-                            </a>
-                            <form url="/api/clientInfoLine/updateContent" right>
-                                <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
-                                <input type="hidden" name="uid" value="{{ $line->uid }}">
-                                <input type="hidden" name="category" value="allergy">
-                                <div class="mb-2">
-                                    <input type="text" class="form-control form-control-sm" name="contentText" placeholder="Allergy" value="{{$line->content_text}}">
-                                </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>
-                        </span>
-                        <span moe relative>
-                            <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                        </span>
-                    </td>
-                </tr>
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
-    <hr>--}}
-    <div class="client-single-dashboard">
-        <div class="d-flex align-items-center pb-2">
-            <h6 class="my-0 font-weight-bold">Allergies</h6>
-            <span class="mx-2 text-secondary">|</span>
-            @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'allergies'])
-        </div>
-        <div class="bg-light border p-2 mb-3">
-            @include('app.patient.canvas-sections.allergies.summary')
-        </div>
-    </div>
+    @include('app.patient.point-based-partials.allergies')
 @endsection

+ 3 - 82
resources/views/app/patient/care-team.blade.php

@@ -1,84 +1,5 @@
 @extends ('layouts.patient')
-
+<?php $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1); ?>
 @section('inner-content')
-    {{--<div class="">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="font-weight-bold m-0">Care Team</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <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="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>
-        </div>
-        <table class="table table-striped table-sm table-bordered">
-            <thead>
-            <tr>
-                <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">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                <tr>
-                    <td class="px-2">{{$line->content_text}}</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">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                    <td class="px-2 text-center delete-column">
-                        <div moe relative>
-                            <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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
-            </tbody>
-        </table>
-    </div>
-
-    <hr>--}}
-    <div class="client-single-dashboard">
-        <div class="d-flex align-items-center pb-2">
-            <h6 class="my-0 font-weight-bold text-secondary">Care Team</h6>
-            <span class="mx-2 text-secondary">|</span>
-            @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'care-team', 'class' => 'wide'])
-        </div>
-        <div class="bg-light border p-2 mb-3">
-            @include('app.patient.canvas-sections.care-team.summary')
-        </div>
-    </div>
-@endsection
+    @include('app.patient.point-based-partials.care-team')
+@endsection

+ 8 - 242
resources/views/app/patient/dashboard.blade.php

@@ -47,41 +47,7 @@
                 @endif
 
                 <!-- allergies - point -->
-                <?php
-                $allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
-                ?>
-                <div class="pt-2 mt-2">
-                    <div class="d-flex align-items-center pb-2">
-                        <h6 class="my-0 font-weight-bold text-secondary">Allergies</h6>
-                        @if($isOldClient)
-                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
-                        @endif
-                        @if($patient->coreNote)
-                            <a native target="_blank"
-                               class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none"
-                               open-in-stag-popup
-                               update-parent
-                               mc-initer="allergies-center-{{$patient->coreNote->id}}"
-                               title="Allergies Center"
-                               popup-style="wide overflow-visible"
-                               href="/allergies-center/{{$patient->uid}}/{{$patient->coreNote->uid}}">
-                                <i class="fa fa-bolt mr-1"></i>
-                                <span>Manage</span>
-                            </a>
-                        @endif
-                    </div>
-                    <div class="bg-light border p-2 mb-3">
-                        @foreach($allergies as $allergy)
-                            <div class="mb-1">
-                                <b><?= !!@($allergy->data->name) ? @($allergy->data->name) : '-' ?></b>
-                                <?= !!@($allergy->data->description) ? '/&nbsp;' . @($allergy->data->description) : '' ?>
-                            </div>
-                        @endforeach
-                        @if(!count($allergies))
-                            <div class="text-secondary">Nothing here yet</div>
-                        @endif
-                    </div>
-                </div>
+                @include('app.patient.point-based-partials.allergies')
 
                 {{-- canvas based rx --}}
                 @if($isOldClient)
@@ -97,45 +63,7 @@
                 @endif
 
                 <!-- meds - point -->
-                <?php
-                $medications = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
-                ?>
-                <div class="pt-2 mt-2">
-                    <div class="d-flex align-items-center pb-2">
-                        <h6 class="my-0 font-weight-bold text-secondary">Current Medications</h6>
-                        @if($isOldClient)
-                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
-                        @endif
-                        @if($patient->coreNote)
-                            <a native target="_blank"
-                               class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none"
-                               open-in-stag-popup
-                               update-parent
-                               mc-initer="medications-center-{{$patient->coreNote->id}}"
-                               title="Medications Center"
-                               popup-style="wide overflow-visible"
-                               href="/medications-center/{{$patient->uid}}/{{$patient->coreNote->uid}}">
-                                <i class="fa fa-bolt mr-1"></i>
-                                <span>Manage</span>
-                            </a>
-                        @endif
-                    </div>
-                    <div class="bg-light border p-2 mb-3">
-                        @foreach($medications as $medication)
-                            <div class="mb-1">
-                                <b><?= !!@($medication->data->name) ? @($medication->data->name) : '-' ?></b>
-                            </div>
-                        @endforeach
-                        @if(!count($medications))
-                            <div class="text-secondary">Nothing here yet</div>
-                        @endif
-                    </div>
-                </div>
-
-                {{-- rm reasons --}}
-                <div class="pt-2 mt-2 border-top">
-                    @include('app/patient/partials/rm-reasons')
-                </div>
+                @include('app.patient.point-based-partials.rx')
 
                 {{-- devices --}}
                 <?php
@@ -312,42 +240,7 @@
                 @endif
 
                 <!-- probs - point -->
-                <?php
-                $problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
-                ?>
-                <div class="pt-2 mt-2">
-                    <div class="d-flex align-items-center pb-2">
-                        <h6 class="my-0 font-weight-bold text-secondary">Current Problems / Focus Areas</h6>
-                        @if($isOldClient)
-                            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
-                        @endif
-                        @if($patient->coreNote)
-                            <a native target="_blank"
-                               class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none"
-                               open-in-stag-popup
-                               update-parent
-                               mc-initer="problems-center-{{$patient->coreNote->id}}"
-                               title="Problems Center"
-                               popup-style="wide overflow-visible"
-                               href="/problems-center/{{$patient->uid}}/{{$patient->coreNote->uid}}">
-                                <i class="fa fa-bolt mr-1"></i>
-                                <span>Manage</span>
-                            </a>
-                        @endif
-                    </div>
-                    <div class="bg-light border p-2 mb-3">
-                        @foreach($problems as $problem)
-                            <div class="mb-1">
-                                <b><?= !!@($problem->data->name) ? @($problem->data->name) : '-' ?></b>
-                                <?= !!@($problem->data->icd) ? '/&nbsp;' . @($problem->data->icd) : '' ?>
-                                <?= !!@($problem->data->description) ? '/&nbsp;' . @($problem->data->description) : '' ?>
-                            </div>
-                        @endforeach
-                        @if(!count($problems))
-                            <div class="text-secondary">Nothing here yet</div>
-                        @endif
-                    </div>
-                </div>
+                @include('app.patient.point-based-partials.dx')
 
                 {{-- canvas based careteam --}}
                 @if($isOldClient)
@@ -363,42 +256,7 @@
                 @endif
 
                 <!-- careteam - point -->
-                <?php
-                $careTeamMembers = \App\Models\Point::getPointsOfCategory($patient, "CARE_TEAM_MEMBER");
-                ?>
-                <div class="pt-2 mt-2">
-                    <div class="d-flex align-items-center pb-2">
-                        <h6 class="my-0 font-weight-bold text-secondary">Care Team</h6>
-                        @if($isOldClient)
-                            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
-                        @endif
-                        @if($patient->coreNote)
-                            <a native target="_blank"
-                               class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none"
-                               open-in-stag-popup
-                               update-parent
-                               mc-initer="careteam-center-{{$patient->coreNote->id}}"
-                               title="Care Team Center"
-                               popup-style="wide overflow-visible"
-                               href="/careteam-center/{{$patient->uid}}/{{$patient->coreNote->uid}}">
-                                <i class="fa fa-bolt mr-1"></i>
-                                <span>Manage</span>
-                            </a>
-                        @endif
-                    </div>
-                    <div class="bg-light border p-2 mb-3">
-                        @foreach($careTeamMembers as $careTeamMember)
-                            <div class="mb-1">
-                                <b><?= !!@($careTeamMember->data->name) ? @($careTeamMember->data->name) : '-' ?></b>
-                                <?= !!@($careTeamMember->data->spacialty) ? '/&nbsp;' . @($careTeamMember->data->spacialty) . '<br>' : '' ?>
-                                <?= !!@($careTeamMember->data->organization) ? '/&nbsp;' . @($careTeamMember->data->organization) . '<br>' : '' ?>
-                            </div>
-                        @endforeach
-                        @if(!count($careTeamMembers))
-                            <div class="text-secondary">Nothing here yet</div>
-                        @endif
-                    </div>
-                </div>
+                @include('app.patient.point-based-partials.care-team')
 
                 {{-- history_medical --}}
                 @if($isOldClient)
@@ -414,26 +272,7 @@
                 @endif
 
                 <!-- pmhx - point -->
-                <div class="pt-2 mt-2">
-                    <div class="d-flex align-items-center pb-2">
-                        <h6 class="my-0 font-weight-bold text-secondary">Medical History</h6>
-                        @if($isOldClient)
-                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
-                        @endif
-                        <a native="" target="_blank"
-                           class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none pmhx-trigger"
-                           open-in-stag-popup="" update-parent=""
-                           mc-initer="past_medical_history_{{$patient->id}}"
-                           title="Past Medical History" popup-style="wide overflow-visible"
-                           href="/chart-segment-view/{{$patient->uid}}/past_medical_history/edit">
-                            <i class="fa fa-bolt mr-1"></i>
-                            <span>Manage</span>
-                        </a>
-                    </div>
-                    <div class="bg-light border p-2 mb-3">
-                        @include('app.patient.segment-templates.past_medical_history.summary', compact('patient'))
-                    </div>
-                </div>
+                @include('app.patient.point-based-partials.pmhx')
 
                 {{-- history_surgical --}}
                 @if($isOldClient)
@@ -449,26 +288,7 @@
                 @endif
 
                 <!-- pshx - point -->
-                <div class="pt-2 mt-2">
-                    <div class="d-flex align-items-center pb-2">
-                        <h6 class="my-0 font-weight-bold text-secondary">Surgical History</h6>
-                        @if($isOldClient)
-                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
-                        @endif
-                        <a native="" target="_blank"
-                           class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none shx-trigger"
-                           open-in-stag-popup="" update-parent=""
-                           mc-initer="history_surgical_{{$patient->id}}"
-                           title="Surgical History" popup-style="wide overflow-visible"
-                           href="/chart-segment-view/{{$patient->uid}}/history_surgical/edit">
-                            <i class="fa fa-bolt mr-1"></i>
-                            <span>Manage</span>
-                        </a>
-                    </div>
-                    <div class="bg-light border p-2 mb-3">
-                        @include('app.patient.segment-templates.history_surgical.summary', compact('patient'))
-                    </div>
-                </div>
+                @include('app.patient.point-based-partials.shx')
 
                 {{-- history_family --}}
                 @if($isOldClient)
@@ -484,26 +304,7 @@
                 @endif
 
                 <!-- fhx - point -->
-                <div class="pt-2 mt-2">
-                    <div class="d-flex align-items-center pb-2">
-                        <h6 class="my-0 font-weight-bold text-secondary">Family History</h6>
-                        @if($isOldClient)
-                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
-                        @endif
-                        <a native="" target="_blank"
-                           class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none fhx-trigger"
-                           open-in-stag-popup="" update-parent=""
-                           mc-initer="history_family_{{$patient->id}}"
-                           title="Family History" popup-style="wide overflow-visible"
-                           href="/chart-segment-view/{{$patient->uid}}/history_family/edit">
-                            <i class="fa fa-bolt mr-1"></i>
-                            <span>Manage</span>
-                        </a>
-                    </div>
-                    <div class="bg-light border p-2 mb-3">
-                        @include('app.patient.segment-templates.history_family.summary', compact('patient'))
-                    </div>
-                </div>
+                @include('app.patient.point-based-partials.fhx')
 
                 {{-- history_social --}}
                 @if($isOldClient)
@@ -519,26 +320,7 @@
                 @endif
 
                 <!-- sochx - point -->
-                <div class="pt-2 mt-2">
-                    <div class="d-flex align-items-center pb-2">
-                        <h6 class="my-0 font-weight-bold text-secondary">Social History</h6>
-                        @if($isOldClient)
-                        <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
-                        @endif
-                        <a native="" target="_blank"
-                           class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none sochx-trigger"
-                           open-in-stag-popup="" update-parent=""
-                           mc-initer="history_social_{{$patient->id}}"
-                           title="Social History" popup-style="wide overflow-visible"
-                           href="/chart-segment-view/{{$patient->uid}}/history_social/edit">
-                            <i class="fa fa-bolt mr-1"></i>
-                            <span>Manage</span>
-                        </a>
-                    </div>
-                    <div class="bg-light border p-2 mb-3">
-                        @include('app.patient.segment-templates.history_social.summary', compact('patient'))
-                    </div>
-                </div>
+                @include('app.patient.point-based-partials.sochx')
 
 
             </div>
@@ -896,22 +678,6 @@
             }
             addMCInitializer('patient-dashboard-devices', init, '#patient-dashboard-devices');
 
-            window.segmentInitializers = {};
-            addMCInitializer('past_medical_history_{{$patient->id}}', function() {
-                window.segmentInitializers['past_medical_history'].call(window);
-            }, '.pmhx-trigger');
-            addMCInitializer('history_family_{{$patient->id}}', function() {
-                window.segmentInitializers['history_family'].call(window);
-            }, '.fhx-trigger');
-            addMCInitializer('history_social_{{$patient->id}}', function() {
-                window.segmentInitializers['history_social'].call(window);
-            }, '.sochx-trigger');
-            addMCInitializer('history_surgical_{{$patient->id}}', function() {
-                window.segmentInitializers['history_surgical'].call(window);
-            }, '.shx-trigger');
-            addMCInitializer('history_screenings_{{$patient->id}}', function() {
-                window.segmentInitializers['history_screenings'].call(window);
-            }, '.screenhx-trigger');
         }).call(window);
     </script>
 @endsection

+ 3 - 12
resources/views/app/patient/dx-and-focus-areas.blade.php

@@ -1,14 +1,5 @@
 @extends ('layouts.patient')
-
+<?php $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1); ?>
 @section('inner-content')
-    <div class="client-single-dashboard">
-        <div class="d-flex align-items-center pb-2">
-            <h6 class="my-0 font-weight-bold">Current Problems / Focus Areas</h6>
-            <span class="mx-2 text-secondary">|</span>
-            @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'dx', 'class' => 'wide'])
-        </div>
-        <div class="bg-light border p-2 mb-3">
-            @include('app.patient.canvas-sections.dx.summary')
-        </div>
-    </div>
-@endsection
+    @include('app.patient.point-based-partials.dx')
+@endsection

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

@@ -1,489 +1,8 @@
 @extends ('layouts.patient')
-
+<?php $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1); ?>
 @section('inner-content')
-    <div class="">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="m-0 font-weight-bold">Medical History</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="py-0">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="Medical 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 w-25">History</th>
-                <th class="px-2 text-secondary w-25">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                @if($line->category === "history_medical")
-                        <tr>
-                            <td class="px-2">{{$line->content_text}}</td>
-                            <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                            <td class="px-2 text-center delete-column">
-                                <div moe relative>
-                                    <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                @endif
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
-    {{-- history_surgical --}}
-    <div class="mt-4">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="m-0 font-weight-bold">Surgical History</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="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="Surgical 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 w-25">History</th>
-                <th class="px-2 text-secondary w-25">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                @if($line->category === "history_surgical")
-                        <tr>
-                            <td class="px-2">{{$line->content_text}}</td>
-                            <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                            <td class="px-2 text-center delete-column">
-                                <div moe relative>
-                                    <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                @endif
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
-    {{-- history_family --}}
-    <div class="mt-4">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="m-0 font-weight-bold">Family History</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="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="Family 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 w-25">History</th>
-                <th class="px-2 text-secondary w-25">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                @if($line->category === "history_family")
-                        <tr>
-                            <td class="px-2">{{$line->content_text}}</td>
-                            <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                            <td class="px-2 text-center delete-column">
-                                <div moe relative>
-                                    <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                @endif
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
-    {{-- history_social --}}
-    <div class="mt-4">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="m-0 font-weight-bold">Social History</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="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="Social 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 w-25">History</th>
-                <th class="px-2 text-secondary w-25">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                @if($line->category === "history_social")
-                        <tr>
-                            <td class="px-2">{{$line->content_text}}</td>
-                            <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                            <td class="px-2 text-center delete-column">
-                                <div moe relative>
-                                    <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                @endif
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
-    {{-- history_ob_and_preg --}}
-    <div class="mt-4">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="m-0 font-weight-bold">OB & Pregnancy History</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="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="OB & Pregnancy 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 w-25">History</th>
-                <th class="px-2 text-secondary w-25">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                @if($line->category === "history_ob_and_preg")
-                        <tr>
-                            <td class="px-2">{{$line->content_text}}</td>
-                            <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                            <td class="px-2 text-center delete-column">
-                                <div moe relative>
-                                    <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                @endif
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
-    {{-- history_hospitalizations_procedures --}}
-    <div class="mt-4">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="m-0 font-weight-bold">Hospitalizations / Procedures History</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="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="Hospitalizations / Procedures 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 w-25">History</th>
-                <th class="px-2 text-secondary w-25">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                @if($line->category === "history_hospitalizations_procedures")
-                        <tr>
-                            <td class="px-2">{{$line->content_text}}</td>
-                            <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                            <td class="px-2 text-center delete-column">
-                                <div moe relative>
-                                    <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                @endif
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
-    {{-- history_screenings --}}
-    <div class="mt-4">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="m-0 font-weight-bold">Screenings History</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="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="Screenings 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 w-25">History</th>
-                <th class="px-2 text-secondary w-25">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                @if($line->category === "history_screenings")
-                        <tr>
-                            <td class="px-2">{{$line->content_text}}</td>
-                            <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                            <td class="px-2 text-center delete-column">
-                                <div moe relative>
-                                    <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                @endif
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
-    {{-- history_colonoscopy --}}
-    <div class="mt-4">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="m-0 font-weight-bold">Colonoscopy History</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="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="Colonoscopy 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 w-25">History</th>
-                <th class="px-2 text-secondary w-25">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                @if($line->category === "history_colonoscopy")
-                        <tr>
-                            <td class="px-2">{{$line->content_text}}</td>
-                            <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                            <td class="px-2 text-center delete-column">
-                                <div moe relative>
-                                    <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                @endif
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
-    {{-- history_mammogram --}}
-    <div class="mt-4">
-        <div class="d-flex align-items-center pb-2">
-            <h4 class="m-0 font-weight-bold">Mammogram History</h4>
-            <span class="mx-2 text-secondary">|</span>
-            <div moe>
-                <a start show class="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="Mammogram 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 w-25">History</th>
-                <th class="px-2 text-secondary w-25">Created By</th>
-                <th class="px-2 text-secondary">Created At</th>
-                <th class="px-2 text-secondary delete-column">&nbsp;</th>
-            </tr>
-            </thead>
-            <tbody>
-            @foreach($infoLines as $line)
-                @if($line->category === "history_mammogram")
-                        <tr>
-                            <td class="px-2">{{$line->content_text}}</td>
-                            <td class="px-2">{{$line->createdBySession && $line->createdBySession->pro ? $line->createdBySession->pro->displayName() : '-'}}</td>
-                    <td class="px-2">{{ friendly_date_time($line->created_at) }}</td>
-                            <td class="px-2 text-center delete-column">
-                                <div moe relative>
-                                    <a start show class="on-hover-opaque"><i class="fa fa-trash-alt 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>
-                @endif
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-
+    @include('app.patient.point-based-partials.pmhx')
+    @include('app.patient.point-based-partials.shx')
+    @include('app.patient.point-based-partials.fhx')
+    @include('app.patient.point-based-partials.sochx')
 @endsection

+ 3 - 49
resources/views/app/patient/medications.blade.php

@@ -1,51 +1,5 @@
 @extends ('layouts.patient')
+<?php $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1); ?>
 @section('inner-content')
-    {{-- canvas based rx --}}
-    <div class="client-single-dashboard" id="client-rx-container">
-        <div class="d-flex align-items-center pb-2">
-            <h6 class="my-0 font-weight-bold">Current Medications</h6>
-            <span class="mx-2 text-secondary">|</span>
-            @include('app.patient.canvas-sections.canvas-editor-modal', ['key' => 'rx', 'class' => 'wide'])
-            <span class="mx-2 text-secondary">|</span>
-            <a href="/patients/view/{{$patient->uid}}/tickets/erx?popupmode=1"
-               native target="_blank"
-               class="ticket-popup-trigger d-block text-nowrap mr-3">
-                Erx/Orders
-            </a>
-        </div>
-        <div class="bg-light border p-2 mb-3">
-            @include('app.patient.canvas-sections.rx.summary')
-        </div>
-    </div>
-    <div class="stag-popup stag-popup-lg ticket-popup mcp-theme-1" stag-popup-key="ticket-popup"></div>
-
-    <script>
-        (function() {
-            function init() {
-                // refresh once ticket popup is closed
-                $('body').off('stag-popup-closed')
-                /*$('body').on('stag-popup-closed', function() {
-                    if($('#client-rx-container').length) {
-                        fastReload();
-                    }
-                });*/
-                // ticket-popup
-                $(document)
-                    .off('click', '.ticket-popup-trigger')
-                    .on('click', '.ticket-popup-trigger', function() {
-                        showMask();
-                        window.noMc = true;
-                        $.get(this.href, (_data) => {
-                            $('.ticket-popup').html(_data);
-                            showStagPopup('ticket-popup', true);
-                            // $('.ticket-popup .stag-popup.stag-slide').attr('close-all-with-self', 1);
-                            runMCInitializer('patient-tickets'); // run specific mc initer
-                            hideMask();
-                        });
-                        return false;
-                    });
-            }
-            addMCInitializer('client-erx-listing', init, '#client-rx-container');
-        }).call(window);
-    </script>
-@endsection
+    @include('app.patient.point-based-partials.rx')
+@endsection

+ 35 - 0
resources/views/app/patient/point-based-partials/allergies.blade.php

@@ -0,0 +1,35 @@
+<?php
+$allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
+?>
+<div class="pt-2 mt-2">
+    <div class="d-flex align-items-center pb-2">
+        <h6 class="my-0 font-weight-bold text-secondary">Allergies</h6>
+        @if($isOldClient)
+            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
+        @endif
+        @if($patient->coreNote)
+            <a native target="_blank"
+               class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none"
+               open-in-stag-popup
+               update-parent
+               mc-initer="allergies-center-{{$patient->coreNote->id}}"
+               title="Allergies Center"
+               popup-style="wide overflow-visible"
+               href="/allergies-center/{{$patient->uid}}/{{$patient->coreNote->uid}}">
+                <i class="fa fa-bolt mr-1"></i>
+                <span>Manage</span>
+            </a>
+        @endif
+    </div>
+    <div class="bg-light border p-2 mb-3">
+        @foreach($allergies as $allergy)
+            <div class="mb-1">
+                <b><?= !!@($allergy->data->name) ? @($allergy->data->name) : '-' ?></b>
+                <?= !!@($allergy->data->description) ? '/&nbsp;' . @($allergy->data->description) : '' ?>
+            </div>
+        @endforeach
+        @if(!count($allergies))
+            <div class="text-secondary">Nothing here yet</div>
+        @endif
+    </div>
+</div>

+ 36 - 0
resources/views/app/patient/point-based-partials/care-team.blade.php

@@ -0,0 +1,36 @@
+<?php
+$careTeamMembers = \App\Models\Point::getPointsOfCategory($patient, "CARE_TEAM_MEMBER");
+?>
+<div class="pt-2 mt-2">
+    <div class="d-flex align-items-center pb-2">
+        <h6 class="my-0 font-weight-bold text-secondary">Care Team</h6>
+        @if($isOldClient)
+            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
+        @endif
+        @if($patient->coreNote)
+            <a native target="_blank"
+               class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none"
+               open-in-stag-popup
+               update-parent
+               mc-initer="careteam-center-{{$patient->coreNote->id}}"
+               title="Care Team Center"
+               popup-style="wide overflow-visible"
+               href="/careteam-center/{{$patient->uid}}/{{$patient->coreNote->uid}}">
+                <i class="fa fa-bolt mr-1"></i>
+                <span>Manage</span>
+            </a>
+        @endif
+    </div>
+    <div class="bg-light border p-2 mb-3">
+        @foreach($careTeamMembers as $careTeamMember)
+            <div class="mb-1">
+                <b><?= !!@($careTeamMember->data->name) ? @($careTeamMember->data->name) : '-' ?></b>
+                <?= !!@($careTeamMember->data->spacialty) ? '/&nbsp;' . @($careTeamMember->data->spacialty) . '<br>' : '' ?>
+                <?= !!@($careTeamMember->data->organization) ? '/&nbsp;' . @($careTeamMember->data->organization) . '<br>' : '' ?>
+            </div>
+        @endforeach
+        @if(!count($careTeamMembers))
+            <div class="text-secondary">Nothing here yet</div>
+        @endif
+    </div>
+</div>

+ 36 - 0
resources/views/app/patient/point-based-partials/dx.blade.php

@@ -0,0 +1,36 @@
+<?php
+$problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
+?>
+<div class="pt-2 mt-2">
+    <div class="d-flex align-items-center pb-2">
+        <h6 class="my-0 font-weight-bold text-secondary">Current Problems / Focus Areas</h6>
+        @if($isOldClient)
+            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
+        @endif
+        @if($patient->coreNote)
+            <a native target="_blank"
+               class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none"
+               open-in-stag-popup
+               update-parent
+               mc-initer="problems-center-{{$patient->coreNote->id}}"
+               title="Problems Center"
+               popup-style="wide overflow-visible"
+               href="/problems-center/{{$patient->uid}}/{{$patient->coreNote->uid}}">
+                <i class="fa fa-bolt mr-1"></i>
+                <span>Manage</span>
+            </a>
+        @endif
+    </div>
+    <div class="bg-light border p-2 mb-3">
+        @foreach($problems as $problem)
+            <div class="mb-1">
+                <b><?= !!@($problem->data->name) ? @($problem->data->name) : '-' ?></b>
+                <?= !!@($problem->data->icd) ? '/&nbsp;' . @($problem->data->icd) : '' ?>
+                <?= !!@($problem->data->description) ? '/&nbsp;' . @($problem->data->description) : '' ?>
+            </div>
+        @endforeach
+        @if(!count($problems))
+            <div class="text-secondary">Nothing here yet</div>
+        @endif
+    </div>
+</div>

+ 26 - 0
resources/views/app/patient/point-based-partials/fhx.blade.php

@@ -0,0 +1,26 @@
+<div class="pt-2 mt-2">
+    <div class="d-flex align-items-center pb-2">
+        <h6 class="my-0 font-weight-bold text-secondary">Family History</h6>
+        @if($isOldClient)
+            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
+        @endif
+        <a native="" target="_blank"
+           class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none fhx-trigger"
+           open-in-stag-popup="" update-parent=""
+           mc-initer="history_family_{{$patient->id}}"
+           title="Family History" popup-style="wide overflow-visible"
+           href="/chart-segment-view/{{$patient->uid}}/history_family/edit">
+            <i class="fa fa-bolt mr-1"></i>
+            <span>Manage</span>
+        </a>
+    </div>
+    <div class="bg-light border p-2 mb-3">
+        @include('app.patient.segment-templates.history_family.summary', compact('patient'))
+    </div>
+</div>
+<script>
+    if(!window.segmentInitializers) window.segmentInitializers = {};
+    addMCInitializer('history_family_{{$patient->id}}', function() {
+        window.segmentInitializers['history_family'].call(window);
+    }, '.fhx-trigger');
+</script>

+ 26 - 0
resources/views/app/patient/point-based-partials/pmhx.blade.php

@@ -0,0 +1,26 @@
+<div class="pt-2 mt-2">
+    <div class="d-flex align-items-center pb-2">
+        <h6 class="my-0 font-weight-bold text-secondary">Medical History</h6>
+        @if($isOldClient)
+            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
+        @endif
+        <a native="" target="_blank"
+           class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none pmhx-trigger"
+           open-in-stag-popup="" update-parent=""
+           mc-initer="past_medical_history_{{$patient->id}}"
+           title="Past Medical History" popup-style="wide overflow-visible"
+           href="/chart-segment-view/{{$patient->uid}}/past_medical_history/edit">
+            <i class="fa fa-bolt mr-1"></i>
+            <span>Manage</span>
+        </a>
+    </div>
+    <div class="bg-light border p-2 mb-3">
+        @include('app.patient.segment-templates.past_medical_history.summary', compact('patient'))
+    </div>
+</div>
+<script>
+    if(!window.segmentInitializers) window.segmentInitializers = {};
+    addMCInitializer('past_medical_history_{{$patient->id}}', function() {
+        window.segmentInitializers['past_medical_history'].call(window);
+    }, '.pmhx-trigger');
+</script>

+ 34 - 0
resources/views/app/patient/point-based-partials/rx.blade.php

@@ -0,0 +1,34 @@
+<?php
+$medications = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
+?>
+<div class="pt-2 mt-2">
+    <div class="d-flex align-items-center pb-2">
+        <h6 class="my-0 font-weight-bold text-secondary">Current Medications</h6>
+        @if($isOldClient)
+            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
+        @endif
+        @if($patient->coreNote)
+            <a native target="_blank"
+               class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none"
+               open-in-stag-popup
+               update-parent
+               mc-initer="medications-center-{{$patient->coreNote->id}}"
+               title="Medications Center"
+               popup-style="wide overflow-visible"
+               href="/medications-center/{{$patient->uid}}/{{$patient->coreNote->uid}}">
+                <i class="fa fa-bolt mr-1"></i>
+                <span>Manage</span>
+            </a>
+        @endif
+    </div>
+    <div class="bg-light border p-2 mb-3">
+        @foreach($medications as $medication)
+            <div class="mb-1">
+                <b><?= !!@($medication->data->name) ? @($medication->data->name) : '-' ?></b>
+            </div>
+        @endforeach
+        @if(!count($medications))
+            <div class="text-secondary">Nothing here yet</div>
+        @endif
+    </div>
+</div>

+ 26 - 0
resources/views/app/patient/point-based-partials/shx.blade.php

@@ -0,0 +1,26 @@
+<div class="pt-2 mt-2">
+    <div class="d-flex align-items-center pb-2">
+        <h6 class="my-0 font-weight-bold text-secondary">Surgical History</h6>
+        @if($isOldClient)
+            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
+        @endif
+        <a native="" target="_blank"
+           class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none shx-trigger"
+           open-in-stag-popup="" update-parent=""
+           mc-initer="history_surgical_{{$patient->id}}"
+           title="Surgical History" popup-style="wide overflow-visible"
+           href="/chart-segment-view/{{$patient->uid}}/history_surgical/edit">
+            <i class="fa fa-bolt mr-1"></i>
+            <span>Manage</span>
+        </a>
+    </div>
+    <div class="bg-light border p-2 mb-3">
+        @include('app.patient.segment-templates.history_surgical.summary', compact('patient'))
+    </div>
+</div>
+<script>
+    if(!window.segmentInitializers) window.segmentInitializers = {};
+    addMCInitializer('history_surgical_{{$patient->id}}', function() {
+        window.segmentInitializers['history_surgical'].call(window);
+    }, '.shx-trigger');
+</script>

+ 26 - 0
resources/views/app/patient/point-based-partials/sochx.blade.php

@@ -0,0 +1,26 @@
+<div class="pt-2 mt-2">
+    <div class="d-flex align-items-center pb-2">
+        <h6 class="my-0 font-weight-bold text-secondary">Social History</h6>
+        @if($isOldClient)
+            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
+        @endif
+        <a native="" target="_blank"
+           class="c-pointer d-inline-flex align-items-center ml-3 text-decoration-none sochx-trigger"
+           open-in-stag-popup="" update-parent=""
+           mc-initer="history_social_{{$patient->id}}"
+           title="Social History" popup-style="wide overflow-visible"
+           href="/chart-segment-view/{{$patient->uid}}/history_social/edit">
+            <i class="fa fa-bolt mr-1"></i>
+            <span>Manage</span>
+        </a>
+    </div>
+    <div class="bg-light border p-2 mb-3">
+        @include('app.patient.segment-templates.history_social.summary', compact('patient'))
+    </div>
+</div>
+<script>
+    if(!window.segmentInitializers) window.segmentInitializers = {};
+    addMCInitializer('history_social_{{$patient->id}}', function() {
+        window.segmentInitializers['history_social'].call(window);
+    }, '.sochx-trigger');
+</script>