Package uk.nhs.interoperability.payloads.exceptions

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


    // Null checks for mandatory fields
    if (isbFields.getEPACCSOrganisationODSID() == null) {
      missingFields.addMissingField("EPACCSOrganisationODSID", "The ODS ID of the organisation hosting the EOL record must be provided");
    }
    if (isbFields.getEPACCSOrganisation() == null) {
      missingFields.addMissingField("EPACCSOrganisation", "The name of the organisation hosting the EOL record must be provided");
    }
    if (missingFields.hasEntries()) {
      throw missingFields;
    }
   
View Full Code Here


    MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
    EoLCarePlan template = new EoLCarePlan();
   
    // Null checks for mandatory fields
    if (isbFields.getEpaccsRecordCreationDate() == null) {
      missingFields.addMissingField("EpaccsRecordCreationDate", "The creation date of the EPaCCS record must be provided");
    }
    // This may be an error in the DMS, so may not be mandatory in a later release
    if (isbFields.getEolcTool() == null) {
      missingFields.addMissingField("EolcTool", "The EOLC tool that is in use must be provided (e.g. LCP, PPC, GSF)");
    }
View Full Code Here

    if (isbFields.getEpaccsRecordCreationDate() == null) {
      missingFields.addMissingField("EpaccsRecordCreationDate", "The creation date of the EPaCCS record must be provided");
    }
    // This may be an error in the DMS, so may not be mandatory in a later release
    if (isbFields.getEolcTool() == null) {
      missingFields.addMissingField("EolcTool", "The EOLC tool that is in use must be provided (e.g. LCP, PPC, GSF)");
    }
   
    // If any of the original EPaCCS author fields exist, check the mandatory author fields also exist
    boolean time = (isbFields.getEpaccsRecordAuthoredDate() != null);
    boolean add = (isbFields.getEpaccsRecordAuthorAddress() != null);
View Full Code Here

    boolean orgid = (isbFields.getEpaccsRecordAuthorOrganisationODSID() != null);
    boolean org = (isbFields.getEpaccsRecordAuthorOrganisationName() != null);
    boolean originalEPaCCSAuthorProvided = (time || add || role || id || tel || name || orgid || org);
    if (originalEPaCCSAuthorProvided) {
      if (!time) {
        missingFields.addMissingField("EpaccsRecordAuthoredDate", "If specifying the original EPaCCS author, the original authoring date must be provided");
      }
      if (!id) {
        missingFields.addMissingField("EpaccsRecordAuthorSDSID", "If specifying the original EPaCCS author, the original author's SDS ID must be provided");
      }
      if (!name) {
View Full Code Here

    if (originalEPaCCSAuthorProvided) {
      if (!time) {
        missingFields.addMissingField("EpaccsRecordAuthoredDate", "If specifying the original EPaCCS author, the original authoring date must be provided");
      }
      if (!id) {
        missingFields.addMissingField("EpaccsRecordAuthorSDSID", "If specifying the original EPaCCS author, the original author's SDS ID must be provided");
      }
      if (!name) {
        missingFields.addMissingField("EpaccsRecordAuthorName", "If specifying the original EPaCCS author, the original author's name must be provided");
      }
      if (!orgid) {
View Full Code Here

      }
      if (!id) {
        missingFields.addMissingField("EpaccsRecordAuthorSDSID", "If specifying the original EPaCCS author, the original author's SDS ID must be provided");
      }
      if (!name) {
        missingFields.addMissingField("EpaccsRecordAuthorName", "If specifying the original EPaCCS author, the original author's name must be provided");
      }
      if (!orgid) {
        missingFields.addMissingField("EpaccsRecordAuthorOrganisationODSID", "If specifying the original EPaCCS author, the original author's organisation ODS ID must be provided");
      }
      if (!org) {
View Full Code Here

      }
      if (!name) {
        missingFields.addMissingField("EpaccsRecordAuthorName", "If specifying the original EPaCCS author, the original author's name must be provided");
      }
      if (!orgid) {
        missingFields.addMissingField("EpaccsRecordAuthorOrganisationODSID", "If specifying the original EPaCCS author, the original author's organisation ODS ID must be provided");
      }
      if (!org) {
        missingFields.addMissingField("EpaccsRecordAuthorOrganisationName", "If specifying the original EPaCCS author, the original author's organisation name must be provided");
      }
    }
View Full Code Here

      }
      if (!orgid) {
        missingFields.addMissingField("EpaccsRecordAuthorOrganisationODSID", "If specifying the original EPaCCS author, the original author's organisation ODS ID must be provided");
      }
      if (!org) {
        missingFields.addMissingField("EpaccsRecordAuthorOrganisationName", "If specifying the original EPaCCS author, the original author's organisation name must be provided");
      }
    }
   
    // If any of the EPaCCS last amending author fields exist, check the mandatory author fields also exist
    boolean latime = (isbFields.getEpaccsRecordUpdatedDate() != null);
View Full Code Here

    boolean laorgid = (isbFields.getEpaccsRecordUpdateAuthorOrganisationODSID() != null);
    boolean laorg = (isbFields.getEpaccsRecordUpdateAuthorOrganisationName() != null);
    boolean laEPaCCSAuthorProvided = (latime || laadd || larole || laid || latel || laname || laorgid || laorg);
    if (laEPaCCSAuthorProvided) {
      if (!latime) {
        missingFields.addMissingField("EpaccsRecordUpdatedDate", "If specifying the last updating EPaCCS author, the last updated date must be provided");
      }
      if (!laid) {
        missingFields.addMissingField("EpaccsRecordUpdateAuthorSDSID", "If specifying the last updating EPaCCS author, the last updating author's SDS ID must be provided");
      }
      if (!laname) {
View Full Code Here

    if (laEPaCCSAuthorProvided) {
      if (!latime) {
        missingFields.addMissingField("EpaccsRecordUpdatedDate", "If specifying the last updating EPaCCS author, the last updated date must be provided");
      }
      if (!laid) {
        missingFields.addMissingField("EpaccsRecordUpdateAuthorSDSID", "If specifying the last updating EPaCCS author, the last updating author's SDS ID must be provided");
      }
      if (!laname) {
        missingFields.addMissingField("EpaccsRecordUpdateAuthorName", "If specifying the last updating EPaCCS author, the last updating author's name must be provided");
      }
      if (!laorgid) {
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.