|
@@ -0,0 +1,558 @@
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+$days = $patient->cmMeasurementsMatrix($careMonth, ($pro->pro_type === 'ADMIN' ? null : $pro));
|
|
|
|
+
|
|
|
|
+$performerRole = false;
|
|
|
|
+if ($pro->pro_type === 'ADMIN') {
|
|
|
|
+ $performerRole = 'ADMIN';
|
|
|
|
+} else if ($careMonth->mcp_pro_id === $pro->id) {
|
|
|
|
+ $performerRole = 'MCP';
|
|
|
|
+} else if ($careMonth->rme_pro_id === $pro->id || $careMonth->rmm_pro_id === $pro->id) {
|
|
|
|
+ $performerRole = 'NON-HCP';
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+$unstampedMCP = [];
|
|
|
|
+$unstampedNonHCP = [];
|
|
|
|
+foreach ($days as $k => $day) {
|
|
|
|
+ $unstampedMCP[$k] = [];
|
|
|
|
+ $unstampedNonHCP[$k] = [];
|
|
|
|
+ foreach ($days[$k] as $mIndex => $m) {
|
|
|
|
+ if(!$m->has_been_stamped_by_mcp) {
|
|
|
|
+ $unstampedMCP[$k][] = $m->measurement_uid;
|
|
|
|
+ }
|
|
|
|
+ if(!$m->has_been_stamped_by_non_hcp) {
|
|
|
|
+ $unstampedNonHCP[$k][] = $m->measurement_uid;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+?>
|
|
|
|
+
|
|
|
|
+<table class="table table-condensed table-sm table-bordered mb-3 cm-tab" tab-key="matrix">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="px-2 text-secondary align-bottom border-bottom-0" rowspan="2">Date</th>
|
|
|
|
+ <th class="px-2 text-secondary border-bottom-0" colspan="4">Measurements</th>
|
|
|
|
+ <!-- <th class="px-2 text-secondary align-bottom border-bottom-0" rowspan="2">{{$performerRole === 'ADMIN' ? 'Stamp Status' : 'Stamp + Entry'}}</th> -->
|
|
|
|
+ <!-- <th class="px-2 text-secondary border-bottom-0" rowspan="2">Entries</th> -->
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="text-secondary text-sm border-bottom-0">Time</th>
|
|
|
|
+ <th class="text-secondary text-sm border-bottom-0">Type</th>
|
|
|
|
+ <th class="text-secondary text-sm border-bottom-0">Value</th>
|
|
|
|
+ <!-- <th class="text-secondary text-sm border-bottom-0">Stamp</th> -->
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach($days as $k => $day)
|
|
|
|
+ @foreach($days[$k] as $mIndex => $m)
|
|
|
|
+ <tr>
|
|
|
|
+ @if($mIndex === 0)
|
|
|
|
+ <td rowspan="{{count($days[$k])}}">
|
|
|
|
+ <span class="text-nowrap">{{$k}}</span>
|
|
|
|
+ </td>
|
|
|
|
+ @endif
|
|
|
|
+ <td><span class="text-nowrap">{{$m->time}}</span></td>
|
|
|
|
+ <td>
|
|
|
|
+ @if($m->label === 'BP')
|
|
|
|
+ BP
|
|
|
|
+ @elseif($m->label === 'Wt. (lbs.)')
|
|
|
|
+ Weight
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="text-nowrap">
|
|
|
|
+ @if($m->label === 'BP')
|
|
|
|
+ {{ $m->sbp_mm_hg }}/{{ $m->dbp_mm_hg }}
|
|
|
|
+ @elseif($m->label === 'Wt. (lbs.)')
|
|
|
|
+ {{ round(floatval($m->numeric_value), 2) }} lbs
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td class="d-none">
|
|
|
|
+ @if($performerRole === 'MCP')
|
|
|
|
+ <div class="width-100px">
|
|
|
|
+ @if($m->has_been_stamped_by_mcp)
|
|
|
|
+ <span class="text-secondary text-sm">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ Stamped
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <div moe relative>
|
|
|
|
+ <a href="#" start show>Stamp</a>
|
|
|
|
+ <form url="/api/measurement/stamp" right class="width-300px">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$m->measurement_uid}}">
|
|
|
|
+ <p class="mb-1">Stamp this measurement?</p>
|
|
|
|
+ <div class="mt-2 bg-light border p-2">
|
|
|
|
+ <div class="mb-1 text-secondary">{{ $m->label }}</div>
|
|
|
|
+ <div class="font-weight-bold mb-1">
|
|
|
|
+ @if($m->label === 'BP')
|
|
|
|
+ {{ round($m->sbp_mm_hg, 2) }}/{{ round($m->dbp_mm_hg, 2) }} mmHg
|
|
|
|
+ <span class="font-weight-normal d-inline-block pl-2">Pulse:</span>
|
|
|
|
+ {{ $m->value_pulse }} {{ $m->value_irregular === 0?'Irregular':'' }} {{ $m->value_irregular === 1?'Regular':'' }}
|
|
|
|
+ @elseif($m->label === 'Wt. (lbs.)')
|
|
|
|
+ {{ round($m->numeric_value, 2) }} lbs
|
|
|
|
+ @else
|
|
|
|
+ {{ $m->value }}
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ <div class="text-sm">
|
|
|
|
+ {{ $m->date }} {{ $m->time }} EST
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!--<div class="mb-2 border border-info p-2 mt-2 bg-light">
|
|
|
|
+ <span>I have had interactive communication with <b>{{$patient->displayName()}}</b>.</span>
|
|
|
|
+ <div class="d-flex border-top mt-2">
|
|
|
|
+ <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
|
|
|
|
+ <input type="radio" class="mr-2" name="communicatedToPatient" value="true" required>
|
|
|
|
+ <span>Yes</span>
|
|
|
|
+ </label>
|
|
|
|
+ <label class="mt-2 mb-0 d-inline-flex align-items-center">
|
|
|
|
+ <input type="radio" class="mr-2" name="communicatedToPatient" value="false" checked required>
|
|
|
|
+ <span>No</span>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ </div>-->
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Memo</label>
|
|
|
|
+ <textarea class="form-control form-control-sm" name="memo"></textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group m-0">
|
|
|
|
+ <button submit class="btn btn-primary btn-sm mr-2">Submit</button>
|
|
|
|
+ <button cancel class="btn btn-default border btn-sm mr-2">Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ @elseif($performerRole === 'NON-HCP')
|
|
|
|
+ <div class="width-100px">
|
|
|
|
+ @if($m->has_been_stamped_by_non_hcp)
|
|
|
|
+ <span class="text-secondary text-sm">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ Stamped
|
|
|
|
+ </span>
|
|
|
|
+ @else
|
|
|
|
+ <div moe relative>
|
|
|
|
+ <a href="#" start show>Stamp</a>
|
|
|
|
+ <form url="/api/measurement/stamp" right class="width-300px">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$m->measurement_uid}}">
|
|
|
|
+ <p class="mb-1">Stamp this measurement?</p>
|
|
|
|
+ <div class="mt-2 bg-light border p-2">
|
|
|
|
+ <div class="mb-1 text-secondary">{{ $m->label }}</div>
|
|
|
|
+ <div class="font-weight-bold mb-1">
|
|
|
|
+ @if($m->label === 'BP')
|
|
|
|
+ {{ round($m->sbp_mm_hg, 2) }}/{{ round($m->dbp_mm_hg, 2) }} mmHg
|
|
|
|
+ <span class="font-weight-normal d-inline-block pl-2">Pulse:</span>
|
|
|
|
+ {{ $m->value_pulse }} {{ $m->value_irregular === 0?'Irregular':'' }} {{ $m->value_irregular === 1?'Regular':'' }}
|
|
|
|
+ @elseif($m->label === 'Wt. (lbs.)')
|
|
|
|
+ {{ round($m->numeric_value, 2) }} lbs
|
|
|
|
+ @else
|
|
|
|
+ {{ $m->value }}
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ <div class="text-sm">
|
|
|
|
+ {{ $m->date }} {{ $m->time }} EST
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Memo</label>
|
|
|
|
+ <textarea class="form-control form-control-sm" name="memo"></textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group m-0">
|
|
|
|
+ <button submit class="btn btn-primary btn-sm mr-2">Submit</button>
|
|
|
|
+ <button cancel class="btn btn-default border btn-sm mr-2">Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ @if($mIndex === 0)
|
|
|
|
+ <td rowspan="{{count($days[$k])}}" class="px-2 d-none">
|
|
|
|
+ @if($performerRole === 'ADMIN')
|
|
|
|
+ <div class="d-flex align-items-center flex-wrap">
|
|
|
|
+ <div class="mr-2">
|
|
|
|
+ <span class="text-secondary">MCP Unstamped:</span>
|
|
|
|
+ <b class="{{count($unstampedMCP[$k]) ? '' : 'text-secondary font-weight-normal'}}">{{count($unstampedMCP[$k])}}</b>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="">
|
|
|
|
+ <span class="text-secondary">Non-HCP Unstamped:</span>
|
|
|
|
+ <b class="{{count($unstampedNonHCP[$k]) ? '' : 'text-secondary font-weight-normal'}}">{{count($unstampedNonHCP[$k])}}</b>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ @elseif($performerRole === 'MCP')
|
|
|
|
+ @if(count($unstampedMCP[$k]))
|
|
|
|
+ <div moe relative class="btn-stamp-all">
|
|
|
|
+ <a href="#" start show class="">
|
|
|
|
+ Stamp All
|
|
|
|
+ </a>
|
|
|
|
+ <form url="/api/measurement/bulkStamp" class="width-300px">
|
|
|
|
+ <input type="hidden" name="clientUid" value="{{$patient->uid}}">
|
|
|
|
+ <input type="hidden" class="measurements-uids" value="{{implode('|', $unstampedMCP[$k])}}">
|
|
|
|
+ <p class="mb-2 font-weight-bold">Stamp all measurements?</p>
|
|
|
|
+ <?php
|
|
|
|
+ $dayTotalMinutes = 0;
|
|
|
|
+ foreach($m->entries as $entry) {
|
|
|
|
+ $dayTotalMinutes += round($entry->time_in_seconds / 60);
|
|
|
|
+ }
|
|
|
|
+ $autoCheckEntry = false;
|
|
|
|
+ $autoCheckEntry = ($dayTotalMinutes < 2 && $careMonth->is_client_enrolled_in_rm);
|
|
|
|
+ ?>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Memo</label>
|
|
|
|
+ <textarea class="form-control form-control-sm" name="entryMemo">measurements within range</textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="">
|
|
|
|
+ <label class="mb-0 d-flex align-items-center">
|
|
|
|
+ <input type="checkbox" class="shouldAddEntry mr-2 my-0" {{$autoCheckEntry ? 'checked' : ''}}>
|
|
|
|
+ <span>Add Time Entry</span>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="if-adding-time-entry pt-2 d-none">
|
|
|
|
+ <div class="mb-2 d-flex align-items-start">
|
|
|
|
+ <div class="width-70px mr-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Seconds</label>
|
|
|
|
+ <input type="number" min="75" max="300"
|
|
|
|
+ class="form-control min-width-unset form-control-sm w-100" name="entryNumberOfSeconds"
|
|
|
|
+ value="75" placeholder="Time (seconds.)">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="flex-grow-1">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Date</label>
|
|
|
|
+ <input type="date" class="form-control min-width-unset form-control-sm w-100"
|
|
|
|
+ name="entryDate"
|
|
|
|
+ value="{{date('Y-m-d', strtotime($k))}}">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="my-3">
|
|
|
|
+ <span><i class="fa fa-phone rotateh text-dark mr-1"></i>This time entry involved interactive communication (audio, video, or in-person) with the patient and/or caretaker.</span>
|
|
|
|
+ <div class="d-flex pt-1">
|
|
|
|
+ <label class="mb-0 d-inline-flex align-items-center mr-3">
|
|
|
|
+ <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="true" required {{$careMonth->has_mcp_interacted_with_client_about_rm ? 'checked' : ''}}>
|
|
|
|
+ <span>Yes</span>
|
|
|
|
+ </label>
|
|
|
|
+ <label class="mb-0 d-inline-flex align-items-center">
|
|
|
|
+ <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="false" required {{!$careMonth->has_mcp_interacted_with_client_about_rm ? 'checked' : ''}}>
|
|
|
|
+ <span>No</span>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group m-0">
|
|
|
|
+ <button type="button" class="btn btn-primary btn-sm mr-2 btn-bulk-stamp">Submit</button>
|
|
|
|
+ <button cancel class="btn btn-default border btn-sm mr-2">Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <span class="text-secondary text-sm d-flex align-items-center">
|
|
|
|
+ <i class="fa fa-check mr-2"></i>
|
|
|
|
+ <span>All Stamped</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @elseif($performerRole === 'NON-HCP')
|
|
|
|
+ @if(count($unstampedNonHCP[$k]))
|
|
|
|
+ <div moe relative class="btn-stamp-all">
|
|
|
|
+ <a href="#" start show class="">
|
|
|
|
+ Stamp All
|
|
|
|
+ </a>
|
|
|
|
+ <form url="/api/measurement/bulkStamp" class="width-300px">
|
|
|
|
+ <input type="hidden" name="clientUid" value="{{$patient->uid}}">
|
|
|
|
+ <input type="hidden" class="measurements-uids" value="{{implode('|', $unstampedNonHCP[$k])}}">
|
|
|
|
+ <p class="mb-2 font-weight-bold">Stamp all measurements?</p>
|
|
|
|
+ <?php
|
|
|
|
+ $dayTotalMinutes = 0;
|
|
|
|
+ foreach($m->entries as $entry) {
|
|
|
|
+ $dayTotalMinutes += round($entry->time_in_seconds / 60);
|
|
|
|
+ }
|
|
|
|
+ $autoCheckEntry = false;
|
|
|
|
+ $autoCheckEntry = ($dayTotalMinutes < 2 && $careMonth->is_client_enrolled_in_rm);
|
|
|
|
+ ?>
|
|
|
|
+ <div class="p-2 border border-info bg-light mb-2">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Memo</label>
|
|
|
|
+ <textarea class="form-control form-control-sm" name="entryMemo"></textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="">
|
|
|
|
+ <label class="mb-0 d-flex align-items-center">
|
|
|
|
+ <input type="checkbox" class="shouldAddEntry mr-2 my-0" {{$autoCheckEntry ? 'checked' : ''}}>
|
|
|
|
+ <span>Add Time Entry</span>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="if-adding-time-entry pt-2 d-none">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Seconds</label>
|
|
|
|
+ <input type="number" min="75" max="300"
|
|
|
|
+ class="form-control form-control-sm w-100" name="entryNumberOfSeconds"
|
|
|
|
+ value="75" placeholder="Time (secs.)">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Date</label>
|
|
|
|
+ <input type="date" class="form-control form-control-sm w-100"
|
|
|
|
+ name="entryDate"
|
|
|
|
+ value="{{date('Y-m-d', strtotime($k))}}">
|
|
|
|
+ </div>
|
|
|
|
+ <!--<div class="">
|
|
|
|
+ <label class="mb-0 d-flex align-items-baseline">
|
|
|
|
+ <input type="checkbox" class="hasAnyoneInteractedWithClientAboutRmOutsideNote mr-2 mt-1">
|
|
|
|
+ <span>Has anyone interacted with client about rm outside note?</span>
|
|
|
|
+ </label>
|
|
|
|
+ </div>-->
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group m-0">
|
|
|
|
+ <button type="button" class="btn btn-primary btn-sm mr-2 btn-bulk-stamp">Submit</button>
|
|
|
|
+ <button cancel class="btn btn-default border btn-sm mr-2">Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ @else
|
|
|
|
+ <span class="text-secondary text-sm d-flex align-items-center">
|
|
|
|
+ <i class="fa fa-check mr-2"></i>
|
|
|
|
+ <span>All Stamped</span>
|
|
|
|
+ </span>
|
|
|
|
+ @endif
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ <td rowspan="{{count($days[$k])}}" class="px-1 pt-1 pb-0 bg-light d-none">
|
|
|
|
+ @foreach($m->entries as $entry)
|
|
|
|
+ <div class="border px-2 py-1 mb-1 bg-white">
|
|
|
|
+ <div class="d-flex align-items-baseline flex-nowrap">
|
|
|
|
+ <b class="mr-2">{{round($entry->time_in_seconds / 60)}}m {{round($entry->time_in_seconds % 60)}}s</b>
|
|
|
|
+ @if($entry->pro_id === $pro->id)
|
|
|
|
+ <div class="ml-2 mr-2" moe>
|
|
|
|
+ <a href="#" start show><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/careMonthEntry/updateTiming">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$entry->uid}}">
|
|
|
|
+ <input type="hidden" name="effectiveDate" value="{{$entry->effective_date}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Seconds *</label>
|
|
|
|
+ <input type="number" name="timeInSeconds" class="form-control form-control-sm" value="{{$entry->time_in_seconds}}" required>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-flex align-items-center flex-nowrap">
|
|
|
|
+ <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>
|
|
|
|
+ @endif
|
|
|
|
+ {{--<span class="text-secondary mr-2 text-nowrap text-sm">({{friendly_date_time($entry->created_at)}})</span>--}}
|
|
|
|
+ <span class="text-secondary inline-html-container">{!! $entry->content_text !!}</span>
|
|
|
|
+ @if($entry->pro_id === $pro->id)
|
|
|
|
+ <div moe relative class="ml-2">
|
|
|
|
+ <a href="#" start show><i class="fa fa-edit"></i></a>
|
|
|
|
+ <form url="/api/careMonthEntry/updateContent" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{$entry->uid}}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Memo</label>
|
|
|
|
+ <textarea class="form-control form-control-sm" name="contentText">{!! $entry->content_text !!}</textarea>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-flex align-items-center flex-nowrap">
|
|
|
|
+ <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>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ @if($entry->pro_id === $pro->id)
|
|
|
|
+ <div class="d-flex align-items-baseline">
|
|
|
|
+ <i class="fa fa-phone rotateh {{$entry->did_pro_interact_with_client_about_rm ? 'text-success' : 'text-danger'}} mr-1"></i>
|
|
|
|
+ <span class="mr-2 text-sm">{{!$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted</span>
|
|
|
|
+ <div moe relative class="mr-2">
|
|
|
|
+ <a href="#" start show class="text-sm">{{$entry->did_pro_interact_with_client_about_rm ? 'Undo' : 'Change'}}</a>
|
|
|
|
+ <form url="/api/careMonthEntry/setDidProInteractWithClientAboutRmTo{{$entry->did_pro_interact_with_client_about_rm ? 'False' : 'True '}}">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$entry->uid}}">
|
|
|
|
+ <p class="text-nowrap">Mark as {{$entry->did_pro_interact_with_client_about_rm ? 'Not ' : ''}}Interacted?</p>
|
|
|
|
+ <div class="d-flex align-items-center flex-nowrap">
|
|
|
|
+ <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 moe relative class="ml-3">
|
|
|
|
+ <a href="#" start show class="text-sm text-danger">Remove</a>
|
|
|
|
+ <form url="/api/careMonthEntry/remove">
|
|
|
|
+ <input type="hidden" name="uid" value="{{$entry->uid}}">
|
|
|
|
+ <p>Remove entry?</p>
|
|
|
|
+ <div class="d-flex align-items-center flex-nowrap">
|
|
|
|
+ <button class="btn btn-sm btn-danger text-white mr-2" submit>Remove</button>
|
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ @if($pro->pro_type === 'ADMIN')
|
|
|
|
+ <div class="mt-1">
|
|
|
|
+ <span class="text-secondary">Pro: </span>
|
|
|
|
+ {{$entry->pro ? $entry->pro->displayName() : '-'}}
|
|
|
|
+ </div>
|
|
|
|
+ @endif
|
|
|
|
+ </div>
|
|
|
|
+ @endforeach
|
|
|
|
+ @if($performerRole === 'MCP' || $performerRole === 'NON-HCP')
|
|
|
|
+ <div moe large relative>
|
|
|
|
+ <a start show class="py-0 mb-3 text-sm">+ Add</a>
|
|
|
|
+ <form url="/api/careMonthEntry/createForRm" right>
|
|
|
|
+ <input type="hidden" name="careMonthUid" value="{{ $careMonth->uid }}">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <div class="row">
|
|
|
|
+ <div class="col-4 pr-0">
|
|
|
|
+ <select class="form-control form-control-sm w-100" name="proUid" provider-search data-pro-uid="{{ @$pro->uid }}"
|
|
|
|
+ required>
|
|
|
|
+ <option value="">-- Select Pro --</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="col-4 pr-0">
|
|
|
|
+ <?php
|
|
|
|
+ $sD = strtotime($careMonth->start_date);
|
|
|
|
+ $y = date('Y', $sD);
|
|
|
|
+ $m0 = date('m', $sD);
|
|
|
|
+ $d = date('t', $sD);
|
|
|
|
+ $yCurrent = date('Y');
|
|
|
|
+ $mCurrent = date('m');
|
|
|
|
+ ?>
|
|
|
|
+ <input autofocus type="date" min="{{ date($y . '-' . $m0 . '-01') }}" max="{{ date($y . '-' . $m0 . '-' . $d) }}"
|
|
|
|
+ value="{{$m->dateYMD}}"
|
|
|
|
+ class="form-control form-control-sm w-100" name="effectiveDate"
|
|
|
|
+ placeholder="Effective Date" required>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="col-4">
|
|
|
|
+ <input type="number" min="75" max="300" class="form-control form-control-sm w-100 cm-time-value" name="timeInSeconds"
|
|
|
|
+ value="75" placeholder="Time (secs.)" required>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <label class="mb-1 text-secondary text-sm">Memo</label>
|
|
|
|
+ <textarea class="form-control form-control-sm" name="contentText">Reviewed/managed patient measurements</textarea>
|
|
|
|
+ </div>
|
|
|
|
+ </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>
|
|
|
|
+ @endif
|
|
|
|
+ </td>
|
|
|
|
+ @endif
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ @endforeach
|
|
|
|
+ </tbody>
|
|
|
|
+</table>
|
|
|
|
+<script>
|
|
|
|
+ (function() {
|
|
|
|
+ function init() {
|
|
|
|
+
|
|
|
|
+ $('.btn-stamp')
|
|
|
|
+ .off('click')
|
|
|
|
+ .on('click', function () {
|
|
|
|
+ let form = $(this).closest('form');
|
|
|
|
+ if(!form[0].checkValidity()) {
|
|
|
|
+ form[0].reportValidity();
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ showMask();
|
|
|
|
+
|
|
|
|
+ let payload = {
|
|
|
|
+ uid: form.find('[name="uid"]').val(),
|
|
|
|
+ memo: form.find('[name="memo"]').val(),
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: form.attr('url'),
|
|
|
|
+ type:"POST",
|
|
|
|
+ data: JSON.stringify(payload),
|
|
|
|
+ contentType:"application/json; charset=utf-8",
|
|
|
|
+ dataType:"json",
|
|
|
|
+ success: function(_data) {
|
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
|
+ if(form.closest('.stag-popup').length) {
|
|
|
|
+ refreshDynamicStagPopup();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ fastReload();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }).then(() => {
|
|
|
|
+ hideMask();
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $('.btn-bulk-stamp')
|
|
|
|
+ .off('click')
|
|
|
|
+ .on('click', function () {
|
|
|
|
+ let form = $(this).closest('form');
|
|
|
|
+ if(!form[0].checkValidity()) {
|
|
|
|
+ form[0].reportValidity();
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ showMask();
|
|
|
|
+
|
|
|
|
+ let payload = {
|
|
|
|
+ clientUid: '{{$patient->uid}}',
|
|
|
|
+ toStamp: form.find('.measurements-uids').val().split('|').map(_x => {
|
|
|
|
+ return {
|
|
|
|
+ measurementUid: _x,
|
|
|
|
+ memo: null,
|
|
|
|
+ detailJson: null
|
|
|
|
+ }
|
|
|
|
+ }),
|
|
|
|
+ shouldAddEntry: form.find('.shouldAddEntry').prop('checked') ? 1 : 0,
|
|
|
|
+ entryDate: form.find('[name="entryDate"]').val(),
|
|
|
|
+ entryMemo: form.find('[name="entryMemo"]').val(),
|
|
|
|
+ entryNumberOfSeconds: form.find('[name="entryNumberOfSeconds"]').val() ? +(form.find('[name="entryNumberOfSeconds"]').val()) : 0
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(form.find('[name="didProInteractWithClientAboutRm"]:checked').length) {
|
|
|
|
+ payload.didProInteractWithClientAboutRm = (form.find('[name="didProInteractWithClientAboutRm"]:checked').val() === 'true');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: form.attr('url'),
|
|
|
|
+ type:"POST",
|
|
|
|
+ data: JSON.stringify(payload),
|
|
|
|
+ contentType:"application/json; charset=utf-8",
|
|
|
|
+ dataType:"json",
|
|
|
|
+ success: function(_data) {
|
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
|
+ if(form.closest('.stag-popup').length) {
|
|
|
|
+ refreshDynamicStagPopup();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ fastReload();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }).then(() => {
|
|
|
|
+ hideMask();
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ $('.shouldAddEntry')
|
|
|
|
+ .off('change')
|
|
|
|
+ .on('change', function () {
|
|
|
|
+ let form = $(this).closest('form');
|
|
|
|
+ if(this.checked) {
|
|
|
|
+ form.find('.if-adding-time-entry').removeClass('d-none');
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ form.find('.if-adding-time-entry').addClass('d-none');
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ })
|
|
|
|
+ .trigger('change');
|
|
|
|
+ }
|
|
|
|
+ addMCInitializer('cm-matrix-{{$patient->id}}', init, '#cm-matrix-{{$patient->id}}');
|
|
|
|
+ }).call(window);
|
|
|
|
+</script>
|