|
@@ -8,14 +8,14 @@ use App\Models\Segment;
|
|
/** @var Client $patient */
|
|
/** @var Client $patient */
|
|
/** @var Note $note */
|
|
/** @var Note $note */
|
|
|
|
|
|
-$medications = Point::getPointsOfCategoryExtended($patient, 'MEDICATION', $note);
|
|
|
|
|
|
+list($medications, $counts) = Point::getPointsOfCategoryExtended($patient, 'MEDICATION', $note);
|
|
|
|
|
|
?>
|
|
?>
|
|
|
|
|
|
<div class="mt-3 p-3 border-top min-height-500px" id="medications-center-{{$note->id}}">
|
|
<div class="mt-3 p-3 border-top min-height-500px" id="medications-center-{{$note->id}}">
|
|
<div>
|
|
<div>
|
|
|
|
|
|
- <table class="table table-sm table-bordered table-striped mb-0 bg-white mb-2">
|
|
|
|
|
|
+ <table class="table table-sm table-bordered mb-0 bg-white mb-2">
|
|
<thead>
|
|
<thead>
|
|
<tr class="">
|
|
<tr class="">
|
|
@if($patient->core_note_id !== $note->id)
|
|
@if($patient->core_note_id !== $note->id)
|
|
@@ -32,322 +32,276 @@ $medications = Point::getPointsOfCategoryExtended($patient, 'MEDICATION', $note)
|
|
</thead>
|
|
</thead>
|
|
<?php $prevRowState = -1; ?>
|
|
<?php $prevRowState = -1; ?>
|
|
<?php foreach($medications as $medication): ?>
|
|
<?php foreach($medications as $medication): ?>
|
|
- <?php $point = $medication; ?>
|
|
|
|
- @if($prevRowState !== -1 && $prevRowState !== $medication->state)
|
|
|
|
- <tr>
|
|
|
|
- <td colspan="10" class="px-0 pt-1 pb-0 on-hover-opaque bg-secondary"></td>
|
|
|
|
- </tr>
|
|
|
|
- @endif
|
|
|
|
- <?php $prevRowState = $medication->state; ?>
|
|
|
|
- <?php $rel = $medication->relevanceToNote($note); ?>
|
|
|
|
- <tr class="{{$rel ? 'relevant-to-visit' : ''}}">
|
|
|
|
- @if($patient->core_note_id !== $note->id)
|
|
|
|
- <td class="text-center">
|
|
|
|
- <a href="#" class="toggle-relevance"
|
|
|
|
- data-relevant="{{$rel ? '1' : '0'}}"
|
|
|
|
- data-rel-uid="{{$rel ? $rel->uid : ''}}"
|
|
|
|
- data-point-uid="{{$medication->uid}}"
|
|
|
|
- title="Mark as{{$rel ? ' not ' : ' '}}relevant to this visit">
|
|
|
|
- @if($rel)
|
|
|
|
- <i class="fa fa-star text-sm text-info"></i>
|
|
|
|
- @else
|
|
|
|
- <i class="fa fa-star text-sm text-secondary on-hover-opaque"></i>
|
|
|
|
- @endif
|
|
|
|
- </a>
|
|
|
|
- </td>
|
|
|
|
|
|
+ <?php $point = $medication; ?>
|
|
|
|
+ @if($prevRowState !== $medication->state)
|
|
|
|
+ @include('app.patient.wizard-partials.state-row', ['point' => $medication])
|
|
@endif
|
|
@endif
|
|
- <td>
|
|
|
|
- <div class="d-flex align-items-baseline">
|
|
|
|
- @if($medication->state === 1)
|
|
|
|
- <i class="text-success fa fa-circle text-sm on-hover-opaque mr-2 active-record"></i>
|
|
|
|
- @elseif($medication->state === 2)
|
|
|
|
- <i class="text-info fa fa-circle text-sm on-hover-opaque mr-2 active-record"></i>
|
|
|
|
- @elseif($medication->state === 3)
|
|
|
|
- <i class="text-warning-mellow fa fa-circle text-sm on-hover-opaque mr-2 active-record"></i>
|
|
|
|
- @elseif($medication->state === 4)
|
|
|
|
- <i class="text-secondary fa fa-circle text-sm on-hover-opaque mr-2"></i>
|
|
|
|
- @endif
|
|
|
|
- <div>
|
|
|
|
- <b><?= !!@($medication->data->name) ? @($medication->data->name) : '-' ?></b>
|
|
|
|
- @if($medication->added_in_note_id === $note->id)
|
|
|
|
- <div class="mt-1 text-sm text-secondary">
|
|
|
|
- Added
|
|
|
|
- @if($patient->core_note_id !== $note->id)
|
|
|
|
- during this visit
|
|
|
|
- @else
|
|
|
|
- from the patient's chart
|
|
|
|
- @endif
|
|
|
|
- @if($medication->addition_reason_category === 'ON_INTAKE')
|
|
|
|
- (existing)
|
|
|
|
- @elseif($medication->addition_reason_category === 'DURING_VISIT')
|
|
|
|
- (new)
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
- @if($medication->is_removed && $medication->removed_in_note_id === $note->id)
|
|
|
|
- <div class="mt-1 text-sm text-secondary">
|
|
|
|
- Discontinued
|
|
|
|
- @if($patient->core_note_id !== $note->id)
|
|
|
|
- during this visit
|
|
|
|
- @else
|
|
|
|
- from the patient's chart
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
|
|
+ <?php $prevRowState = $medication->state; ?>
|
|
|
|
+ <?php $rel = $medication->relevanceToNote($note); ?>
|
|
|
|
+ <tr class="{{$rel ? 'relevant-to-visit' : ''}}">
|
|
|
|
+ @if($patient->core_note_id !== $note->id)
|
|
|
|
+ @include('app.patient.wizard-partials.relevance-column', ['point' => $medication])
|
|
|
|
+ @endif
|
|
|
|
+ <td>
|
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
|
|
+ @include('app.patient.wizard-partials.state-icon', ['point' => $medication])
|
|
|
|
+ <div>
|
|
|
|
+ <b><?= !!@($medication->data->name) ? @($medication->data->name) : '-' ?></b>
|
|
|
|
+ @include('app.patient.wizard-partials.state-badge', ['point' => $medication, 'addedVerb' => 'Prescribed', 'removedVerb' => 'Discontinued'])
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- <div class="d-flex align-items-start">
|
|
|
|
- <div class="flex-grow-1">
|
|
|
|
- <?php
|
|
|
|
- $point = $medication;
|
|
|
|
- include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
|
|
|
|
- ?>
|
|
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <div class="d-flex align-items-start">
|
|
|
|
+ <div class="flex-grow-1">
|
|
|
|
+ <?php
|
|
|
|
+ $point = $medication;
|
|
|
|
+ include resource_path('views/app/patient/segment-templates/_child_review/last-review.php');
|
|
|
|
+ ?>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-inline-flex flex-nowrap">
|
|
|
|
+ <a class="pl-2 view-review-log"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ open-in-stag-popup
|
|
|
|
+ popup-style="stag-popup-md"
|
|
|
|
+ title="Review log<?= !!@($medication->data->name) ? ' for ' . @($medication->data->name) : '' ?>"
|
|
|
|
+ href="/point/review-log/<?= $medication->uid ?>?popupmode=1">
|
|
|
|
+ <i class="fa fa-history"></i>
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="d-inline-flex flex-nowrap">
|
|
|
|
- <a class="pl-2 view-review-log"
|
|
|
|
- native target="_blank"
|
|
|
|
- open-in-stag-popup
|
|
|
|
- popup-style="stag-popup-md"
|
|
|
|
- title="Review log<?= !!@($medication->data->name) ? ' for ' . @($medication->data->name) : '' ?>"
|
|
|
|
- href="/point/review-log/<?= $medication->uid ?>?popupmode=1">
|
|
|
|
- <i class="fa fa-history"></i>
|
|
|
|
- </a>
|
|
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <div class="d-flex align-items-start">
|
|
|
|
+ <div class="flex-grow-1">
|
|
|
|
+ <?php
|
|
|
|
+ include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
|
|
|
|
+ ?>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-inline-flex flex-nowrap">
|
|
|
|
+ <a class="pl-2 view-review-log"
|
|
|
|
+ native target="_blank"
|
|
|
|
+ open-in-stag-popup
|
|
|
|
+ popup-style="stag-popup-md"
|
|
|
|
+ title="Plan log<?= !!@($medication->data->name) ? ' for ' . @($medication->data->name) : '' ?>"
|
|
|
|
+ href="/point/plan-log/<?= $medication->uid ?>?popupmode=1">
|
|
|
|
+ <i class="fa fa-history"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <?php
|
|
|
|
+ /*$segment = $note->getSegmentByInternalName('plan_medications');
|
|
|
|
+ if($segment) {
|
|
|
|
+ include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan.php');
|
|
|
|
+ }*/
|
|
|
|
+ ?>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- <div class="d-flex align-items-start">
|
|
|
|
- <div class="flex-grow-1">
|
|
|
|
- <?php
|
|
|
|
- include resource_path('views/app/patient/segment-templates/_child_plan/last-plan.php');
|
|
|
|
- ?>
|
|
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ @if($medication->is_removed)
|
|
|
|
+ NO
|
|
|
|
+ @else
|
|
|
|
+ <b>YES</b>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <?= !!@($medication->data->start_date) ? friendly_date($medication->data->start_date) : '-' ?>
|
|
|
|
+ @if(!!@($medication->data->prescriber))
|
|
|
|
+ <div class="mt-1 text-sm text-secondary">By: <?= !!@($medication->data->prescriber) ? @($medication->data->prescriber) : '-' ?></div>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <?= !!@($medication->removal_effective_date) ? friendly_date($medication->removal_effective_date) : '-' ?>
|
|
|
|
+ @if(!!@($medication->removal_reason_memo))
|
|
|
|
+ <div class="mt-1 text-sm text-secondary">By: <?= !!@($medication->removal_reason_memo) ? @($medication->removal_reason_memo) : '-' ?></div>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <div moe huge relative>
|
|
|
|
+ <a start show href="#" title="Edit">Edit</a>
|
|
|
|
+ <form url="/api/visitPoint/updateTopLevel" class="mcp-theme-1 frm-edit-medication" right>
|
|
|
|
+ <input type="hidden" name="uid" value="<?= $medication->uid ?>">
|
|
|
|
+ <input type="hidden" name="noteUid" value="<?= $note->uid ?>">
|
|
|
|
+ <p class="mb-2"><b>Update Medication</b></p>
|
|
|
|
+
|
|
|
|
+ <input type="hidden" name="data" value='{{json_encode($medication->data)}}'>
|
|
|
|
+
|
|
|
|
+ @if($medication->added_in_note_id === $note->id)
|
|
|
|
+
|
|
|
|
+ <input type="hidden" data-name="medId" value="{{@$medication->data->medId}}">
|
|
|
|
+ <input type="hidden" data-name="routedMedId" value="{{@$medication->data->routedMedId}}">
|
|
|
|
+ <input type="hidden" data-name="routedDosageFormMedId" value="{{@$medication->data->routedDosageFormMedId}}">
|
|
|
|
+ <input type="hidden" data-name="gcnSeqno" value="{{@$medication->data->gcnSeqno}}">
|
|
|
|
+
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="text-sm mb-1 font-weight-bold">Drug</label>
|
|
|
|
+ <input type="text" class="form-control form-control-sm min-width-unset prescription-medication"
|
|
|
|
+ data-name="name"
|
|
|
|
+ value="{{@$medication->data->name}}"
|
|
|
|
+ stag-suggest
|
|
|
|
+ stag-suggest-ep="/fdb-med-suggest-v2/json">
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ @else
|
|
|
|
+
|
|
|
|
+ <div class="mb-2 bg-light p-2 border">
|
|
|
|
+ <p class="mb-1 font-weight-bold">
|
|
|
|
+ {{ @$medication->data->name }}
|
|
|
|
+ </p>
|
|
|
|
+ @if($patient->core_note_id !== $note->id)
|
|
|
|
+ <div class="text-secondary text-sm">Clinical details cannot be modified since the medication was added prior to this visit.</div>
|
|
|
|
+ @else
|
|
|
|
+ <div class="text-secondary text-sm">Clinical details cannot be modified since the medication was added on a previous visit.</div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ @endif
|
|
|
|
+
|
|
|
|
+ @include('app.patient.wizard-partials.common-fields', ['label' => 'medication', 'point' => $medication, 'addVerbPT' => 'Prescribed', 'planLabel' => 'Directions/Plan'])
|
|
|
|
+
|
|
|
|
+ <div class="mt-3 pt-2 d-flex align-items-center border-top">
|
|
|
|
+ <button type="submit" class="btn-save-medication 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>
|
|
</div>
|
|
- <div class="d-inline-flex flex-nowrap">
|
|
|
|
- <a class="pl-2 view-review-log"
|
|
|
|
- native target="_blank"
|
|
|
|
- open-in-stag-popup
|
|
|
|
- popup-style="stag-popup-md"
|
|
|
|
- title="Plan log<?= !!@($medication->data->name) ? ' for ' . @($medication->data->name) : '' ?>"
|
|
|
|
- href="/point/plan-log/<?= $medication->uid ?>?popupmode=1">
|
|
|
|
- <i class="fa fa-history"></i>
|
|
|
|
- </a>
|
|
|
|
- <?php
|
|
|
|
- /*$segment = $note->getSegmentByInternalName('plan_medications');
|
|
|
|
- if($segment) {
|
|
|
|
- include resource_path('views/app/patient/segment-templates/_child_plan/edit-plan.php');
|
|
|
|
- }*/
|
|
|
|
- ?>
|
|
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <?php endforeach; ?>
|
|
|
|
+ </table>
|
|
|
|
+
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <div class="mt-1 w-100 border p-3 bg-aliceblue border-info rounded">
|
|
|
|
+ <!--<a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new medication, prescribed during this visit</a>-->
|
|
|
|
+ <form action="/api/visitPoint/addTopLevel" class="mcp-theme-1 w-100" id="frm-add-medication">
|
|
|
|
+ <input type="hidden" name="noteUid" value="<?= $note->uid ?>">
|
|
|
|
+ <input type="hidden" name="category" value="MEDICATION">
|
|
|
|
+ <input type="hidden" name="data">
|
|
|
|
+
|
|
|
|
+ <input type="hidden" data-name="medId">
|
|
|
|
+ <input type="hidden" data-name="routedMedId">
|
|
|
|
+ <input type="hidden" data-name="routedDosageFormMedId">
|
|
|
|
+ <input type="hidden" data-name="gcnSeqno">
|
|
|
|
+
|
|
|
|
+ <input type="hidden" name="isRemovedDueToEntryError" value="0">
|
|
|
|
+
|
|
|
|
+ <div class="row">
|
|
|
|
+ <div class="col-8">
|
|
|
|
+ <p class="mb-2"><b>Add Medication</b></p>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-0 font-weight-bold">Name</label>
|
|
|
|
+ <input type="text"
|
|
|
|
+ data-name="name"
|
|
|
|
+ class="form-control form-control-sm"
|
|
|
|
+ stag-suggest
|
|
|
|
+ stag-suggest-bottom-left
|
|
|
|
+ stag-suggest-ep="/fdb-med-suggest-v2/json"
|
|
|
|
+ required>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- @if($medication->is_removed)
|
|
|
|
- NO
|
|
|
|
- @else
|
|
|
|
- <b>YES</b>
|
|
|
|
- @endif
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- <?= !!@($medication->data->start_date) ? friendly_date($medication->data->start_date) : '-' ?>
|
|
|
|
- @if(!!@($medication->data->prescriber))
|
|
|
|
- <div class="mt-1 text-sm text-secondary">By: <?= !!@($medication->data->prescriber) ? @($medication->data->prescriber) : '-' ?></div>
|
|
|
|
- @endif
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- <?= !!@($medication->removal_effective_date) ? friendly_date($medication->removal_effective_date) : '-' ?>
|
|
|
|
- @if(!!@($medication->removal_reason_memo))
|
|
|
|
- <div class="mt-1 text-sm text-secondary">By: <?= !!@($medication->removal_reason_memo) ? @($medication->removal_reason_memo) : '-' ?></div>
|
|
|
|
- @endif
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- <div moe huge relative>
|
|
|
|
- <a start show href="#" title="Edit">Edit</a>
|
|
|
|
- <form url="/api/visitPoint/updateTopLevel" class="mcp-theme-1 frm-edit-medication" right>
|
|
|
|
- <input type="hidden" name="uid" value="<?= $medication->uid ?>">
|
|
|
|
- <input type="hidden" name="noteUid" value="<?= $note->uid ?>">
|
|
|
|
- <p class="mb-2"><b>Update Medication</b></p>
|
|
|
|
-
|
|
|
|
- <input type="hidden" name="data" value='{{json_encode($medication->data)}}'>
|
|
|
|
-
|
|
|
|
- @if($medication->added_in_note_id === $note->id)
|
|
|
|
-
|
|
|
|
- <input type="hidden" data-name="medId" value="{{@$medication->data->medId}}">
|
|
|
|
- <input type="hidden" data-name="routedMedId" value="{{@$medication->data->routedMedId}}">
|
|
|
|
- <input type="hidden" data-name="routedDosageFormMedId" value="{{@$medication->data->routedDosageFormMedId}}">
|
|
|
|
- <input type="hidden" data-name="gcnSeqno" value="{{@$medication->data->gcnSeqno}}">
|
|
|
|
-
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1 font-weight-bold">Drug</label>
|
|
|
|
- <input type="text" class="form-control form-control-sm min-width-unset prescription-medication"
|
|
|
|
- data-name="name"
|
|
|
|
- value="{{@$medication->data->name}}"
|
|
|
|
- stag-suggest
|
|
|
|
- stag-suggest-ep="/fdb-med-suggest-v2/json">
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- @else
|
|
|
|
-
|
|
|
|
- <div class="mb-2 bg-light p-2 border">
|
|
|
|
- <p class="mb-1 font-weight-bold">
|
|
|
|
- {{ @$medication->data->name }}
|
|
|
|
- </p>
|
|
|
|
- @if($patient->core_note_id !== $note->id)
|
|
|
|
- <div class="text-secondary text-sm">Clinical details cannot be modified since the medication was added prior to this visit.</div>
|
|
|
|
- @else
|
|
|
|
- <div class="text-secondary text-sm">Clinical details cannot be modified since the medication was added on a previous visit.</div>
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- @endif
|
|
|
|
|
|
|
|
- @include('app.patient.wizard-partials.common-fields', ['label' => 'medication', 'point' => $medication, 'addVerbPT' => 'Prescribed', 'planLabel' => 'Directions/Plan'])
|
|
|
|
|
|
+ <?php $point = null; ?>
|
|
|
|
+ @include('app.patient.wizard-partials.common-fields', ['label' => 'medication', 'addVerbPT' => 'Prescribed', 'planLabel' => 'Directions/Plan'])
|
|
|
|
|
|
- <div class="mt-3 pt-2 d-flex align-items-center border-top">
|
|
|
|
- <button type="submit" class="btn-save-medication 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>
|
|
</div>
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- <?php endforeach; ?>
|
|
|
|
- </table>
|
|
|
|
-
|
|
|
|
- <div class="d-flex align-items-center">
|
|
|
|
- <div class="mt-1 w-100 border p-3 bg-aliceblue border-info rounded">
|
|
|
|
- <!--<a href="#" start show class="btn btn-sm btn btn-outline-primary">+ Add new medication, prescribed during this visit</a>-->
|
|
|
|
- <form action="/api/visitPoint/addTopLevel" class="mcp-theme-1 w-100" id="frm-add-medication">
|
|
|
|
- <input type="hidden" name="noteUid" value="<?= $note->uid ?>">
|
|
|
|
- <input type="hidden" name="category" value="MEDICATION">
|
|
|
|
- <input type="hidden" name="data">
|
|
|
|
-
|
|
|
|
- <input type="hidden" data-name="medId">
|
|
|
|
- <input type="hidden" data-name="routedMedId">
|
|
|
|
- <input type="hidden" data-name="routedDosageFormMedId">
|
|
|
|
- <input type="hidden" data-name="gcnSeqno">
|
|
|
|
-
|
|
|
|
- <input type="hidden" name="isRemovedDueToEntryError" value="0">
|
|
|
|
-
|
|
|
|
- <div class="row">
|
|
|
|
- <div class="col-8">
|
|
|
|
- <p class="mb-2"><b>Add Medication</b></p>
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="mb-0 font-weight-bold">Name</label>
|
|
|
|
- <input type="text"
|
|
|
|
- data-name="name"
|
|
|
|
- class="form-control form-control-sm"
|
|
|
|
- stag-suggest
|
|
|
|
- stag-suggest-bottom-left
|
|
|
|
- stag-suggest-ep="/fdb-med-suggest-v2/json"
|
|
|
|
- required>
|
|
|
|
|
|
+ <div class="col-4 border-left">
|
|
|
|
+
|
|
|
|
+ <?php
|
|
|
|
+ $problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
|
|
|
|
+ ?>
|
|
|
|
+ @if(count($problems))
|
|
|
|
+ <h6 class="my-0 font-weight-bold text-secondary mb-2">Active Problems</h6>
|
|
|
|
+ <div class="bg-light border px-2 pt-2 pb-1 mb-0">
|
|
|
|
+ @foreach($problems as $problem)
|
|
|
|
+ <div class="mb-1">
|
|
|
|
+ <b><?= !!@($problem->data->name) ? @($problem->data->name) : '-' ?></b>
|
|
|
|
+ </div>
|
|
|
|
+ @endforeach
|
|
</div>
|
|
</div>
|
|
|
|
+ <hr class="my-3 m-neg-3">
|
|
|
|
+ @endif
|
|
|
|
|
|
- <?php $point = null; ?>
|
|
|
|
- @include('app.patient.wizard-partials.common-fields', ['label' => 'medication', 'addVerbPT' => 'Prescribed', 'planLabel' => 'Directions/Plan'])
|
|
|
|
-
|
|
|
|
- </div>
|
|
|
|
- <div class="col-4 border-left">
|
|
|
|
-
|
|
|
|
- <?php
|
|
|
|
- $problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
|
|
|
|
- ?>
|
|
|
|
- @if(count($problems))
|
|
|
|
- <h6 class="my-0 font-weight-bold text-secondary mb-2">Active Problems</h6>
|
|
|
|
- <div class="bg-light border px-2 pt-2 pb-1 mb-0">
|
|
|
|
- @foreach($problems as $problem)
|
|
|
|
- <div class="mb-1">
|
|
|
|
- <b><?= !!@($problem->data->name) ? @($problem->data->name) : '-' ?></b>
|
|
|
|
- </div>
|
|
|
|
- @endforeach
|
|
|
|
- </div>
|
|
|
|
- <hr class="my-3 m-neg-3">
|
|
|
|
- @endif
|
|
|
|
-
|
|
|
|
- <div class="fdb-rx-vigilance max-height-400px overflow-auto">
|
|
|
|
|
|
+ <div class="fdb-rx-vigilance max-height-400px overflow-auto">
|
|
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="d-flex align-items-center">
|
|
|
|
- <button type="submit" class="btn btn-sm btn-primary mr-2">Save Medication</button>
|
|
|
|
- <button type="button" class="btn btn-sm btn-default border-secondary bg-white border mr-2" onclick="return closeStagPopup()">Close</button>
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <button type="submit" class="btn btn-sm btn-primary mr-2">Save Medication</button>
|
|
|
|
+ <button type="button" class="btn btn-sm btn-default border-secondary bg-white border mr-2" onclick="return closeStagPopup()">Close</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+</div>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- (function() {
|
|
|
|
- function init() {
|
|
|
|
- let parentSegment = $('#medications-center-{{$note->id}}');
|
|
|
|
- parentSegment.find('input[stag-suggest][data-name="name"]')
|
|
|
|
- .off('stag-suggest-selected')
|
|
|
|
- .on('stag-suggest-selected', (_e, _input, _data) => {
|
|
|
|
- $(_input).closest('form').find('input[data-name="routedMedId"]').val(_data.routed_med_id);
|
|
|
|
- $(_input).closest('form').find('input[data-name="routedDosageFormMedId"]').val(_data.routed_dosage_form_med_id);
|
|
|
|
- $(_input).closest('form').find('input[data-name="gcnSeqno"]').val(_data.gcn_seqno);
|
|
|
|
- $(_input).closest('form').find('input[data-name="medId"]').val(_data.medid);
|
|
|
|
-
|
|
|
|
- $('.fdb-rx-vigilance').html('<span class="text-secondary font-italic">Please wait ...</span>');
|
|
|
|
- $.post('/fdb-rx-vigilance/{{$patient->uid}}', {
|
|
|
|
- _token: '{{csrf_token()}}',
|
|
|
|
- medId: _data.medid,
|
|
|
|
- routedMedId: _data.routed_med_id,
|
|
|
|
- routedDosageFormMedId: _data.routed_dosage_form_med_id,
|
|
|
|
- gcnSeqno: _data.gcn_seqno,
|
|
|
|
- name: _input.val(),
|
|
|
|
- }, _data => {
|
|
|
|
- $('.fdb-rx-vigilance').html(_data);
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- return false;
|
|
|
|
|
|
+(function() {
|
|
|
|
+ function init() {
|
|
|
|
+ let parentSegment = $('#medications-center-{{$note->id}}');
|
|
|
|
+ parentSegment.find('input[stag-suggest][data-name="name"]')
|
|
|
|
+ .off('stag-suggest-selected')
|
|
|
|
+ .on('stag-suggest-selected', (_e, _input, _data) => {
|
|
|
|
+ $(_input).closest('form').find('input[data-name="routedMedId"]').val(_data.routed_med_id);
|
|
|
|
+ $(_input).closest('form').find('input[data-name="routedDosageFormMedId"]').val(_data.routed_dosage_form_med_id);
|
|
|
|
+ $(_input).closest('form').find('input[data-name="gcnSeqno"]').val(_data.gcn_seqno);
|
|
|
|
+ $(_input).closest('form').find('input[data-name="medId"]').val(_data.medid);
|
|
|
|
+
|
|
|
|
+ $('.fdb-rx-vigilance').html('<span class="text-secondary font-italic">Please wait ...</span>');
|
|
|
|
+ $.post('/fdb-rx-vigilance/{{$patient->uid}}', {
|
|
|
|
+ _token: '{{csrf_token()}}',
|
|
|
|
+ medId: _data.medid,
|
|
|
|
+ routedMedId: _data.routed_med_id,
|
|
|
|
+ routedDosageFormMedId: _data.routed_dosage_form_med_id,
|
|
|
|
+ gcnSeqno: _data.gcn_seqno,
|
|
|
|
+ name: _input.val(),
|
|
|
|
+ }, _data => {
|
|
|
|
+ $('.fdb-rx-vigilance').html(_data);
|
|
});
|
|
});
|
|
|
|
|
|
- @include('app.patient.wizard-partials.common-script', ['label' => 'medication'])
|
|
|
|
-
|
|
|
|
- // custom buttons on title bar
|
|
|
|
- $('.button-container').remove();
|
|
|
|
- let buttonContainer = $('<div/>').addClass('button-container ml-auto mr-3');
|
|
|
|
- let titleElem = $('#medications-center-{{$note->id}}').closest('.stag-popup').find('.stag-popup-title>span');
|
|
|
|
- titleElem.next().removeClass('ml-auto');
|
|
|
|
- titleElem.parent().addClass('align-items-baseline');
|
|
|
|
-
|
|
|
|
- // add button for "reconcile active medications"
|
|
|
|
- if($('.active-record').length) {
|
|
|
|
- $('.btn-reconcile-active').remove();
|
|
|
|
- $('<a ' +
|
|
|
|
- 'href="/medications-reconcile/{{$patient->uid}}/{{$note->uid}}" ' +
|
|
|
|
- 'title="Reconcile Active Medications" ' +
|
|
|
|
- 'update-parent ' +
|
|
|
|
- 'open-in-stag-popup ' +
|
|
|
|
- 'mc-initer="medications-reconcile-{{$note->id}}" ' +
|
|
|
|
- 'popup-style="stag-popup-md" ' +
|
|
|
|
- 'class="btn-reconcile-active btn btn-sm mr-2 btn-info text-white font-weight-bold">Reconcile Active Medications</a>')
|
|
|
|
- .appendTo(buttonContainer);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // add button for "eRx"
|
|
|
|
- $('.btn-manage-erx').remove();
|
|
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ @include('app.patient.wizard-partials.common-script', ['label' => 'medication'])
|
|
|
|
+
|
|
|
|
+ // custom buttons on title bar
|
|
|
|
+ $('.button-container').remove();
|
|
|
|
+ let buttonContainer = $('<div/>').addClass('button-container ml-auto mr-3');
|
|
|
|
+ let titleElem = $('#medications-center-{{$note->id}}').closest('.stag-popup').find('.stag-popup-title>span');
|
|
|
|
+ titleElem.next().removeClass('ml-auto');
|
|
|
|
+ titleElem.parent().addClass('align-items-baseline');
|
|
|
|
+
|
|
|
|
+ // add button for "reconcile active medications"
|
|
|
|
+ if($('.active-record').length) {
|
|
|
|
+ $('.btn-reconcile-active').remove();
|
|
$('<a ' +
|
|
$('<a ' +
|
|
- 'href="/patients/view/{{$patient->uid}}/prescriptions-popup?noteUid={{$note->uid}}&erx_category=DRUG" ' +
|
|
|
|
- 'title="Manage eRx" ' +
|
|
|
|
|
|
+ 'href="/medications-reconcile/{{$patient->uid}}/{{$note->uid}}" ' +
|
|
|
|
+ 'title="Reconcile Active Medications" ' +
|
|
'update-parent ' +
|
|
'update-parent ' +
|
|
'open-in-stag-popup ' +
|
|
'open-in-stag-popup ' +
|
|
- 'mc-initer="prescriptions-popup-{{$patient->id}}" ' +
|
|
|
|
- 'popup-style="medium" ' +
|
|
|
|
- 'class="btn-manage-erx btn btn-sm mr-2 btn-info text-white font-weight-bold">Manage eRx</a>')
|
|
|
|
|
|
+ 'mc-initer="medications-reconcile-{{$note->id}}" ' +
|
|
|
|
+ 'popup-style="stag-popup-md" ' +
|
|
|
|
+ 'class="btn-reconcile-active btn btn-sm mr-2 btn-info text-white font-weight-bold">Reconcile Active Medications</a>')
|
|
.appendTo(buttonContainer);
|
|
.appendTo(buttonContainer);
|
|
-
|
|
|
|
- buttonContainer.insertAfter(titleElem);
|
|
|
|
-
|
|
|
|
- initSegmentMoes(parentSegment);
|
|
|
|
- __initRTEs(parentSegment.find('[note-rte]:not(.ql-container)'));
|
|
|
|
}
|
|
}
|
|
- addMCInitializer('medications-center-{{$note->id}}', init, '#medications-center-{{$note->id}}');
|
|
|
|
- }).call(window);
|
|
|
|
|
|
+
|
|
|
|
+ // add button for "eRx"
|
|
|
|
+ $('.btn-manage-erx').remove();
|
|
|
|
+ $('<a ' +
|
|
|
|
+ 'href="/patients/view/{{$patient->uid}}/prescriptions-popup?noteUid={{$note->uid}}&erx_category=DRUG" ' +
|
|
|
|
+ 'title="Manage eRx" ' +
|
|
|
|
+ 'update-parent ' +
|
|
|
|
+ 'open-in-stag-popup ' +
|
|
|
|
+ 'mc-initer="prescriptions-popup-{{$patient->id}}" ' +
|
|
|
|
+ 'popup-style="medium" ' +
|
|
|
|
+ 'class="btn-manage-erx btn btn-sm mr-2 btn-info text-white font-weight-bold">Manage eRx</a>')
|
|
|
|
+ .appendTo(buttonContainer);
|
|
|
|
+
|
|
|
|
+ buttonContainer.insertAfter(titleElem);
|
|
|
|
+
|
|
|
|
+ initSegmentMoes(parentSegment);
|
|
|
|
+ __initRTEs(parentSegment.find('[note-rte]:not(.ql-container)'));
|
|
|
|
+ }
|
|
|
|
+ addMCInitializer('medications-center-{{$note->id}}', init, '#medications-center-{{$note->id}}');
|
|
|
|
+}).call(window);
|
|
</script>
|
|
</script>
|