|
@@ -4,397 +4,6 @@
|
|
|
|
|
|
<h4 class="font-weight-bold mb-3 text-secondary font-size-16" id="rm-setup">RM Setup</h4>
|
|
<h4 class="font-weight-bold mb-3 text-secondary font-size-16" id="rm-setup">RM Setup</h4>
|
|
|
|
|
|
- <hr class="m-neg-4">
|
|
|
|
- @if($pro->pro_type === 'ADMIN')
|
|
|
|
- <div class="d-flex align-items-baseline mb-3">
|
|
|
|
- <span class="width-200px">Is Eligible for RM?</span>
|
|
|
|
- <div class="ml-3">
|
|
|
|
- <div class="d-inline-flex align-items-start">
|
|
|
|
- <b>{{ ucwords($patient->is_eligible_for_rm ? $patient->is_eligible_for_rm : '-') }}</b>
|
|
|
|
- <div moe class="ml-2">
|
|
|
|
- <a start show><i class="fa fa-edit"></i></a>
|
|
|
|
- <form url="/api/client/updateRmEligibility" class="mcp-theme-1">
|
|
|
|
- <input type="hidden" name="uid" value="{{$patient->uid}}">
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1 text-secondary">Is Eligible?</label>
|
|
|
|
- <select name="isEligibleForRm"
|
|
|
|
- class="form-control form-control-sm"
|
|
|
|
- onchange="toggleDisabledAsNeeded(this, 'NO', 'not-eligible-for-rm')">
|
|
|
|
- <option value="">-- Select Status --</option>
|
|
|
|
- <option value="YES" {{ $patient->is_eligible_for_rm === 'YES' ? 'selected' : '' }}>YES</option>
|
|
|
|
- <option value="NO" {{ $patient->is_eligible_for_rm === 'NO' ? 'selected' : '' }}>NO</option>
|
|
|
|
- <option value="UNKNOWN" {{ $patient->is_eligible_for_rm === 'UNKNOWN' ? 'selected' : '' }}>UNKNOWN</option>
|
|
|
|
- </select>
|
|
|
|
- </div>
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1 text-secondary">Why not eligible category</label>
|
|
|
|
- <input type="text" class="not-eligible-for-rm form-control form-control-sm"
|
|
|
|
- {{$patient->is_eligible_for_rm === 'NO' ? '' : 'disabled' }}
|
|
|
|
- name="whyNotEligibleForRmCategory" value="{{$patient->why_not_eligible_for_rm_category}}">
|
|
|
|
- </div>
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1 text-secondary">Why not eligible memo</label>
|
|
|
|
- <input type="text" class="not-eligible-for-rm form-control form-control-sm"
|
|
|
|
- {{$patient->is_eligible_for_rm === 'NO' ? '' : 'disabled' }}
|
|
|
|
- name="whyNotEligibleForRmMemo" value="{{$patient->why_not_eligible_for_rm_memo}}">
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
|
- <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- @if($patient->is_eligible_for_rm === 'NO')
|
|
|
|
- <div class="mt-1">
|
|
|
|
- <span>{{$patient->why_not_eligible_for_rm_category ?: '-'}}</span>
|
|
|
|
- /
|
|
|
|
- <span class="text-secondary">{{$patient->why_not_eligible_for_rm_memo ?: '-'}}</span>
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
-
|
|
|
|
- <hr class="m-neg-4">
|
|
|
|
- <div class="d-flex align-items-baseline mb-3">
|
|
|
|
- <span class="width-200px">RM Enrollment Status:</span>
|
|
|
|
- <div class="ml-3">
|
|
|
|
- <div class="d-inline-flex align-items-start">
|
|
|
|
- <b>{{ ucwords($patient->is_enrolled_in_rm ? $patient->is_enrolled_in_rm : '-') }}</b>
|
|
|
|
- <div moe class="ml-2">
|
|
|
|
- <a start show>Toggle</a>
|
|
|
|
- <form url="/api/client/{{$patient->is_enrolled_in_rm === 'YES' ? 'setIsEnrolledInRmToFalse' : 'setIsEnrolledInRmToTrue'}}" class="mcp-theme-1">
|
|
|
|
- <input type="hidden" name="uid" value="{{$patient->uid}}">
|
|
|
|
- <p>Toggle RM enrollment?</p>
|
|
|
|
- <div>
|
|
|
|
- <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
|
- <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <hr class="m-neg-4">
|
|
|
|
- <div class="d-flex align-items-baseline mb-3">
|
|
|
|
- <span class="width-200px">RM Reasons:</span>
|
|
|
|
- <div class="ml-3">
|
|
|
|
- @if(!$patient->rmReasons || !count($patient->rmReasons))
|
|
|
|
- <span class="text-secondary">None</span>
|
|
|
|
- @else
|
|
|
|
- <div>
|
|
|
|
- @foreach($patient->rmReasons as $reason)
|
|
|
|
- <div class="border-bottom pb-1 mb-1 d-flex align-items-start">
|
|
|
|
- <b class="width-90px">{{$reason->code}}</b>
|
|
|
|
- <span class="width-200px mr-3">{{$reason->description}}</span>
|
|
|
|
- <div moe>
|
|
|
|
- <a start show>Edit</a>
|
|
|
|
- <form url="/api/clientCmRmReason/updateBasic" class="mcp-theme-1">
|
|
|
|
- <input type="hidden" name="uid" value="{{$reason->uid}}">
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1 text-secondary">Code *</label>
|
|
|
|
- <input type="text" class="form-control form-control-sm"
|
|
|
|
- name="code" value="{{$reason->code}}" required>
|
|
|
|
- </div>
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1 text-secondary">Description</label>
|
|
|
|
- <input type="text" class="form-control form-control-sm"
|
|
|
|
- name="description" value="{{$reason->description}}">
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
|
- <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- @endforeach
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
- <div>
|
|
|
|
- <div moe>
|
|
|
|
- <a start show>+ Add</a>
|
|
|
|
- <form url="/api/clientCmRmReason/create" class="mcp-theme-1">
|
|
|
|
- <input type="hidden" name="clientUid" value="{{$patient->uid}}">
|
|
|
|
- <input type="hidden" name="cmOrRm" value="RM">
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1 text-secondary">Code *</label>
|
|
|
|
- <input type="text" class="form-control form-control-sm"
|
|
|
|
- name="code" value="" required>
|
|
|
|
- </div>
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-sm mb-1 text-secondary">Description</label>
|
|
|
|
- <input type="text" class="form-control form-control-sm"
|
|
|
|
- name="description" value="">
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
|
- <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- @if($pro->pro_type === 'ADMIN')
|
|
|
|
- <hr class="m-neg-4">
|
|
|
|
- <div class="d-flex align-items-baseline mb-3">
|
|
|
|
- <span class="width-200px">RME Pro:</span>
|
|
|
|
- <div class="ml-3">
|
|
|
|
- <div class="d-inline-flex align-items-start">
|
|
|
|
- <b>{{ $patient->rme ? $patient->rme->displayName() : '-' }}</b>
|
|
|
|
- <div moe class="ml-2">
|
|
|
|
- <a start show><i class="fa fa-edit"></i></a>
|
|
|
|
- <form url="/api/client/putRmePro" class="mcp-theme-1">
|
|
|
|
- <input type="hidden" name="uid" value="{{$patient->uid}}">
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-secondary text-sm">RME Pro</label>
|
|
|
|
- <select provider-search data-pro-uid="{{ @$patient->rme->uid }}" name="rmeProUid" class="form-control form-control-sm">
|
|
|
|
- <option value=""> --select--</option>
|
|
|
|
- </select>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
|
- <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
- @if($patient->rme)
|
|
|
|
- <div moe class="ml-2">
|
|
|
|
- <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
|
|
|
|
- <form url="/api/client/removeRmePro" class="mcp-theme-1">
|
|
|
|
- <input type="hidden" name="uid" value="{{$patient->uid}}">
|
|
|
|
- <p>Remove RME Pro?</p>
|
|
|
|
- <div>
|
|
|
|
- <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
|
- <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <hr class="m-neg-4">
|
|
|
|
- <div class="d-flex align-items-baseline mb-3">
|
|
|
|
- <span class="width-200px">RMM Pro:</span>
|
|
|
|
- <div class="ml-3">
|
|
|
|
- <div class="d-inline-flex align-items-start">
|
|
|
|
- <b>{{ $patient->rmm ? $patient->rmm->displayName() : '-' }}</b>
|
|
|
|
- <div moe class="ml-2">
|
|
|
|
- <a start show><i class="fa fa-edit"></i></a>
|
|
|
|
- <form url="/api/client/putRmmPro" class="mcp-theme-1">
|
|
|
|
- <input type="hidden" name="uid" value="{{$patient->uid}}">
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <label class="text-secondary text-sm">RMM Pro</label>
|
|
|
|
- <select provider-search data-pro-uid="{{ @$patient->rmm->uid }}" name="rmmProUid" class="form-control form-control-sm">
|
|
|
|
- <option value=""> --select--</option>
|
|
|
|
- </select>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
|
- <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
- @if($patient->rmm)
|
|
|
|
- <div moe class="ml-2">
|
|
|
|
- <a start show><i class="fa fa-trash-alt text-danger on-hover-opaque"></i></a>
|
|
|
|
- <form url="/api/client/removeRmmPro" class="mcp-theme-1">
|
|
|
|
- <input type="hidden" name="uid" value="{{$patient->uid}}">
|
|
|
|
- <p>Remove RMM Pro?</p>
|
|
|
|
- <div>
|
|
|
|
- <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
|
- <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
-
|
|
|
|
- <?php
|
|
|
|
- $bpDevice = null;
|
|
|
|
- $weightScale = null;
|
|
|
|
- if(count($patient->devices)) {
|
|
|
|
- foreach($patient->devices as $device) {
|
|
|
|
- if(!$bpDevice && $device->device->category === 'BP') {
|
|
|
|
- $bpDevice = $device;
|
|
|
|
- }
|
|
|
|
- elseif(!$weightScale && $device->device->category === 'WEIGHT') {
|
|
|
|
- $weightScale = $device;
|
|
|
|
- }
|
|
|
|
- if($bpDevice && $weightScale) break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- $bpMeasurements = [];
|
|
|
|
- if($bpDevice) {
|
|
|
|
- $bpMeasurements["first"] = \App\Models\Measurement
|
|
|
|
- ::where('imei', $bpDevice->device->imei)
|
|
|
|
- ->where('client_id', $patient->id)
|
|
|
|
- ->where('is_cellular_zero', false)
|
|
|
|
- ->orderBy('ts')
|
|
|
|
- ->first();
|
|
|
|
- $bpMeasurements["last"] = \App\Models\Measurement
|
|
|
|
- ::where('imei', $bpDevice->device->imei)
|
|
|
|
- ->where('client_id', $patient->id)
|
|
|
|
- ->where('is_cellular_zero', false)
|
|
|
|
- ->orderBy('ts', 'DESC')
|
|
|
|
- ->first();
|
|
|
|
- }
|
|
|
|
- $weightMeasurements = [];
|
|
|
|
- if($weightScale) {
|
|
|
|
- $weightMeasurements["first"] = \App\Models\Measurement
|
|
|
|
- ::where('imei', $weightScale->device->imei)
|
|
|
|
- ->where('client_id', $patient->id)
|
|
|
|
- ->where('is_cellular_zero', false)
|
|
|
|
- ->orderBy('ts')
|
|
|
|
- ->first();
|
|
|
|
- $weightMeasurements["last"] = \App\Models\Measurement
|
|
|
|
- ::where('imei', $weightScale->device->imei)
|
|
|
|
- ->where('client_id', $patient->id)
|
|
|
|
- ->where('is_cellular_zero', false)
|
|
|
|
- ->orderBy('ts', 'DESC')
|
|
|
|
- ->first();
|
|
|
|
- }
|
|
|
|
- $careMonth = $patient->currentCareMonth();
|
|
|
|
- ?>
|
|
|
|
-
|
|
|
|
- <hr class="m-neg-4">
|
|
|
|
- @if($bpDevice)
|
|
|
|
- <div class="mb-3">
|
|
|
|
- <div class="d-flex align-items-baseline mb-2">
|
|
|
|
- <span class="width-200px font-weight-bold">Cellular BP Device</span>
|
|
|
|
- <b class="ml-3">Yes</b>
|
|
|
|
- <span class="ml-3 text-secondary">IMEI: {{$bpDevice->device->imei}}</span>
|
|
|
|
- </div>
|
|
|
|
- <div class="border-left">
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">Arrived:</span>
|
|
|
|
- <span class="ml-3">Yes</span>*
|
|
|
|
- </div>
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">First Measurement:</span>
|
|
|
|
- @if($bpMeasurements["first"])
|
|
|
|
- <span class="ml-3">{{ $bpMeasurements["first"]->sbp_mm_hg . '/' . $bpMeasurements["first"]->dbp_mm_hg . ' mmHg' }}</span>
|
|
|
|
- <span class="ml-3 text-secondary">{{date("Y-m-d", $bpMeasurements["first"]->ts/1000)}}</span>
|
|
|
|
- <span class="ml-3">{{date_diff(date_create(date("Y-m-d", $bpMeasurements["first"]->ts/1000)), date_create('now'))->days}} days ago</span>
|
|
|
|
- @else
|
|
|
|
- -
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">Last Measurement:</span>
|
|
|
|
- @if($bpMeasurements["last"])
|
|
|
|
- <span class="ml-3">{{ $bpMeasurements["last"]->sbp_mm_hg . '/' . $bpMeasurements["last"]->dbp_mm_hg . ' mmHg' }}</span>
|
|
|
|
- <span class="ml-3 text-secondary">{{date("Y-m-d", $bpMeasurements["last"]->ts/1000)}}</span>
|
|
|
|
- <span class="ml-3">{{date_diff(date_create(date("Y-m-d", $bpMeasurements["last"]->ts/1000)), date_create('now'))->days}} days ago</span>
|
|
|
|
- @else
|
|
|
|
- -
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">How often to measure:</span>
|
|
|
|
- <span class="ml-3"> -- </span>
|
|
|
|
- </div>
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">SMS reminders:</span>
|
|
|
|
- <span class="ml-3"> -- </span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- @else
|
|
|
|
- <div class="d-flex align-items-baseline mb-3">
|
|
|
|
- <span class="width-200px">Cellular BP Device</span>
|
|
|
|
- <b class="ml-3">No</b>
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
-
|
|
|
|
- <hr class="m-neg-4">
|
|
|
|
- @if($weightScale)
|
|
|
|
- <div class="mb-3">
|
|
|
|
- <div class="d-flex align-items-baseline mb-2">
|
|
|
|
- <span class="width-200px font-weight-bold">Cellular Weight Scale</span>
|
|
|
|
- <b class="ml-3">Yes</b>
|
|
|
|
- <span class="ml-3 text-secondary">IMEI: {{$weightScale->device->imei}}</span>
|
|
|
|
- </div>
|
|
|
|
- <div class="border-left">
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">Arrived:</span>
|
|
|
|
- <span class="ml-3">Yes</span>*
|
|
|
|
- </div>
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">First Measurement:</span>
|
|
|
|
- @if($weightMeasurements["first"])
|
|
|
|
- <span class="ml-3">{{ round($weightMeasurements["first"]->value, 2) . ' lbs' }}</span>
|
|
|
|
- <span class="ml-3 text-secondary">{{date("Y-m-d", $weightMeasurements["first"]->ts/1000)}}</span>
|
|
|
|
- <span class="ml-3">{{date_diff(date_create(date("Y-m-d", $weightMeasurements["first"]->ts/1000)), date_create('now'))->days}} days ago</span>
|
|
|
|
- @else
|
|
|
|
- -
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">Last Measurement:</span>
|
|
|
|
- @if($weightMeasurements["last"])
|
|
|
|
- <span class="ml-3">{{ round($weightMeasurements["last"]->value, 2) . ' lbs' }}</span>
|
|
|
|
- <span class="ml-3 text-secondary">{{date("Y-m-d", $weightMeasurements["last"]->ts/1000)}}</span>
|
|
|
|
- <span class="ml-3">{{date_diff(date_create(date("Y-m-d", $weightMeasurements["last"]->ts/1000)), date_create('now'))->days}} days ago</span>
|
|
|
|
- @else
|
|
|
|
- -
|
|
|
|
- @endif
|
|
|
|
- </div>
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">How often to measure:</span>
|
|
|
|
- <span class="ml-3"> -- </span>
|
|
|
|
- </div>
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px pl-3">SMS reminders:</span>
|
|
|
|
- <span class="ml-3"> -- </span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- @else
|
|
|
|
- <div class="d-flex align-items-baseline mb-3">
|
|
|
|
- <span class="width-200px">Cellular Weight Scale</span>
|
|
|
|
- <b class="ml-3">No</b>
|
|
|
|
- </div>
|
|
|
|
- @endif
|
|
|
|
-
|
|
|
|
- <?php $datesWithMeasurements = []; ?>
|
|
|
|
-
|
|
|
|
- @if($careMonth && ($bpDevice || $weightScale))
|
|
|
|
- <hr class="m-neg-4">
|
|
|
|
- <div class="d-flex align-items-baseline mb-1">
|
|
|
|
- <span class="width-200px">Measurement days this month:</span>
|
|
|
|
- <div class="ml-3">
|
|
|
|
- <b>{{$careMonth->number_of_days_with_remote_measurements}} days</b>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <hr class="m-neg-4">
|
|
|
|
- <?php
|
|
|
|
- $measurementsInCareMonth = $patient->measurementsInCareMonth($careMonth);
|
|
|
|
- $datesWithMeasurements = [];
|
|
|
|
- foreach($measurementsInCareMonth as $measurement) {
|
|
|
|
- if(!empty($measurement->label) && !in_array($measurement->label, ["SBP", "DBP"])/* && !$measurement->is_cellular_zero*/) {
|
|
|
|
- if ($measurement->ts) {
|
|
|
|
- $timestampInSec = floor($measurement->ts / 1000);
|
|
|
|
- $measurement->start = postgres_date_time_short_with_tz_from_timestamp($timestampInSec, 'EASTERN');
|
|
|
|
- $start_date_only = substr($measurement->start, 0, 10);
|
|
|
|
- if(!in_array($start_date_only, $datesWithMeasurements)) {
|
|
|
|
- $datesWithMeasurements[] = $start_date_only;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- ?>
|
|
|
|
-
|
|
|
|
- @endif
|
|
|
|
|
|
+ @include('app.patient.partials.rm-setup')
|
|
|
|
|
|
@endsection
|
|
@endsection
|