Hello,
I'm creating a patient handout that contains a list of lab values for a select list of most common tests. The statement below works, but it creates blank lines for tests a patient never had.
Is there a statement I can add to this that will skip the non populated obsvalues and remove the blank lines in the results list?
This is what I'm using, though I shortened the list for this message:
Your recent lab results:
{IF (LASTOBSVALUEDATE("HDL")) <> "" THEN "HDL: " + LASTOBSVALUEDATE("HDL") else "" endif}
{IF (LASTOBSVALUEDATE("LDL")) <> "" THEN "LDL: " + LASTOBSVALUEDATE("HDL") else "" endif}
{IF (LASTOBSVALUEDATE("CHOLESTEROL")) <> "" THEN "Cholesterol: " + LASTOBSVALUEDATE("CHOLESTEROL") else "" endif}
{IF (LASTOBSVALUEDATE("TRIGLYCERIDES")) <> "" THEN "Triglycerides: " + LASTOBSVALUEDATE("TRIGLYCERIDES") else "" endif}
{IF (LASTOBSVALUEDATE("CL SERUM")) <> "" THEN "Cl Serum: " + LASTOBSVALUEDATE("CL SERUM") else "" endif}
{IF (LASTOBSVALUEDATE("HGBA1C")) <> "" THEN "HGBA1C: " + LASTOBSVALUEDATE("HGBA1C") else "" endif}
{IF (LASTOBSVALUEDATE("WBC")) <> "" THEN "WBC: " + LASTOBSVALUEDATE("WBC") else "" endif}
Remove the carriage returns in between your mel blocks and add them to your condition statement -
{IF (LASTOBSVALUEDATE("HDL")) <> "" THEN "HDL: " + LASTOBSVALUEDATE("HDL")+"\r\n\r\n" else "" endif}{IF (LASTOBSVALUEDATE("LDL")) <> "" THEN "LDL: " + LASTOBSVALUEDATE("HDL")+"\r\n\r\n" else "" endif}{IF (LASTOBSVALUEDATE("CHOLESTEROL")) <> "" THEN "Cholesterol: " + LASTOBSVALUEDATE("CHOLESTEROL")+"\r\n\r\n" else "" endif}{IF (LASTOBSVALUEDATE("TRIGLYCERIDES")) <> "" THEN "Triglycerides: " + LASTOBSVALUEDATE("TRIGLYCERIDES")+"\r\n\r\n" else "" endif}{IF (LASTOBSVALUEDATE("CL SERUM")) <> "" THEN "Cl Serum: " + LASTOBSVALUEDATE("CL SERUM")+"\r\n\r\n" else "" endif}{IF (LASTOBSVALUEDATE("HGBA1C")) <> "" THEN "HGBA1C: " + LASTOBSVALUEDATE("HGBA1C")+"\r\n\r\n" else "" endif}{IF (LASTOBSVALUEDATE("WBC")) <> "" THEN "WBC: " + LASTOBSVALUEDATE("WBC")+"\r\n\r\n" else "" endif}