Skip to content

Commit

Permalink
[Unblock health Modification] Add Patient Option to Register Form
Browse files Browse the repository at this point in the history
  • Loading branch information
bensonpaul committed Mar 7, 2024
1 parent 55dbca7 commit 48ac853
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 10 deletions.
35 changes: 28 additions & 7 deletions layouts/section/individual-access-services.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> */}}

{{/* <script type="text/javascript" src="//script.crazyegg.com/pages/scripts/0092/8173.js" async="async"></script> */}}
<script src="{{"js/vendor/jquery-2.1.1.min.js" | absURL}}"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>

<body>
Expand Down Expand Up @@ -100,9 +102,9 @@ <h1>Medical records at your fingertips</h1>
<p style="font-size: 23px; line-height:34px;">A new three-way partnership between Unblock Health, Health Gorilla, and CLEAR&reg; brings Individual Access Services (IAS) one step closer to reality.</p>
<div class="slds-grid slds-wrap slds-gutters slds-m-bottom_medium">
<div class="slds-col slds-size_12-of-12 slds-medium-size_6-of-12">
<a href="/register"><button class="slds-button bg-btn-style" style="width:250px; margin:20px 0px 0px;">
<button id="start-free-account" class="slds-button bg-btn-style" style="width:250px; margin:20px 0px 0px;">
<span class="slds-text-heading_medium"><b>Start your<br> free account</b></span>
</button></a>
</button>
</div>
</div>
</aside>
Expand Down Expand Up @@ -219,9 +221,9 @@ <h2 class="slds-text-align_center">How can you help move IAS forward?</h2>
<p>The more pressure we place on healthcare organizations to share medical records, the faster we’re likely to see enforcement begin.</p>
<div class="slds-grid slds-gutters">
<div class="slds-col">
<a href="/register"><button class="slds-button bg-btn-style" style="width:250px;">
<button id="free-account" class="slds-button bg-btn-style" style="width:250px;">
<span class="slds-text-heading_medium"><b>Start your<br> free account</b></span>
</button></a>
</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -269,9 +271,9 @@ <h2 class="">
</div>
<div class="slds-col slds-size_8-of-8 slds-medium-size_2-of-8">
<div class="slds-col slds-size_12-of-12 slds-medium-size_6-of-12">
<a href="/register"><button class="slds-button bg-btn-style" style="width:250px;">
<button id="pat-register" class="slds-button bg-btn-style" style="width:250px;">
<span class="slds-text-heading_medium"><b>Start your<br> free account</b></span>
</button></a>
</button>
</div>
</div>
<div class="slds-col slds-size_8-of-8 slds-medium-size_1-of-8">
Expand All @@ -290,4 +292,23 @@ <h2 class="">
</article>

</body>
</html>
</html>
<script>
$(document).ready(function () {
$("#start-free-account").on("click", function () {
var selectedValue = 'PAT';
var url = '/register?option=' + selectedValue;
window.location.href = url;
});
$("#free-account").on("click", function () {
var selectedValue = 'PAT';
var url = '/register?option=' + selectedValue;
window.location.href = url;
});
$("#pat-register").on("click", function () {
var selectedValue = 'PAT';
var url = '/register?option=' + selectedValue;
window.location.href = url;
});
});
</script>
1 change: 1 addition & 0 deletions layouts/section/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ <h3 style="font-size:24px; line-height:34px;">{{ . }}</h3>
<div class="slds-select_container">
<select class="slds-select slds-p-vertical_x-small" style="height: 48px;" name="Patient Information" id="patientoption" required>
<option value="">Please Select Option*</option>
<option value="PAT">Patient</option>
<option value="PA">Patient Advocate</option>
<option value="HIM">Hospital HIM</option>
</select>
Expand Down
24 changes: 21 additions & 3 deletions static/js/main-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ $('#contact-submit-live').click(function (e) {
var patientdetailsvalue = 'PPA';
} else if(patientdetails == 'HIM'){
var patientdetailsvalue = 'HIM';
} else {
} else if(patientdetails == 'PAT'){
var patientdetailsvalue = 'PAT';
}else {
var patientdetailsvalue = '';
}
$('#contact-submit-live').prop('disabled', 'disabled');
$('#contact-submit-live').addClass('is-disabled');
$('.loader-form').show();
var concatenatedValues = first_name + "|" + email + "|" + patientdetailsvalue;
/* var concatenatedValues = first_name + "|" + email + "|" + patientdetailsvalue;
var encodedValues = btoa(concatenatedValues);
var NovuBaseURL = $('#_novbaseurl').val();
Expand Down Expand Up @@ -100,7 +102,21 @@ $('#contact-submit-live').click(function (e) {
"data": JSON.stringify(registerFormData),
};
/* End of Novu Integration */
$.ajax(settings).done(function(response) {

var settings = {
"url": "https://prime.dcp.infra.co.medigy.com/graphiql",
"method": "POST",
"timeout": 0,
"headers": {
"qu": "",
"Content-Type": "application/json"
},
"data": JSON.stringify({
query: "mutation MyMutation {\r\n notifyUserRegistrationV1(input: {email: \"" + email + "\", name: \"" + first_name + "\", userType: \"" + patientdetails + "\"}) {\r\n requestApiResponse {\r\n data\r\n status {\r\n code\r\n message\r\n }\r\n success\r\n }\r\n }\r\n}",
variables: {}
})
};
$.ajax(settings).done(function (response) {
var form = new FormData();
form.append("grant_type", "client_credentials");
form.append("client_id", "93d80a68-5ad0-878d-a787-5da44425070f");
Expand Down Expand Up @@ -159,6 +175,8 @@ $('#contact-submit-live').click(function (e) {
$('#email').val('');
var $success = $('#success'); // get the reference of the div
$success.show().html('We appreciate your registration with Unblock Health.');
//setInterval('location.reload()', 800);
//$success.show().html('');
}
});
});
Expand Down

0 comments on commit 48ac853

Please sign in to comment.