File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -575,6 +575,36 @@ void When_WithSnomedCodingNoTextNoDisplayWithDescriptionExtensionWithDisplayExte
575575
576576 assertThat (outputMessage ).isEqualToIgnoringWhitespace (expectedOutput );
577577 }
578+
579+ @ Test
580+ void When_WithSnomedCodingNoTextNoDisplayWithNonDescriptionExtension_Expect_SnomedCdXmlWithoutOriginalText () {
581+ var inputJson = """
582+ {
583+ "resourceType": "Observation",
584+ "code": {
585+ "coding": [
586+ {
587+ "system": "http://snomed.info/sct",
588+ "code": "852471000000107",
589+ "extension": [
590+ {
591+ "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-some-otherUrl"
592+ }
593+ ]
594+ }
595+ ]
596+ }
597+ }""" ;
598+
599+ var expectedOutput = """
600+ <code nullFlavor="UNK">
601+ </code>""" ;
602+ var codeableConcept = fhirParseService .parseResource (inputJson , Observation .class ).getCode ();
603+
604+ var outputMessage = codeableConceptCdMapper .mapToNullFlavorCodeableConcept (codeableConcept );
605+
606+ assertThat (outputMessage ).isEqualToIgnoringWhitespace (expectedOutput );
607+ }
578608 }
579609
580610 @ ParameterizedTest
You can’t perform that action at this time.
0 commit comments