-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add config to allow replicating primary contacts for places at max depth #8034
Comments
This is similar to #7156 |
Looking forward to having this feature that MoH Mali's Supervisor workflow will also benefit from - cc @loukmantidjani |
Discussed this in more detail with @dianabarsan and @mrjones-plip. Here are some current thoughts:
Next steps:
|
Any update on this issue? this really affects performance of supervisor views in CHT looking forward to having it prioritized. Thanks cc @craig-landry |
A new request came through, regarding supervisors with depth=1 is to see CHW target aggregates, which right now is not possible without downloading the CHW contact and targets associated with them. This means that the contact would need to get into the "reports" request - because that is the request that yields the target documents. |
Investigation from yesterday resulted in:
We would need to:
I'm curious to see how frequent it is to have a primary contact of a place that is not within that place. |
Since this has many open questions, I'm removing this from 4.14 and bumping to 4.15. |
Is your feature request related to a problem? Please describe.
When using the
replication_depth
configuration, the places at the max depth will be replicated, but not the person associated with that place. For example, a CHW Supervisor may be configured to only have access to the CHW Areas (but not the actual CHW person contacts related to the areas).Pain points:
Currently, the only way for the supervisor to have access to the CHW is to increase the replication_depth. However, that would also give the supervisor access to all the other contact children of the CHW Area (e.g. households) which could cause performance issues.
Describe the solution you'd like
It would be useful to have a configuration option that will allow replicating primary contacts, using the same replication depth. So, if the config option is set, then the primary contacts for places at the max depth would also be replicated.
Describe alternatives you've considered
Another option is to just make this the default behavior so that primary contacts are always replicated whenever a place is replicated.
A separate approach would be to to support configuring separate replication depths for places and persons (e.g.
place_depth
andperson_depth
). This would not be easy to implement because we use a view which is unaware of whether a contact is a place or person, since we can’t inject configurable hierarchy contact types in the view. This means that we’d need to edit the view to emit the contact type, and, in code, we would query for every contact type for every level instead of one query just by level. This adds complexity and potentially impacts performance because of the additional queries that are needed.Additional context
Originally submitted on the CHT Forum.
The text was updated successfully, but these errors were encountered: