Example usage for org.apache.commons.lang.time DateFormatUtils ISO_DATE_FORMAT

List of usage examples for org.apache.commons.lang.time DateFormatUtils ISO_DATE_FORMAT

Introduction

In this page you can find the example usage for org.apache.commons.lang.time DateFormatUtils ISO_DATE_FORMAT.

Prototype

FastDateFormat ISO_DATE_FORMAT

To view the source code for org.apache.commons.lang.time DateFormatUtils ISO_DATE_FORMAT.

Click Source Link

Document

ISO8601 formatter for date without time zone.

Usage

From source file:org.oscarehr.PMmodule.web.CdsForm4.java

public static String getDateAsISOString(Date date) {
    if (date == null)
        return ("");

    return (DateFormatUtils.ISO_DATE_FORMAT.format(date));
}

From source file:org.oscarehr.PMmodule.web.ClientManagerAction.java

public static String getEscapedAdmissionSelectionDisplay(int admissionId) {
    Admission admission = admissionDao.getAdmission((long) admissionId);

    StringBuilder sb = new StringBuilder();

    sb.append(admission.getProgramName());
    sb.append(" ( ");
    sb.append(DateFormatUtils.ISO_DATE_FORMAT.format(admission.getAdmissionDate()));
    sb.append(" - ");
    if (admission.getDischargeDate() == null)
        sb.append("current");
    else// www.  j a v  a 2s .  com
        sb.append(DateFormatUtils.ISO_DATE_FORMAT.format(admission.getDischargeDate()));
    sb.append(" )");

    return (StringEscapeUtils.escapeHtml(sb.toString()));
}

From source file:org.oscarehr.PMmodule.web.ClientManagerAction.java

public static String getEscapedDateDisplay(Date d) {
    String display = DateFormatUtils.ISO_DATE_FORMAT.format(d);

    return (StringEscapeUtils.escapeHtml(display));
}

From source file:org.oscarehr.PMmodule.web.ManageHnrClient.java

public String getRemoteFormatedBirthDate() {
    String date = "";

    if (hnrClient != null && hnrClient.getBirthDate() != null) {
        date = DateFormatUtils.ISO_DATE_FORMAT.format(hnrClient.getBirthDate());
    }//w  w w.  java2  s.  co m

    return (date);
}

From source file:org.oscarehr.PMmodule.web.ManageHnrClient.java

public String getRemoteFormatedHinStartDate() {
    String date = "";

    if (hnrClient != null && hnrClient.getHinValidStart() != null) {
        date = DateFormatUtils.ISO_DATE_FORMAT.format(hnrClient.getHinValidStart());
    }/*from   w w w.  j a  va2s  .  c o  m*/

    return (date);
}

From source file:org.oscarehr.PMmodule.web.ManageHnrClient.java

public String getRemoteFormatedHinEndDate() {
    String date = "";

    if (hnrClient != null && hnrClient.getHinValidEnd() != null) {
        date = DateFormatUtils.ISO_DATE_FORMAT.format(hnrClient.getHinValidEnd());
    }//from   w  w w.j  a va2  s  .  co m

    return (date);
}

From source file:org.oscarehr.PMmodule.web.ManageHnrClient.java

public String getLocalFormatedHinStartDate() {
    String date = "";

    if (demographic != null && demographic.getEffDate() != null) {
        date = DateFormatUtils.ISO_DATE_FORMAT.format(demographic.getEffDate());
    }//from  w w w.  j  a  v  a 2s. c o  m

    return (date);
}

From source file:org.oscarehr.PMmodule.web.ManageHnrClient.java

public String getLocalFormatedHinEndDate() {
    String date = "";

    if (demographic != null && demographic.getHcRenewDate() != null) {
        date = DateFormatUtils.ISO_DATE_FORMAT.format(demographic.getHcRenewDate());
    }//w  w w .  j  a  va  2  s .  co  m

    return (date);
}

From source file:org.oscarehr.PMmodule.web.ManageLinkedClients.java

private static void copyHnrClientDataToMatchingScorePlaceholder(
        LinkedDemographicHolder integratorLinkedDemographicHolder, org.oscarehr.hnr.ws.Client hnrClient) {
    // copy the data to holder entry
    if (hnrClient.getBirthDate() != null)
        integratorLinkedDemographicHolder.birthDate = DateFormatUtils.ISO_DATE_FORMAT
                .format(hnrClient.getBirthDate());
    integratorLinkedDemographicHolder.firstName = StringUtils.trimToEmpty(hnrClient.getFirstName());
    if (hnrClient.getGender() != null)
        integratorLinkedDemographicHolder.gender = hnrClient.getGender().name();
    integratorLinkedDemographicHolder.hin = StringUtils.trimToEmpty(hnrClient.getHin());
    integratorLinkedDemographicHolder.hinType = StringUtils.trimToEmpty(hnrClient.getHinType());
    integratorLinkedDemographicHolder.lastName = StringUtils.trimToEmpty(hnrClient.getLastName());
    integratorLinkedDemographicHolder.linkDestination = ClientLink.Type.HNR.name();
    integratorLinkedDemographicHolder.remoteLinkId = hnrClient.getLinkingId();

    if (hnrClient.getImage() != null)
        integratorLinkedDemographicHolder.imageUrl = "/imageRenderingServlet?source="
                + ImageRenderingServlet.Source.hnr_client.name() + "&linkingId=" + hnrClient.getLinkingId();
}

From source file:org.oscarehr.PMmodule.web.ManageLinkedClients.java

private static void copyDemographicTransferDataToScorePlaceholder(DemographicTransfer demographicTransfer,
        LinkedDemographicHolder integratorLinkedDemographicHolder) throws MalformedURLException {
    // copy the data to holder entry
    if (demographicTransfer.getBirthDate() != null)
        integratorLinkedDemographicHolder.birthDate = DateFormatUtils.ISO_DATE_FORMAT
                .format(demographicTransfer.getBirthDate());
    integratorLinkedDemographicHolder.firstName = StringUtils.trimToEmpty(demographicTransfer.getFirstName());
    integratorLinkedDemographicHolder.gender = "";
    if (demographicTransfer.getGender() != null)
        integratorLinkedDemographicHolder.gender = demographicTransfer.getGender().name();
    integratorLinkedDemographicHolder.hin = StringUtils.trimToEmpty(demographicTransfer.getHin());
    integratorLinkedDemographicHolder.hinType = StringUtils.trimToEmpty(demographicTransfer.getHinType());
    integratorLinkedDemographicHolder.lastName = StringUtils.trimToEmpty(demographicTransfer.getLastName());

    CachedFacility tempFacility = CaisiIntegratorManager
            .getRemoteFacility(demographicTransfer.getIntegratorFacilityId());
    integratorLinkedDemographicHolder.linkDestination = ClientLink.Type.OSCAR_CAISI.name() + '.'
            + tempFacility.getIntegratorFacilityId();
    integratorLinkedDemographicHolder.remoteLinkId = demographicTransfer.getCaisiDemographicId();

    if (demographicTransfer.getPhoto() != null)
        integratorLinkedDemographicHolder.imageUrl = "/imageRenderingServlet?source="
                + ImageRenderingServlet.Source.integrator_client.name() + "&integratorFacilityId="
                + demographicTransfer.getIntegratorFacilityId() + "&caisiDemographicId="
                + demographicTransfer.getCaisiDemographicId();
}