update date rendering
This commit is contained in:
parent
a4055877c4
commit
459f04a490
|
@ -40,7 +40,7 @@ public class ListRenderer extends ResourceRenderer {
|
||||||
XhtmlNode tr = t.tr();
|
XhtmlNode tr = t.tr();
|
||||||
XhtmlNode td = tr.td();
|
XhtmlNode td = tr.td();
|
||||||
if (list.has("date")) {
|
if (list.has("date")) {
|
||||||
td.tx(/*!#*/"Date: "+list.get("date").dateTimeValue().toHumanDisplay());
|
td.tx(/*!#*/"Date: "+context.toStr(list.get("date").dateTimeValue()));
|
||||||
}
|
}
|
||||||
if (list.has("mode")) {
|
if (list.has("mode")) {
|
||||||
td.tx(/*!#*/"Mode: "+list.get("mode").primitiveValue());
|
td.tx(/*!#*/"Mode: "+list.get("mode").primitiveValue());
|
||||||
|
@ -113,7 +113,7 @@ public class ListRenderer extends ResourceRenderer {
|
||||||
XhtmlNode t = x.table("clstu");
|
XhtmlNode t = x.table("clstu");
|
||||||
XhtmlNode tr = t.tr();
|
XhtmlNode tr = t.tr();
|
||||||
if (list.hasDate()) {
|
if (list.hasDate()) {
|
||||||
tr.td().tx(/*!#*/"Date: "+list.getDate().toLocaleString());
|
tr.td().tx(/*!#*/"Date: "+context.toStr(list.getDateElement()));
|
||||||
}
|
}
|
||||||
if (list.hasMode()) {
|
if (list.hasMode()) {
|
||||||
tr.td().tx(/*!#*/"Mode: "+list.getMode().getDisplay());
|
tr.td().tx(/*!#*/"Mode: "+list.getMode().getDisplay());
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class ProvenanceRenderer extends ResourceRenderer {
|
||||||
if (prv.hasRecorded()) {
|
if (prv.hasRecorded()) {
|
||||||
tr = t.tr();
|
tr = t.tr();
|
||||||
tr.td().tx(/*!#*/"Recorded");
|
tr.td().tx(/*!#*/"Recorded");
|
||||||
tr.td().addText(prv.getRecordedElement().toHumanDisplay());
|
tr.td().addText(context.toStr(prv.getRecordedElement()));
|
||||||
}
|
}
|
||||||
if (prv.hasPolicy()) {
|
if (prv.hasPolicy()) {
|
||||||
tr = t.tr();
|
tr = t.tr();
|
||||||
|
|
|
@ -18,6 +18,7 @@ import org.hl7.fhir.r5.context.IWorkerContext;
|
||||||
import org.hl7.fhir.r5.elementmodel.Element;
|
import org.hl7.fhir.r5.elementmodel.Element;
|
||||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||||
import org.hl7.fhir.r5.model.Base;
|
import org.hl7.fhir.r5.model.Base;
|
||||||
|
import org.hl7.fhir.r5.model.BaseDateTimeType;
|
||||||
import org.hl7.fhir.r5.model.DateTimeType;
|
import org.hl7.fhir.r5.model.DateTimeType;
|
||||||
import org.hl7.fhir.r5.model.DomainResource;
|
import org.hl7.fhir.r5.model.DomainResource;
|
||||||
import org.hl7.fhir.r5.model.Extension;
|
import org.hl7.fhir.r5.model.Extension;
|
||||||
|
@ -745,7 +746,7 @@ public class RenderingContext extends RenderingI18nContext {
|
||||||
return nf.format(v);
|
return nf.format(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toStr(DateTimeType dt) {
|
public String toStr(BaseDateTimeType dt) {
|
||||||
return dt.toHumanDisplay();
|
return dt.toHumanDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue