Skip to content
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

(feat) Add session and cohort identifiers for group sessions #72

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

icrc-jofrancisco
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • My work includes tests or is validated by existing tests.

Summary

Added functionality to enhance group session data storage by incorporating session and cohort identifiers. This includes additional fields for cohort name, cohortId, and sessionUuId. These new fields complement existing ones such as sessionName, sessionDate, and sessionNotes, providing a more comprehensive dataset for group sessions.

Screenshots

image

Related Issue

Other

Thanks,
CC: @ibacher

@@ -36,6 +37,7 @@ const SessionDetailsForm = () => {

const { patientUuids } = useContext(GroupFormWorkflowContext);
const { patients, isLoading } = useGetPatients(patientUuids);
register("sessionUuid", { value: uuid() });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect that this would be part of the GroupFormWorkflowContext, which is where everything else about the session is initialized.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, add it to the Context type and set a default value here, so it becomes not just part of the form, but part of the data persisted to localStorage (so we don't end up with inconsistent sessionUuids.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, add it to the Context type and set a default value here, so it becomes not just part of the form, but part of the data persisted to localStorage (so we don't end up with inconsistent sessionUuids.

Thanks for your review @ibacher . I made a small refactor, following the same logic that is implemented in the other identifiers, now using the "activeSessionUuid", so everything is more organized and coherent.
I'd ask for a new review.
Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibacher , can you review it again when you have time?
Thanks,

@gracepotma gracepotma requested a review from denniskigen March 8, 2024 15:21
@icrc-jofrancisco icrc-jofrancisco changed the title (feat) Add session and cohort identifiers for group sessions) (feat) Add session and cohort identifiers for group sessions Mar 14, 2024
Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @icrc-jofrancisco. Thanks.

@denniskigen denniskigen merged commit e901873 into openmrs:main Mar 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants