Skip to content

Added autopopulate function to handle autopopulated inputs #114

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

Open
wants to merge 1 commit into
base: 3.0.0-carbonize
Choose a base branch
from

Conversation

CynthiaKamau
Copy link

Summary :
In forms, there certain input fields that are automatically pre-populated based on previous answers and a specified logic. eg if a patient has a bmi of less than 16, then their nutrition status is malnutrition and a user does not have to input that manually as it can be added logically.

This pr has the addition of autopopulate tag in question options which returns a value/concept based on logic specified(helper function) in an autopopulateExpression.

eg:

"autopopulate": {
    "autopopulateExpression": "autopopNutritionStatus(bmi)"
}

Video :

OpenMRS.-.19.July.2022.mp4

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.

1 participant