Hi,
I'd like to be able to import data from the flowsheet directly into the patient's note. For example, next to a patient's current lab results for cholesterol, I'd like to see the 3 most recent cholesterol values as well, all in one place in the note. Can Centricity EMR auto-populate data from the flowsheet directly into the note?
Thanks!
Flowsheet data are obs term oganized in a grid type of view.
you should be able to pull this data with obsany(the obsterm name) commands..
This is very possible with a little bit of MEL. This approach involves bring the obs terms into an array and extracting the desired last set of values which is not entirely trivial. However, it is trivial to bring the last prior obs term into the note via LastObsValue() or LastObsValueDate().
Contact me if you want the code to bring in the last desired set into the note.
Not sure if this is what your looking for. I found this on here awhile back and used it to create a Text Component that we use to insert our Health Home Flow sheet in a note when needed.
Health Home Quality Measures:
{labs = GET_FLOWSHEET_VALUES("Enterprise\CCC\*Health Home Patient")
tody = str(._todaysdate)
if labs <> "" then
lablist = getfield(labs, "\n", "")
sz = size(lablist)
list = ""
for i = 1, i <= sz, i = i + 1 do
dt = ""
lab = lablist[i]
labsize = size(lab)
if labsize > 0 then
dtloop = 0 dtptr = 1
while (dtloop = 0) and (dtptr + 11 <= labsize)
do
dtbegin = match( lab, dtptr,"/") -2
dt = sub(lab, dtbegin, 10)
if sub(lab, dtbegin + 10, 1) = ")" then dtloop = 1 endif
dtptr = dtbegin + 3
endwhile
dur = durationdays(dt, tody)
if (dur < 1) and (dtloop = 1) then
list = list + lablist[i] + "\n\r"
endif
endif
endfor
if list <> "" then list else "No lab results." endif
else "No lab results."
endif}
Here is the code we used in buttons to show the last 3 values of a certain obs term in a pop=up. HGBA1C in this example:
{local obsarray1
obsarray1 = getfield(LIST_OBS("HGBA1C",
"signed", "list","valuedate"),")","(,")
userok(str(sub(obsarray1,1,3), HRET))
}