From a878ef24961de18bb7b07116e0c895399de4e6a6 Mon Sep 17 00:00:00 2001 From: ianmarshall Date: Tue, 25 May 2021 09:09:41 -0400 Subject: [PATCH] Add null check on code lookup result. --- .../ResponseTerminologyDisplayPopulationInterceptorTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/interceptor/ResponseTerminologyDisplayPopulationInterceptorTest.java b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/interceptor/ResponseTerminologyDisplayPopulationInterceptorTest.java index 2dd9ce074a0..f7e58a17002 100644 --- a/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/interceptor/ResponseTerminologyDisplayPopulationInterceptorTest.java +++ b/hapi-fhir-validation/src/test/java/ca/uhn/fhir/rest/server/interceptor/ResponseTerminologyDisplayPopulationInterceptorTest.java @@ -58,7 +58,7 @@ public class ResponseTerminologyDisplayPopulationInterceptorTest { myServerExtension.getRestfulServer().registerInterceptor(new ResponseTerminologyDisplayPopulationInterceptor(new NullableValidationSupport(myCtx))); Patient p = new Patient(); - p.getMaritalStatus().addCoding().setSystem("http://terminology.hl7.org/CodeSystem/v3-MaritalStatus").setCode("A"); + p.getMaritalStatus().addCoding().setSystem("http://terminology.hl7.org/CodeSystem/v3-MaritalStatus").setCode("zz"); IIdType id = myClient.create().resource(p).execute().getId(); p = myClient.read().resource(Patient.class).withId(id).execute(); @@ -101,7 +101,7 @@ public class ResponseTerminologyDisplayPopulationInterceptorTest { myServerExtension.getRestfulServer().registerInterceptor(new ResponseTerminologyDisplayPopulationInterceptor(myCtx.getValidationSupport())); Patient p = new Patient(); - p.getMaritalStatus().addCoding().setSystem("http://terminology.hl7.org/CodeSystem/v3-MaritalStatus").setCode("zz").setDisplay("FOO"); + p.getMaritalStatus().addCoding().setSystem("http://terminology.hl7.org/CodeSystem/v3-MaritalStatus").setCode("A").setDisplay("FOO"); IIdType id = myClient.create().resource(p).execute().getId(); p = myClient.read().resource(Patient.class).withId(id).execute();