Open 1yuv opened 1 year ago
Because contacts are configurable we can't know for sure what is a "patient" or "household" - would it be sufficient to return the count of contacts grouped by the contact type, which would need some knowledge of context to do the translation, eg:
{
"contacts": {
"person": 590,
"clinic": 15,
"something": 1
}
}
I'm assuming "active" in this context is syncing at least one caring activity (data_record
)?
Hi @garethbowen, Yes, contacts grouped by the contact type would be absolutely fine, and probably best.
I'm assuming "active" in this context is syncing at least one caring activity (data_record)?
Yes.
Some ideas on the right views to serve these requests...
medic-client/contacts_by_type
. You could add a _count
reducer to cache the result.medic-client/data_records_by_type
which already has a _count
reduce function.author
field to the infodoc and report off that. Additional metrics which may be useful...
Is your feature request related to a problem? Please describe. Currently, we collect certain metrics from partner(s) for reporting purpose after partner agree to share those aggregated metrics. Some partner(s) might opt to provide these data and they might have data warehouse, but some may not have. This is the request asking if certain metrics are calculable on CouchDB directly and can be exposed via API. In this case, after having Data usage Agreement with partner(s) we can poll those data directly from API without needing to setup rdbms and have additional resoures used for that purpose.
Describe the solution you'd like Provide following data from API (whichever are possible)
data_record
docs created)Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.