Anyone have lab letters/handouts that they are willing to post?
Appreciate the help!
David Shower
OU Tulsa School of Community Medicine
Below is our most inclusive lab letter. I created the AnyInDays function to streamline our lab letters.
{fn AnyInDays(obs, days, label, preresult, prenormal, normallabel, hdid, postnormal, postresult)
{
local result = ""
if LASTOBSDATE(obs)<>""
and (days == 0
or DURATIONDAYS(LASTOBSDATE(obs), STR(._TODAYSDATE)) <= days) then
result = FMT(label, "B") + preresult + FMT(LASTOBSVALUE(obs), "B") + " on " + LASTOBSDATE(obs) + prenormal + if hdid<>"" then CFMT(FIND("_MasterObs", "Range", "HDID", hdid), "", normallabel, "", postnormal + ").") else "" endif + " " + postresult + "
"
endif
return result
}
}{._TODAYSDATE}
?
?
?
{PATIENT.FIRSTNAME} {PATIENT.LASTNAME}
{PATIENT.LABELADDRESS}
MR# - {PATIENT.MEDRECNO}
Dear {INITIALCAP(PATIENT.FIRSTNAME)} {INITIALCAP(PATIENT.LASTNAME)}:
The result(s) of your test(s) listed below has/have been reported back to me and is/are as follows:
{if STR(AnyInDays("WBC", 21, "", "", "", "", "", "", ""),
AnyInDays("RBC", 21, "", "", "", "", "", "", "", ""),
AnyInDays("HGB", 21, "", "", "", "", "", "", "", ""),
AnyInDays("HCT", 21, "", "", "", "", "", "", "", ""),
AnyInDays("PLATELETS", 21, "", "", "", "", "", "", "", ""))<>"" then
FMT("
CBC (Complete Blood Count):" , "B") + " These tests check for infection, anemia and other conditions. The results are as follows:" + hret
+ AnyInDays("WBC", 21, " WBC: ", "", ".", " (Normal: ", "68", "", "")
+ AnyInDays("RBC", 21, " RBC: ", "", ".", " (Normal: ", "67", "", "")
+ AnyInDays("HGB", 21, " Hemoglobin: ", "", ".", " (Normal: ", "65", "", "")
+ AnyInDays("HCT", 21, " Hematocrit: ", "", ".", " (Normal: ", "64", "", "")
+ AnyInDays("PLATELETS", 21, " Platelets: ", "", ".", " (Normal: ", "66", "", "")
else
""
endif + AnyInDays("ESR", 21, "Sedimentation rate: ", "", ".", " (Normal: ", "63", "", "This test is an indicator of inflammation.") + if STR(AnyInDays("CHOLESTEROL", 21, "", "", "", "", "", "", ""),
AnyInDays("TRIGLYC TOT", 21, "", "", "", "", "", "", ""),
AnyInDays("HDL", 21, "", "", "", "", "", "", ""),
AnyInDays("LDL", 21, "", "", "", "", "", "", ""))<>"" then
FMT("
Lipid Panel:", "B") + " These tests measure the various forms of fat in your blood. The results are as follows:" + hret
+ AnyInDays("CHOLESTEROL", 21, " Total Cholesterol: ", "", ".", " (Normal: ", "14", "", "")
+ AnyInDays("TRIGLYC TOT", 21, " Triglycerides: ", "", ".", " (Normal: ", "3071", "", "")
+ AnyInDays("HDL", 21, " HDL (good cholesterol): ", "", ".", " (Normal: ", "26", "", "")
+ AnyInDays("LDL", 21, " LDL (bad cholesterol): ", "", ".", " (Normal: ", "30", "", "")
else
""
endif + if STR(AnyInDays("SODIUM", 21, "", "", "", "", "", "", ""),
AnyInDays("POTASSIUM", 21, "", "", "", "", "", "", ""),
AnyInDays("CHLORIDE", 21, "", "", "", "", "", "", ""),
AnyInDays("HCO3", 21, "", "", "", "", "", "", ""),
AnyInDays("BG RANDOM", 21, "", "", "", "", "", "", ""),
AnyInDays("CREATININE", 21, "", "", "", "", "", "", ""),
AnyInDays("BUN", 21, "", "", "", "", "", "", ""),
AnyInDays("CALCIUM", 21, "", "", "", "", "", "", ""),
AnyInDays("MDRD-GFR", 21, "", "", "", "", "", "", ""),
AnyInDays("GFR", 21, "", "", "", "", "", "", ""))<>"" then
FMT("
Basic Metabolic Panel:", "B") + " These tests check for kidney problems, diabetes and various electrolytes which are essential for the heart. The results are as follows:" + hret
+ AnyInDays("SODIUM", 21, " Sodium: ", "", ".", " (Normal: ", "159", "", "")
+ AnyInDays("POTASSIUM", 21, " Potassium: ", "", ".", " (Normal: ", "35", "", "")
+ AnyInDays("CHLORIDE", 21, " Chloride: ", "", ".", " (Normal: ", "13", "", "")
+ AnyInDays("HCO3", 21, " Bicarbonate: ", "", ".", " (Normal: ", "3387", "", "")
+ AnyInDays("BG RANDOM", 21, " Glucose: ", "", ".", " (Normal: ", "8", "", "")
+ AnyInDays("CREATININE", 21, " Creatinine: ", "", ".", " (Normal: ", "18", "", "")
+ AnyInDays("BUN", 21, " Urea Nitrogen (BUN): ", "", ".", " (Normal: ", "9", "", "")
+ AnyInDays("CALCIUM", 21, " Calcium: ", "", ".", " (Normal: ", "11", "", "")
+ AnyInDays("MDRD-GFR", 21, " Glomerular filtration rate: ", "", "", "", "", "", "(Acceptable: greater than 60)")
+ AnyInDays("GFR", 21, " Glomerular filtration rate: ", "", ".", " (Acceptable: ", "66455", "", "")
else
""
endif + if STR(AnyInDays("ALK PHOS", 21, "", "", "", "", "", "", ""),
AnyInDays("SGOT (AST)", 21, "", "", "", "", "", "", ""),
AnyInDays("SGPT (ALT)", 21, "", "", "", "", "", "", ""),
AnyInDays("CPK", 21, "", "", "", "", "", "", ""),
AnyInDays("PROTEIN, TOT", 21, "", "", "", "", "", "", ""),
AnyInDays("ALBUMIN", 21, "", "", "", "", "", "", ""),
AnyInDays("BILI TOTAL", 21, "", "", "", "", "", "", ""),
AnyInDays("BILI DIRECT", 21, "", "", "", "", "", "", ""),
AnyInDays("MAGNESIUM", 21, "", "", "", "", "", "", ""),
AnyInDays("PO4", 21, "", "", "", "", "", "", ""))<>"" then
FMT("
Hepatic Panel:", "B") + " These tests check for liver damage. The results are as follows:" + hret
+ AnyInDays("ALK PHOS", 21, " Alkaline Phosphatase: ", "", ".", " (Normal: ", "3", "", "")
+ AnyInDays("SGOT (AST)", 21, " AST: ", "", ".", " (Normal: ", "39", "", "")
+ AnyInDays("SGPT (ALT)", 21, " ALT: ", "", ".", " (Normal: ", "40", "", "")
+ AnyInDays("CPK", 21, " CK: ", "", ".", " (Normal: ", "16", " U/L", "")
+ AnyInDays("PROTEIN, TOT", 21, " Total Protein: ", "", ".", " (Normal: ", "36", "", "")
+ AnyInDays("ALBUMIN", 21, " Albumin: ", "", ".", " (Normal: ", "2", "", "")
+ AnyInDays("BILI TOTAL", 21, " Total Bilirubin: ", "", ".", " (Normal: ", "43", "", "")
+ AnyInDays("BILI DIRECT", 21, " Direct Bilirubin: ", "", ".", " (Normal: ", "21", "", "")
+ AnyInDays("MAGNESIUM", 21, " Magnesium: ", "", ".", " (Normal: ", "32", "", "")
+ AnyInDays("PO4", 21, " Phosphorous: ", "", ".", " (Normal: ", "34", "", "")
else
""
endif + if STR(AnyInDays("URIC ACID", 21, "", "", "", "", "", "", ""),
AnyInDays("PSA", 21, "", "", "", "", "", "", ""),
AnyInDays("TSH", 21, "", "", "", "", "", "", ""),
AnyInDays("T4, FREE", 21, "", "", "", "", "", "", ""),
AnyInDays("HGBA1C", 21, "", "", "", "", "", "", ""),
AnyInDays("CEA", 21, "", "", "", "", "", "", ""),
AnyInDays("HELICOB IGG", 21, "", "", "", "", "", "", ""),
AnyInDays("HPYLORIAGSTL", 21, "", "", "", "", "", "", ""),
AnyInDays("H PYLOR BRTH", 21, "", "", "", "", "", "", ""),
AnyInDays("MCROALB24H U", 21, "", "", "", "", "", "", ""),
AnyInDays("MCALB EXC RT", 21, "", "", "", "", "", "", ""),
AnyInDays("MCROALB/CR U", 21, "", "", "", "", "", "", ""),
AnyInDays("B12", 21, "", "", "", "", "", "", ""),
AnyInDays("B-12", 21, "", "", "", "", "", "", ""),
AnyInDays("FOLATE", 21, "", "", "", "", "", "", ""),
AnyInDays("AMYLASE", 21, "", "", "", "", "", "", ""),
AnyInDays("LEAD, BLOOD", 21, "", "", "", "", "", "", ""),
AnyInDays("FERRITIN", 21, "", "", "", "", "", "", ""),
AnyInDays("IRON", 21, "", "", "", "", "", "", ""),
AnyInDays("TIBC", 21, "", "", "", "", "", "", ""),
AnyInDays("VIT D 25-OH", 21, "", "", "", "", "", "", ""),
AnyInDays("LYME DIS AB", 21, "", "", "", "", "", "", ""),
AnyInDays("CRP", 21, "", "", "", "", "", "", ""),
AnyInDays("PROBNP", 21, "", "", "", "", "", "", ""),
AnyInDays("VALPROIC ACD", 21, "", "", "", "", "", "", ""),
AnyInDays("LITHIUM BLD", 21, "", "", "", "", "", "", ""))<>"" then
hret
+ AnyInDays("URIC ACID", 21, "Uric Acid: ", "", ".", " (Normal: ", "46", "", "")
+ AnyInDays("PSA", 21, "PSA: ", "", ".", " (Normal: ", "37", "", "This tests for prostate cancer.")
+ AnyInDays("TSH", 21, "TSH: ", "", ".", " (Normal: ", "29", "", "This tests your thyroid stimulating hormone level.")
+ AnyInDays("T4, FREE", 21, "T4, FREE: ", "", ".", " (Normal: ", "24", "", "")
+ AnyInDays("HGBA1C", 21, "Glycated hemoglobin ", "(also called Hemoglobin A1C): ", ".", "", "", "", "This test is an indicator of your long-term control of diabetes. Generally, levels below 7.0 are acceptable.")
+ AnyInDays("CEA", 21, "CEA: ", "", ".", " (Normal: ", "12", "", "")
+ AnyInDays("HELICOB IGG", 21, "H. Pylori Bacteria: ", "", ".", "", "", "", "This test is an indicator for stomach bacteria that can lead to ulcers and gastritis.")
+ AnyInDays("HPYLORIAGSTL", 21, "H. Pylori Bacteria: ", "", ".", "", "", "", "This test on stool is an indicator for stomach bacteria that can lead to ulcers and gastritis.")
+ AnyInDays("H PYLOR BRTH", 21, "H. Pylori Breath Test: ", "", ".", "", "", "", "This test is an indicator for stomach bacteria that can lead to ulcers and gastritis.")
+ AnyInDays("MCROALB24H U", 21, "24 Hour Urine Microalbumin: ", "", ".", " (Normal: ", "3435", "", "If these tests are elevated, it could represent kidney disease from diabetes.")
+ AnyInDays("MCALB EXC RT", 21, "Excretion Rate: ", "", ".", " (Normal: ", "13343", "", "If these tests are elevated, it could represent kidney disease from diabetes.")
+ AnyInDays("MCROALB/CR U", 21, "Microalbumin/Creatinine Ratio: ", "", ".", " (Normal: ", "3434", "", "If this test is elevated, it could represent kidney disease from diabetes.")
+ AnyInDays("B12", 21, "Vitamin B-12: ", "", ".", " (Normal: ", "5585", " pg/mL", "")
+ AnyInDays("B-12", 21, "Vitamin B-12: ", "", ".", " (Normal: ", "6", " pg/mL", "")
+ AnyInDays("FOLATE", 21, "Folate: ", "", ".", " (Normal: ", "23", " ng/mL", "")
+ AnyInDays("AMYLASE", 21, "Amylase: ", "", ".", " (Normal: ", "4", " U/L", "")
+ AnyInDays("LEAD, BLOOD", 21, "Lead: ", "", ".", " (Normal: ", "111", "", "")
+ AnyInDays("FERRITIN", 21, "Ferritin level (iron study): ", "", ".", " (Normal: ", "22", "", "")
+ AnyInDays("IRON", 21, "Iron level: ", "", ".", " (Normal: ", "151", "", "")
+ AnyInDays("TIBC", 21, "Total Iron Binding Capacity level: ", "", ".", " (Normal: ", "1032", "", "")
+ AnyInDays("VIT D 25-OH", 21, "Vitamin D: ", "", ".", "", "", "", "(Normal: Optimum levels in the normal population are 30-80)")
+ AnyInDays("LYME DIS AB", 21, "Lyme Antibody screen: ", "", ".", "", "", "", "")
+ AnyInDays("CRP", 21, "CRP: ", "", ".", " (Normal: ", "2704", "", "")
+ AnyInDays("PROBNP", 21, "PROBNP: ", "", ".", " (Normal: ", "48284", "", "")
+ AnyInDays("VALPROIC ACD", 21, "Valproic Acid (Depakote): ", "", ".", " (Normal: ", "289", "", "")
+ AnyInDays("LITHIUM BLD", 21, "Lithium: ", "", ".", " (Normal: ", "26639", "", "")
else
""
endif}
If you have any questions, please contact me at your convenience.
Sincerely,
?
?
{PATIENT.FIRSTNAME} {PATIENT.LASTNAME}
Here is the one we use. Although I am trying to make it pull in only the most recent (within 14 days) results for the tests. As you can tell I am not getting tvery far, so any suggestions would be appreciated.
{DATESTAMP()}
?
?
?
?
?
?
{PATIENT.FIRSTNAME} {PATIENT.LASTNAME}
{PATIENT.LABELADDRESS}
?
?
?
Dear {IF PATIENT.SEX = "F" THEN "Ms. " ELSE "Mr. " ENDIF} {INITIALCAP(PATIENT.LASTNAME)}:
Your recent lab work and/ or studies were NORMAL, unless otherwise indicated; see below. Please call the office with any questions.
Blood Tests Other Tests
?
Complete Blood Count (CBC) |
? |
Pap Smear |
||
Chemistry Profile (Includes * tests) |
? | ? | ||
{FMT(LAST_SIGNED_OBS_VALUE("PSA"),",")} |
Prostate Specific Antigen (PSA) (0.0-4.0) |
? |
HPV |
|
{FMT(LAST_SIGNED_OBS_VALUE("HGBA1C"),",")} |
Hemoglobin A1C (4.0-5.6%) |
? |
Urinalysis |
|
{FMT(LAST_SIGNED_OBS_VALUE("GLUCOSE SER"),",")} |
*Sugar (65-99) |
? |
Culture |
|
Electrolytes |
? |
Ultrasound |
||
{FMT(LAST_SIGNED_OBS_VALUE("POTASSIUM"),",")} |
*Potassium (3.5-5.1) |
? |
X-Ray |
|
*Liver Function Tests |
? |
Electrocardiogram |
||
Thyroid Profile |
? |
Mammogram |
||
*Kidney Function |
? |
CT Scan |
||
{FMT(LAST_SIGNED_OBS_VALUE("VIT D 25-OH"),",")} |
Vitamin D (30-100 ng/mL) |
? |
Dexa Scan (Bone Scan) |
|
{FMT(LAST_SIGNED_OBS_VALUE("CRP"),",")} |
Cardio CRP |
? |
Stress Test |
|
Homocysteine |
? |
MRI |
||
*Electrolytes |
? | ? | ||
Stool Cards |
? | ? |
Your Level Desirable Level / Goal
Total Cholesterol |
{FMT(LAST_SIGNED_OBS_VALUE("CHOLESTEROL"),",")} |
Total (normal is less than 200) |
HDL ( Good Cholesterol ) |
{FMT(LAST_SIGNED_OBS_VALUE("HDL"),",")} |
(normal is greater than 40 mg/dl for males and 50 mg/dl for females) |
LDL ( Bad Cholesterol ) |
{FMT(LAST_SIGNED_OBS_VALUE("LDL"),",")} |
(ideal is about 100 mg/dl) |
Triglycerides |
{FMT(LAST_SIGNED_OBS_VALUE("TRIGLYCRDES"),",")} |
(normal is less than 150 mg/dl) |
Risk Indicator |
4.5 or less |
?
Comments:
Recheck Lab Work:
Use this instead of LAST_SIGNED_OBS_VALUE (replace LASTOBSDATE with LAST_SIGNED_OBS_DATEand LASTOBSVALUE with LAST_SIGNED_OBS_VALUE if you only want signed results:
{fn AnyInDays(obs, days)
{
local result = ""
if LASTOBSDATE(obs)<>""
and (days == 0
or DURATIONDAYS(LASTOBSDATE(obs), STR(._TODAYSDATE)) <= days) then
result = LASTOBSVALUE(obs)
endif
return result
}
}
jjordet said:
Use this instead of LAST_SIGNED_OBS_VALUE (replace LASTOBSDATE with LAST_SIGNED_OBS_DATEand LASTOBSVALUE with LAST_SIGNED_OBS_VALUE if you only want signed results:
{fn AnyInDays(obs, days)
{
local result = ""
if LASTOBSDATE(obs)<>""
and (days == 0
or DURATIONDAYS(LASTOBSDATE(obs), STR(._TODAYSDATE)) <= days) then
result = LASTOBSVALUE(obs)
endif
return result
}
}
Thank you! i will give it my best shot. I am still very new at this, so I appreciate the help.
Laurie
Ok so I tried the above in the PSA result field:
{fn AnyInDays(obs, days)
{
local result = ""
if LASTOBSDATE("PSA")<>""
and (days == 14
or DURATIONDAYS(LASTOBSDATE("PSA"), STR(._TODAYSDATE)) <= 14) then
result = LASTOBSVALUE("PSA")
endif
return result
}
}
and recieved this error:
{fn AnyInDays(obs, days)
<-COMPILER ERROR NEARBY: Expect LEFT CURLY BRACKET. Instead had ERROR after RIGHT PAREN
Thanks for your help.
Laurie
Jerroll,
It looks like in the previous function, you eliminated many of the parameters. Thus, I think as you call the function throughout the letter, you now only pass two parameters?
Thus:
+ AnyInDays("WBC", 21, " WBC: ", "", ".", " (Normal: ", "68", "", "")
Becomes
+ AnyInDays("WBC", 21)
Follow-up question - it looks like tests not done suppresses the section. Correct?
Thanks.
Laurie,
don't replace obs in the function. call the function like this: AnyInDays("PSA", 14)
{fn AnyInDays(obs, days)
{
local result = ""
if LASTOBSDATE(obs)<>""
and (days == 0
or DURATIONDAYS(LASTOBSDATE(obs), STR(._TODAYSDATE)) <= days) then
result = LASTOBSVALUE(obs)
endif
return result
}
}PSA Results: {AnyInDays("PSA", 14)}
Joseph,
Correct. The short version of the function won't display any text or normals with the results.
jjordet said:
Laurie,
don't replace obs in the function. call the function like this: AnyInDays("PSA", 14)
{fn AnyInDays(obs, days)
{
local result = ""
if LASTOBSDATE(obs)<>""
and (days == 0
or DURATIONDAYS(LASTOBSDATE(obs), STR(._TODAYSDATE)) <= days) then
result = LASTOBSVALUE(obs)
endif
return result
}
}PSA Results: {AnyInDays("PSA", 14)}
Joseph,
Correct. The short version of the function won't display any text or normals with the results.
Thank you! That works perfectly. I appreciate all your help.
Laurie
Jerry,
Thank you for all your help. My Providers are asking 2 things, one I can figure out, which is to remove the date after the result. The other is they would like the normal range to print beside the results like below.
Hematocrit: 41.5 Normal: 12-24
+ AnyInDays("HCT", 21, " Hematocrit: ", "", ".", " (Normal: ", "64", "", "")
I see the Normal verbiage but it doesn't print on the letter. I am pretty certain I need to add the normal ranges in the 1st set of quotes???
Everytime I think I know what I am doing, I realize I don't know what I am doing.
Thanks
Laurie
From what I understand, the Normal range is entered on the backside (I think in the obshead table???), so just entering the HDID (64) should cause the Normals range to display. If you want a range other than what comes from the HDID, then you can enter it and the trailing ').' after the 'Normal:' text.
jjordet said:
From what I understand, the Normal range is entered on the backside (I think in the obshead table???), so just entering the HDID (64) should cause the Normals range to display. If you want a range other than what comes from the HDID, then you can enter it and the trailing ').' after the 'Normal:' text.
Thank you, it does show the normal ranges. I misread the Providers critique of the form, they don't want the normal ranges to show, well at least he doesn't. Now I have to see what the other 37 say. I really appreciate your help, and believe it or not I learned alot just from your letter.
Laurie