Hi Folks,
I am trying to figure out how to make a minor change to the medication screen in 12.2. The Angular javascript is understandable - but does anyone know how/where jboss is connecting to the SQL database? I haven't yet been able to figure that out.
Thanks,
Steve
I was under the impression that the db calls on HTML forms were not performed by the HTML/JS directly but instead via angular JS through the main application.
Jboss itself is configured to use JDBC. I haven't found anything in the Angular stuff, but I've never used Angular myself - that could be the problem.
In the Angular code it is referring to data objects with different names than the SQL tables/views and columns, I'm trying to find where those data objects are defined. What I'm trying to display is not working but I think it's just because I don't know the correct name in the data object.
Thanks,
Steve
I have never modified or written HTML forms so I am not sure where they are defined but there is a good chance they could be the same as what you would use in find() which are define in mldefs*.txt in the centricity folder.
Unfortunately not.
They are defined as:
angular.$window.external.Medications;
angular.$window.external.Prescriptions;
and I haven't yet been able to find where they are defined 🙁
Steve
You could sign up for a free trial of clinicalforge. It seems like their product has a list of all of the angular functions in it.
I'm pretty sure we have it, I'll get with our Informatics Director and see what I can find out.
Thanks!
Steve
I believe they are using an API through window.external javascript calls. I've yet to find any documentation on them outside of seeing how GE uses them. There are some good examples in emrapiaccess-service.js that show how they handle data coming from the external API calls.
What are you trying to change?
We are trying to add the last note to pharmacy to display so our providers can see it for controlled substances. I'll look at the javascript you mention to see if that helps.
Thanks,
Steve
Since the Note to Pharmacy isn't stored in any of our clinical functions, you may need to look at calling a mldef object. I'm not seeing any API calls that would get this either. If you are able to loop through the PTID (prescriptionId) from all previous prescriptions, you could call find("_MasterRx", "Comments", "PTID", "PTID_GOES_HERE") to get the note.
It actually looks like it is a property of Prescriptions - I just don't know it's correct name so I am trying to get the definition of Prescription.
Steve
That prescriptions object is initialized with emrApiAccessService. It uses emrApiAccessService.prescriptionsFromCache() which just calls window.external.Prescriptions. The JSON object that is returned has all prescriptions ever created on the patient (even during the visit), and that is pretty useful. Alas, after looking through the JSON object, I still don't see them giving us the pharmacy notes :-(. Below is what the JSON looks like for one of the prescriptions I created to test and see if it would show the notes. You could get the prescriptionID and pass it on to the find() I listed earlier if needed.
{
"personID": 0,
"prescriptionID": 1821518172969670,
"medicationID": 1821518172969620,
"medicationIDSpecified": true,
"medicationDetail": null,
"providerID": 0,
"providerIDSpecified": false,
"providerDetail": {
"loginName": null,
"groupList": null,
"providerID": 0,
"providerIDSpecified": false,
"lastPasswordChange": "\\/Date(-62135575200000)\\/",
"lastPasswordChangeSpecified": false,
"jobTitle": 0,
"jobTitleSpecified": false,
"jobTitleDetail": null,
"roleList": null,
"lastName": "Seale",
"firstName": "Michael",
"middleName": "T",
"homeLocation": 0,
"homeLocationSpecified": false,
"homeLocationDetail": null,
"currentLocation": 0,
"currentLocationSpecified": false,
"currentLocationDetail": null,
"deaNumber": null,
"licenseNumber": null,
"status": null,
"phone": null,
"authorizedLocationOfCares": null,
"isrespprov": 0,
"isrespprovSpecified": false,
"pmpRoleID": 0,
"pmpRoleIDSpecified": false,
"pmpRoleName": null,
"pidList": null,
"lastLoginDate": "\\/Date(-62135575200000)\\/",
"lastLoginDateSpecified": false,
"activationDate": "\\/Date(-62135575200000)\\/",
"activationDateSpecified": false,
"expirationDate": "\\/Date(-62135575200000)\\/",
"expirationDateSpecified": false,
"mqicUserName": null,
"specialty": 0,
"specialtySpecified": false,
"specialtyDetail": null,
"loginAttempts": 0,
"loginAttemptsSpecified": false,
"globalID": 0,
"globalIDSpecified": false,
"memberID": null,
"prescriberID": null,
"npi": null,
"spi": null,
"subscriptionureg": null,
"upin": null,
"data2000": null,
"authorizations": null,
"tocElectronicAddress": null,
"updateType": null,
"errorDetails": null,
"result": 0,
"resultSpecified": false
},
"userID": 0,
"userIDSpecified": false,
"userDetail": null,
"secondaryDocumentID": 1821517250597770,
"secondaryDocumentIDSpecified": true,
"documentDetail": null,
"change": 6,
"changeSpecified": true,
"quantity": "30",
"refills": "6",
"printInfo": null,
"rxType": "F",
"pubUser": 0,
"pubUserSpecified": false,
"pubUserDetail": null,
"pubtime": 0,
"pubtimeSpecified": true,
"pharmacy": "TEST Pharmacy\\r\\n130 Desiard st\\r\\nMonroe, LA 71201\\r\\nPh: (318) 361-0900\\r\\nFax: (318) 807-1120",
"clinicalDate": "\\/Date(1505916050000)\\/",
"clinicalDateSpecified": true,
"annotate": null,
"formularyStatus": null,
"formularyID": 0,
"formularyIDSpecified": false,
"formularyDetail": null,
"formularyConfidence": null,
"pharmacyBusinessID": 0,
"pharmacyBusinessIDSpecified": false,
"dispenseAsWritten": "N",
"exported": 0,
"exportedSpecified": false,
"dbCreateDate": "\\/Date(-62135575200000)\\/",
"dbCreateDateSpecified": false,
"dbUpdatedDate": "\\/Date(-62135575200000)\\/",
"dbUpdatedDateSpecified": false,
"bioSign": null,
"eRxAsyncResponse": 0,
"eRxAsyncResponseSpecified": false,
"eRxFmyListId": null,
"eRxFmyStatus": 0,
"eRxFmyStatusSpecified": false,
"pbmPatientUniqueId": null,
"bankIdNumber": null,
"cardholderName": null,
"cardholderId": null,
"payerName": null,
"groupNumber": null,
"comments": null,
"erxRenewalStatus": null,
"erxDenialReasonCode": null,
"erxDenialReasonOther": null,
"ncpdpid": null,
"ncpdpRxQtyQualifier": null,
"eRxUnitOfMeasureData": null,
"prescriptionOrderNumber": null,
"epcsErrorCode": 0,
"epcsErrorCodeSpecified": false,
"epcsErrorCodeDescription": null,
"epcsPrintedDate": "\\/Date(-62135575200000)\\/",
"epcsPrintedDateSpecified": false,
"epcsPrintedByPVID": 0,
"epcsPrintedByPVIDSpecified": false,
"isErxMeasureAllowed": null,
"erxPatient": null,
"erxPrescribedMedication": null
}
That's a huge help!
I'm pretty sure it is the "comments". I'll look into this.
Steve