GeriLife / GeriLife/wellbeing

Add resident engagement level on Add Activity form

Open
#517 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13
Forks
6
PR merge metrics
No merged PRs in 30d

Description

> As a caregiver
> I would like to know the engagement level of residents during activities in which they participate
> so I can ensure that every activity is meaningful for each resident

We would like to add an "engagement level" metric for each resident who participates in an activity. The engagement level should be recorded at the same time as the activity. The Add Activity form should also remain fairly streamlined.

## Example UI structure

### Add activity

> select resident(s)

| Resident name | Engagement level |
|---------------|------------------|
| Resident A | ⭐ |
| Resident B | ⭐⭐⭐ |
| Resident C | ⭐⭐ |

## Example data model
We should aim to keep our data model somewhat relational, for a possible transition to a proper relational database. So, we can add a new table here for recording engagement level data with the following structure:

- `residentId`: the ID of a given resident (basically a ForeignKey)
- `activityId`: the ID of a specific activity (basically a ForeignKey)
- `engagementLevel`: a numeric value on the scale of 1-3

## Configuration option
Since this is a new feature that may not be desirable to all institutions where GeriLife is deployed, administrator users should be able to deactivate the feature.

On the Settings dashboard, rename the "Activity Types" section to be "Activities". Add a new setting on the "Activities" settings page to allow the new "engagement level" feature to be enabled/disabled. When the "engagement level" feature is disabled, the "Add Activity" form should not show the "engagement level" stars but can use the new structure to avoid maintaining two templates.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing Add Activity form and the Activity Types section on the Settings dashboard, then trace how activities and participating residents are stored. Define the engagement-level relationship and the administrator setting before implementing the UI and persistence changes. Done means each participating resident can have a 1–3 engagement level, and disabling the setting hides the stars while activity entry still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.