Question: Dear all. Is there a way to avoid OpenMRS to allowing Male patients to be enrolled in PTV programs and adult patients to be enrolled to a CCR program?
Step-by-step instructions for others to reproduce the problem
Scenario 1: Create a New Male patient with 22 years-> search for the patient-> On patient dashboard look for programs session-> Click on add program -> on program name select PTV-> Chose any completion date and Location-> Click on enrrol button. (The system enrolles the patient)
Scenario 2: Search for the the same Male patient-> On patient dashboard look for programs session-> Click on add program -> on program name select CCR-> Chose any completion date and Location-> Click on enrrol button. (The system enrolles the patient)
Platform: We are using OpenMRS v1.11.5 as a retrospective system
I’m having a problem with the validator implemented.
When I call endpoint /programenrollment with a payload that should not pass validation, the message from error response is actually the key from the messages bundle: