Преглед на файлове

Merge branch 'master' into dev-vj

Vijayakrishnan преди 3 години
родител
ревизия
87f958a872

+ 12 - 0
app/Http/Controllers/AdminController.php

@@ -149,5 +149,17 @@ class AdminController extends Controller
         return view('app.mcp.supply_orders', compact('supplyOrders'));
     }
 
+    public function getCreateNewPatientScriptTemplate(Request $request){
+        $template = $request->get('template');
+        if(!$template) return $this->fail('No script template');
+
+        $path = resource_path() . '/views/app/patient/create-patient/scripts/' . $template . '.blade.php';
+        
+        if(!File::exists($path)) return $this->fail('Invalid script template');
+
+        $templateContent = file_get_contents($path);
+        return $this->pass($templateContent);
+    }
+
 
 }

+ 3 - 3
app/Http/Controllers/PracticeManagementController.php

@@ -99,7 +99,7 @@ class PracticeManagementController extends Controller
                     return $noteQuery->has('claims', '=', 0);
                 })->whereHas('client', function($clientQuery){
                     return $clientQuery->where('client_engagement_status_category','<>' ,'DUMMY');
-                })->paginate(50);
+                })->orderBy('note_date', 'desc')->paginate(50);
             }else{
                 $rows =  BillingReport::whereHas('note', function($noteQuery) use ($claimStatus){
                     return $noteQuery->whereHas('claims', function($claimQuery) use ($claimStatus) {
@@ -107,12 +107,12 @@ class PracticeManagementController extends Controller
                     });
                 })->whereHas('client', function($clientQuery){
                     return $clientQuery->where('client_engagement_status_category','<>' ,'DUMMY');
-                })->paginate(50);
+                })->orderBy('note_date', 'desc')->paginate(50);
             }
         }else {
             $rows =  BillingReport::whereHas('client', function($clientQuery){
                 return $clientQuery->where('client_engagement_status_category','<>' ,'DUMMY');
-            })->paginate(50);    
+            })->orderBy('note_date', 'desc')->paginate(50);    
         }
 
         $claimStatuses = DB::select('SELECT distinct status FROM claim ORDER BY status DESC');

+ 9 - 0
resources/views/app/admin/patients-table.blade.php

@@ -130,6 +130,7 @@
 											<th class="border-0 text-secondary">NA</th>
 											<th class="border-0 text-secondary">HCP Signed</th>
 											<th class="border-0 text-secondary">ICDs</th>
+											<th class="border-0 text-secondary">Bills</th>
 										</tr>
 										</thead>
 										<tbody>
@@ -175,6 +176,14 @@
 														-
 													@endif
 												</td>
+												<td>
+													@if(!count($note->bills))
+														<div class="alert alert-warning">No bills.</div>	
+													@endif
+													@foreach($note->bills as $bill)
+													<div>{{ $bill->code}} | {{ $bill->number_of_units }} | {{ $bill->hcp_expected_payment_amount }}</div>
+													@endforeach
+												</td>
 											</tr>
 										@endforeach
 										</tbody>

+ 10 - 283
resources/views/app/new-patient.blade.php

@@ -28,297 +28,24 @@ $medicaidStates = Config::get('constants.medicaid_states');
 					<div class="alert alert-danger">{{ session('message') }}</div>
 					@endif
 					<div class="row">
-						<div class="border-lighter col-md-6">
-							<div class="row">
-								<div class="col-md-12 bg-light p-3 mb-2">
-									<h5 class="m-0 font-weight-bold">Patient Name / Demographics:</h5>
-								</div>
-								<div class="col-md-12 form-group mt-2">
-									<div class="d-flex align-items-center">
-										<label class="m-0 w-25">Name:</label>
-										<input autocomplete="_blank" type="text" name="patientNamePrefix" placeholder="Prefix" class="ml-2 form-control input-sm w-50">
-										<input autocomplete="_blank" type="text" required name="patientNameFirst" placeholder="First" class="ml-2 form-control input-sm">
-										<input autocomplete="_blank" type="text" name="patientNameMiddle" placeholder="Middle" class="ml-2 form-control input-sm">
-										<input autocomplete="_blank" type="text" name="patientNameLast" placeholder="Last" class="ml-2 form-control input-sm">
-										<input autocomplete="_blank" type="text" name="patientNameSuffix" placeholder="Suffix" class="ml-2 form-control input-sm w-50">
-									</div>
-								</div>
-								<div class="col-md-12 p-0">
-									<div class="col-md-6 form-group">
-										<div class="d-flex align-items-center">
-											<label class="m-0">Email:</label>
-											<input class='form-control ml-2' type='email' placeholder="Email Address" name='emailAddress'>
-										</div>
-									</div>
-								</div>
-								<div class="col-md-12 p-0">
-									<div class="col-md-4 form-group">
-										<div class="d-flex align-items-center">
-											<label class="m-0 w-25">Gender:</label>
-											<select class="form-control input-sm ml-2" name="patientSex" select2>
-												<option value="">--</option>
-												<option value="M">Male</option>
-												<option value="F">Female</option>
-												<option value="UNKNOWN">Unknown</option>
-											</select>
-										</div>
-									</div>
-								</div>
-							</div>
-							<div class="row">
-								<div class="col-md-5 form-group">
-									<div class="d-flex align-items-center">
-										<label class="m-0 w-25">DOB: <span class="text-danger">*</span></label>
-										<input type="date" required name="patientDob" value="" class="form-control input-sm">
-									</div>
-								</div>
-								<div class="col-md-5 form-group">
-									<div class="d-flex align-items-center">
-										<label class="m-0 w-25">Service:</label>
-										<input type="date" name="dateOfService" value="{{date('Y-m-d')}}" class="form-control input-sm">
-									</div>
-								</div>
+						<div class="border-lighter col-md-6 px-0">
+							<div class="px-3">
+								@include('app.patient.create-patient.demographics-form')
 							</div>
 							@if($pro->pro_type === 'ADMIN')
