Hi All,
We recently upgraded to EHR 9.8 and one of our consult letters became corrupt. I have been tweaking it for days with no luck. Close, but not what can't get exactly what the Physician wants.
Currently, we are using the CCC-CPOE for the Assessment. The consult letter is set to pull in the following coding:
{ccc_add_assess("","","N")}
Which populates the information below. The Physician does not want the "Assessed: 0815/2014" line.
Problem: Conductive Hearing Loss, Unspecified
Assessed: 08/15/2014
Patient has hearing loss.
Problem: Asthma
Assessed: 08/15/2014
Patient has asthma.
I tried {PROB_LIST_CHANGES("full")} and "new" but that gave me the Problem, ICD-9, Who Assessed it (Physician), etc. It looked far worse.
The Physician would like is to see the above without the Assessed line and for each Problem to be numbered. Similar to how it appears in the office visit note itself.
Any thoughts or help would be greatly appreicated. I'd be happy with just the Assessed line out of the picture.
Thanks,
-Alicia
You will want to put the output of ccc_add_assess into an array, run a match against each element in the array to find "Assessed:" and then, using the number match returns, do a remove command starting at that number match gave you for the length of however long Assessed: MM/DD/YYYY is and write that to a variable that you will have this function return. You could also put the whole output into a variable and then do a loop that will run it through the match and remove until match returns a 0.
Then there is the mldef method. Here are two functions that pull in the last assessments done into a handout we have. This illustrates how to get the problem and assessments (they aren't stored in the same table)
{fn get_last_assessments() { local aPD,cPD,ePD ePD = 0 local iPD = getRowCount('Assessments') while iPD > 0 do iPD = iPD-1 aPD = getRow('Assessments',iPD,'SDID') cPD=aPD if cPD > ePD then ePD =cPD 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()}{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 }}
Good luck!
ccc_add_assess() just calls ccc_extract_assess(), so you can just manipulate that function to get what you need out of it. If you want to keep the functionality of ccc_extract_assess(), you'll need to name your modified version something else. Here is the code for you to modify:
fn ccc_extract_assess(aa,bb,cc) { /* aa is Dx label; bb is comma delimited string of Dx codes to assess; cc is # of days or a date to set date range, or "L" for last value; if bb is empty, then all problems will be assessed; if cc is empty, then all dates will be assessed; if bb and cc empty, then return assessments for all problems and all dates; returns a "\r\n" delimited string of assessments. */ local a,b,c,d,e,f,g="",h,i,j,k,l,m,n,p,q,r,s,t,u a = getfield(prob_after("delimited"),"|","") n = size(a) if n=0 then return "" else "" endif k = getfield(bb,",","") l = size(k) /* set date range */ h = str(cc) cond case h="" or h="L" or h="l" "" case size(h) < 10 h = str(subtractdates(str(._todaysdate),"0","0",h)) else "" endcond for c=1, c<=n, c=c+1 do if a[c]="" then "" else b = getfield(a[c],"^","") /* j is dx code from Prob List */ j = b[3] /* 12-22-05: moved m to here-jt */ m = "" /* determine if selected problem is found in dx code string */ if bb="" then "" else for f=1, f<=l, f=f+1 do if match(j,k[f]) > 0 then m = 1 break else "" endif endfor endif /* if bb has a value but does not match w/ selected problem, then do nothing */ if bb<>"" and m = "" then "" else /* get delimited list of assessments for selected problem */ if g_use_ccc_list_assess = true then d = ccc_list_assessments_delim(b[1],b[2],j) else d = list_assessments(b[1],b[2],j,"delimited") endif if d="" then "" else e = getfield(d,"|","") if h="L" or h="l" then q = 1 else q = size(e) endif /* 12-13-06: added this code since the date of the assessment does not always follow the date of entry; since e[] is sorted by date of entry and not date of assessment, this had to be added to get the 'last value'; for args other than "L", the date of assessment is already being compared prior to accepting it as a value. */ if size(e)<2 then "" else if h="L" or h="l" then u=copy(e[1]) r = getfield(u,"^","") while size(r)<6 do r[size(r)+1]="" endwhile t=str(r[5]) for f=2, f<=size(e), f=f+1 do s = getfield(e[f],"^","") while size(s)<6 do s[size(s)+1]="" endwhile if durationdays(t,str(s[5]))>0 then t=str(s[5]) u=copy(e[f]) endif endfor /* reset e[1] to values with most recent date for "L" arg; since q is set to 1, then e[1] will be only value evaluated below */ e[1]=copy(u) endif endif for f=1, f<=q, f=f+1 do if e[f]="" then "" else i = getfield(e[f],"^","") // Mods DAFN 13dec2005 while size(i)<6 do i[size(i)+1]="" endwhile /* 12-22-05: jt added; make sure a true date before proceeding */ if durationdays("01/01/1920",str(i[5]))==0 then "" else /* make sure date is within range */ if durationdays(str(i[5]),h) > 0 then break else /* formatting */ if size(g) < 4 then p="\r\n" else if sub(g,size(g)-3)=="\r\n\r\n" then p="" else p="\r\n" endif endif g = g + if i[1]="" then "" else p + "Problem: \t" + ccc_capLETTER(i[1]) + "\r\n" + if i[5]="" then "" else "Assessed: \t" + i[5] + "\r\n" endif + if i[6]="" then "" else i[6] + "\r\n" endif endif endif endif endif endfor endif endif endif endfor return g }
Hi,
I greatly appreciate your responses. I tried both suggestions and couldn't get them to work. I even reached out to the workbench and they suggested I use the same command we've been using {ccc_add_assess("","","N")} or replace the "N" with an "L". This brings in the older assessments that were done over a year or 2 ago along with the new or current.
Our Providers are totally frustrated and the workbench told me maybe the CCC forms changed when upgrading to 8.3.8 for EHR 9.8.
I can't believe there isn't an eaiser way to pull a consult letter together.
Thanks,
-Alicia