I have a PHQ 2 depression screening form that I have a couple of Visibility Regions built for displaying the PHQ9 for adults and one for the PHQA for Adolescents appropriately according to patient age.
The problem is the PHQA for Adolescents isn't displaying.
Visibility Region for PHQA:
(PATIENT_AGE() > 11 AND PATIENT_AGE() < 18)
Visibility Region for PHQ9: (This one works correctly)
(PATIENT_AGE() >18)
I have tried changing the AND to an OR and it works, but then the PHQ9 comes up looking like 2 sets of screens overlayed over each other. (I have tried to upload a visual but can't get a document loaded.
Any suggestions on what I need to correct?
if the code works with OR, then try this:
(PATIENT_AGE() >11 AND PATIENT_AGE() <= 17)
Otherwise, it looks like it should work to me.
PS. I ran the code you posted and it seems to run fine. occassionally I have had to retype from scratch the same code, and it works. I don't know if it is the font, or just a wierd fluke, but you could always try that as well.
Daniel, Thanks for the advice. After your comment I went back and reviewed my code closer and I wasn't including 11 years old. So once I changed my code to be >=11 and <=17 then it worked. My test patient was 11 years old and 7 months and that's why it wasn't working.
Thanks again for your help and advice to get me looking in the right direction. 🙂
Also, if you have <=17 for PHQA and >18 for PHQ9, neither will display for a patient who is 18 years old. You might want to change the PHQ9 to either >17 or >=18.
Ok, now that I have my calculations working correctly, I am running into a new problem. I have a tab for the Plan. Previously I had a display field with the Previous Observation. But it was populating the note all of the time and I don't want that. So I have deleted the Display field completely and just have a Multi edit field to type in the plan. The problem is when I open the form now, it is automatically still populating the contents of the prior observation into the note. Why would it do this, if I have deleted the display field and there is only a multi line edit field? I have even deleted the tab entirely and rebuilt it without a display. But every time I do that it still populates the prior observation.
This one really has me confused.
Thanks again for the help
I have found my problem with the display field. Thank you