Has any one been able to successfully added a second and third blood pressure? i have tried to do it myself but just cant get it to work right. i am also trying to make sure it pulls the most recent results. Here is what i have been using:
Most recent Vitals observed:
{/* vits = GET_FLOWSHEET_VALUES('Enterprise\Printing\Chart_Summary\Current-Vitals')
if vits <> "" then
vitlist = getfield(vits , "\n", "")
sz = size(vitlist)
list = ""
for i = 1, i <= sz, i = i + 1 do
dt = ""
tody = str(._todaysdate)
vit = vitlist[i]
if size(vit) > 0 then
dtbegin = match( vit,"/") -2
dt = sub(vit, dtbegin, 10)
dur = durationdays(dt, tody)
if dur < 4 then
list = list + vit + "\n\r"
else
list = list
endif
else
list = list
endif
endfor
if list <> "" then list else "No results." endif
else
"No results."
endif */}
{if obsany("height") <> "" then "Height: "+obsany("height")+" inches \n\r" else "" endif}{
if obsany("weight") <> "" then "Weight: "+obsany("weight")+" pounds \n\r" else "" endif}{
if obsany("temperature") <> "" then "Temperature: "+obsany("temperature")+" degrees F \n\r" else "" endif}{
if obsany("temp site") <> "" then "Site for temperature: "+obsany("temp site")+ "\n\r" else "" endif}{
if obsany("pulse rate") <> "" then "Pulse Rate: "+obsany("pulse rate")+" beats/minute \n\r" else "" endif}{
if obsany("pulse rhythm") <> "" then "Pulse Rhythm: "+obsany("pulse rhythm")+" \n\r" else "" endif}{
if obsany("resp rate") <> "" then "Respiration Rate: "+obsany("resp rate")+" breaths/minute \n\r" else "" endif}{
if obsany("bp systolic") <> "" and obsany("bp diastolic") <> ""then "Blood Pressure #1: "+obsany("bp systolic")+" / "+obsany("bp diastolic")+" Hg \n\r" else "" endif}{
if obsnow("BP SYS #2") <> "" and obsnow("BP DIA #2") <> ""then "Blood Pressure #2: "+obsnow("BP SYS #2")+" / "+obsnow("BP DIA #2")+" Hg \n\r" else "" endif}{
if obsany("BP SYS #3") <> "" and obsany("BP DIA #3") <> ""then "Blood Pressure #3: "+obsany("BP SYS #3")+" / "+obsany("BP DIA #3")+" Hg \n\r" else "" endif}{
if obsnow("BG FINGER") <> "" then "Blood Glucose Result: "+obsnow("BG FINGER")+" \n\r" else "" endif}
below is what I use to get all previous obs value. You can limit it to 2 or 3
{
local obsTermArray = getfield(list_obs(obsTermStr, status, "delimited", "valuedate"),"|","")
local obsTermArraySize = size(obsTermArray)
local Title = "Flowsheet view for prior "+ description +" values" + "\t" + hret + hret
Title = Title + " " + "Date" + "\t\tValue" + hret
local returnData = ""
local i=""
for i = 1, i <= obsTermArraySize , i = i + 1
do
local eachObs = getfield(obsTermArray[i],"^","")
local obsDate = sub(eachObs[1], match(eachObs[1], "(")+1 , 10)
if obsDate == Null
then obsDate = " - "
else ""
endif
returnData = returnData + " " + obsDate + "\t" + obsValue + hret
endfor
local BodyMessage = Title + returnData
if returnData <> "" then
userok(BodyMessage)
else
userok("No data found for " + description)
endif
}