MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
// Null checks for mandatory fields
// If we have a prognosis awareness for the main informal carer, we need to know who the main informal carer is (name)
if (isbFields.getMainInformalCarerName() == null) {
missingFields.addMissingField("MainInformalCarerName", "In order to indicate the main informal carer's awareness of the prognosis, you must also include the name of the main informal carer");
}
// We also need to know when the prognosis awareness was recorded
if (isbFields.getPrognosisAwarenessRecordedDate() == null) {
missingFields.addMissingField("PrognosisAwarenessRecordedDate", "In order to indicate the main informal carer's awareness of the prognosis, you must also include the date this awareness was recorded");
}