-							<div class="row">
-								<div class="col-md-5 form-group">
-									<div class="d-flex align-items-center">
-										<label class="m-0 w-25">HCP Pro:</label>
-										<select name="hcpProUid" class="form-control input-sm" provider-search provider-type="hcp">
-											<option value="">--select--</option>
-										</select>
-									</div>
-								</div>
-								<div class="col-md-7 form-group">
-									<div class="d-flex align-items-center">
-										<label class='m-0 w-25'>Coordinator:</label>
-										<select name="assistantProUid" class="form-control input-sm ml-2" provider-search provider-type="default-na">
-											<option value="">--select--</option>
-										</select>
-									</div>
-								</div>
-							</div>
-							@elseif($pro->is_hcp === true)
-							<div class="row">
-								<div class="col-md-12">
-									<div class='form-group'>
-										<div class="d-flex align-items-center">
-											<label class="m-0 w-25">HCP Pro:</label>
-											<input type="text" class="form-control" readonly value="{{$pro->displayName()}}">
-											<input type="hidden" name="hcpProUid" value="{{$pro->uid}}">
-										</div>
-									</div>
-								</div>
-							</div>
-							@elseif($pro->isDefaultNA())
-							<div class="row">
-								<div class="col-md-5 form-group">
-									<div class="d-flex align-items-center">
-										<label class="m-0 w-25">HCP Pro:</label>
-										<?php $teams = $pro->teamsWhereAssistant; ?>
-										<select name="hcpProUid" class="form-control">
-											@if(count($teams) > 1)
-											<option value="">--select--</option>
-											@endif
-											@foreach($teams as $team)
-											<option value="{{$team->mcp->uid}}">{{$team->mcp->displayName()}}</option>
-											@endforeach
-										</select>
-									</div>
-								</div>
-								<div class="col-md-7 form-group">
-									<div class="d-flex align-items-center">
-										<label class='m-0 w-25'>Coordinator:</label>
-										<input type="text" class="form-control" readonly value="{{$pro->displayName()}}">
-										<input type="hidden" name="assistantProUid" value="{{$pro->uid}}">
-									</div>
-								</div>
+							<div>
+								@include('app.patient.create-patient.insurance-coverage-form')
 							</div>
 							@endif
-							<div class="row">
-								<div class="col-md-6 form-group">
-									<div class="d-flex align-items-center">
-										<label class='control-label m-0 d-flex align-items-center'>
-											<span>Phone:</span>
-											<a v-if="form.homeNumber" @click="hpnToCpn" class="ml-1 px-1 on-hover-opaque hpn-to-cpn c-pointer">
-												<i class="fa fa-arrow-right"></i>
-											</a>
-											<a v-if="form.cellNumber && form.homeNumber" @click="swapHpnCpn" class="ml-1 px-1 on-hover-opaque swap-pns c-pointer">
-												<i class="fa fa-retweet"></i>
-											</a>
-										</label>
-										<input class='form-control ml-2' placeholder="Home Phone" autocomplete="_blank" stag-input-phone type='tel' name='homeNumber' v-model="form.homeNumber">
-										</select>
-									</div>
-								</div>
-								<div class="col-md-6 form-group">
-									<div class="d-flex align-items-center">
-										<label class='control-label m-0 d-flex align-items-center'>
-											<span>Phone:</span>
-											<a v-if="form.cellNumber" @click="cpnToHpn" class="ml-1 px-1 on-hover-opaque cpn-to-hpn c-pointer">
-												<i class="fa fa-arrow-left"></i>
-											</a>
-										</label>
-										<input class='form-control ml-2' placeholder="Cell Phone" autocomplete="_blank" stag-input-phone type='tel' name='cellNumber' v-model="form.cellNumber">
-										</select>
-									</div>
-								</div>
-							</div>
-
-
-							<div class='form-group mb-3'>
-								<label class='control-label'>How did you hear about us?</label>
-								<input class='form-control' type='text' name='initiative' />
-							</div>
-
-							<div class='form-group mb-3 checkbox'>
-								<label>
-									<input type='checkbox' name='isTestRecord' />
-									This is a test record
-								</label>
-							</div>
 
 						</div>
 						<div class="col-md-6">
 							<div class="border-lighter">
-								<div class="col-md-12 bg-light py-3 px-3 mb-2 ">
-									<h5 class="m-0 font-weight-bold">Insurance Coverage:</h5>
-								</div>
-								<div class="px-3">
-									<div class="row">
-										<div class="form-group col-md-12">
-											<p class="mb-1 font-weight-bold">Type of insurance card:</p>
-											<div class="form-check form-check-inline">
-												<label class="form-check-label"><input class="form-check-input" type="radio" v-model="planType" name="planType" value="MEDICARE">Medicare Part B (Primary)</label>
-											</div>
-											<div class="form-check form-check-inline">
-												<label class="form-check-label"><input class="form-check-input" type="radio" v-model="planType" name="planType" value="MEDICAID">Medicaid (Primary)</label>
-											</div>
-											<div class="form-check form-check-inline">
-												<label class="form-check-label"><input class="form-check-input" type="radio" v-model="planType" name="planType" value="COMMERCIAL">Commercial / Third Party (Primary)</label>
-											</div>
-										</div>
-									</div>
-									<div class="px-2">
-										<div class="row" v-show="planType == 'COMMERCIAL'">
-											<div class="form-group col-md-12">
-												<label for="" class="control-label">Commercial Payer</label>
-												<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="form-group col-md-6">
-												<label class="control-label">Patient Member Identifier</label>
-												<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">
-											</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">
-													<label class="form-check-label"><input class="form-check-input" type="checkbox" name="isPatientSubscriber" v-model="isPatientSubscriber">Is Patient The Subscriber?</label>
-												</div>
-											</div>
-										</div>
-
-										<div v-if="!isPatientSubscriber && (planType == 'MEDICAID' || planType == 'COMMERCIAL')" class="row">
-											<div class="col-md-12 bg-light p-3 mb-2">
-												<h5 class="m-0 font-weight-bold">Subscriber Details:</h5>
-											</div>
-											<div class="form-group col-md-4">
-												<label class="control-label">Subscriber First Name</label>
-												<input type="text" name="subscriberNameFirst" value="" class="form-control input-sm">
-											</div>
-											<div class="form-group col-md-4">
-												<label class="control-label">Subscriber Middle Name / MI</label>
-												<input type="text" name="subscriberNameMiddle" value="" class="form-control input-sm">
-											</div>
-											<div class="form-group col-md-4">
-												<label class="control-label">Subscriber Last Name</label>
-												<input type="text" name="subscriberNameLast" value="" class="form-control input-sm">
-											</div>
-											<div class="form-group col-md-4">
-												<label class="control-label">Subscriber Suffix</label>
-												<input type="text" name="subscriberNameSuffix" value="" class="form-control input-sm">
-											</div>
-											<div class="form-group col-md-4">
-												<label class="control-label">Subscriber Sex</label>
-												<select class="form-control input-sm" name="subscriberSex">
-													<option value="">--</option>
-													<option value="M">Male</option>
-													<option value="F">Female</option>
-													<option value="UNKNOWN">Unknown</option>
-												</select>
-											</div>
-											<div class="form-group col-md-4">
-												<label class="control-label">Subscriber Dob</label>
-												<input type="date" name="subscriberDob" value="" class="form-control input-sm">
-											</div>
-											<div class="form-group col-md-12">
-												<label class="control-label">What is the patient's relationship to the subscriber?</label>
-												<select name="patientRelationshipToSubscriber" class="form-control input-sm">
-													<option value="">--</option>
-													<option value="SPOUSE">Spouse</option>
-													<option value="CHILD">Child</option>
-													<option value="EMPLOYEE">Employee</option>
-													<option value="ORGAN_DONOR">Organ Donor</option>
-													<option value="CADAVER_DONOR">Cadaver Donor</option>
-													<option value="LIFE_PARTNER">Life Partner</option>
-													<option value="OTHER_RELATIONSHIP">Other Relationship</option>
-													<option value="UNKNOWN">Unknown</option>
-												</select>
-											</div>
-										</div>
-										<div class="mb-1" v-if="planType == 'COMMERCIAL'">
-											<h6 class="font-weight-bold">Does the patient also have either a Medicare or Medicaid #? (optional)</h6>
-										</div>
-										<div class="row" v-if="planType == 'MEDICAID' || planType == 'COMMERCIAL'" :class="planType == 'COMMERCIAL' ? 'mx-0' : ''">
-											<div class="col-md-12">
-												<div class="bg-light p-2 mb-2">
-													<h5 class="m-0 font-weight-bold">Medicaid Information:</h5>
-												</div>
-											</div>
-											<div class="col-12">
-												<div class="row">
-
-												
-												<div class="form-group col-md-6">
-													<label for="" class="control-label">Medicaid State</label>
-													<input class="form-control input-sm" list="mcdPayerOptions" name="mcdPayerName" id="mcdPayerName">
-													<datalist id="mcdPayerOptions">
-														<option value="">--</option>
-														@foreach($medicaidStates as $state)
-														<option>{{ $state }}</option>
-														@endforeach
-													</datalist>
-												</div>
-
-												<div class="form-group col-md-6">
-													<label class="control-label">Medicaid Number</label>
-													<input type="text" name="mcdNumber" class="form-control input-sm" oninput="this.value = this.value.toUpperCase()">
-												</div>
-												</div>
-											</div>
-										</div>
-
-										<div class="row" v-if="planType == 'MEDICARE' || planType == 'COMMERCIAL'" :class="planType == 'COMMERCIAL' ? 'mx-0' : ''">
-											<div class="col-md-12">
-												<div class="bg-light p-2 mb-2">
-													<h5 class="m-0 font-weight-bold">Medicare Information:</h5>
-												</div>
-											</div>
-											<div class="col-12">
-												<div class="form-group col-md-6">
-													<label class="control-label">Medicare Number</label>
-													<input type="text" name="mcrNumber" class="form-control input-sm" oninput="this.value = this.value.toUpperCase()">
-												</div>
-											</div>
-
-										</div>
-									</div>
-								</div>
+							@if($pro->pro_type === 'ADMIN')
+								@include('app.patient.create-patient.create-patient-script-templates')
+							@else
+								@include('app.patient.create-patient.insurance-coverage-form')
+							@endif
 							</div>
 						</div>
 					</div>

