Skip to content

Commit 1d7300a

Browse files
authored
removed unnecessary usage of IsEqualToIgnoringWhitespace() (#1396)
1 parent 940d6ef commit 1d7300a

13 files changed

+103
-85
lines changed

service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/diagnosticreport/ObservationMapperTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void When_MappingObservationJson_Expect_CompoundStatementXmlOutput(String inputJ
194194
final String actualXml = observationMapper.mapObservationToCompoundStatement(
195195
observationAssociatedWithSpecimen);
196196

197-
assertThat(actualXml).isEqualToIgnoringWhitespace(expectedXml);
197+
assertThat(actualXml).isEqualTo(expectedXml);
198198
}
199199

200200
@Test

service/src/test/resources/ehr/mapper/diagnosticreport/observation/observation_compound_statement_1.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
33
<id root="Mapped-From-Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2"/>
44
<code code="2564081000000118" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Urine pregnancy test">
5-
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
6-
</code>
5+
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
6+
</code>
77
<statusCode code="COMPLETE"/>
88
<effectiveTime>
99
<center value="20100223"/>
@@ -13,8 +13,8 @@
1313
<ObservationStatement classCode="OBS" moodCode="EVN">
1414
<id root="random-unmapped-id"/>
1515
<code code="2564081000000118" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Urine pregnancy test">
16-
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
17-
</code>
16+
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
17+
</code>
1818
<statusCode code="COMPLETE"/>
1919
<effectiveTime>
2020
<center value="20100223"/>

service/src/test/resources/ehr/mapper/diagnosticreport/observation/observation_compound_statement_1_with_related_comment.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
33
<id root="Mapped-From-Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2"/>
44
<code code="2564081000000118" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Urine pregnancy test">
5-
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
6-
</code>
5+
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
6+
</code>
77
<statusCode code="COMPLETE"/>
88
<effectiveTime>
99
<center value="20100223"/>
@@ -13,8 +13,8 @@
1313
<ObservationStatement classCode="OBS" moodCode="EVN">
1414
<id root="random-unmapped-id"/>
1515
<code code="2564081000000118" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Urine pregnancy test">
16-
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
17-
</code>
16+
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
17+
</code>
1818
<statusCode code="COMPLETE"/>
1919
<effectiveTime>
2020
<center value="20100223"/>

service/src/test/resources/ehr/mapper/diagnosticreport/observation/observation_compound_statement_2.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
33
<id root="Mapped-From-Observation/6E30A9E3-FF9A-4868-8FCD-7DAC26A16E78"/>
44
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
5-
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
6-
</code>
5+
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
6+
</code>
77
<statusCode code="COMPLETE"/>
88
<effectiveTime>
99
<center value="20100223"/>
@@ -13,14 +13,18 @@
1313
<ObservationStatement classCode="OBS" moodCode="EVN">
1414
<id root="random-unmapped-id"/>
1515
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
16-
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
17-
</code>
16+
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
17+
</code>
1818
<statusCode code="COMPLETE"/>
1919
<effectiveTime>
2020
<center value="20100223"/>
2121
</effectiveTime>
2222
<availabilityTime value="20100223"/>
23-
<value xsi:type="PQ" value="8.800" unit="1"><translation value="8.800"><originalText>mmol/L</originalText></translation></value>
23+
<value xsi:type="PQ" value="8.800" unit="1">
24+
<translation value="8.800">
25+
<originalText>mmol/L</originalText>
26+
</translation>
27+
</value>
2428
<referenceRange typeCode="REFV">
2529
<referenceInterpretationRange classCode="OBS" moodCode="EVN.CRT">
2630
<value><low value="10.000"/><high value="90.000"/></value>

service/src/test/resources/ehr/mapper/diagnosticreport/observation/observation_compound_statement_3.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
33
<id root="Mapped-From-Observation/D0A358C9-4833-4827-B14B-E8515C25CB12"/>
44
<code code="2563401000000119" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum ACTH (adrenocorticotrophic hormone) level">
5-
<translation code="4483.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum ACTH" />
6-
</code>
5+
<translation code="4483.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum ACTH" />
6+
</code>
77
<statusCode code="COMPLETE"/>
88
<effectiveTime>
99
<center value="20100223"/>
@@ -13,8 +13,8 @@
1313
<ObservationStatement classCode="OBS" moodCode="EVN">
1414
<id root="random-unmapped-id"/>
1515
<code code="2563401000000119" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum ACTH (adrenocorticotrophic hormone) level">
16-
<translation code="4483.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum ACTH" />
17-
</code>
16+
<translation code="4483.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum ACTH" />
17+
</code>
1818
<statusCode code="COMPLETE"/>
1919
<effectiveTime>
2020
<center value="20100223"/>

service/src/test/resources/ehr/mapper/diagnosticreport/observation/observation_compound_statement_clustered_by_diagnosticreport_reference.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
33
<id root="random-unmapped-id"/>
44
<code code="257472014" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="International normalised ratio">
5-
<translation code="42QE.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="International normalised ratio" />
6-
</code>
5+
<translation code="42QE.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="International normalised ratio" />
6+
</code>
77
<statusCode code="COMPLETE"/>
88
<effectiveTime>
99
<center value="20100223"/>
@@ -13,8 +13,8 @@
1313
<ObservationStatement classCode="OBS" moodCode="EVN">
1414
<id root="random-unmapped-id"/>
1515
<code code="257472014" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="International normalised ratio">
16-
<translation code="42QE.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="International normalised ratio" />
17-
</code>
16+
<translation code="42QE.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="International normalised ratio" />
17+
</code>
1818
<statusCode code="COMPLETE"/>
1919
<effectiveTime>
2020
<center value="20100223"/>

service/src/test/resources/ehr/mapper/diagnosticreport/observation/observation_compound_statement_with_availabilitytime_and_low_effectivetime.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
33
<id root="Mapped-From-Observation/6E30A9E3-FF9A-4868-8FCD-7DAC26A16E78"/>
44
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
5-
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
6-
</code>
5+
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
6+
</code>
77
<statusCode code="COMPLETE"/>
88
<effectiveTime>
99
<low value="19971020"/>
@@ -13,14 +13,18 @@
1313
<ObservationStatement classCode="OBS" moodCode="EVN">
1414
<id root="random-unmapped-id"/>
1515
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
16-
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
17-
</code>
16+
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
17+
</code>
1818
<statusCode code="COMPLETE"/>
1919
<effectiveTime>
2020
<low value="19971020"/>
2121
</effectiveTime>
2222
<availabilityTime value="19971020"/>
23-
<value xsi:type="PQ" value="8.800" unit="1"><translation value="8.800"><originalText>mmol/L</originalText></translation></value>
23+
<value xsi:type="PQ" value="8.800" unit="1">
24+
<translation value="8.800">
25+
<originalText>mmol/L</originalText>
26+
</translation>
27+
</value>
2428
<referenceRange typeCode="REFV">
2529
<referenceInterpretationRange classCode="OBS" moodCode="EVN.CRT">
2630
<value><low value="10.000"/><high value="90.000"/></value>

service/src/test/resources/ehr/mapper/diagnosticreport/observation/observation_compound_statement_with_battery_test_result.xml

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,54 @@
22
<CompoundStatement classCode="BATTERY" moodCode="EVN">
33
<id root="Mapped-From-Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2"/>
44
<code code="2564081000000118" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Urine pregnancy test">
5-
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
6-
</code>
5+
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
6+
</code>
77
<statusCode code="COMPLETE"/>
88
<effectiveTime>
99
<center value="20100223"/>
1010
</effectiveTime>
1111
<availabilityTime value="20100223"/>
12-
<component typeCode="COMP" contextConductionInd="true">
13-
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
14-
<id root="random-unmapped-id"/>
15-
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
16-
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
17-
</code>
18-
<statusCode code="COMPLETE"/>
19-
<effectiveTime>
20-
<center value="20201215151704"/>
21-
</effectiveTime>
22-
<availabilityTime value="20201215151704"/>
23-
<component typeCode="COMP" contextConductionInd="true">
24-
<ObservationStatement classCode="OBS" moodCode="EVN">
25-
<id root="Mapped-From-Observation/TestResult-WithRelatedMember-WhichIsntAFilingComment"/>
26-
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
27-
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
28-
</code>
29-
<statusCode code="COMPLETE"/>
30-
<effectiveTime>
31-
<center value="20201215151704"/>
32-
</effectiveTime>
33-
<availabilityTime value="20201215151704"/>
34-
<value xsi:type="PQ" value="8.800" unit="1">
35-
<translation value="8.800">
36-
<originalText>mmol/L</originalText>
37-
</translation>
38-
</value>
39-
</ObservationStatement>
40-
</component>
41-
<component typeCode="COMP" contextConductionInd="true">
42-
<NarrativeStatement classCode="OBS" moodCode="EVN">
43-
<id root="random-unmapped-id"/>
44-
<text mediaType="text/x-h7uk-pmip">CommentType:AGGREGATE COMMENT SET
45-
CommentDate:20201215151704
12+
<component typeCode="COMP" contextConductionInd="true">
13+
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
14+
<id root="random-unmapped-id"/>
15+
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
16+
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
17+
</code>
18+
<statusCode code="COMPLETE"/>
19+
<effectiveTime>
20+
<center value="20201215151704"/>
21+
</effectiveTime>
22+
<availabilityTime value="20201215151704"/>
23+
<component typeCode="COMP" contextConductionInd="true">
24+
<ObservationStatement classCode="OBS" moodCode="EVN">
25+
<id root="Mapped-From-Observation/TestResult-WithRelatedMember-WhichIsntAFilingComment"/>
26+
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
27+
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
28+
</code>
29+
<statusCode code="COMPLETE"/>
30+
<effectiveTime>
31+
<center value="20201215151704"/>
32+
</effectiveTime>
33+
<availabilityTime value="20201215151704"/>
34+
<value xsi:type="PQ" value="8.800" unit="1">
35+
<translation value="8.800">
36+
<originalText>mmol/L</originalText>
37+
</translation>
38+
</value>
39+
</ObservationStatement>
40+
</component>
41+
<component typeCode="COMP" contextConductionInd="true">
42+
<NarrativeStatement classCode="OBS" moodCode="EVN">
43+
<id root="random-unmapped-id"/>
44+
<text mediaType="text/x-h7uk-pmip">CommentType:AGGREGATE COMMENT SET
45+
CommentDate:20201215151704
4646

47-
Notes provided alongside test result</text>
48-
<statusCode code="COMPLETE"/>
49-
<availabilityTime value="20201215151704"/>
50-
</NarrativeStatement>
51-
</component>
52-
</CompoundStatement>
53-
</component>
47+
Notes provided alongside test result</text>
48+
<statusCode code="COMPLETE"/>
49+
<availabilityTime value="20201215151704"/>
50+
</NarrativeStatement>
51+
</component>
52+
</CompoundStatement>
53+
</component>
5454
</CompoundStatement>
5555
</component>

service/src/test/resources/ehr/mapper/diagnosticreport/observation/observation_compound_statement_with_data_absent_reason_and_interpretation_and_body_site_and_method.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
33
<id root="Mapped-From-Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2"/>
44
<code code="2564081000000118" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Urine pregnancy test">
5-
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
6-
</code>
5+
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
6+
</code>
77
<statusCode code="COMPLETE"/>
88
<effectiveTime>
99
<center value="20100223"/>
@@ -13,8 +13,8 @@
1313
<ObservationStatement classCode="OBS" moodCode="EVN">
1414
<id root="random-unmapped-id"/>
1515
<code code="2564081000000118" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Urine pregnancy test">
16-
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
17-
</code>
16+
<translation code="465..00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Urine pregnancy test" />
17+
</code>
1818
<statusCode code="COMPLETE"/>
1919
<effectiveTime>
2020
<center value="20100223"/>

service/src/test/resources/ehr/mapper/diagnosticreport/observation/observation_compound_statement_with_no_effective_properly_handled.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
33
<id root="Mapped-From-Observation/6E30A9E3-FF9A-4868-8FCD-7DAC26A16E78"/>
44
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
5-
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
6-
</code>
5+
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
6+
</code>
77
<statusCode code="COMPLETE"/>
88
<effectiveTime>
99
<center nullFlavor="UNK"/>
@@ -13,14 +13,18 @@
1313
<ObservationStatement classCode="OBS" moodCode="EVN">
1414
<id root="random-unmapped-id"/>
1515
<code code="2551971000000110" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Serum oestradiol level">
16-
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
17-
</code>
16+
<translation code="4465.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Serum oestradiol level" />
17+
</code>
1818
<statusCode code="COMPLETE"/>
1919
<effectiveTime>
2020
<center nullFlavor="UNK"/>
2121
</effectiveTime>
2222
<availabilityTime nullFlavor="UNK"/>
23-
<value xsi:type="PQ" value="8.800" unit="1"><translation value="8.800"><originalText>mmol/L</originalText></translation></value>
23+
<value xsi:type="PQ" value="8.800" unit="1">
24+
<translation value="8.800">
25+
<originalText>mmol/L</originalText>
26+
</translation>
27+
</value>
2428
<referenceRange typeCode="REFV">
2529
<referenceInterpretationRange classCode="OBS" moodCode="EVN.CRT">
2630
<value><low value="10.000"/><high value="90.000"/></value>

0 commit comments

Comments
 (0)