Error submitting xforms for some providers

Hi everyone, my xforms were submitting successful after creating them. Then I started changing some users(providers) roles on Administration page(Administration/Manage users) then select a specific user by writing their name, opening them and selecting roles. After doing this I started getting errors trying to submit forms for some providers (the ones that change their roles). Even after trying to select previous roles for the users but still I am getting an error. I have no idea how to reverse the action since I was dealing with just settings I did not bother to backup the database.

looking at your logs the major line is (Caused by: ca.uhn.hl7v2.HL7Exception: Could not resolve provider with provider Id:86,)make sure that that you have provider with id 86 in your user_role table

This user_id 86 apparently is on users table, user_role table and encounter_providers table as provider_id but it is not on providers table as provider_id. User_role

The provider should be in the provider table.

1 Like

So what causes the provider_id to appear on encounter_provider table while it is not on provider table? And that provider_id is the same as user_id on users table.

encounter_provider will not have a provider_id which does not exist in the provider table unless you dropped the provider_id_fk foreign key from the encounter_provider table.

In my database I happen to have them and I did not drop provider_id_fk. When I run this sql “SELECT distinct(provider_id) FROM encounter_provider e where not exists (select p.provider_id from provider p where e.provider_id=p.provider_id);” I can see them.

Delete the missing provider item from your xform.

I have deleted the provider from the xform but how do I add the provider back. Because the provider is not on the now when I use the form.

Go back to the form designer and first back up the xform by selecting Save As from the File menu. Then under Form Fields select Refresh to have the providers back.

Thank you very much. I can see the provider when I use the form and it is submitted successfully.