+ 55 - 0
resources/views/app/patient/create-patient/create-patient-script-templates.blade.php

@@ -0,0 +1,55 @@
+<div id="createPatientTemplateScript">
+	<div class="col-md-12 bg-light py-3 px-3 mb-2">
+		<h5 class="m-0 font-weight-bold">New Patient Script:</h5>
+	</div>
+	<div class="px-3">
+		<div class="row">
+			<div class="col-md-12">
+				<div class="form-group">
+					<select class="form-control" name="script_type">
+						<option value="">-- Select Script --</option>
+						<option value="dialmd-covid-kit">DialMD COVID Kit</option>
+					</select>
+				</div>
+			</div>
+			<div class="col-md-12">
+				<div id="scriptTemplateContent" class="pb-3"></div>
+			</div>
+		</div>
+	</div>
+</div>
+
+<script>
+	(function() {
+		function init() {
+			(function($) {
+				var createPatientTemplateScript = {
+					initScriptTemplateChange: function(){
+						var templateContainer = $('#scriptTemplateContent');
+						$('select[name=script_type]').change(function(evt){
+							var input = evt.target;
+							var value = input.value;
+							templateContainer.html('<i class="fas fa-circle-notch fa-spin text-primary"></i> Loading template...');
+							$.get('{{ route("admin.getCreateNewPatientScriptTemplate") }}', {template:value}, function(response){
+								if(response.success){
+									var templateHtml = response.data;
+									templateContainer.html(templateHtml);
+								}else{
+									toastr.error(response.message);
+									templateContainer.html('');
+								}
+							}, 'json');
+						});
+					},
+					init: function() {
+						this.initScriptTemplateChange();
+					}
+				};
+				createPatientTemplateScript.init();
+			})(jQuery);
+
+
+		}
+		addMCInitializer('createPatientTemplateScript', init, '#createPatientTemplateScript');
+	})();
+</script>

+ 148 - 0
resources/views/app/patient/create-patient/demographics-form.blade.php

@@ -0,0 +1,148 @@
+<div class="row">
+	<div class="col-md-12 bg-light p-3 mb-2">
+		<h5 class="m-0 font-weight-bold">Patient Name / Demographics:</h5>
+	</div>
+	<div class="col-md-12 form-group mt-2">
+		<div class="d-md-flex align-items-center">
+			<label class="font-weight-bold m-0 w-25">Name:</label>
+			<input autocomplete="_blank" type="text" name="patientNamePrefix" placeholder="Prefix" class="ml-2 mb-md-0 mb-2 form-control input-sm w-md-50">
+			<input autocomplete="_blank" type="text" required name="patientNameFirst" placeholder="First*" required class="ml-2 mb-md-0 mb-2 form-control input-sm">
+			<input autocomplete="_blank" type="text" name="patientNameMiddle" placeholder="Middle" class="ml-2 mb-md-0 mb-2 form-control input-sm">
+			<input autocomplete="_blank" type="text" name="patientNameLast" placeholder="Last*" required class="ml-2 mb-md-0 mb-2 form-control input-sm">
+			<input autocomplete="_blank" type="text" name="patientNameSuffix" placeholder="Suffix" class="ml-2 mb-md-0 mb-2 form-control input-sm w-md-50">
+		</div>
+	</div>
+	<div class="col-md-12 p-0">
+		<div class="col-md-6 form-group">
+			<div class="d-flex align-items-center">
+				<label class="font-weight-bold m-0">Email:</label>
+				<input class='form-control ml-2' type='email' placeholder="Email Address" name='emailAddress'>
+			</div>
+		</div>
+	</div>
+	<div class="col-md-12 p-0">
+		<div class="col-md-4 form-group">
+			<div class="d-flex align-items-center">
+				<label class="font-weight-bold m-0 w-25">Gender:</label>
+				<select class="form-control input-sm ml-2" name="patientSex" select2>
+					<option value="">--</option>
+					<option value="M">Male</option>
+					<option value="F">Female</option>
+					<option value="UNKNOWN">Unknown</option>
+				</select>
+			</div>
+		</div>
+	</div>
+</div>
+<div class="row">
+	<div class="col-md-5 form-group">
+		<div class="d-flex align-items-center">
+			<label class="font-weight-bold m-0 w-25">DOB: <span class="text-danger">*</span></label>
+			<input type="date" required name="patientDob" value="" class="form-control input-sm">
+		</div>
+	</div>
+	<div class="col-md-5 form-group">
+		<div class="d-flex align-items-center">
+			<label class="font-weight-bold m-0 w-25">Service:</label>
+			<input type="date" name="dateOfService" value="{{date('Y-m-d')}}" class="form-control input-sm">
+		</div>
+	</div>
+</div>
+@if($pro->pro_type === 'ADMIN')
+<div class="row">
+	<div class="col-md-5 form-group">
+		<div class="d-flex align-items-center">
+			<label class="font-weight-bold m-0 w-25">HCP Pro:</label>
+			<select name="hcpProUid" class="form-control input-sm" provider-search provider-type="hcp">
+				<option value="">--select--</option>
+			</select>
+		</div>
+	</div>
+	<div class="col-md-7 form-group">
+		<div class="d-flex align-items-center">
+			<label class='font-weight-bold m-0 w-25'>Coordinator:</label>
+			<select name="assistantProUid" class="form-control input-sm ml-2" provider-search provider-type="default-na">
+				<option value="">--select--</option>
+			</select>
+		</div>
+	</div>
+</div>
+@elseif($pro->is_hcp === true)
+<div class="row">
+	<div class="col-md-12">
+		<div class='form-group'>
+			<div class="d-flex align-items-center">
+				<label class="font-weight-bold m-0 w-25">HCP Pro:</label>
+				<input type="text" class="form-control" readonly value="{{$pro->displayName()}}">
+				<input type="hidden" name="hcpProUid" value="{{$pro->uid}}">
+			</div>
+		</div>
+	</div>
+</div>
+@elseif($pro->isDefaultNA())
+<div class="row">
+	<div class="col-md-5 form-group">
+		<div class="d-flex align-items-center">
+			<label class="font-weight-bold m-0 w-25">HCP Pro:</label>
+			<?php $teams = $pro->teamsWhereAssistant; ?>
+			<select name="hcpProUid" class="form-control">
+				@if(count($teams) > 1)
+				<option value="">--select--</option>
+				@endif
+				@foreach($teams as $team)
+				<option value="{{$team->mcp->uid}}">{{$team->mcp->displayName()}}</option>
+				@endforeach
+			</select>
+		</div>
+	</div>
+	<div class="col-md-7 form-group">
+		<div class="d-flex align-items-center">
+			<label class='font-weight-bold m-0 w-25'>Coordinator:</label>
+			<input type="text" class="form-control" readonly value="{{$pro->displayName()}}">
+			<input type="hidden" name="assistantProUid" value="{{$pro->uid}}">
+		</div>
+	</div>
+</div>
+@endif
+<div class="row">
+	<div class="col-md-6 form-group">
+		<div class="d-flex align-items-center">
+			<label class='control-label m-0 d-flex align-items-center'>
+				<span class="font-weight-bold">Home Phone:</span>
+				<a v-if="form.homeNumber" @click="hpnToCpn" class="ml-1 px-1 on-hover-opaque hpn-to-cpn c-pointer">
+					<i class="fa fa-arrow-right"></i>
+				</a>
+				<a v-if="form.cellNumber && form.homeNumber" @click="swapHpnCpn" class="ml-1 px-1 on-hover-opaque swap-pns c-pointer">
+					<i class="fa fa-retweet"></i>
+				</a>
+			</label>
+			<input class='form-control ml-2' placeholder="Home Phone" autocomplete="_blank" stag-input-phone type='tel' name='homeNumber' v-model="form.homeNumber">
+			</select>
+		</div>
+	</div>
+	<div class="col-md-6 form-group">
+		<div class="d-flex align-items-center">
+			<label class='control-label m-0 d-flex align-items-center'>
+				<span class="font-weight-bold">Cell Phone:</span>
+				<a v-if="form.cellNumber" @click="cpnToHpn" class="ml-1 px-1 on-hover-opaque cpn-to-hpn c-pointer">
+					<i class="fa fa-arrow-left"></i>
+				</a>
+			</label>
+			<input class='form-control ml-2' placeholder="Cell Phone" autocomplete="_blank" stag-input-phone type='tel' name='cellNumber' v-model="form.cellNumber">
+			</select>
+		</div>
+	</div>
+</div>
+
+
+<div class='form-group mb-3'>
+	<label class='control-label font-weight-bold'>How did you hear about us?</label>
+	<input class='form-control' type='text' name='initiative' />
+</div>
+
+<div class='form-group mb-3 checkbox'>
+	<label>
+		<input type='checkbox' name='isTestRecord' />
+		This is a test record
+	</label>
+</div>

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

