Package uk.nhs.interoperability.payloads.exceptions

Examples of uk.nhs.interoperability.payloads.exceptions.MissingMandatoryFieldException.addMissingField()


    }
    MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
    // Null checks for mandatory fields
    // If we have a DNACPR Decision, we also need a senior responsible clinician name
    if (isbFields.getSeniorResponsibleClinicianName() == null) {
      missingFields.addMissingField("SeniorResponsibleClinicianName", "If a DNACPR decision is included, the senior responsible clinician name is also required");
    }
    // We also need the senior responsible clinician org id
    if (isbFields.getSeniorResponsibleClinicianORGID() == null) {
      missingFields.addMissingField("SeniorResponsibleClinicianORGID", "If a DNACPR decision is included, the senior responsible clinician's organisation (ODS) ID is also required");
    }
View Full Code Here


    if (isbFields.getSeniorResponsibleClinicianName() == null) {
      missingFields.addMissingField("SeniorResponsibleClinicianName", "If a DNACPR decision is included, the senior responsible clinician name is also required");
    }
    // We also need the senior responsible clinician org id
    if (isbFields.getSeniorResponsibleClinicianORGID() == null) {
      missingFields.addMissingField("SeniorResponsibleClinicianORGID", "If a DNACPR decision is included, the senior responsible clinician's organisation (ODS) ID is also required");
    }
    // We also need the senior responsible clinician org name
    if (isbFields.getSeniorResponsibleClinicianORGName() == null) {
      missingFields.addMissingField("SeniorResponsibleClinicianORGName", "If a DNACPR decision is included, the senior responsible clinician's organisation name is also required");
    }
View Full Code Here

    if (isbFields.getSeniorResponsibleClinicianORGID() == null) {
      missingFields.addMissingField("SeniorResponsibleClinicianORGID", "If a DNACPR decision is included, the senior responsible clinician's organisation (ODS) ID is also required");
    }
    // We also need the senior responsible clinician org name
    if (isbFields.getSeniorResponsibleClinicianORGName() == null) {
      missingFields.addMissingField("SeniorResponsibleClinicianORGName", "If a DNACPR decision is included, the senior responsible clinician's organisation name is also required");
    }
    // We also need the date of the decision
    if (isbFields.getDNACPRDate() == null) {
      missingFields.addMissingField("DNACPRDate", "If a DNACPR decision is included, the date the decision was made is also required");
    }
View Full Code Here

    if (isbFields.getSeniorResponsibleClinicianORGName() == null) {
      missingFields.addMissingField("SeniorResponsibleClinicianORGName", "If a DNACPR decision is included, the senior responsible clinician's organisation name is also required");
    }
    // We also need the date of the decision
    if (isbFields.getDNACPRDate() == null) {
      missingFields.addMissingField("DNACPRDate", "If a DNACPR decision is included, the date the decision was made is also required");
    }
    // We also need the date the decision was recorded
    if (isbFields.getDNACPRCreatedDate() == null) {
      missingFields.addMissingField("DNACPRCreatedDate", "If a DNACPR decision is included, the date the decision was originally recorded is also required");
    }
View Full Code Here

    if (isbFields.getDNACPRDate() == null) {
      missingFields.addMissingField("DNACPRDate", "If a DNACPR decision is included, the date the decision was made is also required");
    }
    // We also need the date the decision was recorded
    if (isbFields.getDNACPRCreatedDate() == null) {
      missingFields.addMissingField("DNACPRCreatedDate", "If a DNACPR decision is included, the date the decision was originally recorded is also required");
    }
    if (missingFields.hasEntries()) {
      throw missingFields;
    }
   
View Full Code Here

    }
    MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
    // Null checks for mandatory fields
    // If we have an LPA authority we also need a name for the LPA
    if (isbFields.getLPAName() == null) {
      missingFields.addMissingField("LPAName", "If an LPA authority is included, the name of the LPA is also required");
    }
    if (isbFields.getLPADate() == null) {
      missingFields.addMissingField("LPADate", "If an LPA authority is included, the date the LPA was granted is also required");
    }
    if (missingFields.hasEntries()) {
View Full Code Here

    // If we have an LPA authority we also need a name for the LPA
    if (isbFields.getLPAName() == null) {
      missingFields.addMissingField("LPAName", "If an LPA authority is included, the name of the LPA is also required");
    }
    if (isbFields.getLPADate() == null) {
      missingFields.addMissingField("LPADate", "If an LPA authority is included, the date the LPA was granted is also required");
    }
    if (missingFields.hasEntries()) {
      throw missingFields;
    }
   
View Full Code Here

      missingFields.addMissingFields(e);
    }
   
    // Additional mandatory field checks for text sections
    if (isbFields.getPrimaryEOLCDiagnosis() == null) {
      missingFields.addMissingField("PrimaryEOLCDiagnosis", "A primary EOLC Diagnosis must be provided");
    }

    // We have done all the checks on mandatory fields, so if there are any
    // errors, throw them up to the caller
    if (missingFields.hasEntries()) {
View Full Code Here

  public static PatientUniversal createPatient(EndOfLifeCareISBFields isbFields) throws MissingMandatoryFieldException {
    MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
   
    // Null checks for mandatory fields
    if (isbFields.getPatientNHSNoIsTraced() == null) {
      missingFields.addMissingField("PatientNHSNoIsTraced", "The tracing status for the NHS number must be provided");
    }
    if (isbFields.getPatientNHSNo() == null) {
      missingFields.addMissingField("PatientNHSNo", "The patient's NHS number must be provided");
    }
    if (isbFields.getPatientAddress() == null) {
View Full Code Here

    // Null checks for mandatory fields
    if (isbFields.getPatientNHSNoIsTraced() == null) {
      missingFields.addMissingField("PatientNHSNoIsTraced", "The tracing status for the NHS number must be provided");
    }
    if (isbFields.getPatientNHSNo() == null) {
      missingFields.addMissingField("PatientNHSNo", "The patient's NHS number must be provided");
    }
    if (isbFields.getPatientAddress() == null) {
      missingFields.addMissingField("PatientAddress", "The patient's address must be provided");
    }
    if (isbFields.getPatientName() == null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.