Skip to content

Commit bd3b871

Browse files
committed
small improvements
1 parent 64282b4 commit bd3b871

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

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

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ void testMapping(String description, String inputJson, String expectedOutput) {
256256
private static Stream<Arguments> codeableConceptCases() {
257257
return Stream.of(
258258

259-
// --- 1 ---
260259
Arguments.of(
261260
"WithoutCoding → nullFlavor UNK without originalText",
262261
"""
@@ -267,9 +266,8 @@ private static Stream<Arguments> codeableConceptCases() {
267266
"""
268267
<code nullFlavor="UNK">
269268
</code>"""
270-
),
269+
),
271270

272-
// --- 2 ---
273271
Arguments.of(
274272
"SNOMED with display → code, system, display & originalText",
275273
"""
@@ -289,9 +287,8 @@ private static Stream<Arguments> codeableConceptCases() {
289287
<code code="852471000000107" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Prothrombin time">
290288
<originalText>Prothrombin time</originalText>
291289
</code>"""
292-
),
290+
),
293291

294-
// --- 3 ---
295292
Arguments.of(
296293
"SNOMED no display, with descriptionId extension → displayName empty",
297294
"""
@@ -320,9 +317,8 @@ private static Stream<Arguments> codeableConceptCases() {
320317
"""
321318
<code code="852471000000107" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="">
322319
</code>"""
323-
),
320+
),
324321

325-
// --- 4 ---
326322
Arguments.of(
327323
"SNOMED no display, descriptionDisplay extension → originalText from extension",
328324
"""
@@ -352,9 +348,8 @@ private static Stream<Arguments> codeableConceptCases() {
352348
<code code="852471000000107" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="">
353349
<originalText>Prothrombin time (observed)</originalText>
354350
</code>"""
355-
),
351+
),
356352

357-
// --- 5 ---
358353
Arguments.of(
359354
"SNOMED + legacy coding → translations generated",
360355
"""
@@ -386,9 +381,8 @@ <originalText>Prothrombin time (observed)</originalText>
386381
<translation code="42Q5.00" codeSystem="2.16.840.1.113883.2.1.6.2" displayName="Observed Prothrombin time" />
387382
<translation code="123456" codeSystem="2.16.840.1.113883.2.1.3.2.4.14" displayName="Prothrombin time (observed)" />
388383
</code>"""
389-
),
384+
),
390385

391-
// --- 6 ---
392386
Arguments.of(
393387
"Non-SNOMED, text present → nullFlavor=UNK originalText from text",
394388
"""
@@ -409,9 +403,8 @@ <originalText>Prothrombin time (observed)</originalText>
409403
<code nullFlavor="UNK">
410404
<originalText>Prothrombin time (observed)</originalText>
411405
</code>"""
412-
),
406+
),
413407

414-
// --- 7 ---
415408
Arguments.of(
416409
"Non-SNOMED no text, display present → originalText from display",
417410
"""
@@ -431,9 +424,8 @@ <originalText>Prothrombin time (observed)</originalText>
431424
<code nullFlavor="UNK">
432425
<originalText>Prothrombin time</originalText>
433426
</code>"""
434-
),
427+
),
435428

436-
// --- 8 ---
437429
Arguments.of(
438430
"Non-SNOMED with descriptionId extension → originalText from display",
439431
"""
@@ -464,9 +456,8 @@ <originalText>Prothrombin time (observed)</originalText>
464456
<code nullFlavor="UNK">
465457
<originalText>Prothrombin time</originalText>
466458
</code>"""
467-
),
459+
),
468460

469-
// --- 9 ---
470461
Arguments.of(
471462
"Non-SNOMED descriptionDisplay extension → originalText from extension",
472463
"""
@@ -497,9 +488,8 @@ <originalText>Prothrombin time (observed)</originalText>
497488
<code nullFlavor="UNK">
498489
<originalText>Prothrombin time (observed)</originalText>
499490
</code>"""
500-
),
491+
),
501492

502-
// --- 10 ---
503493
Arguments.of(
504494
"No SNOMED but multiple legacy → nullFlavor=UNK, originalText from first",
505495
"""
@@ -524,8 +514,8 @@ <originalText>Prothrombin time (observed)</originalText>
524514
<code nullFlavor="UNK">
525515
<originalText>Observed Prothrombin time</originalText>
526516
</code>"""
527-
)
528-
);
517+
)
518+
);
529519
}
530520
}
531521

0 commit comments

Comments
 (0)