Constructor and Description |
---|
EncounterValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
supports(Class<?> c)
Returns whether or not this validator supports validating a given class.
|
void |
validate(Object obj,
org.springframework.validation.Errors errors)
Validates the given Encounter.
|
public boolean supports(Class<?> c)
supports
in interface org.springframework.validation.Validator
c
- The class to check for support.Validator.supports(java.lang.Class)
public void validate(Object obj, org.springframework.validation.Errors errors) throws APIException
validate
in interface org.springframework.validation.Validator
obj
- The encounter to validate.errors
- ErrorsAPIException
Should fail if the patients for the visit and the encounter dont match
Should fail if patient is not set
Should fail if encounter type is not set
Should fail if encounter dateTime is not set
Should fail if encounter dateTime is after current dateTime
Should fail if encounter dateTime is before visit startDateTime
Should fail if encounter dateTime is after visit stopDateTime
Should pass validation if field lengths are correct
Should fail validation if field lengths are not correct
Copyright © 2024 OpenMRS Inc.. All rights reserved.