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
The Appointments register can be filtered to narrow down the list. The filter options are, namely:
Date
Represents the calendar date of next appointment Appointment.start
Allows for selection for any calendar date
Defaults to date today
All vs User Assigned
This filter enables choosing between view for All patients or just patients who have been assigned to the CHW that is logged in, Patient.generalPractitioner
Options include:
All Patients
My Patients
Defaults to All patients
Patient Category
Defined in Patient.meta.tag
Options include:
All Patient Categories
Lists Appointments for all patient types who requires an appointment ‘today’ or on the day selected on the calendar filter
ART Client
Lists Appointments for both Newly Diagnosed and Already on ART Client who requires an appointment ‘today’ or on the day selected on the calendar filter
Exposed Infant
Child Contact
Sexual Contact
Person Who is Reactive at the Community
Lists Appointments for people who tested positive at the community, who requires an appointment ‘today’ or on the day selected on the calendar filter
Defaults to All Patient Categories
Appointment Reasons
This filter includes selection for any of the Appointment reasons defined here
Data defined in Appointment.reasonCode
Options include:
All Reasons: which lists down all the reasons someone may have an appointment
Cervical Cancer Screening: Women who have a cervical cancer screening due
DBS Positive: Exposed Infants with a positive DBS result who have an appointment due today
HIV Test: Child Contacts, Sexual Contacts and Person Who is Reactive at the Community who have a clinic appointment due
Index Case Testing: ART Clients who have a ICT due today
Linkage: ART clients who need to be started on treatment
Milestone HIV Test: For exposed infants 6 weeks, 1 year and 2 years who need a milestone HIV test conducted
Refill: ART Clients who do not require Cervical Cancer screening, Index Case Testing, Linkage, Viral Load Collection, Welcome Service or Welcome Service Follow up
Routine Visit: Exposed infants who do not need a milestone HIV test
Viral Load Collection: ART clients who require their viral load collected
Welcome Service: ART clients who require welcome service
Welcome Service Follow Up: ART clients who require Welcome Service Follow Up
Filter options for Appointment reasons will be narrowed according the selection in Patient Category. For example
If the ‘Patient Category’ selected is Exposed Infant; the reasons available in the ‘All Reasons’ filter will not include options for viral load
Defaults to All Reasons
Implementation Details
A value object class will be created to hold current value for each of the filters. This object class will be hosted in the ViewModel .
Each filter will be represented as a field. All the fields will have default values
Any option selection change from the UI (Compose) would update the relevant field in the value object in the ViewModel
On click “Apply”, would get the current state of the value object and use it to filter Appointments from the repository
Clicking the “Apply” button would always reset current page to 1, and the pagination in the register to the first page
“Date” filter would show calendar on click, with the default selection in calendar set to either the previously selected date, or current date which is “today”. It will use Google’s MaterialDatePicker for Calendar
“All patients” filter will use Jetpack Compose’s DropdownMenu and DropdownMenuItem to enlist both “All patients” and “My patients”
The two options can either be encoded to an enum or just a string/int that can be toggled between the two values.
On initial load of the register, selection would default to “All patients”. “All Patients” essentially represents absence of any filter for patients in the Appointments data.
Thereafter selection would be the currently selected option
Patient Category would also make use of DropdownMenu and DropdownMenuItem, similar to “All Patients”.
Options to be shown for patient categories would be extracted through the “HealthStatus” enum, that is currently used in the app.
Ideally, only patient categories valid for filters selected options for “Date” and “All patients”, should be shown but this seems like might expensive performance-wise since it involves always examining the data whenever a new date or “All Patients” selection changes
“All Patients” in the UI dropdown would be represented through a sentinel value, since its reference doesn’t exist in the HealthStatus enum.
All reasons filter would be encoded using AppointmentReasons enum. “All Reasons” option would have a sentinel value, whereby on its selection filtering by appointment reason would be cleared and Appointments would be fetched disregarding the appointment reason
The AppointmentReason enum would have a method that denotes whether the reason is specific to a given patient category. The method, by default, returns null to represent that it’s not tied to a specific patient category. When a specific patient category is selected from previous filter, this filter would only show options for AppointmentReason where the method returns a HealthStatus associated to the patient category
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Appointment Register Filters
The Appointments register can be filtered to narrow down the list. The filter options are, namely:
Date
Represents the calendar date of next appointment
Appointment.start
Allows for selection for any calendar date
Defaults to date today
All vs User Assigned
This filter enables choosing between view for All patients or just patients who have been assigned to the CHW that is logged in,
Patient.generalPractitioner
Options include:
Defaults to All patients
Patient Category
Defined in
Patient.meta.tag
Options include:
Lists Appointments for all patient types who requires an appointment ‘today’ or on the day selected on the calendar filter
Lists Appointments for both
Newly Diagnosed
andAlready on ART Client
who requires an appointment ‘today’ or on the day selected on the calendar filterLists Appointments for people who tested positive at the community, who requires an appointment ‘today’ or on the day selected on the calendar filter
Defaults to All Patient Categories
Appointment Reasons
This filter includes selection for any of the Appointment reasons defined here
Data defined in
Appointment.reasonCode
Options include:
Filter options for Appointment reasons will be narrowed according the selection in Patient Category. For example
Defaults to All Reasons
Implementation Details
A value object class will be created to hold current value for each of the filters. This object class will be hosted in the ViewModel .
Each filter will be represented as a field. All the fields will have default values
Any option selection change from the UI (Compose) would update the relevant field in the value object in the ViewModel
On click “Apply”, would get the current state of the value object and use it to filter Appointments from the repository
Clicking the “Apply” button would always reset current page to 1, and the pagination in the register to the first page
The two options can either be encoded to an enum or just a string/int that can be toggled between the two values.
On initial load of the register, selection would default to “All patients”. “All Patients” essentially represents absence of any filter for patients in the Appointments data.
Thereafter selection would be the currently selected option
Options to be shown for patient categories would be extracted through the “HealthStatus” enum, that is currently used in the app.
Ideally, only patient categories valid for filters selected options for “Date” and “All patients”, should be shown but this seems like might expensive performance-wise since it involves always examining the data whenever a new date or “All Patients” selection changes
“All Patients” in the UI dropdown would be represented through a sentinel value, since its reference doesn’t exist in the HealthStatus enum.
The AppointmentReason enum would have a method that denotes whether the reason is specific to a given patient category. The method, by default, returns null to represent that it’s not tied to a specific patient category. When a specific patient category is selected from previous filter, this filter would only show options for AppointmentReason where the method returns a HealthStatus associated to the patient category
Beta Was this translation helpful? Give feedback.
All reactions