Переглянути джерело

Merge branch 'master' of rav.triplestart.com:jmudaka/stagfe2

= 2 роки тому
батько
коміт
c4c1bfbf5b

+ 3 - 0
app/Models/Client.php

@@ -495,6 +495,9 @@ class Client extends Model
         return $appointments->get();
     }
 
+    public function rmCompany() {
+        return $this->hasOne(Company::class, 'id', 'rm_company_id');
+    }
     public function upcomingAppointments()
     {
         return $this->hasMany(Appointment::class, 'client_id', 'id')

+ 1 - 1
app/Models/ClientPrimaryCoverage.php

@@ -53,7 +53,7 @@ class ClientPrimaryCoverage extends Model
             if($this->mcdPayer) return $this->mcdPayer->name;
         } 
         if($this->plan_type === 'COMMERCIAL'){
-            if($this->payer) return $this->payer->name;
+            if($this->payer) return $this->payer->name; else $this->carrier_free_text ?: '-';
         } 
         return $this->insuranceDisplayName();
     }

+ 4 - 0
app/Models/Pro.php

@@ -73,6 +73,10 @@ class Pro extends Model
        return $this->is_considered_for_dna && !$this->is_hcp;
     }
 
+    public function rmCompany() {
+        return $this->hasOne(Company::class, 'id', 'rm_company_id');
+    }
+
     public function lastPayment() {
         return ProTransaction
             ::where('pro_id', $this->id)

+ 1 - 1
resources/views/app/patient/coverage-status.blade.php

@@ -115,7 +115,7 @@
         @endif
     @elseif($coverage->plan_type === 'COMMERCIAL')
         <tr>
-          <td colspan="2"><span>{{ $coverage->payer ? $coverage->payer->name : '--' }}</span></td>
+          <td colspan="2"><span>{{ $coverage->payer ? $coverage->payer->name : ($coverage->carrier_free_text ?: '--') }}</span></td>
         </tr>
         @if($coverage->mcdPayer)
         <tr>

+ 49 - 0
resources/views/app/patient/create-patient/insurance-coverage-form.blade.php

@@ -23,6 +23,20 @@
 				<input name="commercialPayerUidSuggest" class="form-control input-sm" value="" autocomplete="off" stag-suggest stag-suggest-ep="/search-payer/json" />
 				<input type="hidden" name="commercialPayerUid" />
 			</div>
+			<div class="col-md-12">
+				<p class="mb-2 font-weight-bold">If payer not found above, please key in carrier name (and memo if any):</p>
+			</div>
+			<div class="form-group col-md-6">
+				<label class="control-label">Carrier Name</label>
+				<input type="text" name="carrierFreeText" class="form-control input-sm">
+			</div>
+			<div class="form-group col-md-6">
+				<label class="control-label">Carrier Memo</label>
+				<input type="text" name="carrierFreeTextMemo" class="form-control input-sm">
+			</div>
+			<div class="col-12">
+				<hr class="mt-0 mb-2">
+			</div>
 			<div class="form-group col-md-6">
 				<label class="control-label">Patient Member Identifier</label>
 				<input type="text" name="commercialMemberIdentifier" class="form-control input-sm">
@@ -31,7 +45,42 @@
 				<label class="control-label">Patient Group Number</label>
 				<input type="text" name="commercialGroupNumber" class="form-control input-sm">
 			</div>
+			<div class="form-group col-md-6">
+				<label class="control-label">Phone Number For Hcps</label>
+				<input type="text" name="primaryInsurancePhoneNumberForHcps" class="form-control input-sm">
+			</div>
 		</div>
+
+		<div class="row" v-if="planType">
+			<div class="col-12">
+				<hr class="mt-0 mb-2">
+			</div>
+			<div class="form-group col-md-6">
+				<p class="mb-1 font-weight-bold">RPM covered (if medically needed)?</p>
+				<div class="form-check form-check-inline">
+					<label class="form-check-label"><input class="form-check-input" type="radio" name="isRpmCoveredIfMedicallyNeeded" value="YES">Yes</label>
+				</div>
+				<div class="form-check form-check-inline">
+					<label class="form-check-label"><input class="form-check-input" type="radio" name="isRpmCoveredIfMedicallyNeeded" value="NO">No</label>
+				</div>
+				<div class="form-check form-check-inline">
+					<label class="form-check-label"><input class="form-check-input" type="radio" name="isRpmCoveredIfMedicallyNeeded" value="UNKNOWN">Unknown</label>
+				</div>
+			</div>
+			<div class="form-group col-md-6">
+				<p class="mb-1 font-weight-bold">Televisits covered (if medically needed)?</p>
+				<div class="form-check form-check-inline">
+					<label class="form-check-label"><input class="form-check-input" type="radio" name="isTelevisitCoveredIfMedicallyNeeded" value="YES">Yes</label>
+				</div>
+				<div class="form-check form-check-inline">
+					<label class="form-check-label"><input class="form-check-input" type="radio" name="isTelevisitCoveredIfMedicallyNeeded" value="NO">No</label>
+				</div>
+				<div class="form-check form-check-inline">
+					<label class="form-check-label"><input class="form-check-input" type="radio" name="isTelevisitCoveredIfMedicallyNeeded" value="UNKNOWN">Unknown</label>
+				</div>
+			</div>
+		</div>
+
 		<div class="row">
 			<div class="form-group col-md-12" v-if="planType == 'MEDICAID' || planType == 'COMMERCIAL'">
 				<div class="form-check form-check-inline">

+ 151 - 79
resources/views/app/patient/notes.blade.php

@@ -124,92 +124,158 @@
                 </div>
                 @endif
                 <span class="mx-2 text-secondary">|</span>
-                <div moe>
-                <a start show class="py-0 mb-3 text-info font-weight-bold">Add Visit</a>
-                <form url="/api/visit/create"
-                      redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
-                      class="mcp-theme-1">
-                    <?php $proVisitTemplates = $pro->visitTemplates(); ?>
-                    <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                    @if($pro->isDefaultNA())
-                    <input type="hidden" name="naProUid" value="{{$pro->uid}}">
-                    @endif
+                <div moe id="new-appt-moe">
+                    <a start show class="py-0 mb-3 text-info font-weight-bold"></a>
+                    <form url="/api/appointment/create" redir="/patients/view/{{$patient->uid}}/notes?apptUid=[data]">
+                        <p class="mb-2 font-weight-bold">Create Appointment</p>
+                        <input type="hidden" name="clientUid" value="{{$patient->uid}}">
+                        <div class="mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">Pro</label>
+                            <select name="proUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}"></select>
+                        </div>
+                        <div class="mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">Date</label>
+                            <input type="date" name="date" required class="form-control form-control-sm" value="{{date('Y-m-d')}}">
+                        </div>
+                        <div class="mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">Start Time</label>
+                            <input type="time" name="startTime" required class="form-control form-control-sm">
+                        </div>
+                        <div class="mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">End Time</label>
+                            <input type="time" name="endTime" required class="form-control form-control-sm">
+                        </div>
+                        <div class="mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">Timezone</label>
+                            <select name="timeZone" class="form-control">
+                                <option value="EASTERN" selected>Eastern</option>
+                                <option value="CENTRAL">Central</option>
+                                <option value="MOUNTAIN">Mountain</option>
+                                <option value="PACIFIC">Pacific</option>
+                                <option value="ALASKA">Alaska</option>
+                                <option value="HAWAII">Hawaii</option>
+                                <option value="PUERTO_RICO">Puerto Rico</option>
+                            </select>
+                        </div>
+                        <div class="mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">Title</label>
+                            <input type="text" name="title" required class="form-control form-control-sm" value="Visit - {{date('Y-m-d')}}">
+                        </div>
+                        <div class="d-flex align-items-center justify-content-center">
+                            <button class="btn btn-sm btn-primary mr-2" submit>Submit</button>
+                            <button class="btn btn-sm btn-default border" cancel>Cancel</button>
+                        </div>
+                    </form>
+                </div>
+                <div moe id="new-visit-moe">
+                    <a start show class="py-0 mb-3 text-info font-weight-bold">Add Visit</a>
+                    <form url="/api/visit/create"
+                          redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
+                          class="mcp-theme-1">
+                        <p class="mb-2 font-weight-bold">Create Visit</p>
 
-                    <input type="hidden" class="form-control form-control-sm" placeholder="title"
-                           name="title" id="note-create-title" value="{{count($proVisitTemplates) === 1 ? $proVisitTemplates->first()->title : 'Note'}}">
+                        @if($patient->rmCompany && !$patient->rmCompany->is_external_care_allowed)
+                            <div class="alert alert-warning m-0 border-warning text-nowrap">External care is not allowed on patients<br> of
+                                {{$patient->rmCompany->name}}.</div>
+                        @else
 
-                    <div class="form-group mb-2">
-                        <label for="" class="text-secondary text-sm mb-1">Effective Date *</label>
-                        <input type="date" name="effectiveDate" class="form-control" value="{{get_current_date($pro->display_timezone)}}">
-                    </div>
+                        <?php $proVisitTemplates = $pro->visitTemplates(); ?>
+                        <input type="hidden" name="clientUid" value="{{$patient->uid}}">
+                        @if($pro->isDefaultNA())
+                        <input type="hidden" name="naProUid" value="{{$pro->uid}}">
+                        @endif
+
+                        <input type="hidden" class="form-control form-control-sm" placeholder="title"
+                               name="title" id="note-create-title" value="{{count($proVisitTemplates) === 1 ? $proVisitTemplates->first()->title : 'Note'}}">
 
-                    @if($pro->pro_type === 'ADMIN')
-                        <div class="form-group mb-2 pt-2 d-flex">
-                            <label class="my-0 mr-3 d-flex align-items-center">
-                                <input type="radio" class="mr-1" name="isNonMedical" value="0" required {{$pro->is_hcp ? 'checked' : ''}}>
-                                <span class="text-nowrap">Regular Note</span>
-                            </label>
-                            <label class="my-0 mr-3 d-flex align-items-center">
-                                <input type="radio" class="mr-1" name="isNonMedical" value="1" required {{$pro->is_hcp ? '' : 'checked'}}>
-                                <span class="text-nowrap">Admin Note</span>
-                            </label>
+                        <div class="form-group mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">For Appointment *</label>
+                            <select name="forAppointmentUid" class="form-control" onchange="if(this.value === 'create') {$('#new-appt-moe>a').first().click(); return false;}" required>
+                                <option value="" selected>-- select --</option>
+                                <option value="create">Create New</option>
+                                @foreach($patient->upcomingAppointments as $appt)
+                                    @if($appt->raw_date === date('Y-m-d'))
+                                        <option value="{{$appt->uid}}">{{$appt->raw_date}} - {{$appt->pro->displayName()}}</option>
+                                    @endif
+                                @endforeach
+                            </select>
                         </div>
-                    @endif
 
-                    <div class="form-group mb-2">
-                        <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
-                        <select name="hcpProUid" class="form-control" provider-search required <?= $pro->pro_type !== 'ADMIN' ? 'provider-type="hcp"':'' ?> data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
-                        </select>
-                    </div>
+                        <div class="form-group mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">Effective Date *</label>
+                            <input type="date" name="effectiveDate" class="form-control" value="{{get_current_date($pro->display_timezone)}}">
+                        </div>
 
-                    <div class="form-group mb-2">
-                        <label for="" class="text-secondary text-sm mb-1">Note Template *</label>
-                        <select name="visitTemplateUid" class="form-control form-control-sm"
-                                onchange="$('#note-create-title').val($(this).find('option:selected').text())"
-                                required>
-                            <option value=""> --select--</option>
-                            @foreach($proVisitTemplates as $visitTemplate)
-                                <option value="{{$visitTemplate->uid}}" {{count($proVisitTemplates) === 1 ? 'selected' : ''}}>{{$visitTemplate->title}}</option>
-                            @endforeach
-                        </select>
-                    </div>
-                    <div class="mb-2">
-                        <label for="" class="text-secondary text-sm mb-1">New/Follow-up</label>
-                        <div class="d-flex align-items-baseline py-1">
-                            <label class="mr-3 my-0 d-inline-flex align-items-center c-pointer">
-                                <input type="radio" name="newOrFuOrNa" value="NEW" required>
-                                <span class="ml-1 text-dark">New</span>
-                            </label>
-                            <label class="my-0 d-inline-flex align-items-center c-pointer">
-                                <input type="radio" name="newOrFuOrNa" value="FU" required>
-                                <span class="ml-1 text-dark">Follow-Up</span>
-                            </label>
+                        @if($pro->pro_type === 'ADMIN')
+                            <div class="form-group mb-2 pt-2 d-flex">
+                                <label class="my-0 mr-3 d-flex align-items-center">
+                                    <input type="radio" class="mr-1" name="isNonMedical" value="0" required {{$pro->is_hcp ? 'checked' : ''}}>
+                                    <span class="text-nowrap">Regular Note</span>
+                                </label>
+                                <label class="my-0 mr-3 d-flex align-items-center">
+                                    <input type="radio" class="mr-1" name="isNonMedical" value="1" required {{$pro->is_hcp ? '' : 'checked'}}>
+                                    <span class="text-nowrap">Admin Note</span>
+                                </label>
+                            </div>
+                        @endif
+
+                        <div class="form-group mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
+                            <select name="hcpProUid" class="form-control" provider-search required <?= $pro->pro_type !== 'ADMIN' ? 'provider-type="hcp"':'' ?> data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
+                            </select>
                         </div>
-                    </div>
-                    <div class="mb-2">
-                        <label for="" class="text-secondary text-sm mb-1">Method *</label>
-                        <select name="noteContactMethod" class="form-control form-control-sm note-method-select" required>
-                            <option value="">-- select --</option>
-                            <option value="AUDIO">Audio</option>
-                            <option value="VIDEO">Video</option>
-                            <option value="IN_CLINIC">In-Clinic</option>
-                            <option value="HOUSE_CALL">House Call</option>
-                        </select>
-                    </div>
-                    <div class="form-group if-in-clinic">
-                        <label for="" class="text-secondary text-sm mb-1">Location</label>
-                        <select name="hcpCompanyLocationUid" class="form-control">
-                            <option value=""></option>
-                            @foreach($pro->companyLocations() as $location)
-                                <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
-                            @endforeach
-                        </select>
-                    </div>
-                    <div class="form-group m-0">
-                        <button submit class="btn btn-primary btn-sm">submit</button>
-                    </div>
-                </form>
-            </div>
+
+                        <div class="form-group mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">Note Template *</label>
+                            <select name="visitTemplateUid" class="form-control form-control-sm"
+                                    onchange="$('#note-create-title').val($(this).find('option:selected').text())"
+                                    required>
+                                <option value=""> --select--</option>
+                                @foreach($proVisitTemplates as $visitTemplate)
+                                    <option value="{{$visitTemplate->uid}}" {{count($proVisitTemplates) === 1 ? 'selected' : ''}}>{{$visitTemplate->title}}</option>
+                                @endforeach
+                            </select>
+                        </div>
+                        <div class="mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">New/Follow-up</label>
+                            <div class="d-flex align-items-baseline py-1">
+                                <label class="mr-3 my-0 d-inline-flex align-items-center c-pointer">
+                                    <input type="radio" name="newOrFuOrNa" value="NEW" required>
+                                    <span class="ml-1 text-dark">New</span>
+                                </label>
+                                <label class="my-0 d-inline-flex align-items-center c-pointer">
+                                    <input type="radio" name="newOrFuOrNa" value="FU" required>
+                                    <span class="ml-1 text-dark">Follow-Up</span>
+                                </label>
+                            </div>
+                        </div>
+                        <div class="mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">Method *</label>
+                            <select name="noteContactMethod" class="form-control form-control-sm note-method-select" required>
+                                <option value="">-- select --</option>
+                                <option value="AUDIO">Audio</option>
+                                <option value="VIDEO">Video</option>
+                                <option value="IN_CLINIC">In-Clinic</option>
+                                <option value="HOUSE_CALL">House Call</option>
+                            </select>
+                        </div>
+                        <div class="form-group if-in-clinic">
+                            <label for="" class="text-secondary text-sm mb-1">Location</label>
+                            <select name="hcpCompanyLocationUid" class="form-control">
+                                <option value=""></option>
+                                @foreach($pro->companyLocations() as $location)
+                                    <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
+                                @endforeach
+                            </select>
+                        </div>
+                        <div class="form-group m-0">
+                            <button submit class="btn btn-primary btn-sm">submit</button>
+                        </div>
+
+                        @endif
+
+                    </form>
+                </div>
             @else
                 <span class="ml-3 text-danger">
                     <i class="fa fa-exclamation-triangle"></i>
@@ -435,6 +501,12 @@
                     }
                 });
 
+                @if(request('apptUid'))
+                let nvMoe = $('#new-visit-moe');
+                nvMoe.find('[name="forAppointmentUid"]').val('{{request('apptUid')}}');
+                nvMoe.find('>a').first().click();
+                @endif
+
             }
             addMCInitializer('notes-list', initNotesList, '#notes-list-{{$patient->id}}');
         })();

+ 5 - 1
resources/views/app/patient/partials/coverage-information.blade.php

@@ -40,7 +40,11 @@
             @else
 
             @endif
-            <h1 class="mr-2 mb-0">Is Covered: {{$cpc->is_covered}}</h1>
+            <h1 class="mr-3 mb-0">Basic: {{$cpc->is_covered}}</h1>
+            @if($patient->rmCompany)
+                <h1 class="mr-3 mb-0">RPM: {{$cpc->manual_rpm_determination_category}}</h1>
+                <h1 class="mr-3 mb-0">TV: {{$cpc->manual_televisit_determination_category}}</h1>
+            @endif
             @if(!$cpc->is_manually_determined)
                 @if($cpc->plan_type == 'MEDICARE')
                     @include('app.patient.primary-coverage-refresh', ['endpoint'=>'refreshCoverageForMedicare'])

+ 50 - 2
resources/views/app/patient/primary-coverage-form.blade.php

