You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When calculating the contact summary for a place, it would be useful to be able to include data about the child contacts of the place in the calculation. (E.g. to show a warning if the number of contacts does not match what is expected). Currently, there is no way to access any information about those child contacts.
Describe the solution you'd like
In webapp, when we have a contact in context (e.g. we are viewing that contact's profile page), we have already done the heavy lifting to look up the contact's children. (This involves finding which contact types are valid children of the current contact and then querying medic-client/contacts_by_parent for each of the types.) We only calculate the contact-summary when we have a contact in context, so I do not think adding support for this functionality would negatively impact performance (except perhaps when loading a form for a task. I believe we are currently calculating a the contact-summary in that case, but we might not have the children loaded already...)
Describe alternatives you've considered
We could rework our contact hierarchy model to be doubly linked so contacts contain the _ids both for their parent and their children. Seems like that would cause more trouble than it would resolve....
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When calculating the contact summary for a place, it would be useful to be able to include data about the child contacts of the place in the calculation. (E.g. to show a warning if the number of contacts does not match what is expected). Currently, there is no way to access any information about those child contacts.
Describe the solution you'd like
In webapp, when we have a contact in context (e.g. we are viewing that contact's profile page), we have already done the heavy lifting to look up the contact's children. (This involves finding which contact types are valid children of the current contact and then querying
medic-client/contacts_by_parent
for each of the types.) We only calculate the contact-summary when we have a contact in context, so I do not think adding support for this functionality would negatively impact performance (except perhaps when loading a form for a task. I believe we are currently calculating a the contact-summary in that case, but we might not have the children loaded already...)Describe alternatives you've considered
We could rework our contact hierarchy model to be doubly linked so contacts contain the _ids both for their parent and their children. Seems like that would cause more trouble than it would resolve....
The text was updated successfully, but these errors were encountered: