lundi 3 juin 2019

How to update a .tag file

I have a .tag file that I want to edit because I need to separate the date and time from each other.

I've tried editing it a normal way, then saving it. But upon checking, it the date and time is still together. I also tried just to add extra letters but it doesn't show either.

Below are my codes for the date and time.

<%@ taglib prefix="c" uri="/WEB-INF/taglibs/c-rt.tld" 
%><%@ taglib prefix="fmt" uri="/WEB-INF/taglibs/fmt-rt.tld"
%><%@ taglib prefix="chits" uri="/WEB-INF/taglibs/chits-rt.tld" 
%><%@ attribute name="enc" required="true" type="org.openmrs.Encounter"
%>

<c:set var="startTimestamp" value="${chits:coalesce(chits:observation(enc, VisitConcepts.CONSULT_START).valueDatetime, enc.dateCreated)}" />

<c:set var="endTimestamp" value="${chits:coalesce(chits:observation(enc, VisitConcepts.CONSULT_END).valueDatetime, chits:observation(enc, VisitConcepts.NOTES_NUMBER).dateCreated)}" />

<c:if test="${endTimestamp eq null}"><c:set var="endTimestamp" value="${chits:coalesce(enc.dateChanged, enc.dateCreated)}"/></c:if>

<fmt:formatDate pattern="MM/dd/yyyy'<br/>'hh:mm a" value="${startTimestamp}" /> to<br/>

<fmt:formatDate pattern="MM/dd/yyyy'<br/>'hh:mm a" value="${endTimestamp}" /><br/>

(<fmt:formatNumber pattern="0.00" value="${(endTimestamp.time - startTimestamp.time) / 60000}" /> minutes)

While this is what I used to call it in JSP:

<td><chits_tag:encounterDuration enc="${enc}"  /> </td>

I just want to separate the date and time. Thanks!

Aucun commentaire:

Enregistrer un commentaire