finished workflow for sandata - even though they cancelled the launch! Worked on Anthology's group based course extractions.

This commit is contained in:
Norm Rasmussen
2024-04-19 16:53:56 -04:00
parent 59e9a4ae2b
commit 88000a824d
13 changed files with 175 additions and 46 deletions

View File

@ -37,18 +37,21 @@
{% comment %} <input class="sign-up-follow-up-input" id="oh-input" placeholder="OH Identifier" style="display: none;"/> {% endcomment %}
<div id="oh-input" placeholder="OH Identifier" style="display: none;">
<div class='oh-button' type="radio" value="EVV"
onclick="validateForm()">Ohio EVV</div>
<div class='oh-button' type="radio" value="ALT EVV"
onclick="validateForm()">Ohio Alt EVV</div>
<div class='oh-button' type="radio" value="ST - OH EVV ODM Agency Provider"
onclick="validateForm()">Agency EVV</div>
<div class='oh-button' type="radio" value="ST - OH EVV Non-Agency"
onclick="validateForm()">Non-Agency EVV</div>
<div class='oh-button' type="radio" value="ST - OH ODM AGENCY PROVIDER ALT EVV"
onclick="validateForm()">Alternative EVV</div>
</div>
<div id="ca-input" placeholder="CA Identifier" style="display: none;">
{% comment %} <div class='ca-button' type="radio" value="ST - CA CHHS BOTH (PCS & HHCS)" {% endcomment %}
<div class='ca-button' type="radio" value="EVV"
onclick="validateForm()">Sandata EVV</div>
onclick="validateForm()">Agency EVV</div>
{% comment %} <div class='ca-button' type="radio" value="ST - CA CHHS JE & ST - CA CHHS STATE" {% endcomment %}
<div class='ca-button' type="radio" value="ALT EVV"
onclick="validateForm()">Sandata Alt EVV Aggregator</div>
onclick="validateForm()">Alternative EVV</div>
</div>
<span class="sign-up-follow-up-error-label" id="oh-label">Please select your affiliation</span>
@ -389,7 +392,7 @@
if(Object.keys(revisedPropsObj).length > 0){
let validationFlag = true;
let allRequiredFields = ['agency_name', 'medicaid_id', 'provider_id', 'learner_state', 'learner_role', 'ca_group_name', 'oh_group_name'];
let allRequiredFields = ['agency_name', 'medicaid_id', 'provider_id', 'learner_state', 'learner_role', 'oh_group_name', 'ca_group_name']
for(let i = 0; i < allRequiredFields.length; i++){
if(Object.keys(revisedPropsObj).indexOf(allRequiredFields[i]) == -1){
@ -404,6 +407,7 @@
} else {
document.querySelector('#calEVV-input').style.border = '1px solid light-dark(rgb(118, 118, 118), rgb(133, 133, 133))';
document.querySelector('#calEVV-label').style.display = 'none';
revisedPropsObj['oh_group_name'] = undefined;
}
} else if(allRequiredFields[i] == 'learner_state' && revisedPropsObj[allRequiredFields[i]] == 'Ohio'){
if(Object.keys(revisedPropsObj).indexOf('oh_group_name') == -1){
@ -411,6 +415,9 @@
document.querySelector('#oh-label').style.display = 'block';
} else {
document.querySelector('#oh-label').style.display = 'none';
revisedPropsObj['ca_group_name'] = undefined;
revisedPropsObj['cal_evv_id'] = undefined;
}
}
}
@ -446,11 +453,12 @@
console.log(userID);
if(revisedPropsObj['learner_state'] != 'Ohio'){
revisedPropsObj['oh_group_name'] = null;
revisedPropsObj['oh_group_name'] = "None";
}
if(revisedPropsObj['learner_state'] != 'California'){
revisedPropsObj['cal_evv_id'] = null;
revisedPropsObj['cal_evv_id'] = "None";
revisedPropsObj['ca_group_name'] = "None";
}
console.log(revisedPropsObj);
@ -459,8 +467,7 @@
function webhookCaller(){
return new Promise(function(res, rej) {
let xhr = new XMLHttpRequest();
url = "https://webhook.site/8fc3650a-7c4b-413a-a6fd-6e3787bc3771"
//url = "https://webhooks.workato.com/webhooks/rest/0a1d61c1-421c-4160-a1ab-d29e79aee50e/secondary-registration-submitted";
url = "https://webhooks.workato.com/webhooks/rest/0a1d61c1-421c-4160-a1ab-d29e79aee50e/secondary-registration-submitted";
xhr.addEventListener("load", e => {
localStorage.setItem('completed-second-registration', true);