Skip to content

Commit 637053e

Browse files
NIAD-3366: Update test example data to show schema attributes for consent table. (#343)
* NAID-3366: Update test data to reflect schema now shown for consent. * Update `build.gradle` to use the latest FHIR DSTU3 package. * NAID-3366: Update test data to reflect schema now shown for consent. * Switch order of expected / actual in test assertion to match standard assertion ordering. * NAID-3366: Update test data to reflect schema now shown for consent. * Switch order of expected / actual in test assertion to match standard assertion ordering. * NAID-3366: Update test data to reflect schema now shown for consent. * Update documentation example file `primary-emergency-fhir-result.json` to reflect changes made to test file.
1 parent 4490ab6 commit 637053e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

doc/json/primary-emergency-fhir-result.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@
776776
"id": "387eeaec-029d-4f75-ad04-e5f9792548b9",
777777
"text": {
778778
"status": "generated",
779-
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <table>\n <tbody>\n <tr>\n <th>Permission to view outcome</th>\n <td>Permission to view obtained</td>\n </tr>\n <tr>\n <th>Date obtained</th>\n <td>01-Jan-2017, 20:00</td>\n </tr>\n <tr>\n <th>Date expires</th>\n <td>15-Jan-2017, 20:00</td>\n </tr>\n </tbody>\n </table>\n </div>"
779+
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <table xmlns=\"urn:hl7-org:v3\" xmlns:npfitlc=\"NPFIT:HL7:Localisation\">\n <tbody>\n <tr>\n <th>Permission to view outcome</th>\n <td>Permission to view obtained</td>\n </tr>\n <tr>\n <th>Date obtained</th>\n <td>01-Jan-2017, 20:00</td>\n </tr>\n <tr>\n <th>Date expires</th>\n <td>15-Jan-2017, 20:00</td>\n </tr>\n </tbody>\n </table>\n </div>"
780780
},
781781
"identifier": {
782782
"use": "usual",

service/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies {
3131
implementation 'org.springframework.boot:spring-boot-starter-web'
3232
implementation 'org.apache.qpid:qpid-jms-client:2.6.1'
3333
implementation 'org.springframework:spring-jms'
34-
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:5.7.2'
34+
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:8.2.1'
3535
implementation 'uk.nhs.connect.iucds:iucds-schema:3.0.RC1.2'
3636
implementation 'org.apache.xmlbeans:xmlbeans:3.1.0'
3737
implementation 'com.rabbitmq.jms:rabbitmq-jms:3.4.0'

service/src/integration-test/java/uk/nhs/adaptors/oneoneone/cda/report/controller/ReportControllerIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ private void postReportValidBody(String itkReportRequestPath, String expectedJso
305305
overwriteJson(expectedJsonPath, messageBody);
306306
assertThat(validator.isValid(messageBody)).isEqualTo(true);
307307
assertThat(jmsMessage.getStringProperty(MESSAGE_ID)).isEqualTo(messageIdValue);
308-
assertMessageContent(messageBody, readResourceAsString(expectedJsonPath));
308+
assertMessageContent(readResourceAsString(expectedJsonPath), messageBody);
309309
}
310310

311311
@SneakyThrows
@@ -321,7 +321,7 @@ private void overwriteJson(String expectedJsonPath, String messageBody) {
321321
}
322322
}
323323

324-
private void assertMessageContent(String actual, String expected) throws JSONException {
324+
private void assertMessageContent(String expected, String actual) throws JSONException {
325325
LOGGER.info("Validating message content:\n{}", actual);
326326

327327
//when comparing json objects, this will ignore various json paths that contain random values like ids or timestamps

service/src/integration-test/resources/json/primary-emergency-fhir-result.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@
776776
"id": "387eeaec-029d-4f75-ad04-e5f9792548b9",
777777
"text": {
778778
"status": "generated",
779-
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <table>\n <tbody>\n <tr>\n <th>Permission to view outcome</th>\n <td>Permission to view obtained</td>\n </tr>\n <tr>\n <th>Date obtained</th>\n <td>01-Jan-2017, 20:00</td>\n </tr>\n <tr>\n <th>Date expires</th>\n <td>15-Jan-2017, 20:00</td>\n </tr>\n </tbody>\n </table>\n </div>"
779+
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <table xmlns=\"urn:hl7-org:v3\" xmlns:npfitlc=\"NPFIT:HL7:Localisation\">\n <tbody>\n <tr>\n <th>Permission to view outcome</th>\n <td>Permission to view obtained</td>\n </tr>\n <tr>\n <th>Date obtained</th>\n <td>01-Jan-2017, 20:00</td>\n </tr>\n <tr>\n <th>Date expires</th>\n <td>15-Jan-2017, 20:00</td>\n </tr>\n </tbody>\n </table>\n </div>"
780780
},
781781
"identifier": {
782782
"use": "usual",

0 commit comments

Comments
 (0)