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 ability to disable and set default values for answers in specificQuestions #84

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

This pull request includes updates to the specificQuestions feature and a fix for the hook name.

Changes:

  • Added the ability to set default values for answers in the specificQuestions feature.
  • Added functionality to disable specific questions if needed.
  • Corrected the hook name from useForm to useSpecificQuestions to match the feature naming convention and ensure consistency.

Configuration example:

...
    "specificQuestions": [
      {
        "forms": [
          "17dea7cc-a0e6-34be-af31-9867004202df",
          "798a600f-fe2b-3d24-ad15-19d8ff2c17ac"
        ],
        "questionId": "placeOfConsultationTextInput",
        "defaultAnswer": "At the Hospital"
      },
      {
        "forms": [
          "17dea7cc-a0e6-34be-af31-9867004202df",
          "798a600f-fe2b-3d24-ad15-19d8ff2c17ac"
        ],
        "questionId": "practitionerAffiliationSelectInput",
        "defaultAnswer": "my-practitioner-affiliation-concept"
        "disabled": true
      }
    ]
 ...

Screenshots

Related Issue

Other

@icrc-psousa icrc-psousa merged commit 6ae1fda into openmrs:main Sep 2, 2024
4 checks passed
@lumuchris256 lumuchris256 mentioned this pull request Dec 10, 2024
3 tasks
denniskigen pushed a commit that referenced this pull request Dec 18, 2024
Cuts a minor release of Fast Data Entry, `v1.1.0` with some new features and housekeeping.

Here's the draft changelog:

* (feat) Add ability to disable and set default values for answers in specificQuestions by @icrc-jofrancisco in #84
* (feat) Support for static specific answers by @icrc-jofrancisco in #87

* (chore) O3-4255: Bump @carbon/react to v1.17.0 by @dilankavishka in #85
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.

2 participants