AnsweredAssumed Answered

Line breaks and calculations

Question asked by RachelMills on Nov 13, 2015
Latest reply on Nov 13, 2015 by RachelMills

Time to poll the experts again!: )

I have the following calc set up, which works great- UNLESS there's a line break.

 

Here's an example:
The visit type is psychotherapy new treatment plan.

Goal 1 on this form contains: Reduce depression and anxiety

Objective 1 on this form contains: Work with patient to identify symptoms.

 

The field "Treatment Goals", which pulls from the calculation I've pasted below, then reads: Reduce depression and anxiety; work with patient to identify symptoms.

 

Perfect!

 

HOWEVER. If Goal 1 reads:
Reduce depression

Reduce anxiety

 

The entire "Treatment Goals" field just contains:

Reduce depression

 

And appears to stop looking for anything after that. The remainder of the text in the field Goal 1 doesn't carry over, nor does anything in the Objectives field.

 

I've tried using "List()" before the goals and am either not understanding it, or am not entering it properly.

 

Here's my current calc:

 

and PatternCount ( Visit Type ; "psychotherapy new treatment plan" )=1;

Case ( not IsEmpty ( Goal 1) and Plan #1  ≠  "Discontinue Current Goal";"; " & Goal 1 & ", " &  Objectives 1) &

Case ( not IsEmpty ( Goal 2 ) and Plan #2  ≠  "Discontinue Current Goal";"; " & Goal 2 & ", " &  Objective 2) &

Case ( not IsEmpty ( Goal # 1 ) and Plan  ≠  "Discontinue Current Goal";"; " & Goal # 1 & ", " &  Objective 3) &

Case ( not IsEmpty ( Goal # 2 ) and Plan2  ≠  "Discontinue Current Goal";"; " &Goal # 2 & ", " &  Objective 4)

)

 

Thanks in advance for advice!

Outcomes