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}