We would like to track the usage of the encounter forms in our system. There are 100 obs terms in the system named EFTRACKn where n is 1..100.
I would like to set the value of one of the EFTRACK obs terms when a form is loaded to see how frequently that form is used.
I inserted the following statement into the function section of the form:
{!obsnow("EFTRACK2","formname"+USER.LOGINNAME)}
but nothing happens.
However, if I reimport the form into the EMR and then update it with the "Get Latest Form Version" it then sets the obs term.
Is there a standard way of tracking encounter form use that works predictably?
Thanks!
Try something like this:
{
!if (obsnow("EFTRACK2") <> "") then
//do nothing, obsterm already set with username that first opened form
else
obsnow("EFTRACK2",USER.LOGINNAME)
endif
}
watcher expression should evaluate when the form is first opened and then set the value of the appropriate obsterm to the username that opened the form unless the obsterm already has a value
This is how I have been tracking encounter forms. Added this to a text component. Reason for my approach is we are also needing to tack encounter types which, as far as I know not possible, so using the encounter document name and summary helps triangulate what type is being used in the database.
{local test = OBSNOW('TEST AREA', REMOVE(DOCUMENT.ACTIVESUMDESC,1,13)) test = ""}
Then in the SQL DB Use something like this for tracking:
SELECT OBS.OBSVALUE AS Encounter, (PAT.First+' '+PAT.Last) AS PatientName, PAT.Birthdate, (USR.FIRSTNAME+' '+USR.LASTNAME) AS Provider, OBS.OBSDATE AS Date
FROM OBS, PatientProfile PAT, USR
WHERE OBS.PUBUSER = USR.PVID AND OBS.PID = PAT.PID AND OBS.HDID = 1000071
ORDER BY OBSVALUE