@@ -27,13 +27,61 @@
 						<input name="commercialPayerUidSuggest" class="form-control input-sm" value="" stag-suggest stag-suggest-ep="/search-payer/json" />
 						<input type="hidden" name="commercialPayerUid" />
 					</div>
+					<div class="col-md-12">
+						<p class="mb-2 font-weight-bold">If payer not found above, please key in carrier name (and memo if any):</p>
+					</div>
+					<div class="form-group col-md-6">
+						<label class="control-label">Carrier Name</label>
+						<input type="text" name="carrierFreeText" class="form-control input-sm">
+					</div>
+					<div class="form-group col-md-6">
+						<label class="control-label">Carrier Memo</label>
+						<input type="text" name="carrierFreeTextMemo" class="form-control input-sm">
+					</div>
+					<div class="col-12">
+						<hr class="mt-0 mb-2">
+					</div>
 					<div class="form-group col-md-6">
 						<label class="control-label">Patient Member Identifier</label>
-						<input type="text" name="commercialMemberIdentifier"  class="form-control input-sm">
+						<input type="text" name="commercialMemberIdentifier" class="form-control input-sm">
 					</div>
 					<div class="form-group col-md-6">
 						<label class="control-label">Patient Group Number</label>
-						<input type="text" name="commercialGroupNumber"  class="form-control input-sm">
+						<input type="text" name="commercialGroupNumber" class="form-control input-sm">
+					</div>
+					<div class="form-group col-md-6">
+						<label class="control-label">Phone Number For Hcps</label>
+						<input type="text" name="primaryInsurancePhoneNumberForHcps" class="form-control input-sm">
+					</div>
+				</div>
+
+				<div class="row" v-if="insuranceCardType">
+					<div class="col-12">
+						<hr class="mt-0 mb-2">
+					</div>
+					<div class="form-group col-md-6">
+						<p class="mb-1 font-weight-bold">RPM covered (if medically needed)?</p>
+						<div class="form-check form-check-inline">
+							<label class="form-check-label"><input class="form-check-input" type="radio" name="isRpmCoveredIfMedicallyNeeded" value="YES">Yes</label>
+						</div>
+						<div class="form-check form-check-inline">
+							<label class="form-check-label"><input class="form-check-input" type="radio" name="isRpmCoveredIfMedicallyNeeded" value="NO">No</label>
+						</div>
+						<div class="form-check form-check-inline">
+							<label class="form-check-label"><input class="form-check-input" type="radio" name="isRpmCoveredIfMedicallyNeeded" value="UNKNOWN">Unknown</label>
+						</div>
+					</div>
+					<div class="form-group col-md-6">
+						<p class="mb-1 font-weight-bold">Televisits covered (if medically needed)?</p>
+						<div class="form-check form-check-inline">
+							<label class="form-check-label"><input class="form-check-input" type="radio" name="isTelevisitCoveredIfMedicallyNeeded" value="YES">Yes</label>
+						</div>
+						<div class="form-check form-check-inline">
+							<label class="form-check-label"><input class="form-check-input" type="radio" name="isTelevisitCoveredIfMedicallyNeeded" value="NO">No</label>
+						</div>
+						<div class="form-check form-check-inline">
+							<label class="form-check-label"><input class="form-check-input" type="radio" name="isTelevisitCoveredIfMedicallyNeeded" value="UNKNOWN">Unknown</label>
+						</div>
 					</div>
 				</div>
 

