Jelajahi Sumber

RTM UI (wip)

Vijayakrishnan 2 tahun lalu
induk
melakukan
15d2ebc328

+ 4 - 0
app/Http/Controllers/PatientController.php

@@ -680,6 +680,10 @@ class PatientController extends Controller
         return view('app.patient.accounts', compact('patient'));
     }
 
+    public function rtm(Request $request, Client $patient) {
+        return view('app.patient.rtm', compact('patient'));
+    }
+
     public function careMonthMatrix(Request $request, CareMonth $careMonth) {
         return view('app.patient.care-month.matrix', [
             'patient' => $careMonth->patient,

+ 17 - 0
app/Models/Client.php

@@ -63,6 +63,23 @@ class Client extends Model
         return $result;
     }
 
+    public function rtmMskHcp()
+    {
+        return $this->hasOne(Pro::class, 'id', 'rtm_msk_hcp_pro_id');
+    }
+    public function rtmLungHcp()
+    {
+        return $this->hasOne(Pro::class, 'id', 'rtm_lung_hcp_pro_id');
+    }
+    public function rtmMskCoach()
+    {
+        return $this->hasOne(Pro::class, 'id', 'rtm_msk_coach_pro_id');
+    }
+    public function rtmLungCoach()
+    {
+        return $this->hasOne(Pro::class, 'id', 'rtm_lung_coach_pro_id');
+    }
+
     public function mcp()
     {
         return $this->hasOne(Pro::class, 'id', 'mcp_pro_id');

+ 460 - 0
resources/views/app/patient/partials/rtm-lung.blade.php

@@ -0,0 +1,460 @@
+<div class="mt-2">
+
+    <!-- coverage -->
+    <div class="d-flex align-items-baseline">
+        <label class="m-0 text-secondary font-weight-bold">Covered?</label>
+        <div class="ml-2">
+            <div class="d-flex align-items-baseline">
+                @if($patient->does_insurance_cover_rtm_lung)
+                    <span class="mr-2">{{$patient->does_insurance_cover_rtm_lung}}</span>
+                @endif
+                @if($patient->memo_for_does_insurance_cover_rtm_lung)
+                    <span class="mr-2">({{$patient->memo_for_does_insurance_cover_rtm_lung}})</span>
+                @endif
+                <div moe relative>
+                    <a href="#" start show>Edit</a>
+                    <form url="/api/clientRtm/updateDoesInsuranceCoverRtmLung">
+                        <input type="hidden" name="uid" value="{{$patient->uid}}">
+                        <div class="mb-2">
+                            <label class="text-secondary text-sm mb-1">RTM Lung Covered?</label>
+                            <select name="doesInsuranceCoverRtmLung" class="form-control form-control-sm" requied>
+                                <option value="">-- select --</option>
+                                <option value="YES" {{$patient->does_insurance_cover_rtm_lung === 'YES' ? 'selected' : ''}}>Yes</option>
+                                <option value="NO" {{$patient->does_insurance_cover_rtm_lung === 'NO' ? 'selected' : ''}}>No</option>
+                                <option value="UNKNOWN" {{$patient->does_insurance_cover_rtm_lung === 'UNKNOWN' ? 'selected' : ''}}>Unknown</option>
+                            </select>
+                        </div>
+                        <div class="mb-2">
+                            <label class="text-secondary text-sm mb-1">Memo</label>
+                            <textarea type="text" class="form-control form-control-sm" name="memoForDoesInsuranceCoverRtmLung">{{$patient->memo_for_does_insurance_cover_rtm_lung}}</textarea>
+                        </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>
+                <span class="mx-1 text-secondary">|</span>
+                <div moe relative>
+                    <a href="#" start show>Edit Memo</a>
+                    <form url="/api/clientRtm/updateMemoForDoesInsuranceCoverRtmLung">
+                        <input type="hidden" name="uid" value="{{$patient->uid}}">
+                        <div class="mb-2">
+                            <label class="text-secondary text-sm mb-1">Memo</label>
+                            <textarea type="text" class="form-control form-control-sm" name="memoForDoesInsuranceCoverRtmLung">{{$patient->memo_for_does_insurance_cover_rtm_lung}}</textarea>
+                        </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>
+            </div>
+        </div>
+    </div>
+
+    @if($patient->does_insurance_cover_rtm_lung === 'YES')
+
+        <!-- medically needed -->
+        <div class="d-flex align-items-baseline mt-2">
+            <label class="m-0 text-secondary font-weight-bold">Medically needed?</label>
+            <div class="ml-2">
+                <div class="d-flex align-items-baseline">
+                    @if($patient->is_rtm_lung_medically_needed)
+                        <span class="mr-2">{{$patient->is_rtm_lung_medically_needed}}</span>
+                    @endif
+                    <div moe relative>
+                        <a href="#" start show>Edit</a>
+                        <form url="/api/clientRtm/updateIsRtmLungMedicallyNeeded">
+                            <input type="hidden" name="uid" value="{{$patient->uid}}">
+                            <div class="mb-2">
+                                <label class="text-secondary text-sm mb-1 text-nowrap">RTM Lung Medically Needed?</label>
+                                <select name="isRtmLungMedicallyNeeded" class="form-control form-control-sm" requied>
+                                    <option value="">-- select --</option>
+                                    <option value="YES" {{$patient->is_rtm_lung_medically_needed === 'YES' ? 'selected' : ''}}>Yes</option>
+                                    <option value="NO" {{$patient->is_rtm_lung_medically_needed === 'NO' ? 'selected' : ''}}>No</option>
+                                    <option value="UNKNOWN" {{$patient->is_rtm_lung_medically_needed === 'UNKNOWN' ? 'selected' : ''}}>Unknown</option>
+                                </select>
+                            </div>
+                            <div class="mb-2">
+                                <label class="text-sm text-secondary mb-1">Memo:</label>
+                                <textarea type="text" class="form-control form-control-sm" name="rtmLungMedicallyNeededForMemo">{{$patient->rtm_lung_medically_needed_for_memo}}</textarea>
+                            </div>
+                            <div class="mb-2">
+                                <table class="table table-sm table-bordered m-0">
+                                    <thead class="bg-light">
+                                    <tr>
+                                        <th class="text-sm text-secondary font-weight-normal border-bottom-0">ICD</th>
+                                        <th class="text-sm text-secondary font-weight-normal border-bottom-0">Description</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" data-target="input[name=rtmLungMedicallyNeededForIcd1Description]" name="rtmLungMedicallyNeededForIcd1" value="{{$patient->rtm_lung_medically_needed_for_icd1}}" placeholder="ICD 1" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input id="" type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmLungMedicallyNeededForIcd1Description" value="{{$patient->rtm_lung_medically_needed_for_icd1description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmLungMedicallyNeededForIcd2" data-target="input[name=rtmLungMedicallyNeededForIcd2Description]" value="{{$patient->rtm_lung_medically_needed_for_icd2}}" placeholder="ICD 2" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmLungMedicallyNeededForIcd2Description" value="{{$patient->rtm_lung_medically_needed_for_icd2description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmLungMedicallyNeededForIcd3" data-target="input[name=rtmLungMedicallyNeededForIcd3Description]" value="{{$patient->rtm_lung_medically_needed_for_icd3}}" placeholder="ICD 3" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmLungMedicallyNeededForIcd3Description" value="{{$patient->rtm_lung_medically_needed_for_icd3description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmLungMedicallyNeededForIcd4" data-target="input[name=rtmLungMedicallyNeededForIcd4Description]" value="{{$patient->rtm_lung_medically_needed_for_icd4}}" placeholder="ICD 4" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmLungMedicallyNeededForIcd4Description" value="{{$patient->rtm_lung_medically_needed_for_icd4description}}">
+                                        </td>
+                                    </tr>
+                                    </tbody>
+                                </table>
+                            </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>
+                </div>
+            </div>
+        </div>
+
+        @if($patient->is_rtm_lung_medically_needed === 'YES')
+
+            <!-- icds -->
+            <div class="d-flex align-items-baseline mt-2">
+                <label class="m-0 text-secondary font-weight-bold text-nowrap">Needed For:</label>
+                <div class="ml-2">
+                    <div class="d-flex align-items-baseline">
+                        <?php
+                        $displayData = [
+                            'icd_1' => [
+                                'title' => 'ICD 1',
+                                'reason' => $patient->rtm_lung_medically_needed_for_icd1,
+                                'description' => $patient->rtm_lung_medically_needed_for_icd1description
+                            ],
+                            'icd_2' => [
+                                'title' => 'ICD 2',
+                                'reason' => $patient->rtm_lung_medically_needed_for_icd2,
+                                'description' => $patient->rtm_lung_medically_needed_for_icd2description
+                            ],
+                            'icd_3' => [
+                                'title' => 'ICD 3',
+                                'reason' => $patient->rtm_lung_medically_needed_for_icd3,
+                                'description' => $patient->rtm_lung_medically_needed_for_icd3description
+                            ],
+                            'icd_4' => [
+                                'title' => 'ICD 4',
+                                'reason' => $patient->rtm_lung_medically_needed_for_icd4,
+                                'description' => $patient->rtm_lung_medically_needed_for_icd4description
+                            ],
+                        ];
+                        ?>
+                        <?php $emptyICDs = true; ?>
+                        @foreach($displayData as $rmKey=>$rmData)
+                            <?php
+                            $emptyICD = true;
+                            if (!empty($rmData['reason']) || !empty($rmData['description'])) {
+                                $emptyICDs = false;
+                                $emptyICD = false;
+                            }
+                            ?>
+                        @endforeach
+                        @if(!$emptyICDs)
+                            <div>
+                                <div class="d-flex flex-wrap">
+                                    <?php $emptyICDs = true; ?>
+                                    @foreach($displayData as $rmKey=>$rmData)
+                                        <?php
+                                        $emptyICD = true;
+                                        if (!empty($rmData['reason']) || !empty($rmData['description'])) {
+                                            $emptyICDs = false;
+                                            $emptyICD = false;
+                                        }
+                                        ?>
+                                        @if(!$emptyICD)
+                                            <span class="mb-1 mr-2 d-flex align-items-center"><i class="fas fa-circle text-muted mr-1" style="font-size: 5px;"></i> {{$rmData['reason']}} @if(!empty($rmData['description']))({{ $rmData['description'] }})@endif</span>
+                                        @endif
+                                    @endforeach
+                                </div>
+                            </div>
+                        @endif
+                    </div>
+                    <div class="d-flex align-items-baseline">
+                        @if($patient->rtm_lung_medically_needed_for_memo)
+                            <span class="mr-2 mb-1">{{$patient->rtm_lung_medically_needed_for_memo}}</span>
+                        @endif
+                    </div>
+                    <div moe relative>
+                        <a start="" show="" href="#">Edit</a>
+                        <form url="/api/clientRtm/updateRtmLungMedicallyNeededFor" class="mcp-theme-1">
+                            <input type="hidden" name="uid" value="{{$patient->uid}}">
+                            <div class="mb-2">
+                                <label class="font-weight-bold mb-1">Memo:</label>
+                                <textarea type="text" class="form-control form-control-sm" name="rtmLungMedicallyNeededForMemo">{{$patient->rtm_lung_medically_needed_for_memo}}</textarea>
+                            </div>
+                            <div class="mb-2">
+                                <table class="table table-sm table-bordered m-0">
+                                    <thead class="bg-light">
+                                    <tr>
+                                        <th class="border-bottom-0">ICD</th>
+                                        <th class="border-bottom-0">Description</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" data-target="input[name=rtmLungMedicallyNeededForIcd1Description]" name="rtmLungMedicallyNeededForIcd1" value="{{$patient->rtm_lung_medically_needed_for_icd1}}" placeholder="ICD 1" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input id="" type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmLungMedicallyNeededForIcd1Description" value="{{$patient->rtm_lung_medically_needed_for_icd1description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmLungMedicallyNeededForIcd2" data-target="input[name=rtmLungMedicallyNeededForIcd2Description]" value="{{$patient->rtm_lung_medically_needed_for_icd2}}" placeholder="ICD 2" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmLungMedicallyNeededForIcd2Description" value="{{$patient->rtm_lung_medically_needed_for_icd2description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmLungMedicallyNeededForIcd3" data-target="input[name=rtmLungMedicallyNeededForIcd3Description]" value="{{$patient->rtm_lung_medically_needed_for_icd3}}" placeholder="ICD 3" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmLungMedicallyNeededForIcd3Description" value="{{$patient->rtm_lung_medically_needed_for_icd3description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmLungMedicallyNeededForIcd4" data-target="input[name=rtmLungMedicallyNeededForIcd4Description]" value="{{$patient->rtm_lung_medically_needed_for_icd4}}" placeholder="ICD 4" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmLungMedicallyNeededForIcd4Description" value="{{$patient->rtm_lung_medically_needed_for_icd4description}}">
+                                        </td>
+                                    </tr>
+                                    </tbody>
+                                </table>
+                            </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>
+
+            <!-- patient interest -->
+            <div class="d-flex align-items-baseline mt-2">
+                <label class="m-0 text-secondary font-weight-bold">Patient Interested?</label>
+                <div class="ml-2">
+                    <div class="d-flex align-items-baseline">
+                        @if($patient->does_patient_want_rtm_lung)
+                            <span class="mr-2">{{$patient->does_patient_want_rtm_lung}}</span>
+                        @endif
+                        @if($patient->memo_for_does_patient_want_rtm_lung)
+                            <span class="mr-2">({{$patient->memo_for_does_patient_want_rtm_lung}})</span>
+                        @endif
+                        <div moe relative>
+                            <a href="#" start show>Edit</a>
+                            <form url="/api/clientRtm/updateDoesPatientWantRtmLung">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Patient Interested?</label>
+                                    <select name="doesPatientWantRtmLung" class="form-control form-control-sm" requied>
+                                        <option value="">-- select --</option>
+                                        <option value="YES" {{$patient->does_patient_want_rtm_lung === 'YES' ? 'selected' : ''}}>Yes</option>
+                                        <option value="NO" {{$patient->does_patient_want_rtm_lung === 'NO' ? 'selected' : ''}}>No</option>
+                                        <option value="UNKNOWN" {{$patient->does_patient_want_rtm_lung === 'UNKNOWN' ? 'selected' : ''}}>Unknown</option>
+                                    </select>
+                                </div>
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Memo</label>
+                                    <textarea type="text" class="form-control form-control-sm" name="memoForDoesPatientWantRtmLung">{{$patient->memo_for_does_patient_want_rtm_lung}}</textarea>
+                                </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>
+                        <span class="mx-1 text-secondary">|</span>
+                        <div moe relative>
+                            <a href="#" start show>Edit Memo</a>
+                            <form url="/api/clientRtm/updateMemoForDoesPatientWantRtmLung">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Memo</label>
+                                    <textarea type="text" class="form-control form-control-sm" name="memoForDoesPatientWantRtmLung">{{$patient->memo_for_does_patient_want_rtm_lung}}</textarea>
+                                </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>
+                    </div>
+                </div>
+            </div>
+
+            <!-- enrollment -->
+            <div class="d-flex align-items-baseline mt-2">
+                <label class="m-0 text-secondary font-weight-bold">Enrolled?</label>
+                <div class="ml-2">
+                    <div class="d-flex align-items-baseline">
+                        <span class="mr-2">{{$patient->is_enrolled_in_rtm_lung ? 'Yes' : 'No'}}</span>
+                        <div moe relative>
+                            <a href="#" start show>Edit</a>
+                            <form url="/api/clientRtm/updateIsEnrolledInRtmLung">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Patient Interested?</label>
+                                    <select name="isEnrolledInRtmLung" class="form-control form-control-sm" requied>
+                                        <option value="">-- select --</option>
+                                        <option value="1" {{$patient->is_enrolled_in_rtm_lung ? 'selected' : ''}}>Yes</option>
+                                        <option value="0" {{!$patient->is_enrolled_in_rtm_lung ? 'selected' : ''}}>No</option>
+                                    </select>
+                                </div>
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Effective Date</label>
+                                    <input type="date" class="form-control form-control-sm" name="rtmLungEnrollmentDate" value="{{$patient->rtm_lung_enrollment_date}}">
+                                </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>
+                    </div>
+                </div>
+            </div>
+
+            @if($patient->is_enrolled_in_rtm_lung)
+                <div class="d-flex align-items-baseline mt-1 pl-3">
+                    <label class="m-0 text-secondary font-weight-bold">Date:</label>
+                    <div class="ml-2">
+                        <div class="d-flex align-items-baseline">
+                            @if($patient->rtm_lung_enrollment_date)
+                                <span class="mr-2">{{friendly_date($patient->rtm_lung_enrollment_date)}}</span>
+                            @endif
+                            <div moe relative>
+                                <a href="#" start show>Edit Date</a>
+                                <form url="/api/clientRtm/updateRtmLungEnrollmentDate">
+                                    <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                    <div class="mb-2">
+                                        <label class="text-secondary text-sm mb-1">Effective Date</label>
+                                        <input type="date" class="form-control form-control-sm" name="rtmLungEnrollmentDate" value="{{$patient->rtm_lung_enrollment_date}}">
+                                    </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>
+                        </div>
+                    </div>
+                </div>
+                <div class="d-flex align-items-baseline mt-1 pl-3">
+                    <label class="m-0 text-secondary font-weight-bold">HCP:</label>
+                    <div class="ml-2">
+                        <div class="d-flex align-items-baseline">
+                            @if($patient->rtmLungHcp)
+                                <span class="mr-2">{{$patient->rtmLungHcp->displayName()}}</span>
+                            @endif
+                            <div moe relative>
+                                <a href="#" start show>Edit</a>
+                                <form url="/api/clientRtm/updateRtmLungHcpPro">
+                                    <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                    <div class="mb-2">
+                                        <label class="text-secondary text-sm">HCP</label>
+                                        <select name="rtmLungHcpProUid" provider-search data-pro-uid="{{ @$patient->rtmLungHcp->uid }}" class="form-control form-control-sm">
+                                            <option value=""> --select--</option>
+                                        </select>
+                                    </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>
+                        </div>
+                    </div>
+                </div>
+                <div class="d-flex align-items-baseline mt-1 pl-3">
+                    <label class="m-0 text-secondary font-weight-bold">Coach:</label>
+                    <div class="ml-2">
+                        <div class="d-flex align-items-baseline">
+                            @if($patient->rtmLungCoach)
+                                <span class="mr-2">{{$patient->rtmLungCoach->displayName()}}</span>
+                            @endif
+                            <div moe relative>
+                                <a href="#" start show>Edit</a>
+                                <form url="/api/clientRtm/updateRtmLungCoachPro">
+                                    <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                    <div class="mb-2">
+                                        <label class="text-secondary text-sm">Coach</label>
+                                        <select name="rtmLungCoachProUid" provider-search data-pro-uid="{{ @$patient->rtmLungCoach->uid }}" class="form-control form-control-sm">
+                                            <option value=""> --select--</option>
+                                        </select>
+                                    </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>
+                        </div>
+                    </div>
+                </div>
+            @endif
+
+            {{-- protocol --}}
+            @if($patient->is_enrolled_in_rtm_lung)
+                <div class="d-flex align-items-baseline mt-2">
+                    <label class="m-0 text-secondary font-weight-bold">Protocol:</label>
+                    <div class="ml-2">
+                        <div class="d-flex align-items-baseline">
+                            @if($patient->rtm_lung_protocol_detail_json)
+                                <span class="mr-2">{{$patient->rtm_lung_protocol_detail_json}}</span>
+                            @endif
+                            <div moe relative>
+                                <a href="#" start show>Edit</a>
+                                <form url="/api/clientRtm/updateRtmLungProtocolDetailJson">
+                                    <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                    <div class="mb-2">
+                                        <label class="text-secondary text-sm mb-1">Protocol</label>
+                                        <textarea class="form-control form-control-sm" name="rtmLungProtocolDetailJson">{{$patient->rtm_lung_protocol_detail_json}}</textarea>
+                                    </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>
+                        </div>
+                    </div>
+                </div>
+            @endif
+
+        @endif
+
+    @endif
+
+</div>

+ 460 - 0
resources/views/app/patient/partials/rtm-msk.blade.php

@@ -0,0 +1,460 @@
+<div class="mt-2">
+
+    <!-- coverage -->
+    <div class="d-flex align-items-baseline">
+        <label class="m-0 text-secondary font-weight-bold">Covered?</label>
+        <div class="ml-2">
+            <div class="d-flex align-items-baseline">
+                @if($patient->does_insurance_cover_rtm_msk)
+                    <span class="mr-2">{{$patient->does_insurance_cover_rtm_msk}}</span>
+                @endif
+                @if($patient->memo_for_does_insurance_cover_rtm_msk)
+                    <span class="mr-2">({{$patient->memo_for_does_insurance_cover_rtm_msk}})</span>
+                @endif
+                <div moe relative>
+                    <a href="#" start show>Edit</a>
+                    <form url="/api/clientRtm/updateDoesInsuranceCoverRtmMsk">
+                        <input type="hidden" name="uid" value="{{$patient->uid}}">
+                        <div class="mb-2">
+                            <label class="text-secondary text-sm mb-1">RTM MSK Covered?</label>
+                            <select name="doesInsuranceCoverRtmMsk" class="form-control form-control-sm" requied>
+                                <option value="">-- select --</option>
+                                <option value="YES" {{$patient->does_insurance_cover_rtm_msk === 'YES' ? 'selected' : ''}}>Yes</option>
+                                <option value="NO" {{$patient->does_insurance_cover_rtm_msk === 'NO' ? 'selected' : ''}}>No</option>
+                                <option value="UNKNOWN" {{$patient->does_insurance_cover_rtm_msk === 'UNKNOWN' ? 'selected' : ''}}>Unknown</option>
+                            </select>
+                        </div>
+                        <div class="mb-2">
+                            <label class="text-secondary text-sm mb-1">Memo</label>
+                            <textarea type="text" class="form-control form-control-sm" name="memoForDoesInsuranceCoverRtmMsk">{{$patient->memo_for_does_insurance_cover_rtm_msk}}</textarea>
+                        </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>
+                <span class="mx-1 text-secondary">|</span>
+                <div moe relative>
+                    <a href="#" start show>Edit Memo</a>
+                    <form url="/api/clientRtm/updateMemoForDoesInsuranceCoverRtmMsk">
+                        <input type="hidden" name="uid" value="{{$patient->uid}}">
+                        <div class="mb-2">
+                            <label class="text-secondary text-sm mb-1">Memo</label>
+                            <textarea type="text" class="form-control form-control-sm" name="memoForDoesInsuranceCoverRtmMsk">{{$patient->memo_for_does_insurance_cover_rtm_msk}}</textarea>
+                        </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>
+            </div>
+        </div>
+    </div>
+
+    @if($patient->does_insurance_cover_rtm_msk === 'YES')
+
+        <!-- medically needed -->
+        <div class="d-flex align-items-baseline mt-2">
+            <label class="m-0 text-secondary font-weight-bold">Medically needed?</label>
+            <div class="ml-2">
+                <div class="d-flex align-items-baseline">
+                    @if($patient->is_rtm_msk_medically_needed)
+                        <span class="mr-2">{{$patient->is_rtm_msk_medically_needed}}</span>
+                    @endif
+                    <div moe relative>
+                        <a href="#" start show>Edit</a>
+                        <form url="/api/clientRtm/updateIsRtmMskMedicallyNeeded">
+                            <input type="hidden" name="uid" value="{{$patient->uid}}">
+                            <div class="mb-2">
+                                <label class="text-secondary text-sm mb-1 text-nowrap">RTM MSK Medically Needed?</label>
+                                <select name="isRtmMskMedicallyNeeded" class="form-control form-control-sm" requied>
+                                    <option value="">-- select --</option>
+                                    <option value="YES" {{$patient->is_rtm_msk_medically_needed === 'YES' ? 'selected' : ''}}>Yes</option>
+                                    <option value="NO" {{$patient->is_rtm_msk_medically_needed === 'NO' ? 'selected' : ''}}>No</option>
+                                    <option value="UNKNOWN" {{$patient->is_rtm_msk_medically_needed === 'UNKNOWN' ? 'selected' : ''}}>Unknown</option>
+                                </select>
+                            </div>
+                            <div class="mb-2">
+                                <label class="text-sm text-secondary mb-1">Memo:</label>
+                                <textarea type="text" class="form-control form-control-sm" name="rtmMskMedicallyNeededForMemo">{{$patient->rtm_msk_medically_needed_for_memo}}</textarea>
+                            </div>
+                            <div class="mb-2">
+                                <table class="table table-sm table-bordered m-0">
+                                    <thead class="bg-light">
+                                    <tr>
+                                        <th class="text-sm text-secondary font-weight-normal border-bottom-0">ICD</th>
+                                        <th class="text-sm text-secondary font-weight-normal border-bottom-0">Description</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" data-target="input[name=rtmMskMedicallyNeededForIcd1Description]" name="rtmMskMedicallyNeededForIcd1" value="{{$patient->rtm_msk_medically_needed_for_icd1}}" placeholder="ICD 1" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input id="" type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmMskMedicallyNeededForIcd1Description" value="{{$patient->rtm_msk_medically_needed_for_icd1description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmMskMedicallyNeededForIcd2" data-target="input[name=rtmMskMedicallyNeededForIcd2Description]" value="{{$patient->rtm_msk_medically_needed_for_icd2}}" placeholder="ICD 2" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmMskMedicallyNeededForIcd2Description" value="{{$patient->rtm_msk_medically_needed_for_icd2description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmMskMedicallyNeededForIcd3" data-target="input[name=rtmMskMedicallyNeededForIcd3Description]" value="{{$patient->rtm_msk_medically_needed_for_icd3}}" placeholder="ICD 3" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmMskMedicallyNeededForIcd3Description" value="{{$patient->rtm_msk_medically_needed_for_icd3description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmMskMedicallyNeededForIcd4" data-target="input[name=rtmMskMedicallyNeededForIcd4Description]" value="{{$patient->rtm_msk_medically_needed_for_icd4}}" placeholder="ICD 4" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmMskMedicallyNeededForIcd4Description" value="{{$patient->rtm_msk_medically_needed_for_icd4description}}">
+                                        </td>
+                                    </tr>
+                                    </tbody>
+                                </table>
+                            </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>
+                </div>
+            </div>
+        </div>
+
+        @if($patient->is_rtm_msk_medically_needed === 'YES')
+
+            <!-- icds -->
+            <div class="d-flex align-items-baseline mt-2">
+                <label class="m-0 text-secondary font-weight-bold text-nowrap">Needed For:</label>
+                <div class="ml-2">
+                    <div class="d-flex align-items-baseline">
+                        <?php
+                        $displayData = [
+                            'icd_1' => [
+                                'title' => 'ICD 1',
+                                'reason' => $patient->rtm_msk_medically_needed_for_icd1,
+                                'description' => $patient->rtm_msk_medically_needed_for_icd1description
+                            ],
+                            'icd_2' => [
+                                'title' => 'ICD 2',
+                                'reason' => $patient->rtm_msk_medically_needed_for_icd2,
+                                'description' => $patient->rtm_msk_medically_needed_for_icd2description
+                            ],
+                            'icd_3' => [
+                                'title' => 'ICD 3',
+                                'reason' => $patient->rtm_msk_medically_needed_for_icd3,
+                                'description' => $patient->rtm_msk_medically_needed_for_icd3description
+                            ],
+                            'icd_4' => [
+                                'title' => 'ICD 4',
+                                'reason' => $patient->rtm_msk_medically_needed_for_icd4,
+                                'description' => $patient->rtm_msk_medically_needed_for_icd4description
+                            ],
+                        ];
+                        ?>
+                        <?php $emptyICDs = true; ?>
+                        @foreach($displayData as $rmKey=>$rmData)
+                            <?php
+                            $emptyICD = true;
+                            if (!empty($rmData['reason']) || !empty($rmData['description'])) {
+                                $emptyICDs = false;
+                                $emptyICD = false;
+                            }
+                            ?>
+                        @endforeach
+                        @if(!$emptyICDs)
+                            <div>
+                                <div class="d-flex flex-wrap">
+                                    <?php $emptyICDs = true; ?>
+                                    @foreach($displayData as $rmKey=>$rmData)
+                                        <?php
+                                        $emptyICD = true;
+                                        if (!empty($rmData['reason']) || !empty($rmData['description'])) {
+                                            $emptyICDs = false;
+                                            $emptyICD = false;
+                                        }
+                                        ?>
+                                        @if(!$emptyICD)
+                                            <span class="mb-1 mr-2 d-flex align-items-center"><i class="fas fa-circle text-muted mr-1" style="font-size: 5px;"></i> {{$rmData['reason']}} @if(!empty($rmData['description']))({{ $rmData['description'] }})@endif</span>
+                                        @endif
+                                    @endforeach
+                                </div>
+                            </div>
+                        @endif
+                    </div>
+                    <div class="d-flex align-items-baseline">
+                        @if($patient->rtm_msk_medically_needed_for_memo)
+                            <span class="mr-2 mb-1">{{$patient->rtm_msk_medically_needed_for_memo}}</span>
+                        @endif
+                    </div>
+                    <div moe relative>
+                        <a start="" show="" href="#">Edit</a>
+                        <form url="/api/clientRtm/updateRtmMskMedicallyNeededFor" class="mcp-theme-1">
+                            <input type="hidden" name="uid" value="{{$patient->uid}}">
+                            <div class="mb-2">
+                                <label class="font-weight-bold mb-1">Memo:</label>
+                                <textarea type="text" class="form-control form-control-sm" name="rtmMskMedicallyNeededForMemo">{{$patient->rtm_msk_medically_needed_for_memo}}</textarea>
+                            </div>
+                            <div class="mb-2">
+                                <table class="table table-sm table-bordered m-0">
+                                    <thead class="bg-light">
+                                    <tr>
+                                        <th class="border-bottom-0">ICD</th>
+                                        <th class="border-bottom-0">Description</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" data-target="input[name=rtmMskMedicallyNeededForIcd1Description]" name="rtmMskMedicallyNeededForIcd1" value="{{$patient->rtm_msk_medically_needed_for_icd1}}" placeholder="ICD 1" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input id="" type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmMskMedicallyNeededForIcd1Description" value="{{$patient->rtm_msk_medically_needed_for_icd1description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmMskMedicallyNeededForIcd2" data-target="input[name=rtmMskMedicallyNeededForIcd2Description]" value="{{$patient->rtm_msk_medically_needed_for_icd2}}" placeholder="ICD 2" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmMskMedicallyNeededForIcd2Description" value="{{$patient->rtm_msk_medically_needed_for_icd2description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmMskMedicallyNeededForIcd3" data-target="input[name=rtmMskMedicallyNeededForIcd3Description]" value="{{$patient->rtm_msk_medically_needed_for_icd3}}" placeholder="ICD 3" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmMskMedicallyNeededForIcd3Description" value="{{$patient->rtm_msk_medically_needed_for_icd3description}}">
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            <input type="text" class="icd-input search_field" icd-autocomplete-code="" name="rtmMskMedicallyNeededForIcd4" data-target="input[name=rtmMskMedicallyNeededForIcd4Description]" value="{{$patient->rtm_msk_medically_needed_for_icd4}}" placeholder="ICD 4" autocomplete="off" role="combobox" aria-expanded="false">
+                                        </td>
+                                        <td>
+                                            <input type="text" class="form-control form-control-sm" icd-autocomplete-description="" name="rtmMskMedicallyNeededForIcd4Description" value="{{$patient->rtm_msk_medically_needed_for_icd4description}}">
+                                        </td>
+                                    </tr>
+                                    </tbody>
+                                </table>
+                            </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>
+
+            <!-- patient interest -->
+            <div class="d-flex align-items-baseline mt-2">
+                <label class="m-0 text-secondary font-weight-bold">Patient Interested?</label>
+                <div class="ml-2">
+                    <div class="d-flex align-items-baseline">
+                        @if($patient->does_patient_want_rtm_msk)
+                            <span class="mr-2">{{$patient->does_patient_want_rtm_msk}}</span>
+                        @endif
+                        @if($patient->memo_for_does_patient_want_rtm_msk)
+                            <span class="mr-2">({{$patient->memo_for_does_patient_want_rtm_msk}})</span>
+                        @endif
+                        <div moe relative>
+                            <a href="#" start show>Edit</a>
+                            <form url="/api/clientRtm/updateDoesPatientWantRtmMsk">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Patient Interested?</label>
+                                    <select name="doesPatientWantRtmMsk" class="form-control form-control-sm" requied>
+                                        <option value="">-- select --</option>
+                                        <option value="YES" {{$patient->does_patient_want_rtm_msk === 'YES' ? 'selected' : ''}}>Yes</option>
+                                        <option value="NO" {{$patient->does_patient_want_rtm_msk === 'NO' ? 'selected' : ''}}>No</option>
+                                        <option value="UNKNOWN" {{$patient->does_patient_want_rtm_msk === 'UNKNOWN' ? 'selected' : ''}}>Unknown</option>
+                                    </select>
+                                </div>
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Memo</label>
+                                    <textarea type="text" class="form-control form-control-sm" name="memoForDoesPatientWantRtmMsk">{{$patient->memo_for_does_patient_want_rtm_msk}}</textarea>
+                                </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>
+                        <span class="mx-1 text-secondary">|</span>
+                        <div moe relative>
+                            <a href="#" start show>Edit Memo</a>
+                            <form url="/api/clientRtm/updateMemoForDoesPatientWantRtmMsk">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Memo</label>
+                                    <textarea type="text" class="form-control form-control-sm" name="memoForDoesPatientWantRtmMsk">{{$patient->memo_for_does_patient_want_rtm_msk}}</textarea>
+                                </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>
+                    </div>
+                </div>
+            </div>
+
+            <!-- enrollment -->
+            <div class="d-flex align-items-baseline mt-2">
+                <label class="m-0 text-secondary font-weight-bold">Enrolled?</label>
+                <div class="ml-2">
+                    <div class="d-flex align-items-baseline">
+                        <span class="mr-2">{{$patient->is_enrolled_in_rtm_msk ? 'Yes' : 'No'}}</span>
+                        <div moe relative>
+                            <a href="#" start show>Edit</a>
+                            <form url="/api/clientRtm/updateIsEnrolledInRtmMsk">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Patient Interested?</label>
+                                    <select name="isEnrolledInRtmMsk" class="form-control form-control-sm" requied>
+                                        <option value="">-- select --</option>
+                                        <option value="1" {{$patient->is_enrolled_in_rtm_msk ? 'selected' : ''}}>Yes</option>
+                                        <option value="0" {{!$patient->is_enrolled_in_rtm_msk ? 'selected' : ''}}>No</option>
+                                    </select>
+                                </div>
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Effective Date</label>
+                                    <input type="date" class="form-control form-control-sm" name="rtmMskEnrollmentDate" value="{{$patient->rtm_msk_enrollment_date}}">
+                                </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>
+                    </div>
+                </div>
+            </div>
+
+            @if($patient->is_enrolled_in_rtm_msk)
+                <div class="d-flex align-items-baseline mt-1 pl-3">
+                    <label class="m-0 text-secondary font-weight-bold">Date:</label>
+                    <div class="ml-2">
+                        <div class="d-flex align-items-baseline">
+                            @if($patient->rtm_msk_enrollment_date)
+                                <span class="mr-2">{{friendly_date($patient->rtm_msk_enrollment_date)}}</span>
+                            @endif
+                            <div moe relative>
+                                <a href="#" start show>Edit Date</a>
+                                <form url="/api/clientRtm/updateRtmMskEnrollmentDate">
+                                    <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                    <div class="mb-2">
+                                        <label class="text-secondary text-sm mb-1">Effective Date</label>
+                                        <input type="date" class="form-control form-control-sm" name="rtmMskEnrollmentDate" value="{{$patient->rtm_msk_enrollment_date}}">
+                                    </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>
+                        </div>
+                    </div>
+                </div>
+                <div class="d-flex align-items-baseline mt-1 pl-3">
+                    <label class="m-0 text-secondary font-weight-bold">HCP:</label>
+                    <div class="ml-2">
+                        <div class="d-flex align-items-baseline">
+                            @if($patient->rtmMskHcp)
+                                <span class="mr-2">{{$patient->rtmMskHcp->displayName()}}</span>
+                            @endif
+                            <div moe relative>
+                                <a href="#" start show>Edit</a>
+                                <form url="/api/clientRtm/updateRtmMskHcpPro">
+                                    <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                    <div class="mb-2">
+                                        <label class="text-secondary text-sm">HCP</label>
+                                        <select name="rtmMskHcpProUid" provider-search data-pro-uid="{{ @$patient->rtmMskHcp->uid }}" class="form-control form-control-sm">
+                                            <option value=""> --select--</option>
+                                        </select>
+                                    </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>
+                        </div>
+                    </div>
+                </div>
+                <div class="d-flex align-items-baseline mt-1 pl-3">
+                    <label class="m-0 text-secondary font-weight-bold">Coach:</label>
+                    <div class="ml-2">
+                        <div class="d-flex align-items-baseline">
+                            @if($patient->rtmMskCoach)
+                                <span class="mr-2">{{$patient->rtmMskCoach->displayName()}}</span>
+                            @endif
+                            <div moe relative>
+                                <a href="#" start show>Edit</a>
+                                <form url="/api/clientRtm/updateRtmMskCoachPro">
+                                    <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                    <div class="mb-2">
+                                        <label class="text-secondary text-sm">Coach</label>
+                                        <select name="rtmMskCoachProUid" provider-search data-pro-uid="{{ @$patient->rtmMskCoach->uid }}" class="form-control form-control-sm">
+                                            <option value=""> --select--</option>
+                                        </select>
+                                    </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>
+                        </div>
+                    </div>
+                </div>
+            @endif
+
+            {{-- protocol --}}
+            @if($patient->is_enrolled_in_rtm_msk)
+            <div class="d-flex align-items-baseline mt-2">
+                <label class="m-0 text-secondary font-weight-bold">Protocol:</label>
+                <div class="ml-2">
+                    <div class="d-flex align-items-baseline">
+                        @if($patient->rtm_msk_protocol_detail_json)
+                            <span class="mr-2">{{$patient->rtm_msk_protocol_detail_json}}</span>
+                        @endif
+                        <div moe relative>
+                            <a href="#" start show>Edit</a>
+                            <form url="/api/clientRtm/updateRtmMskProtocolDetailJson">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm mb-1">Protocol</label>
+                                    <textarea class="form-control form-control-sm" name="rtmMskProtocolDetailJson">{{$patient->rtm_msk_protocol_detail_json}}</textarea>
+                                </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>
+                    </div>
+                </div>
+            </div>
+        @endif
+
+        @endif
+
+    @endif
+
+</div>

+ 17 - 0
resources/views/app/patient/rtm.blade.php

@@ -0,0 +1,17 @@
+@extends ('layouts.patient')
+@section('inner-content')
+    <div class="">
+        <h4 class="font-weight-bold m-0 font-size-16" id="vitals-settings">Remote Therapeutic Monitoring</h4>
+        <hr class="m-neg-4">
+        <div class="row">
+            <div class="col-6">
+                <b>Musculoskeletal</b>
+                @include('app.patient.partials.rtm-msk')
+            </div>
+            <div class="col-6 border-left">
+                <b>Pulmonary</b>
+                @include('app.patient.partials.rtm-lung')
+            </div>
+        </div>
+    </div>
+@endsection

+ 3 - 0
resources/views/layouts/patient.blade.php

@@ -81,6 +81,9 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 					<li class="nav-item">
 						<a class="nav-link {{ strpos($routeName, 'patients.view.rm-setup') === 0 ? 'active' : '' }}" href="{{ route('patients.view.rm-setup', ['patient' => $patient]) }}">Remote Monitoring</a>
 					</li>
+					<li class="nav-item">
+						<a class="nav-link {{ strpos($routeName, 'patients.view.rtm') === 0 ? 'active' : '' }}" href="{{ route('patients.view.rtm', $patient) }}">RTM</a>
+					</li>
 					<?php /* <li class="nav-item">
 							<a class="nav-link d-flex align-items-center {{ strpos($routeName, 'patients.view.action-items') === 0 ? 'active' : '' }}"
 							   native onclick="return false">

+ 2 - 0
routes/web.php

@@ -610,6 +610,8 @@ Route::middleware('pro.auth')->group(function () {
 
             Route::get('accounts', 'PatientController@accounts')->name('accounts');
 
+            Route::get('rtm', 'PatientController@rtm')->name('rtm');
+
         });
 
     });