|
@@ -0,0 +1,187 @@
|
|
|
+@extends ('layouts/template')
|
|
|
+
|
|
|
+@section('content')
|
|
|
+<style>
|
|
|
+ #rm-action-report-filters label {
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ #rm-action-report-filters .mw-100px {
|
|
|
+ min-width: 100px;
|
|
|
+ }
|
|
|
+ .filter-container{
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ }
|
|
|
+ .filter-container >div {
|
|
|
+ width: 165px;
|
|
|
+ }
|
|
|
+ .filter-container >div:not(:last-child) {
|
|
|
+ margin-right: 15px;
|
|
|
+ }
|
|
|
+ .sm-section {
|
|
|
+ width: 200px !important;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<div id="rm-action-report" class="p-3 mcp-theme-1">
|
|
|
+ <div class="card">
|
|
|
+
|
|
|
+ <div class="card-header px-2 py-1 d-flex align-items-center">
|
|
|
+ <strong class="mr-4">
|
|
|
+ <i class="fas fa-user"></i>
|
|
|
+ RM Action Report
|
|
|
+ </strong>
|
|
|
+ </div>
|
|
|
+ <div class="card-body p-0 border-0 table-responsive">
|
|
|
+ <div class="m-2">
|
|
|
+ <form id="rm-action-report-filters" method="GET" action="{{ route('practice-management.rmActionReport') }}" class="filter-container" v-cloak>
|
|
|
+ <div class="sm-section">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Care Month Start Date:</label>
|
|
|
+ <input name="care_month_start_date" type="date" class="form-control input-sm" v-model="filters.care_month_start_date">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="sm-section">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Number Of Measurement Days:</label>
|
|
|
+ <select name="num_of_measurements" class="form-control input-sm" v-model="filters.num_of_measurements">
|
|
|
+ <option value="">All</option>
|
|
|
+ <option value="16_or_more">16+</option>
|
|
|
+ <option value="12_or_more">12+</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="sm-section">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Has had visit in the last 90 days:</label>
|
|
|
+ <select name="has_recent_visit" class="form-control input-sm" v-model="filters.has_recent_visit">
|
|
|
+ <option value="">All</option>
|
|
|
+ <option value="YES">Yes</option>
|
|
|
+ <option value="NO">No</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="sm-section">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Has been spoken to this month:</label>
|
|
|
+ <select name="has_been_spoken_to" class="form-control input-sm" v-model="filters.has_been_spoken_to">
|
|
|
+ <option value="">All</option>
|
|
|
+ <option value="YES">Yes</option>
|
|
|
+ <option value="NO">No</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label> </label>
|
|
|
+ <div class=" d-flex">
|
|
|
+ <button type="button" v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
|
|
|
+ <a href="#" v-on:click.prevent="fastLoad('{{route('mcp.patients')}}')" class="btn btn-link btn-sm text-danger">Clear Filters</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <table class="table table-sm table-striped border-0 p-0 m-0 text-nowrap">
|
|
|
+ <thead class="bg-light">
|
|
|
+ <tr>
|
|
|
+ <th>Patient</th>
|
|
|
+ <th>Care Month</th>
|
|
|
+ <th>MCP</th>
|
|
|
+ <th>Number of Measurement Days</th>
|
|
|
+ <th>Last Visit Date</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach ($rows as $row)
|
|
|
+ <tr class="{{false ? 'bg-light' : ''}}">
|
|
|
+ <td class="text-nowrap border-left-0">
|
|
|
+ <a href="/patients/view/{{$row->client->uid}}">
|
|
|
+ {{$row->client->name_first}} {{$row->client->name_last}}
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ <td class="text-nowrap border-left-0">
|
|
|
+ <a href="/patients/view/{{$row->client->uid}}/care-months/view/{{$row->uid}}">
|
|
|
+ {{friendly_date($row->start_date)}}
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ @if($row->client->mcp)
|
|
|
+ {{$row->client->mcp->name_first}} {{$row->client->mcp->name_last}}
|
|
|
+ @else
|
|
|
+ --
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ {{$row->number_of_days_with_remote_measurements}}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ @if($row->client->mostRecentCompletedMcpNote)
|
|
|
+ <a href="/patients/view/{{$row->client->uid}}/notes/view/{{$row->client->mostRecentCompletedMcpNote->uid}}">
|
|
|
+ {{friendly_date($row->client->most_recent_completed_mcp_note_date)}}
|
|
|
+ </a>
|
|
|
+ @else
|
|
|
+ --
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="mt-3">
|
|
|
+ {{$rows->appends(request()->input())->links()}}
|
|
|
+ </div>
|
|
|
+
|
|
|
+</div>
|
|
|
+<?php
|
|
|
+$loadedFilters = $filters;
|
|
|
+$allFilterKeys = [
|
|
|
+ 'care_month_start_date',
|
|
|
+ 'num_of_measurements',
|
|
|
+ 'has_recent_visit',
|
|
|
+ 'has_been_spoken_to',
|
|
|
+];
|
|
|
+for ($i=0; $i < count($allFilterKeys); $i++) {
|
|
|
+ if (!isset($loadedFilters[$allFilterKeys[$i]]) || !$loadedFilters[$allFilterKeys[$i]]) {
|
|
|
+ $loadedFilters[$allFilterKeys[$i]] = '';
|
|
|
+ }
|
|
|
+}
|
|
|
+?>
|
|
|
+
|
|
|
+<script>
|
|
|
+ (function() {
|
|
|
+ function init() {
|
|
|
+ new Vue({
|
|
|
+ el: '#rm-action-report-filters',
|
|
|
+ delimiters: ['@{{', '}}'],
|
|
|
+ data: {
|
|
|
+ filters: <?= json_encode($loadedFilters) ?>
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init: function() {
|
|
|
+
|
|
|
+ },
|
|
|
+ doSubmit: function() {
|
|
|
+ fastLoad('{{ route('practice-management.rmActionReport') }}?' + $('#rm-action-report-filters').serialize());
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted: function() {
|
|
|
+ console.log(this.filters);
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ addMCInitializer('rm-action-report-filters', init, '#rm-action-report-filters');
|
|
|
+ })();
|
|
|
+</script>
|
|
|
+@endsection
|