Hi all,
So we are using Kryptiq's patient portal for all of our new patient paper work. With the changes to the family history and how they are now saved in the database I had to modify our portal to accommodate this change.
The problem I am having is when the family history form loads in CPS and attempts to create the family history for what the patient has entered, using the MEL_ADD_FHX ,I get and error -21 (service layer error). Currently this is set to automatically run when the form loads. I replace the auto load with a button which when clicked runs the same exact code but without the error -21.
I'm not entirely sure what is causing the error, except maybe the data being saved with the family history has not been entirely generated during the loading process for the encounter type, maybe the SDID or something to the affect. The fact that it works perfectly from a button click tells me the code works as desired and doesn't seem to be the problem, which leads me to believe something is not entirely loaded when it attempts to run automatically.
Has anyone else had any issues similar to this and a possible solution? The button click works but I would much rather have it load and generate automatically without involving the users click a button, less chance for them to forget to click the button...
Heath
We saw this error on the Family Hx form at first - it was because we had a bad SNOMED code in the .txt file. Fixing that caused the error to stop. Do not know if this is the same thing you are experiencing, but the error was the exact same.
That was one of my thoughts as well so I did verified all the codes and they are correct. The fact that it runs works fine on a button click but not when the forms loads has me stumped.
Heath
I had the same error as DVI1501, but I dont think this is the case for you. I have had other instances where forms trying to execute code in the wrong order caused errors and sometime crashes, if it is something that needs to load later I have either put the code in a data display (just remove the border and place "" at the end right before the last bracket and no one will see anything) or do a check that observations have loaded before executing the code, something like if obs now office visit date is not blank ( because we record that every time) then if a document variable is not blank (to prevent it from running multiple times) then run code, set document variable to done