I have a form that displays the names of the care team members involved in a visit. The PCP, the current provider, and the nurse/document provider. I would like this care team member box to provide all three names only if they are different. For instance if the PCP and current provider are the same then only document the name once. Likewise if the document provider and PCP are the same only document once.
This is currently what I have to document all three names:
{if OBSNOW("CAREPROVIDRS") == ""
then OBSNOW(
"CAREPROVIDRS",DOCUMENT.PROVIDER + User.RealName + PATIENT.RESPPROVID)
endif}
Thanks.
You are going to have to do something like this:
Cond
case name1 <> name2 and name 1 <> name 3 and name2 <> name 3
obsnow("CAREPROVIDRS", name1+name2+name3)
case name1 <> name 2 and name 1 = name2 and name1 <> name3
obsnow("CAREPROVIDRS", name1+name3)
etc.
Endcond
Or set up some match statements to see if they are duplicates
Good luck, maybe someone else has a more elegant solution.