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

U4X-520: Setting default program enrolled as HIV #214

Conversation

Daphne210
Copy link
Collaborator

@Daphne210 Daphne210 commented Apr 4, 2024

20240409012148.mp4

@Daphne210 Daphne210 requested a review from Mwanje April 4, 2024 14:55
</div>
);
}
console.info(programEnrolled);
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we remove this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jabahum This has been removed in the subsequent commit

const { isLoading, error, enrollments } = usePatientPrograms(patientUuid);
const switcherHeaders = enrollments?.map((item) => item.program.name);
const [programEnrolled, setProgramEnrolled] = useState<programs>('HIV Program');
Copy link
Contributor

Choose a reason for hiding this comment

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

@Daphne210 what happens of the person is only in the TB Program?

Probably consider enrollments[0] as default & dont show anything if there are no programs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@akileng56 This has been fixed in the subsequent commit

Copy link
Contributor

@Mwanje Mwanje left a comment

Choose a reason for hiding this comment

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

Thanks @Daphne210

@akileng56 akileng56 merged commit 2dab85b into METS-Programme:master Apr 12, 2024
3 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.

4 participants