@@ -0,0 +1,138 @@
+<div class="col-md-12 bg-light py-3 px-3 mb-2 ">
+	<h5 class="m-0 font-weight-bold">Insurance Coverage:</h5>
+</div>
+<div class="px-3">
+	<div class="row">
+		<div class="form-group col-md-12">
+			<p class="mb-1 font-weight-bold">Type of insurance card:</p>
+			<div class="form-check form-check-inline">
+				<label class="form-check-label"><input class="form-check-input" type="radio" v-model="planType" name="planType" value="MEDICARE">Medicare Part B (Primary)</label>
+			</div>
+			<div class="form-check form-check-inline">
+				<label class="form-check-label"><input class="form-check-input" type="radio" v-model="planType" name="planType" value="MEDICAID">Medicaid (Primary)</label>
+			</div>
+			<div class="form-check form-check-inline">
+				<label class="form-check-label"><input class="form-check-input" type="radio" v-model="planType" name="planType" value="COMMERCIAL">Commercial / Third Party (Primary)</label>
+			</div>
+		</div>
+	</div>
+	<div class="px-2">
+		<div class="row" v-show="planType == 'COMMERCIAL'">
+			<div class="form-group col-md-12">
+				<label for="" class="control-label">Commercial Payer</label>
+				<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="form-group col-md-6">
+				<label class="control-label">Patient Member Identifier</label>
+				<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">
+			</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">
+					<label class="form-check-label"><input class="form-check-input" type="checkbox" name="isPatientSubscriber" v-model="isPatientSubscriber">Is Patient The Subscriber?</label>
+				</div>
+			</div>
+		</div>
+
+		<div v-if="!isPatientSubscriber && (planType == 'MEDICAID' || planType == 'COMMERCIAL')" class="row">
+			<div class="col-md-12 bg-light p-3 mb-2">
+				<h5 class="m-0 font-weight-bold">Subscriber Details:</h5>
+			</div>
+			<div class="form-group col-md-4">
+				<label class="control-label">Subscriber First Name</label>
+				<input type="text" name="subscriberNameFirst" value="" class="form-control input-sm">
+			</div>
+			<div class="form-group col-md-4">
+				<label class="control-label">Subscriber Middle Name / MI</label>
+				<input type="text" name="subscriberNameMiddle" value="" class="form-control input-sm">
+			</div>
+			<div class="form-group col-md-4">
+				<label class="control-label">Subscriber Last Name</label>
+				<input type="text" name="subscriberNameLast" value="" class="form-control input-sm">
+			</div>
+			<div class="form-group col-md-4">
+				<label class="control-label">Subscriber Suffix</label>
+				<input type="text" name="subscriberNameSuffix" value="" class="form-control input-sm">
+			</div>
+			<div class="form-group col-md-4">
+				<label class="control-label">Subscriber Sex</label>
+				<select class="form-control input-sm" name="subscriberSex">
+					<option value="">--</option>
+					<option value="M">Male</option>
+					<option value="F">Female</option>
+					<option value="UNKNOWN">Unknown</option>
+				</select>
+			</div>
+			<div class="form-group col-md-4">
+				<label class="control-label">Subscriber Dob</label>
+				<input type="date" name="subscriberDob" value="" class="form-control input-sm">
+			</div>
+			<div class="form-group col-md-12">
+				<label class="control-label">What is the patient's relationship to the subscriber?</label>
+				<select name="patientRelationshipToSubscriber" class="form-control input-sm">
+					<option value="">--</option>
+					<option value="SPOUSE">Spouse</option>
+					<option value="CHILD">Child</option>
+					<option value="EMPLOYEE">Employee</option>
+					<option value="ORGAN_DONOR">Organ Donor</option>
+					<option value="CADAVER_DONOR">Cadaver Donor</option>
+					<option value="LIFE_PARTNER">Life Partner</option>
+					<option value="OTHER_RELATIONSHIP">Other Relationship</option>
+					<option value="UNKNOWN">Unknown</option>
+				</select>
+			</div>
+		</div>
+		<div class="mb-1" v-if="planType == 'COMMERCIAL'">
+			<h6 class="font-weight-bold">Does the patient also have either a Medicare or Medicaid #? (optional)</h6>
+		</div>
+		<div class="row" v-if="planType == 'MEDICAID' || planType == 'COMMERCIAL'" :class="planType == 'COMMERCIAL' ? 'mx-0' : ''">
+			<div class="col-md-12">
+				<div class="bg-light p-2 mb-2">
+					<h5 class="m-0 font-weight-bold">Medicaid Information:</h5>
+				</div>
+			</div>
+			<div class="col-12">
+				<div class="row">
+
+
+					<div class="form-group col-md-6">
+						<label for="" class="control-label">Medicaid State</label>
+						<input class="form-control input-sm" list="mcdPayerOptions" name="mcdPayerName" id="mcdPayerName">
+						<datalist id="mcdPayerOptions">
+							<option value="">--</option>
+							@foreach($medicaidStates as $state)
+							<option>{{ $state }}</option>
+							@endforeach
+						</datalist>
+					</div>
+
+					<div class="form-group col-md-6">
+						<label class="control-label">Medicaid Number</label>
+						<input type="text" name="mcdNumber" class="form-control input-sm" oninput="this.value = this.value.toUpperCase()">
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<div class="row" v-if="planType == 'MEDICARE' || planType == 'COMMERCIAL'" :class="planType == 'COMMERCIAL' ? 'mx-0' : ''">
+			<div class="col-md-12">
+				<div class="bg-light p-2 mb-2">
+					<h5 class="m-0 font-weight-bold">Medicare Information:</h5>
+				</div>
+			</div>
+			<div class="col-12">
+				<div class="form-group col-md-6">
+					<label class="control-label">Medicare Number <span class="text-danger">*</span> </label>
+					<input type="text" name="mcrNumber" class="form-control input-sm" required oninput="this.value = this.value.toUpperCase()">
+				</div>
+			</div>
+
+		</div>
+	</div>
+</div>

+ 60 - 0
resources/views/app/patient/create-patient/scripts/dialmd-covid-kit.blade.php

