Skip to content

Commit 4bafe0a

Browse files
authored
remove usages of isEqualToIgnoringWhitespace (#1387)
1 parent 1905689 commit 4bafe0a

18 files changed

+95
-76
lines changed

service/src/main/resources/templates/ehr_encounter_to_ehr_composition_template.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
{{/altCode}}
77
{{^altCode}}
88
<code code="{{code}}" displayName="{{displayName}}" codeSystem="2.16.840.1.113883.2.1.3.2.4.15">
9-
{{#originalText}}<originalText>{{originalText}}</originalText>{{/originalText}}
9+
{{#originalText}}
10+
<originalText>{{originalText}}</originalText>
11+
{{/originalText}}
1012
</code>
1113
{{/altCode}}
1214
<statusCode code="{{{status}}}" />

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void testEncounterWithNOPATAddsConfidentialityCodeIntoEhrComposition() {
113113

114114
String outputMessageWithConfidentialityCode = encounterMapper.mapEncounterToEhrComposition(parsedEncounter);
115115

116-
assertThat(outputMessageWithConfidentialityCode).isEqualToIgnoringWhitespace(expectedOutputWithConfidentialityCode);
116+
assertThat(outputMessageWithConfidentialityCode).isEqualTo(expectedOutputWithConfidentialityCode);
117117
verify(encounterComponentsMapper).mapComponents(parsedEncounter);
118118
}
119119

@@ -130,7 +130,7 @@ void When_MappingParsedEncounterJson_Expect_EhrCompositionXmlOutput(String input
130130
when(encounterComponentsMapper.mapComponents(parsedEncounter)).thenReturn(sampleComponent);
131131

132132
String outputMessage = encounterMapper.mapEncounterToEhrComposition(parsedEncounter);
133-
assertThat(outputMessage).isEqualToIgnoringWhitespace(expectedOutputMessage);
133+
assertThat(outputMessage).isEqualTo(expectedOutputMessage);
134134

135135
verify(encounterComponentsMapper).mapComponents(parsedEncounter);
136136
}

service/src/test/resources/ehr/mapper/encounter/output-with-confidentiality-code.xml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
<component typeCode="COMP">
22
<ehrComposition classCode="COMPOSITION" moodCode="EVN">
33
<id root="test-id" />
4-
<code code="24671000000101" displayName="Telephone call to a patient" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"><originalText>GP Surgery</originalText></code>
4+
<code code="24671000000101" displayName="Telephone call to a patient" codeSystem="2.16.840.1.113883.2.1.3.2.4.15">
5+
<originalText>GP Surgery</originalText>
6+
</code>
57
<statusCode code="COMPLETE" />
68
<effectiveTime>
79
<center value="20100113152000"/>
810
</effectiveTime>
9-
<availabilityTime value="20100113152000" />
10-
<confidentialityCode
11-
code="NOPAT"
12-
codeSystem="2.16.840.1.113883.4.642.3.47"
13-
displayName="no disclosure to patient, family or caregivers without attending provider's authorization" />
11+
<availabilityTime value="20100113152000"/>
12+
<confidentialityCode
13+
code="NOPAT"
14+
codeSystem="2.16.840.1.113883.4.642.3.47"
15+
displayName="no disclosure to patient, family or caregivers without attending provider's authorization"
16+
/>
1417
<author typeCode="AUT" contextControlCode="OP">
1518
<time value="20100113151332" />
1619
<agentRef classCode="AGNT">
@@ -27,7 +30,7 @@
2730
</location>
2831
<Participant2 typeCode="PRF" contextControlCode="OP">
2932
<agentRef classCode="AGNT">
30-
<id root="test-id" />
33+
<id root="test-id"/>
3134
</agentRef>
3235
</Participant2>
3336
<component typeCode="COMP" >

service/src/test/resources/ehr/mapper/encounter/output-with-effective-time.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<component typeCode="COMP">
22
<ehrComposition classCode="COMPOSITION" moodCode="EVN">
33
<id root="test-id" />
4-
<code code="24561000000109" displayName="A+E report" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"><originalText>GP Surgery</originalText></code>
4+
<code code="24561000000109" displayName="A+E report" codeSystem="2.16.840.1.113883.2.1.3.2.4.15">
5+
<originalText>GP Surgery</originalText>
6+
</code>
57
<statusCode code="COMPLETE" />
68
<effectiveTime>
79
<low value="20100113152000"/><high value="20100113162000"/>
810
</effectiveTime>
9-
<availabilityTime value="20100113152000" />
11+
<availabilityTime value="20100113152000"/>
1012
<author typeCode="AUT" contextControlCode="OP">
1113
<time value="20100113151332" />
1214
<agentRef classCode="AGNT">
@@ -23,7 +25,7 @@
2325
</location>
2426
<Participant2 typeCode="PRF" contextControlCode="OP">
2527
<agentRef classCode="AGNT">
26-
<id root="test-id" />
28+
<id root="test-id"/>
2729
</agentRef>
2830
</Participant2>
2931
<component typeCode="COMP" >

service/src/test/resources/ehr/mapper/encounter/output-with-no-effective-time.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<component typeCode="COMP">
22
<ehrComposition classCode="COMPOSITION" moodCode="EVN">
33
<id root="test-id" />
4-
<code code="15611000000104" displayName="Diagnosis" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"><originalText>GP Surgery</originalText></code>
5-
<statusCode code="COMPLETE"/>
4+
<code code="15611000000104" displayName="Diagnosis" codeSystem="2.16.840.1.113883.2.1.3.2.4.15">
5+
<originalText>GP Surgery</originalText>
6+
</code>
7+
<statusCode code="COMPLETE" />
68
<effectiveTime>
79
<center nullFlavor="UNK"/>
810
</effectiveTime>
9-
<availabilityTime nullFlavor="UNK" />
11+
<availabilityTime nullFlavor="UNK"/>
1012
<author typeCode="AUT" contextControlCode="OP">
1113
<time value="20100113151332" />
1214
<agentRef classCode="AGNT">
@@ -23,7 +25,7 @@
2325
</location>
2426
<Participant2 typeCode="PRF" contextControlCode="OP">
2527
<agentRef classCode="AGNT">
26-
<id root="test-id" />
28+
<id root="test-id"/>
2729
</agentRef>
2830
</Participant2>
2931
<component typeCode="COMP" >

service/src/test/resources/ehr/mapper/encounter/output-with-no-location-reference.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<component typeCode="COMP">
22
<ehrComposition classCode="COMPOSITION" moodCode="EVN">
33
<id root="test-id" />
4-
<code code="24561000000109" displayName="A+E report" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"><originalText>GP Surgery</originalText></code>
4+
<code code="24561000000109" displayName="A+E report" codeSystem="2.16.840.1.113883.2.1.3.2.4.15">
5+
<originalText>GP Surgery</originalText>
6+
</code>
57
<statusCode code="COMPLETE" />
68
<effectiveTime>
79
<low value="20100113152000"/><high value="20100113162000"/>
810
</effectiveTime>
9-
<availabilityTime value="20100113152000" />
11+
<availabilityTime value="20100113152000"/>
1012
<author typeCode="AUT" contextControlCode="OP">
1113
<time value="20100113151332" />
1214
<agentRef classCode="AGNT">
@@ -15,7 +17,7 @@
1517
</author>
1618
<Participant2 typeCode="PRF" contextControlCode="OP">
1719
<agentRef classCode="AGNT">
18-
<id root="test-id" />
20+
<id root="test-id"/>
1921
</agentRef>
2022
</Participant2>
2123
<component typeCode="COMP" >

service/src/test/resources/ehr/mapper/encounter/output-with-no-period-field.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<component typeCode="COMP">
22
<ehrComposition classCode="COMPOSITION" moodCode="EVN">
33
<id root="test-id" />
4-
<code code="24611000000106" displayName="Radiology Result" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"><originalText>GP Surgery</originalText></code>
5-
<statusCode code="COMPLETE"/>
4+
<code code="24611000000106" displayName="Radiology Result" codeSystem="2.16.840.1.113883.2.1.3.2.4.15">
5+
<originalText>GP Surgery</originalText>
6+
</code>
7+
<statusCode code="COMPLETE" />
68
<effectiveTime>
79
<center nullFlavor="UNK"/>
810
</effectiveTime>
9-
<availabilityTime nullFlavor="UNK" />
11+
<availabilityTime nullFlavor="UNK"/>
1012
<author typeCode="AUT" contextControlCode="OP">
1113
<time value="20100113151332" />
1214
<agentRef classCode="AGNT">
@@ -23,7 +25,7 @@
2325
</location>
2426
<Participant2 typeCode="PRF" contextControlCode="OP">
2527
<agentRef classCode="AGNT">
26-
<id root="test-id" />
28+
<id root="test-id"/>
2729
</agentRef>
2830
</Participant2>
2931
<component typeCode="COMP" >

service/src/test/resources/ehr/mapper/encounter/output-with-nul-author-participant2.xml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,35 @@
2525
</location>
2626
<Participant2 typeCode="PRF" contextControlCode="OP">
2727
<agentRef classCode="AGNT">
28-
<id nullFlavor="UNK" />
28+
<id nullFlavor="UNK"/>
2929
</agentRef>
3030
</Participant2>
3131
<component typeCode="COMP" >
32-
<ObservationStatement classCode="OBS" moodCode="EVN">
33-
<id root="BA6EA7CB-3E2F-46FA-918C-C0B5178C1D4E" />
34-
<code code="907511000006105" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="[RFC] Chest infection">
35-
<originalText>Test</originalText>
36-
</code>
37-
<statusCode code="COMPLETE" />
38-
<effectiveTime>
39-
<center value="20201110115000"/>
40-
</effectiveTime>
41-
<availabilityTime value="20201110115000"/>
32+
<ObservationStatement classCode="OBS" moodCode="EVN">
33+
<id root="BA6EA7CB-3E2F-46FA-918C-C0B5178C1D4E" />
34+
<code code="907511000006105" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="[RFC] Chest infection">
35+
<originalText>Test</originalText>
36+
</code>
37+
<statusCode code="COMPLETE" />
38+
<effectiveTime>
39+
<center value="20201110115000"/>
40+
</effectiveTime>
41+
<availabilityTime value="20201110115000"/>
4242

4343

44-
<pertinentInformation typeCode="PERT">
45-
<sequenceNumber value="+1" />
46-
<pertinentAnnotation classCode="OBS" moodCode="EVN">
47-
<text>Test Observation</text>
48-
</pertinentAnnotation>
49-
</pertinentInformation>
44+
<pertinentInformation typeCode="PERT">
45+
<sequenceNumber value="+1" />
46+
<pertinentAnnotation classCode="OBS" moodCode="EVN">
47+
<text>Test Observation</text>
48+
</pertinentAnnotation>
49+
</pertinentInformation>
5050

51-
<Participant typeCode="PRF" contextControlCode="OP">
52-
<agentRef classCode="AGNT">
53-
<id root="6423EA0F-1F1C-4255-AEBA-D142BE836D50"/>
54-
</agentRef>
55-
</Participant>
56-
</ObservationStatement>
57-
</component>
51+
<Participant typeCode="PRF" contextControlCode="OP">
52+
<agentRef classCode="AGNT">
53+
<id root="6423EA0F-1F1C-4255-AEBA-D142BE836D50"/>
54+
</agentRef>
55+
</Participant>
56+
</ObservationStatement>
57+
</component>
5858
</ehrComposition>
5959
</component>

service/src/test/resources/ehr/mapper/encounter/output-with-recorder-as-participant2.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<component typeCode="COMP">
22
<ehrComposition classCode="COMPOSITION" moodCode="EVN">
33
<id root="test-id" />
4-
<code code="24561000000109" displayName="A+E report" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"><originalText>GP Surgery</originalText></code>
4+
<code code="24561000000109" displayName="A+E report" codeSystem="2.16.840.1.113883.2.1.3.2.4.15">
5+
<originalText>GP Surgery</originalText>
6+
</code>
57
<statusCode code="COMPLETE" />
68
<effectiveTime>
79
<low value="20100113152000"/><high value="20100113162000"/>
810
</effectiveTime>
9-
<availabilityTime value="20100113152000" />
11+
<availabilityTime value="20100113152000"/>
1012
<author typeCode="AUT" contextControlCode="OP">
1113
<time value="20100113151332" />
1214
<agentRef classCode="AGNT">
@@ -23,7 +25,7 @@
2325
</location>
2426
<Participant2 typeCode="PRF" contextControlCode="OP">
2527
<agentRef classCode="AGNT">
26-
<id root="test-id" />
28+
<id root="test-id"/>
2729
</agentRef>
2830
</Participant2>
2931
<component typeCode="COMP" >

service/src/test/resources/ehr/mapper/encounter/output-with-start-effective-time.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<component typeCode="COMP">
22
<ehrComposition classCode="COMPOSITION" moodCode="EVN">
33
<id root="test-id" />
4-
<code code="24671000000101" displayName="Telephone call to a patient" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"><originalText>GP Surgery</originalText></code>
4+
<code code="24671000000101" displayName="Telephone call to a patient" codeSystem="2.16.840.1.113883.2.1.3.2.4.15">
5+
<originalText>GP Surgery</originalText>
6+
</code>
57
<statusCode code="COMPLETE" />
68
<effectiveTime>
79
<center value="20100113152000"/>
810
</effectiveTime>
9-
<availabilityTime value="20100113152000" />
11+
<availabilityTime value="20100113152000"/>
1012
<author typeCode="AUT" contextControlCode="OP">
1113
<time value="20100113151332" />
1214
<agentRef classCode="AGNT">
@@ -23,7 +25,7 @@
2325
</location>
2426
<Participant2 typeCode="PRF" contextControlCode="OP">
2527
<agentRef classCode="AGNT">
26-
<id root="test-id" />
28+
<id root="test-id"/>
2729
</agentRef>
2830
</Participant2>
2931
<component typeCode="COMP" >

0 commit comments

Comments
 (0)