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... */