|
@@ -9,10 +9,10 @@
|
|
|
<div class="form-group col-md-12">
|
|
|
<p class="mb-1">How did you manually check coverage?</p>
|
|
|
<div class="form-check form-check-inline">
|
|
|
- <label class="form-check-label"><input class="form-check-input" type="radio" v-model="uiState.manualDeterminationStrategy" name="manualDeterminationStrategy" value="REVIEWED_ELECTRONIC">Reviewed Electronically</label>
|
|
|
+ <label class="form-check-label"><input class="form-check-input" type="radio" v-model="uiState.manualDeterminationStrategy" name="manualDeterminationStrategy" value="REVIEWED_ELECTRONIC" required>Reviewed Electronically</label>
|
|
|
</div>
|
|
|
<div class="form-check form-check-inline">
|
|
|
- <label class="form-check-label"><input class="form-check-input" type="radio" v-model="uiState.manualDeterminationStrategy" name="manualDeterminationStrategy" value="CALLED_PAYER">Called Payer</label>
|
|
|
+ <label class="form-check-label"><input class="form-check-input" type="radio" v-model="uiState.manualDeterminationStrategy" name="manualDeterminationStrategy" value="CALLED_PAYER" required>Called Payer</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -30,35 +30,77 @@
|
|
|
<td>Record Found?</td>
|
|
|
<td>{{$cpc->auto_commercial_is_match_found ? 'YES' : 'NO'}}</td>
|
|
|
<td>
|
|
|
- <div class="form-group mb-0">
|
|
|
- <label for="" class="control-label">Manual Determination Category</label>
|
|
|
- <select name="manualDeterminationCategory" class="form-control input-sm" @change="onInputChange">
|
|
|
- <option value="">--select--</option>
|
|
|
- <option value="COVERED">Covered</option>
|
|
|
- <option value="NOT_COVERED">Not Covered</option>
|
|
|
- <option value="INVALID" :selected="cpc.auto_commercial_is_match_found == 'NO'">Invalid</option>
|
|
|
- <option value="UNKNOWN">Unknown</option>
|
|
|
- </select>
|
|
|
+ <div class="form-group">
|
|
|
+ <div class="form-check form-check-inline">
|
|
|
+ <label class="form-check-label"><input class="form-check-input" type="radio" name="manualCommercialIsMatched" value="YES" @change="onInputChange">Yes</label>
|
|
|
+ </div>
|
|
|
+ <div class="form-check form-check-inline">
|
|
|
+ <label class="form-check-label"><input class="form-check-input" type="radio" name="manualCommercialIsMatched" value="NO" @change="onInputChange">No</label>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <td>Coverage Status?</td>
|
|
|
+ <td>UNKNOWN</td>
|
|
|
+ <td>
|
|
|
+ <select name="manualDeterminationCategory" class="form-control input-sm" @change="onInputChange">
|
|
|
+ <option value="">--select--</option>
|
|
|
+ <option value="COVERED" :selected="uiState.manualCommercialIsMatched == 'YES'">Covered</option>
|
|
|
+ <option value="NOT_COVERED">Not Covered</option>
|
|
|
+ <option value="INVALID" :selected="uiState.manualCommercialIsMatched == 'NO'">Invalid</option>
|
|
|
+ <option value="UNKNOWN">Unknown</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ @if($cpc->mcd_number)
|
|
|
+ <h5 class="mt-2 font-weight-bold">Medicaid Information Provided:</h5>
|
|
|
+ <table class="table table-bordered table-striped">
|
|
|
+ <tbody>
|
|
|
<tr>
|
|
|
<td>Medicaid Number</td>
|
|
|
- <td colspan="2">{{$cpc->mcd_number ?? '-'}}</td>
|
|
|
+ <td>{{$cpc->mcd_number ?? '-'}}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>Medicaid State</td>
|
|
|
- <td colspan="2">{{$cpc->mcd_payer_name ?? '-'}}</td>
|
|
|
+ <td>{{$cpc->mcd_payer_name ?? '-'}}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>Was Medicaid Record Found?</td>
|
|
|
- <td colspan="2">{{$cpc->auto_medicaid_is_match_found ? 'Yes' : 'No'}}</td>
|
|
|
+ <td>{{$cpc->auto_medicaid_is_match_found ? 'Yes' : 'No'}}</td>
|
|
|
</tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ @endif
|
|
|
+
|
|
|
+ @if($cpc->mcr_number)
|
|
|
+ <h5 class="mt-2 font-weight-bold">Medicare Information Provided:</h5>
|
|
|
+ <table class="table table-bordered table-striped">
|
|
|
+ <thead>
|
|
|
<tr>
|
|
|
- <td>Medicare Number</td>
|
|
|
- <td colspan="2">{{$cpc->mcr_number ?? '-'}}</td>
|
|
|
+ <th></th>
|
|
|
+ <th>Automatic</th>
|
|
|
+ <th>Override</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td>Record Found?</td>
|
|
|
+ <td>{{$cpc->auto_medicare_is_match_found ? 'YES' : 'NO'}}</td>
|
|
|
+ <td>
|
|
|
+ <div class="form-group mb-0">
|
|
|
+ <div class="form-check form-check-inline">
|
|
|
+ <label class="form-check-label"><input class="form-check-input" type="radio" name="manualMedicareIsMatched" value="YES" @click="onInputChange">Yes</label>
|
|
|
+ </div>
|
|
|
+ <div class="form-check form-check-inline">
|
|
|
+ <label class="form-check-label"><input class="form-check-input" type="radio" name="manualMedicareIsMatched" value="NO" @click="onInputChange">No</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
-
|
|
|
<tr>
|
|
|
<td>Part B Active?</td>
|
|
|
<td>{{$cpc->auto_medicare_is_partbactive}}</td>
|
|
@@ -174,6 +216,9 @@
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
+ @endif
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div class="form-group col-md-12">
|
|
@@ -196,106 +241,132 @@
|
|
|
</div>
|
|
|
<script>
|
|
|
(function() {
|
|
|
- function init() {
|
|
|
- new Vue({
|
|
|
- el: '#manual-determination-form-{{$patient->uid}}',
|
|
|
- delimiters: ['@{{', '}}'],
|
|
|
- data: {
|
|
|
- url: '/api/clientPrimaryCoverage/manualDeterminationForCommercial',
|
|
|
- uiState: {
|
|
|
- manualDeterminationCategory: null,
|
|
|
- manualMedicareIsPartBActive: null,
|
|
|
- manualMedicareIsPartBPrimary: null,
|
|
|
- manualMedicareIsPartCActive: null,
|
|
|
- manualMedicareIsInpatient: null,
|
|
|
- manualMedicareIsHospice: null,
|
|
|
- manualMedicareIsHomeHealth: null,
|
|
|
- manualMedicareIsMsp: null,
|
|
|
+ function init() {
|
|
|
+ new Vue({
|
|
|
+ el: '#manual-determination-form-{{$patient->uid}}',
|
|
|
+ delimiters: ['@{{', '}}'],
|
|
|
+ data: {
|
|
|
+ url: '/api/clientPrimaryCoverage/manualDeterminationForCommercial',
|
|
|
+ uiState: {
|
|
|
+ manualCommercialIsMatched: null,
|
|
|
+ manualDeterminationCategory: null,
|
|
|
+ manualMedicareIsPartBActive: null,
|
|
|
+ manualMedicareIsPartBPrimary: null,
|
|
|
+ manualMedicareIsPartCActive: null,
|
|
|
+ manualMedicareIsInpatient: null,
|
|
|
+ manualMedicareIsHospice: null,
|
|
|
+ manualMedicareIsHomeHealth: null,
|
|
|
+ manualMedicareIsMsp: null,
|
|
|
|
|
|
- },
|
|
|
- cpc: <?= json_encode($cpc); ?>,
|
|
|
- processing: false,
|
|
|
- response: null,
|
|
|
- disabled: false
|
|
|
- },
|
|
|
- methods: {
|
|
|
- onInputChange: function(evt){
|
|
|
- var input = evt.target;
|
|
|
- var name = input.name;
|
|
|
- var value = input.value;
|
|
|
- this.uiState[name] = value;
|
|
|
- console.log({name, value});
|
|
|
- if(name === 'manualMedicareIsPartBPrimary'){
|
|
|
- if(value === 'YES') this.uiState.manualMedicareIsPartBActive = 'YES';
|
|
|
- }
|
|
|
- if(name === 'manualMedicareIsPartCActive'){
|
|
|
- if(value === 'YES') this.uiState.manualMedicareIsPartBActive = 'NO';
|
|
|
- }
|
|
|
- if(name === 'manualDeterminationCategory'){
|
|
|
- if(value === 'INVALID' || value === 'UNKNOWN'){
|
|
|
- this.setUiStateDefaultValue('NO');
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- this.refreshUi();
|
|
|
- },
|
|
|
- setUiStateDefaultValue: function(value){
|
|
|
- var self = this;
|
|
|
- for(var fieldName in self.uiState){
|
|
|
- self.uiState[fieldName] = value;
|
|
|
- }
|
|
|
- self.refreshUi();
|
|
|
- },
|
|
|
- submitForm: function(evt) {
|
|
|
- var self = this;
|
|
|
- if (self.processing) return;
|
|
|
- var form = evt.target;
|
|
|
- var data = $(form).serializeArray();
|
|
|
- var url = self.url;
|
|
|
- if (!url) {
|
|
|
- self.response = {
|
|
|
- success: false,
|
|
|
- message: 'Invalid url'
|
|
|
- };
|
|
|
- return;
|
|
|
- }
|
|
|
+ manualMedicareIsMatched: null,
|
|
|
+
|
|
|
+ },
|
|
|
+ cpc: <?= json_encode($cpc); ?>,
|
|
|
+ processing: false,
|
|
|
+ response: null,
|
|
|
+ disabled: false
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onInputChange: function(evt) {
|
|
|
+ var input = evt.target;
|
|
|
+ var name = input.name;
|
|
|
+ var nameLowerCase = name.toLowerCase();
|
|
|
+ var value = input.value;
|
|
|
+ this.uiState[name] = value;
|
|
|
+
|
|
|
+ if(/medicare/gi.test(nameLowerCase)){
|
|
|
+ if(value === 'YES') this.uiState.manualMedicareIsMatched = 'YES';
|
|
|
+ }
|
|
|
+
|
|
|
+ if (name === 'manualMedicareIsPartBPrimary') {
|
|
|
+ if (value === 'YES') this.uiState.manualMedicareIsPartBActive = 'YES';
|
|
|
+ }
|
|
|
+ if (name === 'manualMedicareIsPartCActive') {
|
|
|
+ if (value === 'YES') this.uiState.manualMedicareIsPartBActive = 'NO';
|
|
|
+ }
|
|
|
+ if (name === 'manualDeterminationCategory') {
|
|
|
+ if (value === 'INVALID' || value === 'UNKNOWN') {
|
|
|
+ this.setUiStateDefaultValue('NO');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.uiState.manualMedicareIsMatched === 'NO') {
|
|
|
+ this.setUiStateDefaultValue('NO', 'medicare');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.refreshUi();
|
|
|
+ },
|
|
|
+ setUiStateDefaultValue: function(value, type) {
|
|
|
+ var self = this;
|
|
|
+ for (var fieldName in self.uiState) {
|
|
|
+ if (type) {
|
|
|
+ var fieldNameLowerCase = fieldName.toLowerCase();
|
|
|
+ var typeRegex = RegExp(type, 'g');
|
|
|
+ var isMatchFound = typeRegex.test(fieldNameLowerCase);
|
|
|
+ if(isMatchFound){
|
|
|
+ self.uiState[fieldName] = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ self.uiState[fieldName] = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.refreshUi();
|
|
|
+ },
|
|
|
+ submitForm: function(evt) {
|
|
|
+ var self = this;
|
|
|
+ if (self.processing) return;
|
|
|
+ var form = evt.target;
|
|
|
+ var data = $(form).serializeArray();
|
|
|
+ var url = self.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;
|
|
|
+ self.processing = true;
|
|
|
+ $.post(url, data, function(response) {
|
|
|
+ self.processing = false;
|
|
|
+ if (response.success) {
|
|
|
+ closeStagPopup();
|
|
|
+ fastReload();
|
|
|
+ } else {
|
|
|
+ self.response = response;
|
|
|
+ }
|
|
|
+ }, 'json');
|
|
|
+ },
|
|
|
+ refreshUi: function() {
|
|
|
+ var self = this;
|
|
|
+ $("input[type=radio]").prop('checked', false);
|
|
|
+ for (var fieldName in self.uiState) {
|
|
|
+ var value = self.uiState[fieldName];
|
|
|
+ if (value) {
|
|
|
+ $("input[name=" + fieldName + "][type=radio][value=" + value + "]").prop('checked', true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.disabled = (self.cpc.auto_medicare_is_partcactive == 'YES' && self.cpc.auto_medicare_is_partbprimary == 'YES') || (self.uiState.manualMedicareIsPartBPrimary == 'YES' && self.uiState.manualMedicareIsPartCActive == 'YES');
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted: function() {
|
|
|
+ if (this.cpc.auto_medicare_is_partbprimary == 'YES') {
|
|
|
+ this.uiState.manualMedicareIsPartBPrimary = 'YES';
|
|
|
+ this.uiState.manualMedicareIsPartCActive = 'NO';
|
|
|
+ this.uiState.manualMedicareIsPartBActive = 'YES';
|
|
|
+ };
|
|
|
+ this.uiState.manualMedicareIsMatched = this.cpc.auto_medicare_is_partbactive;
|
|
|
+ this.uiState.manualCommercialIsMatched = this.cpc.auto_commercial_is_match_found ? 'YES' : 'NO';
|
|
|
+ if (this.cpc.auto_commercial_is_match_found === 'NO') {
|
|
|
+ this.uiState.manualDeterminationCategory = 'INVALID';
|
|
|
+ }
|
|
|
+ this.refreshUi();
|
|
|
}
|
|
|
- }, 'json');
|
|
|
- },
|
|
|
- refreshUi: function(){
|
|
|
- var self = this;
|
|
|
- $("input[type=radio]").prop('checked', false);
|
|
|
- for(var fieldName in self.uiState){
|
|
|
- var value = self.uiState[fieldName];
|
|
|
- if(value){
|
|
|
- $("input[name="+ fieldName +"][type=radio][value=" + value + "]").prop('checked', true);
|
|
|
- }
|
|
|
- }
|
|
|
- self.disabled = (self.cpc.auto_medicare_is_partcactive == 'YES' && self.cpc.auto_medicare_is_partbprimary == 'YES') || (self.uiState.manualMedicareIsPartBPrimary == 'YES' && self.uiState.manualMedicareIsPartCActive == 'YES');
|
|
|
- },
|
|
|
- },
|
|
|
- mounted: function() {
|
|
|
- if (this.cpc.auto_medicare_is_partbprimary == 'YES') {
|
|
|
- this.uiState.manualMedicareIsPartBPrimary = 'YES';
|
|
|
- this.uiState.manualMedicareIsPartCActive = 'NO';
|
|
|
- this.uiState.manualMedicareIsPartBActive = 'YES';
|
|
|
- };
|
|
|
- if(this.cpc.auto_commercial_is_match_found === 'NO'){
|
|
|
- this.uiState.manualDeterminationCategory = 'INVALID';
|
|
|
- }
|
|
|
- this.refreshUi();
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
- addMCInitializer('manual-determination-form-{{$patient->uid}}', init, '#manual-determination-form-{{$patient->uid}}')
|
|
|
- }).call(window);
|
|
|
-</script>
|
|
|
+ addMCInitializer('manual-determination-form-{{$patient->uid}}', init, '#manual-determination-form-{{$patient->uid}}')
|
|
|
+ }).call(window);
|
|
|
+</script>
|