Ejemplo n.º 1
0
  public static String ExtractBirthdate(PRPAMT201306UV02ParameterList params) {
    log.debug("Entering HL7Parser201305.ExtractBirthdate method...");

    String birthDate = null;

    // Extract the birth time from the query parameters - Assume only one was specified
    if (params.getLivingSubjectBirthTime() != null
        && params.getLivingSubjectBirthTime().size() > 0
        && params.getLivingSubjectBirthTime().get(0) != null) {
      PRPAMT201306UV02LivingSubjectBirthTime birthTime = params.getLivingSubjectBirthTime().get(0);

      if (birthTime.getValue() != null
          && birthTime.getValue().size() > 0
          && birthTime.getValue().get(0) != null) {
        IVLTSExplicit birthday = birthTime.getValue().get(0);
        log.info("Found birthTime in query parameters = " + birthday.getValue());
        birthDate = birthday.getValue();
      } else {
        log.info("message does not contain a birthtime");
      }
    } else {
      log.info("message does not contain a birthtime");
    }

    log.debug("Exiting HL7Parser201305.ExtractBirthdate method...");
    return birthDate;
  }