|
@@ -1,13 +1,23 @@
|
|
|
<?php
|
|
|
- $days = $patient->cmMeasurementsMatrix($careMonth);
|
|
|
+$days = $patient->cmMeasurementsMatrix($careMonth);
|
|
|
|
|
|
- $performerRole = false;
|
|
|
- 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';
|
|
|
+$performerRole = false;
|
|
|
+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';
|
|
|
+}
|
|
|
+
|
|
|
+$unstamped = [];
|
|
|
+foreach ($days as $k => $day) {
|
|
|
+ $unstamped[$k] = [];
|
|
|
+ foreach ($days[$k] as $mIndex => $m) {
|
|
|
+ if(($performerRole === 'MCP' && !$m->has_been_stamped_by_mcp) || ($performerRole === 'NON-MCP' && !$m->has_been_stamped_by_non_hcp)) {
|
|
|
+ $unstamped[$k][] = $m->measurement_uid;
|
|
|
+ }
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
?>
|
|
|
<p class="font-weight-bold">Care Month Matrix</p>
|
|
|
<table class="table table-condensed table-sm table-bordered mt-2 mb-3">
|
|
@@ -27,7 +37,6 @@
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
@foreach($days as $k => $day)
|
|
|
- <?php $unstamped = []; ?>
|
|
|
@foreach($days[$k] as $mIndex => $m)
|
|
|
<tr>
|
|
|
@if($mIndex === 0)
|
|
@@ -59,7 +68,6 @@
|
|
|
Stamped
|
|
|
</span>
|
|
|
@else
|
|
|
- <?php $unstamped[] = $m->measurement_uid; ?>
|
|
|
<div moe relative>
|
|
|
<a href="#" start show>Stamp</a>
|
|
|
<form url="/api/measurement/stampAsMcp" right class="width-300px">
|
|
@@ -107,64 +115,67 @@
|
|
|
</div>
|
|
|
@endif
|
|
|
</div>
|
|
|
- @elseif($performerRole === 'MCP')
|
|
|
+ @elseif($performerRole === 'NON-MCP')
|
|
|
<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
|
|
|
- <?php $unstamped[] = $m->measurement_uid; ?>
|
|
|
@endif
|
|
|
</div>
|
|
|
@endif
|
|
|
</td>
|
|
|
- @if($mIndex === 0)
|
|
|
- <td rowspan="{{count($days[$k])}}">
|
|
|
- @if(count($unstamped))
|
|
|
- <div moe relative class="btn-stamp-all">
|
|
|
- <a href="#" start show class="">
|
|
|
- Stamp All & Create Entry
|
|
|
- </a>
|
|
|
- <form url="/api/measurement/bulkStampAsMcp">
|
|
|
- <input type="hidden" name="measurementUids" value="{{implode('|', $unstamped)}}">
|
|
|
- <p class="mb-1">Stamp all measurements?</p>
|
|
|
- <div class="mb-2 border border-info p-2 mt-2 bg-light width-300px">
|
|
|
- <span>I have had interactive communication with <b>{{$patient->displayName()}}</b> during this care month.</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>
|
|
|
+ @if($mIndex === 0)
|
|
|
+ <td rowspan="{{count($days[$k])}}">
|
|
|
+ @if(count($unstamped[$k]))
|
|
|
+ <div moe relative class="btn-stamp-all">
|
|
|
+ <a href="#" start show class="">
|
|
|
+ Stamp All & Create Entry
|
|
|
+ </a>
|
|
|
+ <form url="/api/measurement/bulkStampAsMcp">
|
|
|
+ <input type="hidden" name="measurementUids" value="{{implode('|', $unstamped[$k])}}">
|
|
|
+ <p class="mb-1">Stamp all measurements?</p>
|
|
|
+ <div class="mb-2 border border-info p-2 mt-2 bg-light width-300px">
|
|
|
+ <span>I have had interactive communication with <b>{{$patient->displayName()}}</b> during this care month.</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>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- @endif
|
|
|
- </td>
|
|
|
- @endif
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- @foreach($m->entries as $entry)
|
|
|
- <div class="my-1 d-flex align-items-start flex-nowrap">
|
|
|
- <b class="mr-2">{{round($entry->time_in_seconds / 60)}}m</b>
|
|
|
- <span class="text-secondary mr-2 text-nowrap text-sm">({{date('h:i a', strtotime($entry->created_at))}})</span>
|
|
|
- <span class="text-secondary inline-html-container flex-grow-1">{!! $entry->content_text !!}</span>
|
|
|
- </div>
|
|
|
- @endforeach
|
|
|
+ </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="mb-2">
|
|
|
+ <label class="mb-1 text-secondary text-sm">Minutes</label>
|
|
|
+ <input type="number" min="1" max="15" class="form-control form-control-sm w-100" name="entryMinutes"
|
|
|
+ value="2" placeholder="Time (mins.)" required>
|
|
|
+ </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
|
|
|
+ </td>
|
|
|
+ @endif
|
|
|
+ @if($mIndex === 0)
|
|
|
+ <td rowspan="{{count($days[$k])}}">
|
|
|
+ @foreach($m->entries as $entry)
|
|
|
+ <div class="my-1 d-flex align-items-start flex-nowrap">
|
|
|
+ <b class="mr-2">{{round($entry->time_in_seconds / 60)}}m</b>
|
|
|
+ <span class="text-secondary mr-2 text-nowrap text-sm">({{date('h:i a', strtotime($entry->created_at))}})</span>
|
|
|
+ <span class="text-secondary inline-html-container flex-grow-1">{!! $entry->content_text !!}</span>
|
|
|
+ </div>
|
|
|
+ @endforeach
|
|
|
<div moe large>
|
|
|
<a start show class="py-0 mb-3 text-sm">+ Add</a>
|
|
|
<form url="/api/careMonthEntry/createForRm">
|
|
@@ -192,7 +203,7 @@
|
|
|
placeholder="Effective Date" required>
|
|
|
</div>
|
|
|
<div class="col-4">
|
|
|
- <input type="number" min="0" max="5400" class="form-control form-control-sm w-100 cm-time-value" name="timeInMinutes"
|
|
|
+ <input type="number" min="0" max="15" class="form-control form-control-sm w-100 cm-time-value" name="timeInMinutes"
|
|
|
value="2" placeholder="Time (mins.)" required>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -210,7 +221,8 @@
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
- </td>
|
|
|
+ </td>
|
|
|
+ @endif
|
|
|
</tr>
|
|
|
@endforeach
|
|
|
@endforeach
|