I have a form with 7 visibility regions ( different tests/orders appear based on location of care).
When I added the 7th visibility region, I started get a MEL parse error. There are approx. 80 document variables on each from.
Strange thing is that the IF statement that shows up in the MEL is not part of my code - is this something that is being created internally? I can't seem to get around this. The MEL vomit appears when the form is loads initially.
{IF (STR(DOCUMENT.PT_ROOM, DOCUMENT.EKG, DOCUMENT.INTR_DIAG_01, DOCUMENT.RYTH_STRP, DOCUMENT.INTR_DIAG_02, DOCUMENT.HEMOGLOBIN_A, DOCUMENT.INTR_DIAG_03, DOCUMENT.FINGER_STICK, DOCUMENT.INTR_DIAG_04,
......
DOCUMENT.INTR_DIAG_22, DOCUMENT.AMRRH_TST, DOCUMENT.INTR_DIAG_23, DOCUMENT.HEMOCCULT, DOCUMENT.INTR_DIAG_24, DOCUMENT.OTHER_TESTS_1, DOCUMENT.INTR_DIAG_25, DOCUMENT.RAPID_STREP_, DOCUMENT.INTR_DIAG_15, DOCUMENT.THROAT_CULT, DOCUMENT.INTR_DIAG_16, DOCUMENT.PEAK_FLOW, DOCUMENT.INTR_DIAG_14, DOCUMENT.EYE_EXAM, DOCUMENT.INTR_DIAG_17, DOCUMENT.HEAR_TST, DOCUMENT.INTR_DIAG_18, DOCUMENT.UP_GO_TST, DOCUMENT.INTR_DIAG_19, DOCUMENT.UA_DIP, DOCUMENT.INTR_DIAG_20, DOCUMENT.DYSURIA_UA, <-COMPILER ERROR NEARBY: Too many arguments after COMMA
Then the code is either in the encounter or in a variable directly. If you send me the form I can help you fix it. Go to the bottom window of VFE where you would see the errors and Ctrl+F and type in part of the str and enter to search then double click and it will open the box that contains that code.
Hope this helps. If need be email it to me at [email protected] and I can find it for you.
The error happens at run time....It compiles with no errors......
You still need to identify where the code is and take it out then re-run it. Look in the encounter if you execute by dropping the form into a blank open encounter then the code is in the form.
The if statement is created to process the visibility segment. Take it out, verify there are no errors, then look carefully at your syntax. It would be helpful if you could post your visibilitiy segment code.
The code in the visibility region just checks the location of care.......
{DOCUMENT.LOCOFCARENAME == "XXXXX-Cardiology"}
Based on the information provided:
7 layers of 80 variables = 560 potential arguments.
MEL has undocumented argument count limits to various functions and I suspect that you might have hit the limit for the str() function.
Try to remove fields (variables) from the last layer until it works. Add a field back and see if it breaks again - you will have your answer regarding the limit.
Possible resolution:
Break the visibility layers up into multiple sections or tabs, ensuring you do not exceed the newly discovered limit. If you break it up using tabs, you could then use some additional MEL to jump the user to the appropriate tab containing the additional layers.
Alternatively, you could break the layers into multiple layers containing 20 variables each for each layer resulting in 4 layers per location of care 'visibility'. This would give you room to expand as well.
Hope this helps.