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

in the OTZ Discontinuation form, does not save the correct data when … #1792

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gabriel090
Copy link
Contributor

in the OTZ Discontinuation form, does not save the correct data when saved in the database upon successful submission. For instance, Opt out of OTZ in the form will display discontinue

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

Screenshots

This is the image of the error.
otz_discontinuation

Related Issue

Other

…saved in the database upon successful submit. For instance Opt out of OTZ in the form will display discontinue
Copy link
Member

@donaldkibet donaldkibet left a comment

Choose a reason for hiding this comment

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

Thanks @gabriel090. Ensure you follow the community guidelines for contributing here by having a good PR description and summary. Also include a ticket for this work.

Comment on lines +9 to +10
export const otzUuid = '159836AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
export const otzOutPut = 'Opt out of OTZ';
Copy link
Member

Choose a reason for hiding this comment

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

We don't need this hard coded values. These should be provided by the config file

@@ -12,15 +13,22 @@ interface EncounterObservationsProps {
const EncounterObservations: React.FC<EncounterObservationsProps> = ({ observations }) => {
const { t } = useTranslation();
const { obsConceptUuidsToHide = [] } = useConfig();
const { obsConceptDisplayOverrides = { otzUuid: otzOutPut } } = useConfig();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const { obsConceptDisplayOverrides = { otzUuid: otzOutPut } } = useConfig();
const { obsConceptDisplayOverrides = useConfig();

Comment on lines -63 to -68

return (
<div className={styles.observation}>
<p>{t('noObservationsFound', 'No observations found')}</p>
</div>
);
Copy link
Member

Choose a reason for hiding this comment

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

Why are we removing this empty status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants