Bläddra i källkod

Probs wiz - new layout

Vijayakrishnan 3 år sedan
förälder
incheckning
c669bc6b76

+ 3 - 0
public/css/style.css

@@ -134,6 +134,9 @@ body.stag_rhs_collapsed .app-right-panel {
 .pl-3-5 {
     padding-left: 1.25rem !important;
 }
+.lh-16px {
+    line-height: 16px;
+}
 .lh-24px {
     height: 24px;
     line-height: 24px;

+ 182 - 190
resources/views/app/patient/problems-center.blade.php

@@ -86,7 +86,7 @@ if(!@$summaryView) {
             </form>
         </div>
 
-        <hr class="m-neg-3 my-3">
+        <hr class="m-neg-3 mt-3 mb-2">
         @endif
 
         @if(!@$summaryView)
@@ -94,17 +94,6 @@ if(!@$summaryView) {
         @endif
 
         <table class="table table-sm table-bordered bg-white mb-2 point-table read">
-            <thead>
-            <tr class="">
-                @if($patient->core_note_id !== $note->id)
-                    <th class="border-bottom-0 text-secondary text-center width-30px">Rel.</th>
-                @endif
-                <th class="border-bottom-0 text-secondary">Name</th>
-                <th class="border-bottom-0 text-secondary w-30">Subjective/HPI</th>
-                <th class="border-bottom-0 text-secondary w-30">Plan</th>
-                @if(!@$summaryView) <th class="border-bottom-0 text-secondary width-30px"></th> @endif
-            </tr>
-            </thead>
             <?php $prevRowState = -1; ?>
             <?php
             $segment = $note->coreSegment; // getSegmentByInternalName('intake_allergies');
@@ -117,7 +106,7 @@ if(!@$summaryView) {
                 <?php $favoriteUid = isFavoriteProblem($problem, $favorites); ?>
             @endif
             @if($prevRowState !== $problem->state)
-                @include('app.patient.wizard-partials.state-row', ['point' => $problem])
+                @include('app.patient.wizard-partials.state-row-flat', ['point' => $problem])
             @endif
             <?php $prevRowState = $problem->state; ?>
             <?php $rel = $problem->note_point_uid; ?>
@@ -126,198 +115,201 @@ if(!@$summaryView) {
                 data-name-base64="{{!!@($problem->data->name) ? base64_encode($problem->data->name) : ''}}"
                 data-is-removed="{{$problem->is_removed ? 1 : 0}}"
                 data-is-removed-due-to-entry-error="{{$problem->is_removed_due_to_entry_error ? 1 : 0}}">
-                @if($patient->core_note_id !== $note->id)
-                    @include('app.patient.wizard-partials.relevance-column-optimized', ['point' => $point])
-                @endif
-                <td>
+
+                <td class="border-0 pl-0">
                     <div class="d-flex align-items-start">
-                        @include('app.patient.wizard-partials.state-icon', ['point' => $problem])
+                        @if($patient->core_note_id !== $note->id)
+                            @include('app.patient.wizard-partials.relevance-column-optimized-flat', ['point' => $point])
+                        @endif
                         <div>
-                            @if(!@$summaryView)
-                                <div moe huge relative>
-                                    <a start show href="#" title="Edit">
-                                        <?= !!@($problem->data->name) ? @($problem->data->name) : '-' ?>
-                                        <?= !!@($problem->data->icd) ? '/&nbsp;' . @($problem->data->icd) : '' ?>
-                                    </a>
-                                    <form url="/api/visitPoint/updateTopLevel" no-auto-focus class="mcp-theme-1 frm-edit-problem">
-                                        <input type="hidden" name="uid" value="<?= $problem->uid ?>">
-                                        <input type="hidden" name="noteUid" value="<?= $note->uid ?>">
-                                        <p class="mb-2"><b>Update Problem</b></p>
-
-                                        <input type="hidden" name="data" value='{{json_encode($problem->data)}}'>
-
-                                        @if($problem->added_in_note_id === $note->id)
-
-                                            <input type="hidden" data-name="dxid" value="{{@$problem->data->dxid}}">
-                                            <input type="hidden" data-name="icd-type" value="{{@$problem->data->{'icd-type'} }}">
-
-                                            <div class="row mb-2">
-                                                <div class="col-8 pr-0">
-                                                    <label class="text-sm mb-0 font-weight-bold">Problem</label>
-                                                    <input type="text" class="form-control form-control-sm min-width-unset"
-                                                           data-name="name"
-                                                           value="{{@$problem->data->name}}"
-                                                           stag-suggest
-                                                           stag-suggest-ep="/fdb-dx-suggest-v2/json"
-                                                           stag-suggest-text-only>
-                                                </div>
-                                                <div class="col-4">
-                                                    <label class="text-sm mb-0 font-weight-bold">ICD</label>
-                                                    <input type="text"
-                                                           data-name="icd"
-                                                           class="form-control form-control-sm"
-                                                           value="{{@$problem->data->icd}}"
-                                                           readonly>
-                                                </div>
-                                            </div>
+                            <div class="d-flex align-items-baseline">
+                                <div> <!-- name + edit moe -->
+                                    @if(!@$summaryView)
+                                        <div moe huge relative>
+                                            <a start show href="#" title="Edit" class="text-dark font-weight-bold">
+                                                <?= !!@($problem->data->name) ? @($problem->data->name) : '-' ?>
+                                                <?= !!@($problem->data->icd) ? '/&nbsp;' . @($problem->data->icd) : '' ?>
+                                            </a>
+                                            <form url="/api/visitPoint/updateTopLevel" no-auto-focus class="mcp-theme-1 frm-edit-problem">
+                                                <input type="hidden" name="uid" value="<?= $problem->uid ?>">
+                                                <input type="hidden" name="noteUid" value="<?= $note->uid ?>">
+                                                <p class="mb-2"><b>Update Problem</b></p>
+
+                                                <input type="hidden" name="data" value='{{json_encode($problem->data)}}'>
+
+                                                @if($problem->added_in_note_id === $note->id)
+
+                                                    <input type="hidden" data-name="dxid" value="{{@$problem->data->dxid}}">
+                                                    <input type="hidden" data-name="icd-type" value="{{@$problem->data->{'icd-type'} }}">
+
+                                                    <div class="row mb-2">
+                                                        <div class="col-8 pr-0">
+                                                            <label class="text-sm mb-0 font-weight-bold">Problem</label>
+                                                            <input type="text" class="form-control form-control-sm min-width-unset"
+                                                                   data-name="name"
+                                                                   value="{{@$problem->data->name}}"
+                                                                   stag-suggest
+                                                                   stag-suggest-ep="/fdb-dx-suggest-v2/json"
+                                                                   stag-suggest-text-only>
+                                                        </div>
+                                                        <div class="col-4">
+                                                            <label class="text-sm mb-0 font-weight-bold">ICD</label>
+                                                            <input type="text"
+                                                                   data-name="icd"
+                                                                   class="form-control form-control-sm"
+                                                                   value="{{@$problem->data->icd}}"
+                                                                   readonly>
+                                                        </div>
+                                                    </div>
 
-                                        @else
-
-                                            <div class="mb-2 bg-light p-2 border">
-                                                <p class="mb-1 font-weight-bold">
-                                                    {{ @$problem->data->name }}
-                                                </p>
-                                                @if($patient->core_note_id !== $note->id)
-                                                    <div class="text-secondary text-sm">Clinical details cannot be modified since the problem was added prior to this visit.</div>
                                                 @else
-                                                    <div class="text-secondary text-sm">Clinical details cannot be modified since the problem was added on a previous visit.</div>
-                                                @endif
-                                            </div>
 
-                                        @endif
+                                                    <div class="mb-2 bg-light p-2 border">
+                                                        <p class="mb-1 font-weight-bold">
+                                                            {{ @$problem->data->name }}
+                                                        </p>
+                                                        @if($patient->core_note_id !== $note->id)
+                                                            <div class="text-secondary text-sm">Clinical details cannot be modified since the problem was added prior to this visit.</div>
+                                                        @else
+                                                            <div class="text-secondary text-sm">Clinical details cannot be modified since the problem was added on a previous visit.</div>
+                                                        @endif
+                                                    </div>
 
-                                        @include('app.patient.wizard-partials.common-fields-optimized', ['label' => 'problem', 'point' => $problem, 'addVerbPT' => 'Added', 'reviewLabel' => 'Subjective/HPI', 'apTerm' => 'assessment/plan'])
+                                                @endif
+
+                                                @include('app.patient.wizard-partials.common-fields-optimized', ['label' => 'problem', 'point' => $problem, 'addVerbPT' => 'Added', 'reviewLabel' => 'Subjective/HPI', 'apTerm' => 'assessment/plan'])
 
-                                        <div class="mt-3 pt-2 d-flex align-items-center border-top">
-                                            <button type="submit" class="btn-save-problem btn btn-sm btn-primary mr-2">Save</button>
-                                            <button cancel class="btn btn-sm bg-light btn-default border">Cancel</button>
+                                                <div class="mt-3 pt-2 d-flex align-items-center border-top">
+                                                    <button type="submit" class="btn-save-problem btn btn-sm btn-primary mr-2">Save</button>
+                                                    <button cancel class="btn btn-sm bg-light btn-default border">Cancel</button>
+                                                </div>
+                                            </form>
                                         </div>
-                                    </form>
+                                    @else
+                                        <?= !!@($problem->data->name) ? @($problem->data->name) : '-' ?>
+                                        <?= !!@($problem->data->icd) ? '/&nbsp;' . @($problem->data->icd) : '' ?>
+                                    @endif
                                 </div>
-                            @else
-                                <?= !!@($problem->data->name) ? @($problem->data->name) : '-' ?>
-                                <?= !!@($problem->data->icd) ? '/&nbsp;' . @($problem->data->icd) : '' ?>
-                            @endif
-
-                            @include('app.patient.wizard-partials.state-badge', ['point' => $problem, 'addedVerb' => 'Added'])
-                        </div>
-                        @if(!@$summaryView)
-                        <div class="ml-auto mr-1">
-                            <div moe>
-                                @if(!$favoriteUid)
-                                    <form show url="/api/proFavorite/create">
-                                        <input type="hidden" name="proUid" value="{{$pro->uid}}">
-                                        <input type="hidden" name="category" value="problem">
-                                        <input type="hidden" data-name="dxid" value="{{@$problem->data->dxid}}">
-                                        <input type="hidden" data-name="icd" value="{{@$problem->data->icd}}">
-                                        <input type="hidden" data-name="icd-type" value="{{@$problem->data->{'icd-type'} }}">
-                                        <textarea class="d-none" name="data">{!! json_encode(["name" => @($problem->data->name), "dxid" => @($problem->data->dxid), "icd" => @($problem->data->icd), "icd-type" => @($problem->data->{'icd-type'})]) !!}</textarea>
-                                        <button submit class="outline-0 shadow-none border-0 bg-transparent p-0 text-secondary-light" title="Add to common">
-                                            <i class="fa fa-bookmark"></i>
-                                        </button>
-                                    </form>
-                                @else
-                                    <form show url="/api/proFavorite/remove">
-                                        <input type="hidden" name="uid" value="{{$favoriteUid}}">
-                                        <button submit class="outline-0 shadow-none border-0 bg-transparent p-0 text-info" title="Remove from common">
-                                            <i class="fa fa-bookmark"></i>
-                                        </button>
-                                    </form>
+                                @if(!@$summaryView)
+                                    <div class="ml-3">
+                                        <div moe>
+                                            @if(!$favoriteUid)
+                                                <form show url="/api/proFavorite/create">
+                                                    <input type="hidden" name="proUid" value="{{$pro->uid}}">
+                                                    <input type="hidden" name="category" value="problem">
+                                                    <input type="hidden" data-name="dxid" value="{{@$problem->data->dxid}}">
+                                                    <input type="hidden" data-name="icd" value="{{@$problem->data->icd}}">
+                                                    <input type="hidden" data-name="icd-type" value="{{@$problem->data->{'icd-type'} }}">
+                                                    <textarea class="d-none" name="data">{!! json_encode(["name" => @($problem->data->name), "dxid" => @($problem->data->dxid), "icd" => @($problem->data->icd), "icd-type" => @($problem->data->{'icd-type'})]) !!}</textarea>
+                                                    <button submit class="outline-0 shadow-none border-0 bg-transparent p-0 text-secondary-light" title="Add to common">
+                                                        <i class="fa fa-bookmark text-sm"></i>
+                                                    </button>
+                                                </form>
+                                            @else
+                                                <form show url="/api/proFavorite/remove">
+                                                    <input type="hidden" name="uid" value="{{$favoriteUid}}">
+                                                    <button submit class="outline-0 shadow-none border-0 bg-transparent p-0 text-info" title="Remove from common">
+                                                        <i class="fa fa-bookmark text-sm"></i>
+                                                    </button>
+                                                </form>
+                                            @endif
+                                        </div>
+                                    </div>
                                 @endif
+                                <div class="ml-3 d-inline-flex align-items-baseline"> <!-- meta info -->
+                                    @if(!!@$problem->data->start_date)
+                                        <div class="text-sm text-nowrap small text-left mr-2">Started <?= !!@($problem->data->start_date) ? friendly_date($problem->data->start_date) : '-' ?></div>
+                                    @endif
+                                    @if(!!@($problem->data->prescriber))
+                                        <div class="text-sm text-left text-secondary mr-2">{{!!@$problem->data->start_date ? '' : 'Started'}} By: <?= !!@($problem->data->prescriber) ? @($problem->data->prescriber) : '-' ?></div>
+                                    @endif
+                                    @if(!!@$problem->removal_effective_date)
+                                        <div class="text-sm text-nowrap small text-left text-left mr-2">Ended <?= !!@($problem->removal_effective_date) ? friendly_date($problem->removal_effective_date) : '-' ?></div>
+                                    @endif
+                                    @if(!!@($problem->removal_reason_memo))
+                                        <div class="text-sm text-secondary">{{ !!@$problem->removal_effective_date ? '' : 'Ended' }} By: <?= !!@($problem->removal_reason_memo) ? @($problem->removal_reason_memo) : '-' ?></div>
+                                    @endif
+                                </div>
                             </div>
-                        </div>
-                        @endif
-                    </div>
-                </td>
-                <td>
-                    <div if-read-mode>
-                        <div class="d-flex align-items-start position-relative">
-                            <div class="flex-grow-1">
-                                <?php
-                                $point = $problem;
-                                include resource_path('views/app/patient/segment-templates/_child_review/last-review-optimized.php');
-                                ?>
-                            </div>
-                            @if(!@$summaryView)
-                            <div class="d-inline-flex flex-column ml-1">
-                                <a class="px-1 view-review-log"
-                                   native target="_blank"
-                                   open-in-stag-popup
-                                   popup-style="stag-popup-md"
-                                   title="Subjective log<?= !!@($problem->data->name) ? ' for ' . @($problem->data->name) : '' ?>"
-                                   href="/point/review-log/<?= $problem->uid ?>?popupmode=1">
-                                    <i class="fa fa-history"></i>
-                                </a>
-                                <?php
-                                if($segment) {
-                                    include resource_path('views/app/patient/segment-templates/_child_review/edit-review-optimized.php');
-                                }
-                                ?>
-                            </div>
-                            @endif
-                        </div>
-                    </div>
-                    <div if-edit-mode>
-                        <?php
-                        if($segment) {
-                            include resource_path('views/app/patient/segment-templates/_child_review/edit-review-in-place-optimized.php');
-                        }
-                        ?>
-                    </div>
-                </td>
-                <td>
-                    <div if-read-mode>
-                        <div class="d-flex align-items-start position-relative">
-                            <div class="flex-grow-1">
-                                <?php
-                                include resource_path('views/app/patient/segment-templates/_child_plan/last-plan-optimized.php');
-                                ?>
-                            </div>
-                            @if(!@$summaryView)
-                            <div class="d-inline-flex flex-column ml-1">
-                                <a class="px-1 view-review-log"
-                                   native target="_blank"
-                                   open-in-stag-popup
-                                   popup-style="stag-popup-md"
-                                   title="Plan log<?= !!@($problem->data->name) ? ' for ' . @($problem->data->name) : '' ?>"
-                                   href="/point/plan-log/<?= $problem->uid ?>?popupmode=1">
-                                    <i class="fa fa-history"></i>
-                                </a>
-                                <?php
-                                if($segment) {
-                                    include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan-optimized.php');
-                                }
-                                ?>
+                            <div class="ml-3 text-dark">
+                                <div class="mt-1">
+                                    <div if-read-mode>
+                                        <div class="">
+                                            <div class="flex-grow-1">
+                                                <span class="on-hover-opaque font-weight-bold mr-2">Subj.</span>
+                                                <?php
+                                                $point = $problem;
+                                                include resource_path('views/app/patient/segment-templates/_child_review/last-review-optimized-flat.php');
+                                                ?>
+                                            </div>
+                                            @if(!@$summaryView)
+                                                <div class="d-flex align-items-baseline ml-3">
+                                                    <?php
+                                                    if($segment) {
+                                                        include resource_path('views/app/patient/segment-templates/_child_review/edit-review-optimized-flat.php');
+                                                    }
+                                                    ?>
+                                                    <a class="mr-2 view-review-log text-sm"
+                                                       native target="_blank"
+                                                       open-in-stag-popup
+                                                       popup-style="stag-popup-md"
+                                                       title="Subjective log<?= !!@($problem->data->name) ? ' for ' . @($problem->data->name) : '' ?>"
+                                                       href="/point/review-log/<?= $problem->uid ?>?popupmode=1">
+                                                        Log
+                                                    </a>
+                                                </div>
+                                            @endif
+                                        </div>
+                                    </div>
+                                    <div if-edit-mode>
+                                        <?php
+                                        if($segment) {
+                                            include resource_path('views/app/patient/segment-templates/_child_review/edit-review-in-place-optimized.php');
+                                        }
+                                        ?>
+                                    </div>
+                                </div>
+                                <div class="mt-1">
+                                    <div if-read-mode>
+                                        <div class="">
+                                            <div class="flex-grow-1">
+                                                <span class="on-hover-opaque font-weight-bold mr-2">Plan</span>
+                                                <?php
+                                                include resource_path('views/app/patient/segment-templates/_child_plan/last-plan-optimized-flat.php');
+                                                ?>
+                                            </div>
+                                            @if(!@$summaryView)
+                                                <div class="d-flex align-items-baseline ml-3">
+                                                    <?php
+                                                    if($segment) {
+                                                        include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan-optimized-flat.php');
+                                                    }
+                                                    ?>
+                                                    <a class="mr-2 view-review-log text-sm"
+                                                       native target="_blank"
+                                                       open-in-stag-popup
+                                                       popup-style="stag-popup-md"
+                                                       title="Plan log<?= !!@($problem->data->name) ? ' for ' . @($problem->data->name) : '' ?>"
+                                                       href="/point/plan-log/<?= $problem->uid ?>?popupmode=1">
+                                                        Log
+                                                    </a>
+                                                </div>
+                                            @endif
+                                        </div>
+                                    </div>
+                                    <div if-edit-mode>
+                                        <?php
+                                        if($segment) {
+                                            include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan-in-place-optimized-flat.php');
+                                        }
+                                        ?>
+                                    </div>
+                                </div>
                             </div>
-                            @endif
-                        </div>
-                    </div>
-                    <div if-edit-mode>
-                        <?php
-                        if($segment) {
-                            include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan-in-place-optimized.php');
-                        }
-                        ?>
-                    </div>
-                </td>
-                @if(!@$summaryView)
-                <td>
-                    <div class="position-relative c-pointer stag-tooltip">
-                        <i class="fa fa-info-circle"></i>
-                        <div class="position-absolute bg-white border rounded p-2 stag-tooltip-content">
-                            <div class="text-nowrap small text-left">Started <b><?= !!@($problem->data->start_date) ? friendly_date($problem->data->start_date) : '-' ?></b></div>
-                            @if(!!@($problem->data->prescriber))
-                                <div class="text-sm text-left text-secondary">By: <?= !!@($problem->data->prescriber) ? @($problem->data->prescriber) : '-' ?></div>
-                            @endif
-                            <hr class="my-1">
-                            <div class="text-nowrap small text-left text-left">Ended <b><?= !!@($problem->removal_effective_date) ? friendly_date($problem->removal_effective_date) : '-' ?></b></div>
-                            @if(!!@($problem->data->prescriber))
-                                <div class="text-sm text-secondary">By/Memo: <?= !!@($problem->removal_reason_memo) ? @($problem->removal_reason_memo) : '-' ?></div>
-                            @endif
+
                         </div>
                     </div>
                 </td>
-                @endif
             </tr>
             <?php endforeach; ?>
         </table>

+ 1 - 1
resources/views/app/patient/segment-templates/_child_plan/edit-plan-optimized-flat.php

@@ -30,7 +30,7 @@ else {
     <a start show href="#" class="mr-2 text-sm text-center" title="<?= !empty($currentValue) ? 'Edit Plan' : 'Add Plan'?>">
         <?= !empty($currentValue) ? 'Edit' : 'Add'?>
     </a>
-    <form url="/api/visitPoint/upsertChildPlan" class="mcp-theme-1 w-100">
+    <form url="/api/visitPoint/upsertChildPlan" class="mcp-theme-1">
         <input type="hidden" name="uid" value="<?= $point->uid ?>">
         <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
         <input type="hidden" name="data">