Wizard353
(David D. Speck MD)
June 7, 2020, 2:40pm
1
Allscripts has been modifying their page code. For the past week or so, the “Load from OpenEMR” button no longer appears on the “Add New patient” Allscripts page. Violentmonkey says that the Allscripts Integration script is active and running.
If I invoke the Allscripts button from the patient demographics page, after entering my name and password in the bottom OpenEMR frame, I’m just thrown back to the Allscripts sign-in page. In the past, I’ve been able to have Allscripts running in a separate Firefox tab, and somehow it would magically find the demographic info, even though it was displayed in a different Firefox tab.
Tampermonkey has the same failure as Violentmonkey.
I’m running OpenEMR V5.0.7 on Win 7 and Firefox x64 V77.0.1 with the current version of the script and Violentmonkey.
Can anyone suggest a fix to the Allscripts integration script that would restore its functionality? Re-keying the demographics for each new prescription is annoying.
Thanks
cverk
June 7, 2020, 10:05pm
2
I have the same issue. It came about when I had to change from using the frames interface to using the tabs interface to get the calendar to work. It does not appear to be version related since I am on win 10 openemr 5.0.2 patch 3.
Calendar is fixed and you should be okay to use frames.
If Allscripts has modified their front end then, all bets are off and the openemr script will have to be modified to match the new Allscript page changes.
cverk
June 7, 2020, 11:12pm
4
You are correct, the script is broken. Under frames the link box next to the patient name shows up and will open the allscripts sign in page but the button to load new patient demographics from openemr into allscripts is gone. Under tabs neither is present. Under frames my calendar is still broken even with the prepatch 4 files, but works fine under tabs. Grease monkey broke a long time ago for this but the violent monkey add in has worked fine until now.
cverk
June 7, 2020, 11:58pm
6
This is the info from the add new patient frame on allscripts. The script is listed on greeseyfork under allscripts.
Veradigm ePrescribe - Add Patient
.auto-style1 {
width: 61px;
}
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="E3BA02E7" />
<input type="hidden" name="____Ticket" id="____Ticket" value="1" />
<script type="text/javascript">
var sysApplication = Sys.WebForms.PageRequestManager.getInstance();
ignoreIeEvents();
sysApplication.add_initializeRequest(beginRequest);
sysApplication.add_endRequest(endRequest);
function beginRequest() {
document.getElementById("divLoading").style.display = "inline";
//You can show a div or
}
function endRequest() {
document.getElementById("divLoading").style.display = "none";
}
RegisterPopupOvelay('');
</script>
<table id="Content" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 80%">
<script type="text/javascript" language="javascript">
function CalculateLbsAndOzsFromKgs()
{
var kgValue = $('#ctl00_ContentPlaceHolder1_txtWeightKg').val();
if (kgValue == "")
kgValue = 0;
var ozs = Math.round(((kgValue * 2.20462) % 1) * 16);
var lbs = Math.floor(kgValue * 2.20462);
if(ozs === 16)
{
ozs = 0;
lbs = lbs+1;
}
$('#ctl00_ContentPlaceHolder1_txtWeightLbs').val(lbs);
$('#ctl00_ContentPlaceHolder1_txtWeightOzs').val(ozs);
}
function UpdateKgFromLbsAndOzs()
{
var lbs = document.getElementById( 'ctl00_ContentPlaceHolder1_txtWeightLbs').value;
var ozs = document.getElementById('ctl00_ContentPlaceHolder1_txtWeightOzs').value;
if (lbs == "")
lbs = 0;
if (ozs == "")
ozs = 0;
var kgs = lbs * .45359237;
var kgs = kgs + (ozs / 16) * .45359237;
$('#ctl00_ContentPlaceHolder1_txtWeightKg').val(kgs.toFixed(2));
}
function UpdateCmFromFtAndIns()
{
var feet = document.getElementById('ctl00_ContentPlaceHolder1_txtHeightFt').value;
var inches = document.getElementById('ctl00_ContentPlaceHolder1_txtHeightIn').value;
if (feet == "")
feet = 0;
if (inches == "")
inches = 0;
var cm = (feet * 30.48) + (inches * 2.54);
$('#ctl00_ContentPlaceHolder1_txtHeightCm').val(cm.toFixed(1));
}
function CalculateFtAndInsFromCm()
{
var cm = document.getElementById('ctl00_ContentPlaceHolder1_txtHeightCm').value;
if (cm == "") {
$('#ctl00_ContentPlaceHolder1_txtHeightFt').val(0);
$('#ctl00_ContentPlaceHolder1_txtHeightIn').val(0);
}
//Begin conversions
var cmValue = $('#ctl00_ContentPlaceHolder1_txtHeightCm').val();
if (cmValue !== "") {
cmValue /= 2.54;
var feet = parseInt(Math.floor(cmValue / 12));
var inches = parseInt(Math.round(cmValue % 12));
if(inches === 12)
{
inches = 0;
feet++;
}
$('#ctl00_ContentPlaceHolder1_txtHeightFt').val(feet);
$('#ctl00_ContentPlaceHolder1_txtHeightIn').val(inches);
}
}
function digitValidation(evt)
{
if (evt.charCode > 31 && (evt.charCode < 48 || evt.charCode > 57))
{
return false;
}
if (evt.keyCode > 31 && (evt.keyCode < 48 || evt.keyCode > 57))
{
return false;
}
}
function digitDecimalValidation(evt) {
if (evt.charCode == 46)
return true;
if (evt.keyCode == 46)
return true;
if (evt.charCode > 31 && (evt.charCode < 48 || evt.charCode > 57)) {
return false;
}
if (evt.keyCode > 31 && (evt.keyCode < 48 || evt.keyCode > 57))
{
return false;
}
}
</script>
<script type="text/javascript" language="javascript" src="js/formUtil.js"></script>
<input type="hidden" name="ctl00$ContentPlaceHolder1$isFromAngularModal" id="isFromAngularModal" value="false" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="h1title indnt">
<td colspan="2">
<span id="ctl00_ContentPlaceHolder1_heading" class="highlight">Add New Patient</span>
</td>
</tr>
<tr class="h4title">
<td colspan="2" style="padding:5px">
<input type="submit" name="ctl00$ContentPlaceHolder1$btnBack" value="Back" id="ctl00_ContentPlaceHolder1_btnBack" title="Click to go back to the Choose Patient page." class="btnstyle" />
<input type="submit" name="ctl00$ContentPlaceHolder1$btnPatientAdd" value="Save" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$btnPatientAdd", "", true, "", "", false, false))" id="ctl00_ContentPlaceHolder1_btnPatientAdd" title="Click to save details." class="btnstyle" />
<input type="submit" name="ctl00$ContentPlaceHolder1$btnAddAllergy" value="Patient Allergy" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$btnAddAllergy", "", true, "", "", false, false))" id="ctl00_ContentPlaceHolder1_btnAddAllergy" title="Click to view list of medications to which patient is allergic or to add a new allergy." class="btnstyle" />
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" border="0" cellpadding="0" style="width:100%">
<tr>
<td style="height: inherit;">
<table width="100%" border="0" cellpadding="0">
<tr>
<td>
</td>
</tr>
<tr>
<td>
<div id="ctl00_ContentPlaceHolder1_ValidationSummary1" style="display:none;">
Phone:
*
Mobile Phone:
*
* First Name:
* *
Middle Name:
*
<tr>
<td nowrap="nowrap" align="right">
<span id="ctl00_ContentPlaceHolder1_lblLastNameAsterisk" style="color:Red;">*</span> Last Name:
</td>
<td>
<input name="ctl00$ContentPlaceHolder1$txtLName" type="text" maxlength="35" id="ctl00_ContentPlaceHolder1_txtLName" onblur="capitilizeInitial(this)" style="width:200px;" />
<span id="ctl00_ContentPlaceHolder1_rfvLastName" style="display:inline-block;height:9px;width:6px;visibility:hidden;">*</span><span id="ctl00_ContentPlaceHolder1_revLastName" style="visibility:hidden;">*</span>
</td>
<td align="right">
Patient allows Medication History:
</td>
<td>
<select name="ctl00$ContentPlaceHolder1$ddlMedHistory" id="ctl00_ContentPlaceHolder1_ddlMedHistory" style="width:80px;">
<option value="false">Yes</option>
<option value="true">No</option>
Patient allows Disclosures to Health Plan:
Yes
No
* Date of Birth:
*
</td>
<td align="right">
Patient Preferred <br />
Language: </td>
<td colspan="3" style="padding-top:3px">
<select name="ctl00$ContentPlaceHolder1$ddlPatientPreferredLang" id="ctl00_ContentPlaceHolder1_ddlPatientPreferredLang" style="width:100px;">
<option value="amh">Amharic</option>
<option value="ara">Arabic</option>
<option value="hye">Armenian</option>
<option value="ben">Bengali</option>
<option value="zho">Chinese</option>
<option value="hrv">Croatian</option>
<option value="ces">Czech</option>
<option value="dan">Danish</option>
<option value="nld">Dutch</option>
<option selected="selected" value="eng">English</option>
<option value="fin">Finnish</option>
<option value="fra">French</option>
<option value="deu">German</option>
<option value="ell">Greek</option>
<option value="heb">Hebrew</option>
<option value="hin">Hindi(Urdu)</option>
<option value="hun">Hungarian</option>
<option value="ita">Italian</option>
<option value="jpn">Japanese</option>
<option value="kor">Korean</option>
<option value="lit">Lithuanian</option>
<option value="mal">Malayalam</option>
<option value="nav">Navaho</option>
<option value="nno">Norwegian</option>
<option value="oth">Other(not english)</option>
<option value="pan">Panjabi</option>
<option value="fas">Persian</option>
<option value="pol">Polish</option>
<option value="por">Portuguese</option>
<option value="ron">Romanian</option>
<option value="rus">Russian</option>
<option value="smo">Samoan</option>
<option value="slk">Slovak</option>
<option value="spa">Spanish</option>
<option value="swe">Swedish</option>
<option value="tgl">Tagalog</option>
<option value="tha">Thai(Laotian)</option>
<option value="tur">Turkish</option>
<option value="ukr">Ukrainian</option>
<option value="vie">Vietnamese</option>
<option value="yid">Yiddish</option>
* Gender:
--Select--
Male
Female
Unknown
*
</td>
<td align="right">
<div style="padding-top: 10px">
Current Weight:
</div>
</td>
<td style="padding-top:3px;">
<input name="ctl00$ContentPlaceHolder1$txtWeightLbs" type="text" maxlength="4" id="ctl00_ContentPlaceHolder1_txtWeightLbs" onfocusout="UpdateKgFromLbsAndOzs()" onkeypress="return digitValidation(event)" onkeyup="UpdateKgFromLbsAndOzs()" style="width:40px;" /> lb
<input name="ctl00$ContentPlaceHolder1$txtWeightOzs" type="text" maxlength="2" id="ctl00_ContentPlaceHolder1_txtWeightOzs" onfocusout="UpdateKgFromLbsAndOzs()" onkeypress="return digitValidation(event)" onkeyup="UpdateKgFromLbsAndOzs()" style="width:20px;" /> oz
</td>
</tr>
<tr style="padding-top:20px">
<td align="right">
Patient ID (MRN):
</td>
<td>
<input name="ctl00$ContentPlaceHolder1$txtMRN" type="text" maxlength="25" id="ctl00_ContentPlaceHolder1_txtMRN" />
</td>
<td>
</td>
<td style="padding-top:3px;">
<input name="ctl00$ContentPlaceHolder1$txtWeightKg" type="text" maxlength="6" id="ctl00_ContentPlaceHolder1_txtWeightKg" onfocusout="CalculateLbsAndOzsFromKgs()" onkeypress="return digitDecimalValidation(event)" onkeyup="CalculateLbsAndOzsFromKgs()" style="width:60px;" /> kg
<span id="ctl00_ContentPlaceHolder1_kgDecimalValidation" style="visibility:hidden;">*</span>
</tr>
<tr>
</tr>
<tr>
<td align="right">
<span style="color:Red">*</span> Address 1:
</td>
<td colspan="1">
<input name="ctl00$ContentPlaceHolder1$txtAddress1" type="text" maxlength="40" id="ctl00_ContentPlaceHolder1_txtAddress1" onblur="capitilizeInitial(this)" style="width:300px;" />
<span id="ctl00_ContentPlaceHolder1_rfvAddress1" style="display:inline-block;width:1px;visibility:hidden;">*</span>
</td>
<td align="right">
<div style="padding-top: 10px">
Current Height:
</div>
</td>
<td style="padding-top:3px;" rowspan="2">
<input name="ctl00$ContentPlaceHolder1$txtHeightFt" type="text" maxlength="2" id="ctl00_ContentPlaceHolder1_txtHeightFt" onfocusout="UpdateCmFromFtAndIns()" onkeypress="return digitValidation(event)" onkeyup="UpdateCmFromFtAndIns()" style="width:40px;" /> ft
<input name="ctl00$ContentPlaceHolder1$txtHeightIn" type="text" maxlength="3" id="ctl00_ContentPlaceHolder1_txtHeightIn" onfocusout="UpdateCmFromFtAndIns()" onkeypress="return digitValidation(event)" onkeyup="UpdateCmFromFtAndIns()" style="width:20px;" /> in
<div style="padding-top:7px">
<input name="ctl00$ContentPlaceHolder1$txtHeightCm" type="text" maxlength="7" id="ctl00_ContentPlaceHolder1_txtHeightCm" onfocusout="CalculateFtAndInsFromCm()" onkeypress="return digitDecimalValidation(event)" onkeyup="CalculateFtAndInsFromCm()" style="width:60px;" /> cm
<span id="ctl00_ContentPlaceHolder1_CmDecimalValidation" style="visibility:hidden;">*</span>
</td>
</tr>
<tr>
<td align="right">
Address 2:</td>
<td colspan="2">
<input name="ctl00$ContentPlaceHolder1$txtAddress2" type="text" maxlength="40" id="ctl00_ContentPlaceHolder1_txtAddress2" onblur="capitilizeInitial(this)" style="width:300px;" /></td>
</tr>
<tr>
<td align="right">
<span style="color:Red">*</span> City:</td>
<td style="">
<input name="ctl00$ContentPlaceHolder1$txtCity" type="text" maxlength="35" id="ctl00_ContentPlaceHolder1_txtCity" onblur="capitilizeInitial(this)" style="width:200px;" />
<span id="ctl00_ContentPlaceHolder1_revCity" style="visibility:hidden;">*</span>
<span id="ctl00_ContentPlaceHolder1_rfvCity" style="display:inline-block;width:1px;visibility:hidden;">*</span>
</td>
<td align="right">
<span style="color:Red">*</span> State:</td>
<td>
<select name="ctl00$ContentPlaceHolder1$ddlState" id="ctl00_ContentPlaceHolder1_ddlState" style="width:50px;">
<option value="AK">AK</option>
<option value="AL">AL</option>
<option value="AR">AR</option>
<option value="AZ">AZ</option>
<option value="CA">CA</option>
<option selected="selected" value="CO">CO</option>
<option value="CT">CT</option>
<option value="DC">DC</option>
<option value="DE">DE</option>
<option value="FL">FL</option>
<option value="GA">GA</option>
<option value="GU">GU</option>
<option value="HI">HI</option>
<option value="IA">IA</option>
<option value="ID">ID</option>
<option value="IL">IL</option>
<option value="IN">IN</option>
<option value="KS">KS</option>
<option value="KY">KY</option>
<option value="LA">LA</option>
<option value="MA">MA</option>
<option value="MD">MD</option>
<option value="ME">ME</option>
<option value="MI">MI</option>
<option value="MN">MN</option>
<option value="MO">MO</option>
<option value="MS">MS</option>
<option value="MT">MT</option>
<option value="NC">NC</option>
<option value="ND">ND</option>
<option value="NE">NE</option>
<option value="NH">NH</option>
<option value="NJ">NJ</option>
<option value="NM">NM</option>
<option value="NV">NV</option>
<option value="NY">NY</option>
<option value="OH">OH</option>
<option value="OK">OK</option>
<option value="OR">OR</option>
<option value="PA">PA</option>
<option value="PR">PR</option>
<option value="RI">RI</option>
<option value="SC">SC</option>
<option value="SD">SD</option>
<option value="TN">TN</option>
<option value="TX">TX</option>
<option value="UT">UT</option>
<option value="VA">VA</option>
<option value="VI">VI</option>
<option value="VT">VT</option>
<option value="WA">WA</option>
<option value="WI">WI</option>
<option value="WV">WV</option>
<option value="WY">WY</option>
*
</tr>
<tr>
<td align="right">
E-mail:</td>
<td >
<input name="ctl00$ContentPlaceHolder1$txtEmail" type="text" maxlength="80" id="ctl00_ContentPlaceHolder1_txtEmail" style="width:200px;" />
<span id="ctl00_ContentPlaceHolder1_revEmail" style="display:inline-block;height:1px;width:1px;visibility:hidden;">*</span>  
</td>
<td align="right" >
<span style="color:Red">*</span> ZIP Code:
</td>
<td style="width:270px">
<input name="ctl00$ContentPlaceHolder1$txtZip" type="text" maxlength="9" id="ctl00_ContentPlaceHolder1_txtZip" onkeypress="return numericKeyPressOnly(this, event);" style="width:97px;" />
<span id="ctl00_ContentPlaceHolder1_revZipCode" style="visibility:hidden;">*</span>
<span id="ctl00_ContentPlaceHolder1_rfvZipCode" style="display:inline-block;width:1px;visibility:hidden;">*</span>
</td>
</tr>
<tr>
<td nowrap="nowrap" align="right">
Selected Pharmacy:</td>
<td colspan="5" style="padding-top:3px">
<span id="ctl00_ContentPlaceHolder1_lblPharmacy" style="font-weight:bold;">None Entered</span>  
<a id="ctl00_ContentPlaceHolder1_lnkEditPharmacy" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$lnkEditPharmacy", "", true, "", "", false, true))">[edit]</a>
</td>
</tr>
<tr>
<td align="right">
  </td>
<td colspan="5" style="padding-top:3px">
  
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="6" style="height: 138px">
<table border="0" cellspacing="5" cellpadding="2" visible="false" width="100%">
<tr>
<td>
<div id="ctl00_ContentPlaceHolder1_gridCoverages" class="RadGrid RadGrid_Allscripts">
Insurance Plan Information
No records to display.
</td>
</tr>
<tr>
<td><input type="submit" name="ctl00$ContentPlaceHolder1$btChangeInsurance" value="Add Plan" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$btChangeInsurance", "", true, "", "", false, false))" id="ctl00_ContentPlaceHolder1_btChangeInsurance" class="btnstyle" /></td>
</tr>
</table>
</td>
</tr>
</table>
<script type="text/javascript">
RegisterBackButton("ctl00_ContentPlaceHolder1_btnBack");
setAngulrModalStatus();
$(document).keypress(function (e) {
if (e.keyCode === 13) {
e.preventDefault();
return false;
}
});
</script>
</td>
<!-- 27/10/06 HA/Kumar.V css class added for right side content color -->
</tr>
</table>
cverk
June 7, 2020, 11:59pm
7
It was too big for one box so here is the rest
<script type="text/javascript">
// var navTop = $('#rightPanel').offset().top;
</script>
cverk
June 8, 2020, 12:00am
8
another try at that
<script type="text/javascript">
// var navTop = $('#rightPanel').offset().top;
</script>
Okay it looks like some of our css pathing has changed which is why none of the demographic controls are populating.
Also noted that Allscripts now offers a FHIR API which by some coincident, so do we!
Some enterprising developer could replace this plugin with a new interop module to solve this issue for future users.
I’ll try to have a modified plugin fix sometime to today.
gutiersa
(Sandra Gutierrez)
June 8, 2020, 9:03pm
10
Re: Also don’t forget to change your servers PHP error levels as mentioned in the issue forum thread.
What do I change it to? I use allscripts and have not yet integrated it. Actually, I have been communicating with them, and they had asked me the following:
“Please confirm you can send HL7 transactions to an FTP site, is this correct?” and
“Also, what is the name of your practice management system, not EHR that you are using?”
They are pricey.
Looks like allscripts is no longer available for greasmonkey.
Sandra
The Allscript plugin is custom for openemr. However is broken which i’m trying to fix now. Also some are using ViolentMonkey to replace GreaseMonkey.
For error reporting on 5.0.2 see this: Loss of convenient features
I’m posting a fix try for all to try.
@cverk @Wizard353
This is what I have so far. I can’t test so you’ll need to for me unless someone wants to give me shortterm access. My Allscript developer account is still active but, won’t allow me to test erx.(what good is a dev account one could ponder!!!)
Here is export from ViolentMonkey extension good luck:
scripts_2020-06-08_18.01.02.zip (5.0 KB)
1 Like
gutiersa
(Sandra Gutierrez)
June 8, 2020, 10:15pm
13
So this goes in the openemr base directory?
ViolentMonkey is a browser extension where you’ll need to import above once you install monkey
gutiersa
(Sandra Gutierrez)
June 8, 2020, 11:00pm
15
duh, you did say this before. tthanks
lol, agreed, too much blood is making my brain hyperventilate
lol, well maybe having your foot dangling in the air is causing all the blood to rush to your head.(inside joke for others)
gutiersa
(Sandra Gutierrez)
June 8, 2020, 11:55pm
17
Do I unzip the file?
without unzipping the file I am getting that the add on is corrupt, if I unzip it, then it does not find a file in the directory.
I can’t tell if you have to install pugin from greasy forks but if import won’t work then suggest open existing plugin in violentmonkey editor then cut and replace from my plugin script.
gutiersa
(Sandra Gutierrez)
June 9, 2020, 1:05am
19
Right, I installed violentmonkey into firefox. I deinstalled greasemonkey
I should have closed and reopened. Hang on, it is updating
@sjpadgett
Ok, so I created the script, but what do I do with the second file?
The second file looks to be a file of options from my instance. Shouldn’t need it.
As i’ve said I really don’t know too much about violentmonkey and how the scripts are installed. If I know my changes work for everyone, I will update greasy forks. That I can do.
I did find the reason demographics weren’t being fetched and there also was a function call bug that worked on previous JS versions but was a no no on current version.
As long as Allscripts hasn’t drastically changed their front end, i’m hoping this will work.
Until someone with an account test and let’s me know, i’m stuck and moving on back to app performance tuning! I just know this plugin is important to many of our users.