Package uk.nhs.interoperability.payloads.exceptions

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


      }
      if (!guardianNHSNoTraceStatus) {
        missingFields.addMissingField("GuardianNHSNoTraceStatus", "When a guardian is specified, an NHS number trace status must be included");
      }
      if (!guardianRole) {
        missingFields.addMissingField("GuardianRole", "When a guardian is specified, a guardian role must be included");
      }
    }
    if (missingFields.hasEntries()) {
      throw missingFields;
    }
View Full Code Here


    boolean providerOrganisationType = fields.getProviderOrganisationType() != null;
    boolean providerParentOrganisationODSID = fields.getProviderParentOrganisationODSID() != null;
    boolean provider = (providerOrganisationODSID || providerOrganisation || providerOrganisationAddress || providerOrganisationTelephone || providerOrganisationType || providerParentOrganisationODSID);
    if (provider) {
      if (!providerOrganisationODSID) {
        missingFields.addMissingField("ProviderOrganisationODSID", "When a provider organisation is specified for a child patient, an ODS code must be included");
      }
      if (!providerOrganisation) {
        missingFields.addMissingField("ProviderOrganisation", "When a provider organisation is specified for a child patient, an Org Name must be included");
      }
      if (!providerOrganisationType) {
View Full Code Here

    if (provider) {
      if (!providerOrganisationODSID) {
        missingFields.addMissingField("ProviderOrganisationODSID", "When a provider organisation is specified for a child patient, an ODS code must be included");
      }
      if (!providerOrganisation) {
        missingFields.addMissingField("ProviderOrganisation", "When a provider organisation is specified for a child patient, an Org Name must be included");
      }
      if (!providerOrganisationType) {
        missingFields.addMissingField("ProviderOrganisationType", "When a provider organisation is specified for a child patient, a provider org type must be included");
      }
    }
View Full Code Here

      }
      if (!providerOrganisation) {
        missingFields.addMissingField("ProviderOrganisation", "When a provider organisation is specified for a child patient, an Org Name must be included");
      }
      if (!providerOrganisationType) {
        missingFields.addMissingField("ProviderOrganisationType", "When a provider organisation is specified for a child patient, a provider org type must be included");
      }
    }
   
    ChildPatientUniversal template = new ChildPatientUniversal();
   
View Full Code Here

  public static AuthorPersonUniversal createAuthor(ChildScreeningFields fields) throws MissingMandatoryFieldException {
    MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
   
    // Null checks for mandatory fields
    if (fields.getDocumentAuthorSDSID() == null) {
      missingFields.addMissingField("DocumentAuthorSDSID", "The SDS ID of the document author must be provided");
    }
    if (fields.getDocumentAuthorRole() == null) {
      missingFields.addMissingField("DocumentAuthorRole", "The job role of the document author must be provided");
    }
    if (fields.getDocumentAuthorName() == null) {
View Full Code Here

    // Null checks for mandatory fields
    if (fields.getDocumentAuthorSDSID() == null) {
      missingFields.addMissingField("DocumentAuthorSDSID", "The SDS ID of the document author must be provided");
    }
    if (fields.getDocumentAuthorRole() == null) {
      missingFields.addMissingField("DocumentAuthorRole", "The job role of the document author must be provided");
    }
    if (fields.getDocumentAuthorName() == null) {
      missingFields.addMissingField("DocumentAuthorName", "The name of the document author must be provided");
    }
    if (fields.getDocumentAuthorOrganisationODSID() == null) {
View Full Code Here

    }
    if (fields.getDocumentAuthorRole() == null) {
      missingFields.addMissingField("DocumentAuthorRole", "The job role of the document author must be provided");
    }
    if (fields.getDocumentAuthorName() == null) {
      missingFields.addMissingField("DocumentAuthorName", "The name of the document author must be provided");
    }
    if (fields.getDocumentAuthorOrganisationODSID() == null) {
      missingFields.addMissingField("DocumentAuthorOrganisationODSID", "The ID of the organisation the document author belongs to must be provided");
    }
    if (fields.getDocumentAuthorOrganisationName() == null) {
View Full Code Here

    }
    if (fields.getDocumentAuthorName() == null) {
      missingFields.addMissingField("DocumentAuthorName", "The name of the document author must be provided");
    }
    if (fields.getDocumentAuthorOrganisationODSID() == null) {
      missingFields.addMissingField("DocumentAuthorOrganisationODSID", "The ID of the organisation the document author belongs to must be provided");
    }
    if (fields.getDocumentAuthorOrganisationName() == null) {
      missingFields.addMissingField("DocumentAuthorOrganisationName", "The name of the organisation the document author belongs to must be provided");
    }
    if (missingFields.hasEntries()) {
View Full Code Here

    }
    if (fields.getDocumentAuthorOrganisationODSID() == null) {
      missingFields.addMissingField("DocumentAuthorOrganisationODSID", "The ID of the organisation the document author belongs to must be provided");
    }
    if (fields.getDocumentAuthorOrganisationName() == null) {
      missingFields.addMissingField("DocumentAuthorOrganisationName", "The name of the organisation the document author belongs to must be provided");
    }
    if (missingFields.hasEntries()) {
      throw missingFields;
    }
   
View Full Code Here

 
  public static CustodianOrganizationUniversal createCustodian(ChildScreeningFields fields) throws MissingMandatoryFieldException {
    MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
    // Null checks for mandatory fields
    if (fields.getCustodianOrganisationODSID() == null) {
      missingFields.addMissingField("CustodianOrganisationODSID", "The ODS ID of the custodian organisation must be provided");
    }
    if (fields.getCustodianOrganisation() == null) {
      missingFields.addMissingField("CustodianOrganisation", "The name of the custodian organisation must be provided");
    }
    if (missingFields.hasEntries()) {
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.