I built a 'check-out' form entry, to guide through the check-out process. Trying to find the date of the most recent office visit (could be signed, but most likely not).
Do not see any MEL to list documents. Is there any function to do this?
Otherwise, thinking to:
(1) LIST_OBS("BP SYSTOLIC","signed","delimited","value")
(2) LIST_OBS("BP SYSTOLIC","unsigned","delimited","value")
(3) review thru both to filter on field 10 (document type) and determine max of field 2 (date)
Has anyone done anything like this? Have any suggestions?
Thanks.
Joe
What you are suggesting makes sense to me. We do something simpler. In our banner we just have Last OV: {LASTOBSDATE("CHIEF CMPLNT")} We make two assumptions:
1. If it's an office visit the chief complaint will be completed every time.
2. The note should be signed. I know that this isn't always true, but we felt that only signed visits should count.
If you need to grab unsigned visits what you are suggesting makes logic sense.
Similar approach, would need to be modified for your needs, i.e. unsigned encounters. I am assuming obs term "HPI" has been entered. I put all results in a string that is called by a data display. Contact me if you would like to discuss.
/*Retrieve List of Prior Office Visits*/
{fn Retrieve_Visits()
{
local i=0
local strList=""
local strHPI=""
strRetrieveList=""
OVArray1=getField(list_obs("HPI","Signed","Delimited","Value"),"|","")
if size(OVArray1)==0 then
return ""
else
for i=1,i<=size(OVArray1) and i<10,i=i+1 do
OVArray1[i]=getField(OVArray1[i],"^","")
strRetrieveList=strRetrieveList+(if strRetrieveList<>"",",","")+str(i)+"--"+OVArray1[i][2]+" "+OVArray1[i][3]+": "+OVArray1[i][4]+HRET
endfor
endif
return strRetrieveList
}
}
I agree with the use of either Chief complaint or HPI obsterms. No matter how much you drill it, there are going to be times when BP won't be entered.