Package uk.nhs.interoperability.payloads.exceptions

Examples of uk.nhs.interoperability.payloads.exceptions.MissingMandatoryFieldException


    }
    return template;
  }
 
  public static EncompassingEncounter createEncompassingEncounter(NonCodedCDACommonFields commonFields) throws MissingMandatoryFieldException {
    MissingMandatoryFieldException missingFields = new MissingMandatoryFieldException();
    boolean from = commonFields.getEncounterFromTime()!=null;
    boolean to = commonFields.getEncounterToTime()!=null;
    // Null checks for mandatory fields
    if (!from && !to) {
      missingFields.addMissingField("encounterFromTime", "If an encounter is included, it must have a start and/or end time");
    }
    if (commonFields.getEncounterLocationType() == null) {
      missingFields.addMissingField("encounterLocationType", "If an encounter is included, it must have a location type");
    }
    if (missingFields.hasEntries()) {
      throw missingFields;
    }
   
    EncompassingEncounter template = new EncompassingEncounter();
    // ID
View Full Code Here

TOP

Related Classes of uk.nhs.interoperability.payloads.exceptions.MissingMandatoryFieldException

Copyright © 2018 www.massapicom. 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.