I was asked to help out a coworker modify a handout to only print certain sections of the code if the patients were male/female. I fixed one section without a problem and then I ran into a strange issue and I can't figure it out.
Here is the code:
{if PATIENT.SEX == 'F' Then "Breast - Females Only " + HRET + "Have you had a Unilateral Mastectomy?: " + obsany("MASTECTOMY") + HRET + "Have you had a Bilateral Mastectomy?: " + obsany("BILAT MAST") + HRET + "Do you perform monthly breast exams?: " + obsany("BRST EX PERF") +HRET + HRET + "Cervical - Females Only" + HRET + "Have you had a Hysterectomy?: " + obsany("HYSTERECTOMY") + HRET + "Do you have any problems with vaginal itching or discharge?: [ ] Yes [ ] No " + HRET + "Do you have any Sexual Dificulties?: [ ] Yes [ ] No" + HRET + "Number of pregnancies: " + obsany("NO. PREGNANC") + HRET + "Number of children born alive: " + obsany("MOB#LIVCHILD") + HRET + "Number of miscarriages: " + obsany("MISCARRIAGES") + HRET + "Have you had an abortion: " + obsany("ABORTIONS") else "Prostate - Males Only" + HRET + "Has weak or slow urine stream: [ ] Yes [ ] No" + HRET + "Has swelling or lumps on testicles: [ ] Yes [ ] No" + HRET + "Has difficulty with erection: [ ] Yes [ ] No" endif}
This ends up printing only the last couple of lines. On a female it prints from "Number of children born alive" to the end.
I also tried ending the lines with an open + " for the new lines and that did not work either.
What am I missing? Is there a limit to size on something?
I kinda figured this would be an easy, quick response. Does anyone have any input on this one?
I looked and didn't see anything suspicious. Have you run a trace?
I also didnt see anything wrong with it. In my experience what you describe can happen if you are missing a "+", but they all appear to be there. My suggestion would be to try to copy it into notepad and back into the handout window. You may have some hidden formatting characters...
I fixed it. Thank you for the notepad suggestion. The strange thing was that after pasting it from notpad it still did not work. Then I deleted all of the white space between this section and the two sections it was next to and pasted it again and it worked.