Skip to content

Validation bypass after removal in Add Allergy/Diagnosis/Symptoms & Raw translation keys in Add Questionnaire #13349

@Denyme24

Description

@Denyme24

Describe the bug
There are two issues observed in the Encounters page:

  1. Validation bypass after removal
  • When adding Allergy, Diagnosis, or Symptoms for the first time, the required validation for the main dropdown works correctly (e.g., "This field is required").
  • However, if an item is added and then removed, the user can submit the form again without selecting anything, and it still gets submitted without triggering the required validation.
  • This bypass happens for all three: Allergy, Diagnosis, and Symptoms.
  1. Raw translation keys in Add Questionnaire
  • When selecting the "Respiratory Status" questionnaire, under "Respiratory Support", some options display raw translation keys (e.g., oxygen_support, non_invasive) instead of their proper localized labels.

To Reproduce
Steps to Reproduce (Issue 1 - Validation bypass):

  1. Go to Encounters → Add Allergy (same issue for Diagnosis/Symptoms).
  2. Try to submit without selecting anything → validation message appears (expected).
  3. Add any allergy and submit → works fine.
  4. Edit and remove that allergy → list becomes empty.
  5. Submit without adding anything again → submission still succeeds (unexpected).

Steps to Reproduce (Issue 2 - Raw translation keys):

  1. Go to Encounters → Add Questionnaire → select "Respiratory Status".
  2. Under "Respiratory Support", check the options.
  3. Notice that raw translation keys like oxygen_support, non_invasive, etc., are shown instead of proper values.

Expected behavior

  • For Issue 1: Required validation should trigger every time the list is empty, even after removing previously added items.
  • For Issue 2: All option labels should display their localized text instead of raw translation keys.

Screenshots

Recording.2025-08-12.163557.mp4

Desktop (please complete the following information):

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

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


🚨 DO NOT EDIT BELOW THIS LINE 🚨

Instructions for Requesting Assignment:

To request assignment, please clearly outline your solution and timeline by commenting on the issue using the format below:

Describe your solution clearly:
Provide a detailed explanation of your proposed solution, including your approach, key implementation steps, and relevant examples or references. Mention any dependencies, assumptions, or risks you foresee that might affect your timeline or implementation.

Expected Timeline:

  • End date: [Expected submission date of a completed Pull Request]

Additional Context:
Include any other relevant context, links, screenshots, or resources that support your proposed solution.

🚨 Your assignment may be unassigned if there is no activity or progress within the stated timeline unless communicated clearly and agreed upon.

Metadata

Metadata

Labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions