On CPS12.
I have been trying to figure out a way to pull in the appointment information that was linked to the document (in the Update Chart Dialog box).
We have a number of users that can't seem to get right the LOC of the appointment and sometimes even the date.
I was really hoping to create an alert when a user entered a document where the appointment loc does not match the appt LOC.
I have tried using FIND, but not having any luck.
Has anyone had any luck in building anything like this? (Yes I recognize it is a training issue, but easier to train at the time of the error than when billing sends them a flag).
Thank you!!!!!!
We have the same problems, I'm sure a lot of people out there do. Here is a snippet I have in a form that runs one time when the document opens. It gives a popup warning to users if they don't link an appointment and sets a couple document variables that I use for other purposes. It also adds appointment type to the summary line. You can probably get what you need from here. This was written for CPS, cEMR may be different
if find("document","AppointmentsID") == "" then
document.apptstatus = FALSE
userok("WARNING" + hret + hret + "This document is not properly linked to a patient appointment. This could cause issues with documentation and billing. If this is for a patient visit please click Okay, end the document and discard it." + hret + hret + "If you are unsure why you are receiving this message, please contact your clinic super user.")
//prefill document prov and loc here
if ok(MelGuessProvider) then
document.MEL_Provider = MelGuessProvider()
endif
if (document.MEL_Provider == "") then
document.MEL_Provider = find("_UserSearch","loginname","RealName",document.provider)
endif
document.MEL_LOC = find("AllLocation","abbrevName","Name",document.locofcarename) //mldefs8
document.apptType = "F/U" //just a guess, there is no appointment
else
document.apptstatus = TRUE
document.MEL_Provider = find("_usersearch","loginname","doctorfacilityID",find("_PatientAppointments","DoctorID","AppointmentsID",find("Document","AppointmentsID"))) //docfacility mldefs3, document mldefs6
document.MEL_LOC = find("AllLocation","abbrevName","FacilityID",find("_PatientAppointments","FacilityID","AppointmentsID",find("Document","AppointmentsID"))) //mldefs8
document.apptType = find("_ApptType","Name","ApptTypeID",find("_PatientAppointments","ApptTypeID","AppointmentsID",find("Document","AppointmentsID")))
ADD_DOCUMENT_SUMMARY(document.apptType)
endif
gibsonmi - quick question, the form that you mentioned you have this in, is it basically a blank form with this code in it or is there a form with other data that has this included?
Linda
It is part of an intake/Hpi form, there is a lot of other code in there. This sits in the code panel to the right. I wrap it in a function I call RunFirstOpen() and call it like this (also in the code panel).
{!document.isFormOpen}
{!if document.isFormOpen == "" then
RunFirstOpen()
document.isFormOpen = "Yes"
endif}
Thank you! I will have to take a look and do a little playing with it.
A couple of questions:
1. It appears that you are pushing data- is it just to fields on the form? You can't actually update the document properties can you? (other than the summary line)
2. It looks like there is a function MELGuessProvider() is that a function included in the form or as part of your implementation, or an 'undocumented' GE one?
Thanks again- I do think this is a start.