Trying to create custom load command and need pointers.
I want to ALWAYS add a form called "PQRS Diabetes Measures 2016"...............except if the document provider is "Example Doctor MD". Below is the code written so far that's not really working like I need it to.
{
cond
case
DOCUMENT.PROVIDER == "Richard Clouse MD"
ADD_FORM_COMP("Enterprise\MU","PQRS Diabetes Measures 2016","2")
case
DOCUMENT.PROVIDER == "Donald Goodin MD"
ADD_FORM_COMP("Enterprise\MU","Oncology Quality","2")
case
DOCUMENT.PROVIDER == "Nellie S Bell APRN CNM"
ADD_FORM_COMP("Enterprise\MU","PQRS Individual Measures 2016","1")
case
DOCUMENT.PROVIDER == "John A Nesbitt MD"
ADD_FORM_COMP("Enterprise\Specialty\Urology","Urology Procedures","1")
case
DOCUMENT.PROVIDER == "Bogdan R Marcol MD"
TRUE
ADD_FORM_COMP("Enterprise\Specialty\Urology","Urology Procedures","1")
endcond
}
I just did a quick test with the base of the code in our test server and it added forms I coded it to add (I changed for testing purposes). I did notice you have single and double quotes mixed. Not sure if it has to do with you copying the code and pasting or what but if not that may have something to so with it.
{
cond
case DOCUMENT.PROVIDER == "Richard Clouse MD"
ADD_FORM_COMP("Enterprise\MU","PQRS Diabetes Measures 2016","2")
case DOCUMENT.PROVIDER == "Donald Goodin MD"
ADD_FORM_COMP("Enterprise\MU","Oncology Quality","2")
case DOCUMENT.PROVIDER == "Nellie S Bell APRN CNM"
ADD_FORM_COMP("Enterprise\MU","PQRS Individual Measures 2016","1")
case DOCUMENT.PROVIDER == "John A Nesbitt MD"
ADD_FORM_COMP("Enterprise\Specialty\Urology","Urology Procedures","1")
case DOCUMENT.PROVIDER == "Bogdan R Marcol MD"
ADD_FORM_COMP("Enterprise\Specialty\Urology","Urology Procedures","1")
else
""
endcond
}
Also if you are trying to always added a specific form expect when it meets a specific condition you can add the form that will always be added to the else portion of the code. Thus making it always add the form unless one of the case statements is true.
Thank you for your help. So if I just copy what you have above and carefully add my system's information it should work.
Just to help me........where do you see the mixed double/single quotes?
The original code also shows the word TRUE after "Bogdan R Marcol MD" . If that is in the code and not a copy/paste error, then it is likely causing problems.
It should add forms. But I am not sure what you were wanting this function to do in the first place to be honest as your original post states you always want to add a specific form unless it is Dr. so and so but then you have that form being added to specific providers anyway via case statement. I see a single quote at the end of the ADD_FORM_COMP. The very end around the specific numbered location of the form it has "1' rather than "1".