2 Replies Latest reply on Nov 13, 2015 9:10 AM by RachelMills

# Line breaks and calculations

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!

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)

)

• ###### 1. Re: Line breaks and calculations

Rachel

How about an auto-enter calc for Goal 1 that does this: substitute(Goal 1;"¶";", ")?  or substitute(Goal 1;"¶";" and ")

Stephen

• ###### 2. Re: Line breaks and calculations

Gah! Why didn't I think of that? Of course- makes perfect sense. Just added and tested, works perfectly. Thanks so much for the quick help!