|
@@ -1,26 +1,37 @@
|
|
|
<?php
|
|
|
- $medicaidStates = Config::get('constants.medicaid_states');
|
|
|
- $cpc = $patient->getPrimaryCoverage();
|
|
|
+$medicaidStates = Config::get('constants.medicaid_states');
|
|
|
+$cpc = $patient->getPrimaryCoverage();
|
|
|
?>
|
|
|
- <div id="new-coverage-form-{{$patient->uid}}">
|
|
|
- <div class="p-3">
|
|
|
- <form :url="url" class="mcp-theme-1" @submit.prevent="submitForm" autocomplete="off">
|
|
|
- <input type="hidden" name="clientUid" value="{{$patient->uid}}" class="form-control input-sm" />
|
|
|
- <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="insuranceCardType" @change="updateUrl" name="insuranceCardType" 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="insuranceCardType" @change="updateUrl" name="insuranceCardType" 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="insuranceCardType" @change="updateUrl" name="insuranceCardType" value="commercial">Commercial / Third Party (Primary)</label>
|
|
|
- </div>
|
|
|
+<div id="new-coverage-form-{{ $patient->uid }}">
|
|
|
+ <div class="p-3">
|
|
|
+ <form :url="url" class="mcp-theme-1" @submit.prevent="submitForm" autocomplete="off">
|
|
|
+ <input type="hidden" name="clientUid" value="{{ $patient->uid }}" class="form-control input-sm" />
|
|
|
+ <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="insuranceCardType" @change="updateUrl" name="insuranceCardType" 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="insuranceCardType" @change="updateUrl" name="insuranceCardType" 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="insuranceCardType" @change="updateUrl" name="insuranceCardType" value="commercial">Commercial / Third Party (Primary)</label>
|
|
|
</div>
|
|
|
+ <div class="form-check form-check-inline">
|
|
|
+ <label class="form-check-label"><input class="form-check-input" type="radio" v-model="insuranceCardType" @change="updateUrl" name="insuranceCardType" value="selfPay">Self Pay</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-if="insuranceCardType === 'selfPay'">
|
|
|
+ <div class="alert alert-warning p-1 rounded-0">
|
|
|
+ Please create patient payment profile by clicking here:
|
|
|
+ <a href="{{ route('patients.view.customers', $patient) }}">Create/Manage customer payment methods</a>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
|
|
|
+ <div v-if="insuranceCardType !== 'selfPay'">
|
|
|
<div class="row" v-show="insuranceCardType == 'commercial'">
|
|
|
<div class="form-group col-md-12">
|
|
|
<label for="" class="control-label">Commercial Payer</label>
|
|
@@ -28,7 +39,8 @@
|
|
|
<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>
|
|
|
+ <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>
|
|
@@ -92,36 +104,36 @@
|
|
|
</div>
|
|
|
<div class="form-group col-md-4">
|
|
|
<label class="control-label">Patient First Name</label>
|
|
|
- <input type="text" name="patientNameFirst" value="{{$patient->name_first}}" class="form-control input-sm">
|
|
|
+ <input type="text" name="patientNameFirst" value="{{ $patient->name_first }}" class="form-control input-sm">
|
|
|
</div>
|
|
|
<div class="form-group col-md-4">
|
|
|
<label class="control-label">Patient Middle Name / MI</label>
|
|
|
- <input type="text" name="patientNameMiddle" value="{{$patient->name_middle}}" class="form-control input-sm">
|
|
|
+ <input type="text" name="patientNameMiddle" value="{{ $patient->name_middle }}" class="form-control input-sm">
|
|
|
</div>
|
|
|
<div class="form-group col-md-4">
|
|
|
<label class="control-label">Patient Last Name</label>
|
|
|
- <input type="text" name="patientNameLast" value="{{$patient->name_last}}" class="form-control input-sm">
|
|
|
+ <input type="text" name="patientNameLast" value="{{ $patient->name_last }}" class="form-control input-sm">
|
|
|
</div>
|
|
|
<div class="form-group col-md-4">
|
|
|
<label class="control-label">Patient Suffix</label>
|
|
|
- <input type="text" name="patientNameSuffix" value="{{$patient->name_suffix}}" class="form-control input-sm">
|
|
|
+ <input type="text" name="patientNameSuffix" value="{{ $patient->name_suffix }}" class="form-control input-sm">
|
|
|
</div>
|
|
|
<div class="form-group col-md-4">
|
|
|
<label class="control-label">Patient Sex</label>
|
|
|
<select class="form-control input-sm" name="sex" select2>
|
|
|
<option value="">--</option>
|
|
|
- <option value="M" @if($patient->sex === 'M') selected @endif>Male</option>
|
|
|
- <option value="F" @if($patient->sex === 'F') selected @endif>Female</option>
|
|
|
- <option value="UNKNOWN" @if($patient->sex === 'UNKNOWN') selected @endif>Unknown</option>
|
|
|
+ <option value="M" @if ($patient->sex === 'M') selected @endif>Male</option>
|
|
|
+ <option value="F" @if ($patient->sex === 'F') selected @endif>Female</option>
|
|
|
+ <option value="UNKNOWN" @if ($patient->sex === 'UNKNOWN') selected @endif>Unknown</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="form-group col-md-4">
|
|
|
<label class="control-label">Patient Dob</label>
|
|
|
- <input type="date" name="patientDob" value="{{$patient->dob}}" class="form-control input-sm">
|
|
|
+ <input type="date" name="patientDob" value="{{ $patient->dob }}" class="form-control input-sm">
|
|
|
</div>
|
|
|
<div class="form-group col-md-6">
|
|
|
<label class="control-label">Date Of Service</label>
|
|
|
- <input type="date" name="dateOfService" value="{{date('Y-m-d')}}" class="form-control input-sm">
|
|
|
+ <input type="date" name="dateOfService" value="{{ date('Y-m-d') }}" class="form-control input-sm">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
@@ -142,19 +154,19 @@
|
|
|
</div>
|
|
|
<div class="form-group col-md-4">
|
|
|
<label class="control-label">Subscriber First Name</label>
|
|
|
- <input type="text" name="subscriberNameFirst" value="{{$patient->name_first}}" class="form-control input-sm">
|
|
|
+ <input type="text" name="subscriberNameFirst" value="{{ $patient->name_first }}" 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="{{$patient->name_middle}}" class="form-control input-sm">
|
|
|
+ <input type="text" name="subscriberNameMiddle" value="{{ $patient->name_middle }}" 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="{{$patient->name_last}}" class="form-control input-sm">
|
|
|
+ <input type="text" name="subscriberNameLast" value="{{ $patient->name_last }}" 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="{{$patient->name_suffix}}" class="form-control input-sm">
|
|
|
+ <input type="text" name="subscriberNameSuffix" value="{{ $patient->name_suffix }}" class="form-control input-sm">
|
|
|
</div>
|
|
|
<div class="form-group col-md-4">
|
|
|
<label class="control-label">Subscriber Sex</label>
|
|
@@ -167,7 +179,7 @@
|
|
|
</div>
|
|
|
<div class="form-group col-md-4">
|
|
|
<label class="control-label">Subscriber Dob</label>
|
|
|
- <input type="date" name="subscriberDob" value="{{$patient->dob}}" class="form-control input-sm">
|
|
|
+ <input type="date" name="subscriberDob" value="{{ $patient->dob }}" class="form-control input-sm">
|
|
|
</div>
|
|
|
<div class="form-group col-md-6">
|
|
|
<label class="control-label">What is the patient's relationship to the subscriber?</label>
|
|
@@ -196,9 +208,9 @@
|
|
|
<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
|
|
|
+ @foreach ($medicaidStates as $state)
|
|
|
+ <option>{{ $state }}</option>
|
|
|
+ @endforeach
|
|
|
</datalist>
|
|
|
</div>
|
|
|
|
|
@@ -226,167 +238,175 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-md-12">
|
|
|
- <div class="row">
|
|
|
- <div class="col-md-12">
|
|
|
- <div class="form-group">
|
|
|
- <label>Plan Effective Date</label>
|
|
|
- <input type="date" name="planEffectiveDate" class="form-control" value="{{$cpc->plan_effective_date ?? ''}}" />
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-12">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Plan Effective Date</label>
|
|
|
+ <input type="date" name="planEffectiveDate" class="form-control" value="{{ $cpc->plan_effective_date ?? '' }}" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-12">
|
|
|
- <div class="form-group">
|
|
|
- <label>Plan Description</label>
|
|
|
- <textarea name="planDescription" class="form-control" value="{{$cpc->plan_description ?? ''}}"></textarea>
|
|
|
+ <div class="col-md-12">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Plan Description</label>
|
|
|
+ <textarea name="planDescription" class="form-control" value="{{ $cpc->plan_description ?? '' }}"></textarea>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- <label>Provider Status</label>
|
|
|
- <select name="providerStatus" class="form-control" value="{{$cpc->provider_status ?? ''}}">
|
|
|
- <option value=""></option>
|
|
|
- <option value="IN_NETWORK" @if($cpc && $cpc->provider_status && $cpc->provider_status === 'IN_NETWORK') selected @endif>IN NETWORK</option>
|
|
|
- <option value="OUT_OF_NETWORK" @if($cpc && $cpc->provider_status && $cpc->provider_status === 'OUT_OF_NETWORK') selected @endif>OUT_OF_NETWORK</option>
|
|
|
- </select>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Provider Status</label>
|
|
|
+ <select name="providerStatus" class="form-control" value="{{ $cpc->provider_status ?? '' }}">
|
|
|
+ <option value=""></option>
|
|
|
+ <option value="IN_NETWORK" @if ($cpc && $cpc->provider_status && $cpc->provider_status === 'IN_NETWORK') selected @endif>IN
|
|
|
+ NETWORK</option>
|
|
|
+ <option value="OUT_OF_NETWORK" @if ($cpc && $cpc->provider_status && $cpc->provider_status === 'OUT_OF_NETWORK') selected @endif>OUT_OF_NETWORK</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- <label>Mental Health Coverage</label>
|
|
|
- <select name="mentalHealthCoverage" class="form-control" value="{{$cpc->mental_health_coverage ?? ''}}">
|
|
|
- <option value=""></option>
|
|
|
- <option value="YES" @if($cpc && $cpc->mental_health_coverage && $cpc->mental_health_coverage === 'YES') selected @endif>YES</option>
|
|
|
- <option value="NO" @if($cpc && $cpc->mental_health_coverage && $cpc->mental_health_coverage === 'YES') selected @endif>NO</option>
|
|
|
- <option value="UNKNOWN" @if($cpc && $cpc->mental_health_coverage && $cpc->mental_health_coverage === 'YES') selected @endif>UNKNOWN</option>
|
|
|
- </select>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Mental Health Coverage</label>
|
|
|
+ <select name="mentalHealthCoverage" class="form-control" value="{{ $cpc->mental_health_coverage ?? '' }}">
|
|
|
+ <option value=""></option>
|
|
|
+ <option value="YES" @if ($cpc && $cpc->mental_health_coverage && $cpc->mental_health_coverage === 'YES') selected @endif>YES
|
|
|
+ </option>
|
|
|
+ <option value="NO" @if ($cpc && $cpc->mental_health_coverage && $cpc->mental_health_coverage === 'YES') selected @endif>NO
|
|
|
+ </option>
|
|
|
+ <option value="UNKNOWN" @if ($cpc && $cpc->mental_health_coverage && $cpc->mental_health_coverage === 'YES') selected @endif>
|
|
|
+ UNKNOWN</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- <label>Telehealth Coverage</label>
|
|
|
- <select name="telehealthCoverage" class="form-control">
|
|
|
- <option value=""></option>
|
|
|
- <option value="YES" @if($cpc && $cpc->telehealth_coverage && $cpc->telehealth_coverage === 'YES') selected @endif>YES</option>
|
|
|
- <option value="NO" @if($cpc && $cpc->telehealth_coverage && $cpc->telehealth_coverage === 'NO') selected @endif>NO</option>
|
|
|
- <option value="UNKNOWN" @if($cpc && $cpc->telehealth_coverage && $cpc->telehealth_coverage === 'UNKNOWN') selected @endif>UNKNOWN</option>
|
|
|
- </select>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Telehealth Coverage</label>
|
|
|
+ <select name="telehealthCoverage" class="form-control">
|
|
|
+ <option value=""></option>
|
|
|
+ <option value="YES" @if ($cpc && $cpc->telehealth_coverage && $cpc->telehealth_coverage === 'YES') selected @endif>YES
|
|
|
+ </option>
|
|
|
+ <option value="NO" @if ($cpc && $cpc->telehealth_coverage && $cpc->telehealth_coverage === 'NO') selected @endif>NO
|
|
|
+ </option>
|
|
|
+ <option value="UNKNOWN" @if ($cpc && $cpc->telehealth_coverage && $cpc->telehealth_coverage === 'UNKNOWN') selected @endif>
|
|
|
+ UNKNOWN</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- <label>Deductible Amount</label>
|
|
|
- <input type="number" name="deductibleAmount" class="form-control" value="{{$cpc->deductible_amount ?? ''}}" />
|
|
|
+ <div class="col-md-6">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Deductible Amount</label>
|
|
|
+ <input type="number" name="deductibleAmount" class="form-control" value="{{ $cpc->deductible_amount ?? '' }}" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- <label>Family Deductible</label>
|
|
|
- <input type="number" name="familyDeductible" class="form-control" value="{{$cpc->family_deductible ?? ''}}" />
|
|
|
+ <div class="col-md-6">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Family Deductible</label>
|
|
|
+ <input type="number" name="familyDeductible" class="form-control" value="{{ $cpc->family_deductible ?? '' }}" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- <label>Member Accumulated Total</label>
|
|
|
- <input type="number" name="memberAccumulatedTotal" class="form-control" value="{{$cpc->member_accumulated_total ?? ''}}" />
|
|
|
+ <div class="col-md-6">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Member Accumulated Total</label>
|
|
|
+ <input type="number" name="memberAccumulatedTotal" class="form-control" value="{{ $cpc->member_accumulated_total ?? '' }}" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- <label>Total Individual Balance</label>
|
|
|
- <input type="number" name="totalIndividualBalance" class="form-control" value="{{$cpc->total_individual_balance ?? ''}}" />
|
|
|
+ <div class="col-md-6">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Total Individual Balance</label>
|
|
|
+ <input type="number" name="totalIndividualBalance" class="form-control" value="{{ $cpc->total_individual_balance ?? '' }}" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="form-group">
|
|
|
- <label>Total Family Balance</label>
|
|
|
- <input type="number" name="totalFamilyBalance" class="form-control" value="{{$cpc->total_family_balance ?? ''}}" />
|
|
|
+ <div class="col-md-6">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>Total Family Balance</label>
|
|
|
+ <input type="number" name="totalFamilyBalance" class="form-control" value="{{ $cpc->total_family_balance ?? '' }}" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div v-if="response" :class="response.success ? 'alert success' : 'alert alert-danger'">
|
|
|
@{{ response.message }}
|
|
|
</div>
|
|
|
-
|
|
|
<div class="form-group text-nowrap mb-0">
|
|
|
<button v-if="!processing" class="btn btn-sm btn-primary" type="submit" :disabled="url == ''">Submt</button>
|
|
|
<button v-else class="btn btn-sm btn-primary" type="button"><i class="fas fa-circle-notch fa-spin"></i> Processing...</button>
|
|
|
</div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </form>
|
|
|
</div>
|
|
|
- <script>
|
|
|
- (function() {
|
|
|
- function init() {
|
|
|
- new Vue({
|
|
|
- el: '#new-coverage-form-{{$patient->uid}}',
|
|
|
- delimiters: ['@{{', '}}'],
|
|
|
- data: {
|
|
|
- url: '',
|
|
|
- insuranceCardType: '',
|
|
|
- isPatientSubscriber: 1,
|
|
|
- processing: false,
|
|
|
- response: null
|
|
|
+</div>
|
|
|
+<script>
|
|
|
+ (function() {
|
|
|
+ function init() {
|
|
|
+ new Vue({
|
|
|
+ el: '#new-coverage-form-{{ $patient->uid }}',
|
|
|
+ delimiters: ['@{{ ', ' }}'],
|
|
|
+ data: {
|
|
|
+ url: '',
|
|
|
+ insuranceCardType: '',
|
|
|
+ isPatientSubscriber: 1,
|
|
|
+ processing: false,
|
|
|
+ response: null
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ updateUrl: function() {
|
|
|
+ if (this.insuranceCardType == 'medicare') {
|
|
|
+ this.url = '/api/clientPrimaryCoverage/createNewCoverageForMedicare';
|
|
|
+ }
|
|
|
+ if (this.insuranceCardType == 'medicaid') {
|
|
|
+ this.url = '/api/clientPrimaryCoverage/createNewCoverageForMedicaid';
|
|
|
+ }
|
|
|
+ if (this.insuranceCardType == 'commercial') {
|
|
|
+ this.url = '/api/clientPrimaryCoverage/createNewCoverageForCommercial';
|
|
|
+ }
|
|
|
},
|
|
|
- methods: {
|
|
|
- updateUrl: function() {
|
|
|
- if (this.insuranceCardType == 'medicare') {
|
|
|
- this.url = '/api/clientPrimaryCoverage/createNewCoverageForMedicare';
|
|
|
- }
|
|
|
- if (this.insuranceCardType == 'medicaid') {
|
|
|
- this.url = '/api/clientPrimaryCoverage/createNewCoverageForMedicaid';
|
|
|
- }
|
|
|
- if (this.insuranceCardType == 'commercial') {
|
|
|
- this.url = '/api/clientPrimaryCoverage/createNewCoverageForCommercial';
|
|
|
- }
|
|
|
- },
|
|
|
- onCommercialPayerChange: function() {
|
|
|
- var input = $('input[name=commercialPayerUidSuggest]');
|
|
|
- var hiddenInput = $('input[name=commercialPayerUid]');
|
|
|
- input
|
|
|
- .off('stag-suggest-selected')
|
|
|
- .on('stag-suggest-selected', (e, input, _data) => {
|
|
|
- hiddenInput.val(_data.uid);
|
|
|
- });
|
|
|
+ onCommercialPayerChange: function() {
|
|
|
+ var input = $('input[name=commercialPayerUidSuggest]');
|
|
|
+ var hiddenInput = $('input[name=commercialPayerUid]');
|
|
|
+ input
|
|
|
+ .off('stag-suggest-selected')
|
|
|
+ .on('stag-suggest-selected', (e, input, _data) => {
|
|
|
+ hiddenInput.val(_data.uid);
|
|
|
+ });
|
|
|
|
|
|
- },
|
|
|
- submitForm: function(evt) {
|
|
|
- var self = this;
|
|
|
- if(self.processing) return;
|
|
|
- var form = evt.target;
|
|
|
- var data = $(form).serializeArray();
|
|
|
- var url = $(form).attr('url');
|
|
|
- if (!url) {
|
|
|
- self.response = {
|
|
|
- success: false,
|
|
|
- message: 'Invalid url'
|
|
|
- };
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- self.processing = true;
|
|
|
- $.post(url, data, function(response) {
|
|
|
- self.processing = false;
|
|
|
- if (response.success) {
|
|
|
- closeStagPopup();
|
|
|
- fastReload();
|
|
|
- } else {
|
|
|
- self.response = response;
|
|
|
- }
|
|
|
- }, 'json');
|
|
|
- },
|
|
|
- init: function() {
|
|
|
- initStagSuggest();
|
|
|
- this.onCommercialPayerChange();
|
|
|
+ },
|
|
|
+ submitForm: function(evt) {
|
|
|
+ var self = this;
|
|
|
+ if (self.processing) return;
|
|
|
+ var form = evt.target;
|
|
|
+ var data = $(form).serializeArray();
|
|
|
+ var url = $(form).attr('url');
|
|
|
+ if (!url) {
|
|
|
+ self.response = {
|
|
|
+ success: false,
|
|
|
+ message: 'Invalid url'
|
|
|
+ };
|
|
|
+ return;
|
|
|
}
|
|
|
+
|
|
|
+ self.processing = true;
|
|
|
+ $.post(url, data, function(response) {
|
|
|
+ self.processing = false;
|
|
|
+ if (response.success) {
|
|
|
+ closeStagPopup();
|
|
|
+ fastReload();
|
|
|
+ } else {
|
|
|
+ self.response = response;
|
|
|
+ }
|
|
|
+ }, 'json');
|
|
|
},
|
|
|
- mounted: function() {
|
|
|
- this.init();
|
|
|
+ init: function() {
|
|
|
+ initStagSuggest();
|
|
|
+ this.onCommercialPayerChange();
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
- addMCInitializer('new-coverage-form-{{$patient->uid}}', init, '#new-coverage-form-{{$patient->uid}}')
|
|
|
- }).call(window);
|
|
|
- </script>
|
|
|
+ },
|
|
|
+ mounted: function() {
|
|
|
+ this.init();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ addMCInitializer('new-coverage-form-{{ $patient->uid }}', init, '#new-coverage-form-{{ $patient->uid }}')
|
|
|
+ }).call(window);
|
|
|
+</script>
|