added support for R4 profile validation alongside a passing test (#3074)

Co-authored-by: tom <tom.daudelin@smilecdr>
This commit is contained in:
tom-daudelin-smilecdr 2021-10-18 12:37:51 -04:00 committed by GitHub
parent b5e31abf9b
commit c89d12232f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -159,7 +159,8 @@ public class ValidateCommand extends BaseCommand {
break;
}
case DSTU3: {
case DSTU3:
case R4: {
FhirInstanceValidator instanceValidator = new FhirInstanceValidator(ctx);
val.registerValidatorModule(instanceValidator);
ValidationSupportChain validationSupport = new ValidationSupportChain(new DefaultProfileValidationSupport(ctx), new InMemoryTerminologyServerValidationSupport(ctx));

View File

@ -12,7 +12,7 @@ public class ValidateCommandTest {
}
@Test
public void testValidateLocalProfile() {
public void testValidateLocalProfileDstu3() {
String resourcePath = ValidateCommandTest.class.getResource("/patient-uslab-example1.xml").getFile();
ourLog.info(resourcePath);
@ -22,4 +22,16 @@ public class ValidateCommandTest {
"-p",
"-n", resourcePath});
}
@Test
public void testValidateLocalProfileR4() {
String resourcePath = ValidateCommandTest.class.getResource("/patient-uslab-example1.xml").getFile();
ourLog.info(resourcePath);
App.main(new String[] {
"validate",
"-v", "R4",
"-p",
"-n", resourcePath});
}
}