Case functions use this syntax:
Case ( Boolean expression 1 ; result expression 1 ;
Boolean expression 2 ; result expression 2 ;
// and so forth....
Other result expression
A case function evaluates each Boolean expression and returns the value of the corresponding result expression of the first Boolean expression to evaluate as True. The Other result is returned if all of the Boolean Expressions evaluate as False.
But you have included the OR operator as part of the first result expression. And that makes no sense.Case (Type of Anesthesia Performed = "General Anesthesia";"GA" or Type of Anesthesia Performed = "Inhalational (+/- intravenous)";
"GA" or Type of Anesthesia Performed = "TIVA"; "GA";Type of Anesthesia Performed = "Regional Anesthesia"; "Regional";Type of Anesthesia Performed = "Local Anesthesia"; "Regional"
)My best guess as to what you need:Case (Type of Anesthesia Performed = "General Anesthesia";"GA" ;Type of Anesthesia Performed = "Inhalational (+/- intravenous)"; "GA" ;Type of Anesthesia Performed = "TIVA"; "GA";Type of Anesthesia Performed = "Regional Anesthesia"; "Regional";Type of Anesthesia Performed = "Local Anesthesia"; "Regional")
Replace or with ; ( a semi colon)
Just in case this may help clarify things, here is a breakdown of the checkbox options for the field in question;
Types of Anesthesia Performed (check all that apply)
1. General Anesthesia
2. Total Intravenous Anesthesia
3. Inhalational (+/- intravenous)
- Oral Airway
- Endotracheal Tube (ETT)
- Laryngeal mask Airway
4. Regional Anesthesia
- Nerve Block
5. Regional Anesthesia Changed to GA
6. Local Anesthesia
7. Monitored Anesthesia Care
Hope this helps
Does this mean that you have one field formatted with a value list of multiple check box values?
That would definitely explain why this does not work the way that you expected.
Let's say you have a field formatted with check boxes with the following value list: A, B, C. Three checkboxes on one field.
If you click the check box for A, then the check box for C, you see both check boxes selected. but if you make a copy of this field and remove the checkboxes format to return it to edit box format, you'll see that you have both values in the field on separate lines as they are separated by a return character.
If you clear those choices, then click C then A, even though the same checkboxes display as selected, you'll see C on line 1 and A on line 2. And in an calculation such as your case function a field with "A<return>C" does not equal "C<return>A".
Here's how to test to see if the check box for A has been selected in our A, B, C value list example:
Not Isempty ( Filtervalues ( CheckboxField ; "A" ) )
will be True if "A" has been selected.
You can use this type of expression in the Boolean expressions of your Case function, but keep in mind that only the result expression of the first Boolean to evaluate as True will be evaluated and returned so I am not sure even that will work for you in this situation.