How to reproduce
- Login to demo.openmrs.org/openmrs as Admin (user: admin, password: Admin123)
- Visit
System Administration
>Advanced Administration
>Manage Users
- Then under User Management click on
'Add User'
Provide user details such as name, password, role (Organizational: Registration Clerk) and save the user without selecting the checkbox "Create a Provider account for this user"
Eg:- Username: bob , Roles: Organizational: Registration Clerk , Provider
Then logged into the newly created users account and click on "Register a patient"
UI Framework Error
Root Error
java.lang.IllegalStateException: Logged-in user is not a Provider
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
Full Error
org.openmrs.ui.framework.ViewException: Error rendering page view for registerPatient. Model properties:
sessionContext
featureToggles
patient
primaryIdentifierType
appId
Caused by: java.lang.IllegalStateException: Logged-in user is not a Provider
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
Full Error Log: https://gist.github.com/gayanW/0f22f8732334994ac2bd092283a0a763