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

Failed to update encounters on selecting certain diet preference #9817

Closed
arhamathar opened this issue Jan 7, 2025 · 3 comments · May be fixed by #9859
Closed

Failed to update encounters on selecting certain diet preference #9817

arhamathar opened this issue Jan 7, 2025 · 3 comments · May be fixed by #9859

Comments

@arhamathar
Copy link
Contributor

Describe the bug
Failed to update encounters on selecting certain diet preference

To Reproduce
Steps to reproduce the behavior:

  1. Select any Patient
  2. Click on View Encounter
  3. Click on Update Encounter
  4. Select diet preference as Gluten free, Nut free or Dairy Free
  5. Click on submit button
  6. Error -> Failed to update Questionnaire

Expected behavior
Encounter should be updated

Screenshots
Image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
I have debug the issue. The backend is expecting diet preference as kebab case: Ex 'diary-free', 'nut-free', 'gluten-free'
From the UI we are providing diet payload as snake case. Ex: 'diary_free', 'nut_free', 'gluten_free'

@arhamathar
Copy link
Contributor Author

I would like to work on this issue if we need to handle this from the frontend @Jacobjeevan @rithviknishad

@arhamathar
Copy link
Contributor Author

Today I re-tested the issue and found that the backend now accepts snake_case (e.g. Input should be 'vegetarian', 'diary_free', 'nut_free', 'gluten_free', 'vegan', 'halal', 'kosher' or 'none'). Previously, it expected kebab-case. It seems this was fixed on the backend side. The Update Encounter is working fine now. @rithviknishad

@rithviknishad
Copy link
Member

Yup, it was updated in BE. Anyhow, like @bodhish already said, do move it to constants anyhow, using snake_case itself as a code quality improvement thing.

Image

Closing this issue as the bug is solved, however do make the change for the PR.

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