From 77fa7f78191aa83b48a12bd29a7ff26fc574bb84 Mon Sep 17 00:00:00 2001
From: JasonRoberts-smile
<85363818+JasonRoberts-smile@users.noreply.github.com>
Date: Tue, 26 Nov 2024 09:14:18 -0500
Subject: [PATCH] adapt template for reuse in CDA (#6500)
* adapt template for reuse in CDA
* use coerced onset date time value
* fix broken test
---
.../ca/uhn/fhir/jpa/ips/narrative/allergyintolerance.html | 6 +++---
.../uhn/fhir/jpa/ips/generator/IpsGeneratorSvcImplTest.java | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hapi-fhir-jpaserver-ips/src/main/resources/ca/uhn/fhir/jpa/ips/narrative/allergyintolerance.html b/hapi-fhir-jpaserver-ips/src/main/resources/ca/uhn/fhir/jpa/ips/narrative/allergyintolerance.html
index 728afbbd7a07..55f3d14dfc92 100644
--- a/hapi-fhir-jpaserver-ips/src/main/resources/ca/uhn/fhir/jpa/ips/narrative/allergyintolerance.html
+++ b/hapi-fhir-jpaserver-ips/src/main/resources/ca/uhn/fhir/jpa/ips/narrative/allergyintolerance.html
@@ -23,8 +23,8 @@
Allergies And Intolerances
-
-
+
+
Allergen |
Status |
Category |
@@ -33,7 +33,7 @@ Allergies And Intolerances
Comments |
- Onset |
+ Onset |
Onset |
diff --git a/hapi-fhir-jpaserver-ips/src/test/java/ca/uhn/fhir/jpa/ips/generator/IpsGeneratorSvcImplTest.java b/hapi-fhir-jpaserver-ips/src/test/java/ca/uhn/fhir/jpa/ips/generator/IpsGeneratorSvcImplTest.java
index 30791aadc8dc..96464a82b4de 100644
--- a/hapi-fhir-jpaserver-ips/src/test/java/ca/uhn/fhir/jpa/ips/generator/IpsGeneratorSvcImplTest.java
+++ b/hapi-fhir-jpaserver-ips/src/test/java/ca/uhn/fhir/jpa/ips/generator/IpsGeneratorSvcImplTest.java
@@ -220,7 +220,7 @@ public void testAllergyIntolerance_OnsetTypes() throws IOException {
HtmlTable table = (HtmlTable) tables.get(0);
int onsetIndex = 6;
assertEquals("Onset", table.getHeader().getRows().get(0).getCell(onsetIndex).asNormalizedText());
- assertEquals(new DateTimeType("2020-02-03T11:22:33Z").getValue().toString(), table.getBodies().get(0).getRows().get(0).getCell(onsetIndex).asNormalizedText());
+ assertEquals(new DateTimeType("2020-02-03T11:22:33Z").getValueAsString(), table.getBodies().get(0).getRows().get(0).getCell(onsetIndex).asNormalizedText());
assertEquals("Some Onset", table.getBodies().get(0).getRows().get(1).getCell(onsetIndex).asNormalizedText());
assertEquals("", table.getBodies().get(0).getRows().get(2).getCell(onsetIndex).asNormalizedText());
}