+ 28 - 0
resources/views/app/patient/primary-coverage-manual-determination-commercial-modal.blade.php

@@ -75,6 +75,34 @@
 								</select>
 							</td>
 						</tr>
+						@if($patient->rmCompany)
+						<tr>
+							<td>RPM covered (if medically needed)?</td>
+							<td>UNKNOWN</td>
+							<td>
+								<select name="manualRpmDeterminationCategory" class="form-control input-sm" @change="onInputChange" required>
+									<option value="">--select--</option>
+									<option value="COVERED">Covered</option>
+									<option value="NOT_COVERED">Not Covered</option>
+									<option value="INVALID">Invalid</option>
+									<option value="UNKNOWN">Unknown</option>
+								</select>
+							</td>
+						</tr>
+						<tr>
+							<td>Televisits covered (if medically needed)?</td>
+							<td>UNKNOWN</td>
+							<td>
+								<select name="manualTelevisitDeterminationCategory" class="form-control input-sm" @change="onInputChange" required>
+									<option value="">--select--</option>
+									<option value="COVERED">Covered</option>
+									<option value="NOT_COVERED">Not Covered</option>
+									<option value="INVALID">Invalid</option>
+									<option value="UNKNOWN">Unknown</option>
+								</select>
+							</td>
+						</tr>
+						@endif
 					</tbody>
 				</table>
 

+ 9 - 1
resources/views/app/patient/primary-coverage-view.blade.php

@@ -44,7 +44,15 @@
 							</tr>
 							<tr v-if="cpc.plan_type == 'COMMERCIAL'">
 								<td>Commercial Payer</td>
-								<td>{{$cpc->commercial_payer_id ? $cpc->payer->name : '-'}}</td>
+								<td>{{$cpc->commercial_payer_id ? $cpc->payer->name : ($cpc->carrier_free_text ?: '-')}}</td>
+							</tr>
+							<tr v-if="cpc.plan_type == 'COMMERCIAL'">
+								<td>Carrier Free Text</td>
+								<td>{{$cpc->carrier_free_text}}</td>
+							</tr>
+							<tr v-if="cpc.plan_type == 'COMMERCIAL'">
+								<td>Carrier Free Text Memo</td>
+								<td>{{$cpc->carrier_free_text_memo}}</td>
 							</tr>
 							<tr v-if="cpc.plan_type == 'COMMERCIAL'">
 								<td>Patient Member Identifier</td>

+ 41 - 0
resources/views/app/patient/settings.blade.php

@@ -919,6 +919,47 @@
             </div>
             <div class="col-6 border-left">
 
+                <div class="d-flex">
+                    <label class="mr-2">RM Company:</label>
+                    <b>{{$patient->rmCompany ? $patient->rmCompany->name : '(not set)'}}</b>
+                    @if(!$patient->rmCompany)
+                        <div moe class="ml-2">
+                            <a start show><i class="fa fa-edit"></i></a>
+                            <form url="/api/client/putRmCompany" class="mcp-theme-1">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="text-secondary text-sm">RM Company</label>
+                                    <select name="rmCompanyUid" class="form-control form-control-sm">
+                                        <option value=""> --select--</option>
+                                        <?php $allCompanies = \App\Models\Company::orderBy('name')->get(); ?>
+                                        @foreach($allCompanies as $rmCompany)
+                                            <option value="{{$rmCompany->uid}}">{{$rmCompany->name}}</option>
+                                        @endforeach
+                                    </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>
+                    @else
+                        <div moe class="ml-2">
+                            <a start show><i class="text-danger fa fa-ban"></i></a>
+                            <form url="/api/client/wipeRmCompany" class="mcp-theme-1">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <p>Wipe RM Company?</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>
+
+                <hr class="m-negator-3 my-3">
+
                 <span>
                     <span class="mr-1">MCP Onboarding Active?</span>
                     @if($patient->has_mcp_done_onboarding_visit === 'YES')

+ 18 - 0
resources/views/app/patient/shipments.blade.php

@@ -363,6 +363,24 @@
                     </div>
 --}}
 
+                    <div class="mb-2 d-flex align-items-baseline">
+                        <label class="text-secondary text-sm mb-0 width-90px mr-2">FedEx Status</label>
+                        <div moe bottom relative class="d-block">
+                            <a start show>{{$shipment->fedex_shipment_status ?: '(not set)'}}</a>
+                            <form url="/api/shipment/updateFedexStatus">
+                                <input type="hidden" name="uid" value="{{ $shipment->uid }}">
+                                <div class="mb-2">
+                                    <label class="text-secondary mb-1 text-sm">Status *</label>
+                                    <input type="text" class="form-control form-control-sm" name="fedexStatus" value="{{$shipment->fedex_shipment_status}}" required>
+                                </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 class="mb-2 d-flex align-items-baseline">
                         <label class="text-secondary text-sm mb-0 width-90px mr-2">Status</label>
                         <div moe bottom relative class="d-block">

+ 10 - 3
resources/views/app/patient/supply-orders.blade.php

@@ -9,8 +9,15 @@
                     <a start show href="#">Add</a>
                     <form url="/api/supplyOrder/createAndSignAsPro" redir="/patients/view/{{ $patient->uid }}/supply-orders/[data]?{{request()->input('popupmode') ? 'popupmode=1' : ''}}&note-uid={{request()->input('note-uid')}}">
 
-                        @if(!$patient->has_cm_setup_been_performed)
-                            <p class="font-weight-bold alert alert-warning border-warning mb-2">You need to complete the patient's comprehensive care plan before ordering cellular devices.</p>
+                        <?php
+                        $showWarnings = true;
+                        if($patient->mcp && $patient->mcp->rmCompany) $showWarnings = false;
+                        ?>
+
+                        @if($showWarnings)
+                            @if(!$patient->has_cm_setup_been_performed)
+                                <p class="font-weight-bold alert alert-warning border-warning mb-2">You need to complete the patient's comprehensive care plan before ordering cellular devices.</p>
+                            @endif
                         @endif
 
                         @if(!$patient->is_bp_and_pulse_updated)
@@ -35,7 +42,7 @@
                                 @foreach($products as $product)
                                     @if(!$product->has_imei_number)
                                         <option value="{{$product->uid}}">{{$product->title}}</option>
-                                    @elseif($patient->has_cm_setup_been_performed)
+                                    @elseif($patient->has_cm_setup_been_performed || ($patient->mcp && $patient->mcp->rmCompany))
                                         @if($product->bdt_device_category === 'BP' && $patient->is_bp_and_pulse_updated)
                                             <option value="{{$product->uid}}">{{$product->title}}</option>
                                         @endif