@@ -0,0 +1,60 @@
+<div>
+	<p><b>Introduction:</b></p>
+	<p>Hello, thank you for calling DialMD, this is Jason. How may I help you?</p>
+
+	<p>Absolutely, we'll get you set up for that.</p>
+
+	<p>First I'm required to tell you a few things:</p>
+
+	<p>DialMD is a Maryland-based telemedicine practice.</p>
+
+	<p>We accept Medicare Part B. Do you have Medicare Part B?</p>
+
+	<p>We are under the same HIPAA and physician licensing laws as any brick and mortar doctor's office, but due to
+		COVID, telemedicine is now fully covered for beneficiaries.</p>
+
+	<p>Our doctors are available 24/7 by phone for any non-emergency medical advice, prescription, or lab order -
+		basically anything you might need a doctor for, but not something that you need in-person or emergency
+		treatment.</p>
+
+	<p>During this public health emergency, all co-pays for telemedicine services are being waived.</p>
+
+	<p>Therefore, if you have Medicare Part B, using DialMD is 100% free of charge for you, the patient. You will never
+		receive a bill.</p>
+
+	<p>If it is a medical emergency - please do not call DialMD, please call 911 or go to your nearest emergency room.
+		<b>Do you understand?</b>
+	</p>
+
+	<p>>> GRAB INFORMATION</p>
+	<p>How do I spell your first name? Last name? DOB? Medicare Number… it starts with a number followed by a letter and
+		has 11 alphanumeric characters.</p>
+
+	<p>>> IF PART B…</p>
+
+	<p>>> And if we send a FedEx package to that address: << READ THE ADDRESS >> will it reach you safely? Any special
+			instructions?</p>
+
+	<p>Last week, on January 4th, Governor Hogan declared a state of emergency here in Maryland. More individuals are
+		hospitalized in Maryland right now due to COVID-19 than at any previous point in the entire pandemic.</p>
+
+	<p>So we’ve urgently put this program together to educate the public on how to detect COVID-19 early using
+		self-monitoring devices. Because early detection truly saves lives and prevents hospitalization. These
+		FDA-Approved self-monitoring devices can detect small changes in blood oxygen concentration and temperature
+		which you sometimes may not even feel, and are therefore highly effective in the early detection of COVID-19.
+	</p>
+
+	<p>So what I am going to do now is transfer the call over to one of our medical professionals who will be able to
+		educate you on proper use of self-monitoring devices, and send you a kit out for overnight delivery.</p>
+
+	<p>Like any doctor’s office, I need to create a chart for you so we know who we’re talking to.</p>
+
+	<p>Before I transfer you over, if you could help me answer a few questions:</p>
+
+	<p>Are you currently experiencing any flu-like symptoms such as fever or chills, or a loss of sense of smell?</p>
+	<p>Preferred language?</p>
+	<p>Would you like an interpreter?</p>
+	<p>Family history of heart disease, or any other chronic medical condition?</p>
+	<p>Ethnicity?</p>
+	<p>Marital status?</p>
+</div>

+ 10 - 4
resources/views/app/patient/notes.blade.php

@@ -17,9 +17,11 @@
                           redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
                           class="mcp-theme-1">
                         <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                        <input type="hidden" name="effectiveDateEST" value="{{date("Y-m-d")}}">
-                        <input type="hidden" name="effectiveTime" value="{{date("h:i")}}">
                         <input type="hidden" name="title" id="note-create-title" value="">
+                        <div class="form-group mb-2">
+                            <label for="" class="text-secondary text-sm mb-1">Effective Date *</label>
+                            <input name="effectiveDateEST" class="form-control" value="{{date("Y-m-d")}}">
+                        </div>
                         <div class="form-group mb-2">
                             <label for="" class="text-secondary text-sm mb-1">Pro *</label>
                             <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">
@@ -72,10 +74,14 @@
                     @if($pro->isDefaultNA())
                     <input type="hidden" name="naProUid" value="{{$pro->uid}}">
                     @endif
-                    <input type="hidden" name="effectiveDate" value="{{date("Y-m-d")}}">
-                    <input type="hidden" name="effectiveTime" value="{{date("h:i")}}">
+                  
                     <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'}}">
+                    
+                    <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="{{date("Y-m-d")}}">
+                    </div>
                     <div class="form-group">
                         <label for="" class="text-secondary text-sm mb-1">HCP Pro *</label>
                         <select name="hcpProUid" class="form-control" provider-search required data-pro-uid="{{$pro->is_hcp ? $pro->uid : ''}}">

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

@@ -252,6 +252,23 @@
                             </form>
                         </div>
                     </div>
+                    <div class="mb-1">
+                        Date of Birth: <b>{{ $patient->dob ?? '' }}</b>
+                        <div moe>
+                            <a start show><i class="fa fa-edit"></i></a>
+                            <form url="/api/client/editDob" class="mcp-theme-1">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="mb-1 text-secondary text-sm">Date of Birth</label>
+                                    <input type="date" class="form-control form-control-sm" name="dob" value="{{ $patient->dob }}" required />
+                                </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>
                 <hr class="m-negator-3 my-3">
 

+ 1 - 1
resources/views/app/practice-management/billing-manager.blade.php

@@ -125,7 +125,7 @@
                             <td class="">
                                 {{ friendly_date_time($note->created_at, true) }}
                             </td>
