-
-
Notifications
You must be signed in to change notification settings - Fork 204
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 display of visit counts and conditionally style them (UHC mode) #4758
Comments
Update: I have deleted my above comments (in case you wonder where they went, because they are no longer true or relevant to the discussion. I've talked to the CouchDB folks, and reduce functions are partially run at index time and stored (for performance reasons), so:
In case it's not obvious, this invalidates the reduce function I wrote in the product call earlier this week, because it relied on the code being run completely dynamically every time you requested it. OK to that leaves us with two real options for this ticket:
The former is almost certainly the best approach, the latter invoking way more IO than the former (though neither are ideal). If this was 3.0.0 we could consider a Mango query, but 2.18 will not have support for them. |
Adds visit count display in contacts list. Visit count display is conditioned by the same permission as displaying last visited date. Visits are counted based on the calendar month, with each month starting on either the 1st or on a configurable date. Visit counters may be color coded if a specific visit count goal configured. Adds UHC app configuration section. Adds UHC configuration with options to select default sorting contacts lists by last visited date, visit counter settings for monthly count goal and the month reset/start date. #4758 #4752
Adds visit count display in contacts list. Visit count display is conditioned by the same permission as displaying last visited date. Visits are counted based on the calendar month, with each month starting on either the 1st or on a configurable date. Visit counters may be color coded if a specific visit count goal configured. Adds UHC app configuration section. Adds UHC configuration with options to select default sorting contacts lists by last visited date, visit counter settings for monthly count goal and the month reset/start date. #4758 #4752
Adds visit count display in contacts list. Visit count display is conditioned by the same permission as displaying last visited date. Visits are counted based on the calendar month, with each month starting on either the 1st or on a configurable date. Visit counters may be color coded if a specific visit count goal configured. Adds UHC app configuration section. Adds UHC configuration with options to select default sorting contacts lists by last visited date, visit counter settings for monthly count goal and the month reset/start date. #4758 #4752
Merged into |
To enable the specific
where:
|
Thanks @dianabarsan for comments above. LGTM. |
Documentation added here: https://github.com/medic/medic-docs/blob/master/configuration/app-settings.md#optional-settings |
For UHC mode, we already display "Date last visited". We would like to keep that, and add in a visual display of "Number of visits this month".
Clarification
Although they sound similar, “Date last visited” and “Visits this month” are two completely different data points. Date last visited is calculated based upon a rolling count of “how many days ago” and is not tied to the calendar at all. Visits this month is tied directly to the calendar month. Date last visited never resets while visits this month resets back to 0 at the beginning of each month.
Visits this month
We would like to add large visit count numbers to the right side of each family row. The visit count will display a count of the number of times that family has been visited so far within the current month. The exact definition of the calendar month should be left configurable. Some partners may follow the calendar literally, while other partners have different definitions of a month (ex: Muso counts from the 26th of one month until the 25th of the next month). Whatever forms have been configured to calculate "Date last visited" will be the same forms used to calculate "Visits this month".
Basic layout
Conditional styling
Muso's desired configuration
Here is what the visit counts will always look like at the very beginning of the month ("0 visits" for every single family):
Here is what the visit counts should look like after three visits have been made:
And here is what the visit counts might look like even later in the month:
Another clarification
You will notice that it is sometimes possible for families with 2 visits to appear above families with 1 visit in the list, due to the sorting based upon “Date last visited”. We are aware of this outcome but think it makes sense in light of the emphasis on frequency of home visits. It is possible we might get a request in down the road to add the ability to sort "By number of visits this month" but that is an issue for another time.
The text was updated successfully, but these errors were encountered: