As we have multiple specialists and we have a lot of shared patients between them. Some of the specialists do not like that the view/insert prior pulls the true prior and not their own for certain data. We have created a solution for the HPI (pulls in that particular users prior HPI), but now looking for something similar to pull in the prior Assessment and Patient Instructions. I am pretty sure I can get the patient instructions to work, but the prior assess has been proving more difficult. If anyone has any ideas for the prior assessment, please let me know. Any help would be greatly appreciated!
Can you share what your solution was for the HPI pulls?
We named it .myhpi and used: {LASTOBSVALUEBYUSER("HPI")} as the read out of the quick text. This will then pull in that users prior hpi and they can keep or discard all or parts of it if needed.
awesome - thanks so much for the share!
Sue
I just confirmed that the prior patient instructions also works. Using the same symbol language and just changing the obs term to "INSTRUCTIONS"
If you are using the OBSTERM's "ASSESS" and "PLAN" for you assessment and plan, the same code would work for those as well.
-Chris
Would that work for lab as well for that particular provider?
Here is come code I wrote to do what you are asking for as far as assessments I believe (2 functions)
{fn get_last_assessments_ForCurrentUser()
{
local aPD,cPD,ePD,strAssessedBy
ePD = 0
local iPD = getRowCount('Assessments')
while iPD > 0 do
iPD = iPD-1
aPD = getRow('Assessments',iPD,'SDID')
strAssessedBy = find("_UserSearch","LoginName","PVID",getRow('Assessments',iPD,'USRID'))
if USER.LOGINNAME == strAssessedBy then
cPD=aPD
if cPD > ePD then
ePD =cPD
else
""
endif
else
""
endif
endwhile
local aP,cP
cP = fmt("Problems discussed at your last visit:","B") + HRET
local iP = getRowCount('Assessments')
while iP > 0 do
iP = iP-1
aP = getRow('Assessments',iP,'SDID','ANNOTATE','SPRID')
if aP[1] = ePD then
cP=cP + get_prob_from_sprid(aP[3]) + HRET + "Assessment: " + aP[2] + HRET
else
""
endif
endwhile
if cP=="" then return "None entered" else "" endif
return str(cP)
}}
{get_last_assessments_ForCurrentUser()}
{fn get_prob_from_sprid(passedsprid)
{
passedsprid = replacestr(passedsprid,".00","")
local aSP, cSP
local iSP = getRowCount('_MasterProb')
while iSP > 0 do
iSP = iSP-1
aSP = getRow('_MasterProb',iSP,'SPRID','DESCRIPTION')
if aSP[1] = passedsprid then
cSP=aSP[2]
else
""
endif
endwhile
return cSP
}}
Hi David,
For this code, I will place all of this into the body of the quick text as the read out?
Thanks,
Sirna
Sirna, you would have to try changing the code so that they were not separate functions but just one code block. And you will probably not be able to do that as you would run into the Quick Text 512 character limit. The better thing would be to add them to a function library and use the Quick Text to call the function.
How do I add something to the Function Library? Sorry! I do not normally do this, but would appreciate any guidance you can give me or direct me to a document or book that would help!
Thank you so much!
Sirna, I've always had CCC so if you don't I'm not sure what files you have. But there should be a file in the EMR directory called urslib.txt. This loads functions for the client. You can put the function in there in this format.
fn get_last_assessments_ForCurrentUser(){
rest of the code
}
fn get_prob_from_sprid(passedsprid){
rest of the code
}
Then you can set up the quick text with {get_last_assements_ForCurrentUser()} in it. Also, in all the code I pasted, you don't need the line {get_last_assessments_ForCurrentUser()} that is right before the second function. That code was copied from a handout and that line just invoked the function above it.