-                            <td>{{$note->hcpPro->displayName()}}</td>
+                            <td>{{$note->hcpPro?$note->hcpPro->displayName():''}}</td>
                             <td>{{$note->is_signed_by_hcp?'Yes':'No'}}</td>
                             @if($performer->pro->pro_type == 'ADMIN')
                                 <td>

+ 58 - 0
resources/views/layouts/confirm-hours-of-availability-notification.blade.php

@@ -0,0 +1,58 @@
+<style>
+	.confirm-hrs-btn {
+		background: none;
+		border: 1px solid #856404;
+		padding: 3px 10px;
+		color: #856404;
+		font-weight: bold;
+		border-radius: 4px;
+		font-size: 13px;
+		cursor: pointer;
+	}
+	.confirm-hrs-btn:hover,
+	.confirm-hrs-btn:focus {
+		text-decoration: none;
+		color: #856404;
+	}
+</style>
+<div id="confirmHoursOfAvailability" class="alert alert-warning mb-0 py-1 px-3 rounded-0">
+	<div class="d-flex align-items-center justify-content-center" style="font-size: 14px;">
+		<span><i class="fas fa-exclamation-triangle"></i> Please confirm your <a href="{{ route('practice-management.proAvailability') }}" style="color: #856404;"><u>hours of availability</u></a>.</span>
+
+		<div id="confirmHoursOfAvailabilityMoe" moe class="ml-4">
+			<a class="confirm-hrs-btn" href="" show start>Confirm</a>
+			<form  url="/api/pro/confirmHoursOfAvailability" hook="onConfirmHoursOfAvailaility">
+				<input type="hidden" name="uid" value="{{ $pro->uid }}">
+				<label>Are you sure?</label>
+				<div class="">
+					<button class="btn btn-primary btn-sm" submit>Yes</button>
+					<button class="btn btn-default border btn-sm" cancel>Cancel</button>
+				</div>
+			</form>
+		</div>
+		<a id="undoConfirmHoursOfAvailability" class="d-none ml-4 confirm-hrs-btn">Undo</a>
+
+	</div>
+</div>
+
+<script>
+	(function() {
+		var hasUndoneConfirmation = false;
+		addMCHook('onConfirmHoursOfAvailaility', function(){
+			$('#confirmHoursOfAvailabilityMoe').remove();
+			var confirmSection = $('#confirmHoursOfAvailability');
+			var undoConfirmBtn = $('#undoConfirmHoursOfAvailability');
+
+			undoConfirmBtn.removeClass('d-none').click(function(){
+				hasUndoneConfirmation = true;
+				$.post('/api/pro/undoConfirmHoursOfAvailability', {uid:"{{ $pro->uid }}"}, function(response){
+					fastReload();
+				}, 'json');
+			});
+			setTimeout(function(){
+				if(hasUndoneConfirmation) return;
+				$('#confirmHoursOfAvailability').remove();
+			}, 5000);			
+		});
+	}).call(window);
+</script>

+ 22 - 1
resources/views/layouts/patient.blade.php

@@ -743,7 +743,28 @@ $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_creat
 											@include('app.patient.coverage-status')
 									</section>
 									@endif
-									<ul class="vbox mt-2 align-self-start patient-header-address ml-auto">
+
+									<section class="mr-4 align-self-start mt-2 ml-auto">
+										<label>Sticky Note:</label> {{$patient->sticky_note ?? '-' }}
+											<div moe right class="ml-2 hide-inside-popup">
+												<a start show><i class="fa fa-edit"></i></a>
+												<form url="/api/client/updateStickyNote" class="mcp-theme-1">
+													<input type="hidden" name="uid" value="{{$patient->uid}}">
+													<div class="mb-2">
+														<label class="text-secondary text-sm">Sticky Note</label>
+														<textarea name="stickyNote" class="form-control" rows="8" cols="80"></textarea>
+													</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>
+									</section>
+									<ul class="vbox mt-2 align-self-start patient-header-address ">
 										<li class="d-flex align-items-start">
 											<span class="aligned-icon">
 												<i class="fa fa-map-marker-alt" aria-hidden="true"></i>

+ 3 - 1
resources/views/layouts/template.blade.php

@@ -263,7 +263,9 @@
     </nav>
 
     <main role="main" class="stag-content px-0">
-
+        @if($pro->is_enrolled_as_mcp && $pro->is_considered_for_mcp_assignment && !$pro->are_hours_of_availability_confirmed)
+            @include('layouts.confirm-hours-of-availability-notification')
+        @endif
         @yield('content')
 
     </main><!-- /.container -->

+ 1 - 0
routes/web.php

@@ -199,6 +199,7 @@ Route::middleware('pro.auth')->group(function () {
         Route::get('erx-and-orders', 'AdminController@erx_and_orders')->name('erx_and_orders');
         Route::get('reports', 'AdminController@reports')->name('reports');
         Route::get('supply-orders', 'AdminController@supply_orders')->name('supply_orders');
+        Route::get('get-create-new-patient-script-template', 'AdminController@getCreateNewPatientScriptTemplate')->name('getCreateNewPatientScriptTemplate');
     });
 
     Route::name('practice-management.')->prefix('practice-management')->group(function () {