From 8458544fc9fcd51313598f39ce5965fc7ffe1689 Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Thu, 15 Feb 2018 07:12:56 -0500 Subject: [PATCH] Add test for #851 --- .../FhirInstanceValidatorDstu3Test.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java index d70e954e70c..b4f5037a231 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java @@ -408,6 +408,25 @@ public class FhirInstanceValidatorDstu3Test { } + /** + * See #851 + */ + @Test + public void testValidateCoding() { + ImagingStudy is = new ImagingStudy(); + is.setUid(IdType.newRandomUuid().getValue()); + is.getPatient().setReference("Patient/1"); + + is.getModalityListFirstRep().setSystem("http://foo"); + is.getModalityListFirstRep().setCode("BAR"); + is.getModalityListFirstRep().setDisplay("Hello"); + + ValidationResult results = myVal.validateWithResult(is); + List outcome = logResultsAndReturnNonInformationalOnes(results); + assertThat(outcome, empty()); + + } + /** * FHIRPathEngine was throwing Error... */