We have a TEI from OU (say X) registered in a program. Whenever we try registering that TEI to another program B in another OU (say Y), we get:
"Failed to update the tracked entity instance in the server".
The OU in the error refers to the parent OU of the TEI where it was first registered in a different program.
Is this a permission configuration issue? Unsure why the user needs to have write access to the parent
OU X to enroll this TEI in
in DHIS 2, a user is assigned to one or more roots in the org unit hierarchy, either “data input” org unit and potentially “data output” org unit. The “data input” org unit refers to the root of the sub-hierarchy in which the user can enter data, enroll TEIs and so on. So there is the chance that you are trying to enroll a TEI outside/above the “data input” root org units assigned to the user which you are authenticating as in your request.
You could let us know the current org hierarchy, i.e. is OU Y above OU X in the hierarchy? Also, which root org unit is your current user assigned to?
Here is the current hierarchy:
------OU Y <----- (User is trying to enroll TEI in a program here)
------OU X <----- (TEI is already enrolled in a different program here)
The user is trying to enroll patient registered in a program from “OU X” to a program at “OU Y”. The user has “Data Capture” set to OU Y, and data
output set to “Nepal”.
Is OU Y above OU X in the hierarchy?
Which root org unit is your current user assigned to?
Only OU Y for data capture.
What version are you on? Do you experience this in the tracker capture web app, or are you building your own? On 2.30 and later the above should based on your description work without error, as long as the user in OU Y has access to the tracked entity instance:
- She has to have “Search” org unit scope set to a level that encapsulates OU X.
- She has to have at least “Data:Read” access to the tracked entity type in question.
We’re on DHIS 2.30. Yes, we are using Tracker capture app.
She has to have “Search” org unit scope set to a level that encapsulates OU X.
Checked. The user has access to whole Nepal as search unit.
For Data:Read, here is the sharing settings on the TEI Type:
What is your programs Access level?
If it is set to “Closed”, noone outside the owning organisation unit will be able to access it.
You can read a bit more here:
Programs are in “Open” access level. Really strange.