JonathanNYC
IS-IT--Management
For a report pertaining to laterality, I am trying to extract “left”, “right” or “bilateral”.
Left and right are indicated only in the “descriptMod” field, however, “bilateral” may be indicated in either the “descriptMod” and/or the “proceduredescription” field.
Thus far I can not get “formula 1” (see below) to report on bilateral when it may occur in the proceduredescription field. Obviously, some major error in my formula. As a workaround, I created “formula 2” which is able to correctly report on bilateral in the proceduredescription field. Even when I insert formula 2 into formula 1 it does not work.
Help, please, in combining this into one formula. I am using Crystal 10 and a database called PSSolutions.
Formula 1
if {pcmProcedure.descriptMod} = "BIL" then "B" else
if {pcmProcedure.descriptMod} = "bilateral" then "B" else
if {pcmProcedure.descriptMod} = "BILATERAL" then "B" else
if {pcmProcedure.descriptMod} = "Bilateral" then "B" else
if {pcmProcedure.descriptMod} = "Left" then "LT" else
if {pcmProcedure.descriptMod} = "LEFT" then "LT" else
if {pcmProcedure.descriptMod} = "left" then "LT" else
if {pcmProcedure.descriptMod} = "Right" then "RT" else
if {pcmProcedure.descriptMod} = "RIGHT" then "RT" else
if {pcmProcedure.descriptMod} = "right" then "RT" else
if {pcmProcedure.procedureDescription} = "BILATERAL" then "B" else
if {pcmProcedure.procedureDescription} = "bilateral" then "B" else
if {pcmProcedure.procedureDescription} = "Bilateral" then "B" else
"Not applicable"
Formula 2
if instr({pcmProcedure.procedureDescription} ,"BIL") > 0 then "B"
Left and right are indicated only in the “descriptMod” field, however, “bilateral” may be indicated in either the “descriptMod” and/or the “proceduredescription” field.
Thus far I can not get “formula 1” (see below) to report on bilateral when it may occur in the proceduredescription field. Obviously, some major error in my formula. As a workaround, I created “formula 2” which is able to correctly report on bilateral in the proceduredescription field. Even when I insert formula 2 into formula 1 it does not work.
Help, please, in combining this into one formula. I am using Crystal 10 and a database called PSSolutions.
Formula 1
if {pcmProcedure.descriptMod} = "BIL" then "B" else
if {pcmProcedure.descriptMod} = "bilateral" then "B" else
if {pcmProcedure.descriptMod} = "BILATERAL" then "B" else
if {pcmProcedure.descriptMod} = "Bilateral" then "B" else
if {pcmProcedure.descriptMod} = "Left" then "LT" else
if {pcmProcedure.descriptMod} = "LEFT" then "LT" else
if {pcmProcedure.descriptMod} = "left" then "LT" else
if {pcmProcedure.descriptMod} = "Right" then "RT" else
if {pcmProcedure.descriptMod} = "RIGHT" then "RT" else
if {pcmProcedure.descriptMod} = "right" then "RT" else
if {pcmProcedure.procedureDescription} = "BILATERAL" then "B" else
if {pcmProcedure.procedureDescription} = "bilateral" then "B" else
if {pcmProcedure.procedureDescription} = "Bilateral" then "B" else
"Not applicable"
Formula 2
if instr({pcmProcedure.procedureDescription} ,"BIL") > 0 then "B"