use of org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator in project dpc-app by CMSgov.
the class RosterValidationTest method setup.
@BeforeAll
static void setup() {
ctx = FhirContext.forDstu3();
final FhirInstanceValidator instanceValidator = new FhirInstanceValidator();
fhirValidator = ctx.newValidator();
fhirValidator.setValidateAgainstStandardSchematron(false);
fhirValidator.setValidateAgainstStandardSchema(false);
fhirValidator.registerValidatorModule(instanceValidator);
dpcModule = new DPCProfileSupport(ctx);
final ValidationSupportChain chain = new ValidationSupportChain(new DefaultProfileValidationSupport(), dpcModule);
instanceValidator.setValidationSupport(chain);
}
use of org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator in project dpc-app by CMSgov.
the class AttestationValidationTest method setup.
@BeforeAll
static void setup() {
ctx = FhirContext.forDstu3();
final FhirInstanceValidator instanceValidator = new FhirInstanceValidator();
fhirValidator = ctx.newValidator();
fhirValidator.setValidateAgainstStandardSchematron(false);
fhirValidator.setValidateAgainstStandardSchema(false);
fhirValidator.registerValidatorModule(instanceValidator);
dpcModule = new DPCProfileSupport(ctx);
final ValidationSupportChain chain = new ValidationSupportChain(new DefaultProfileValidationSupport(), dpcModule);
instanceValidator.setValidationSupport(chain);
}
use of org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator in project dpc-app by CMSgov.
the class OrganizationValidationTest method setup.
@BeforeAll
static void setup() {
ctx = FhirContext.forDstu3();
final FhirInstanceValidator instanceValidator = new FhirInstanceValidator();
fhirValidator = ctx.newValidator();
fhirValidator.setValidateAgainstStandardSchematron(false);
fhirValidator.setValidateAgainstStandardSchema(false);
fhirValidator.registerValidatorModule(instanceValidator);
dpcModule = new DPCProfileSupport(ctx);
final ValidationSupportChain chain = new ValidationSupportChain(new DefaultProfileValidationSupport(), dpcModule);
instanceValidator.setValidationSupport(chain);
}
use of org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator in project dpc-app by CMSgov.
the class FHIRValidatorProvider method get.
@Override
public FhirValidator get() {
logger.debug("Schema validation enabled: {}.\nSchematron validation enabled: {}", validationConfiguration.isSchemaValidation(), validationConfiguration.isSchematronValidation());
final FhirInstanceValidator instanceValidator = new FhirInstanceValidator();
final FhirValidator fhirValidator = ctx.newValidator();
fhirValidator.setValidateAgainstStandardSchematron(validationConfiguration.isSchematronValidation());
fhirValidator.setValidateAgainstStandardSchema(validationConfiguration.isSchemaValidation());
fhirValidator.registerValidatorModule(instanceValidator);
instanceValidator.setValidationSupport(this.supportChain);
return fhirValidator;
}
use of org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator in project synthea by synthetichealth.
the class ValidationResources method initializeSTU3.
private void initializeSTU3() {
FhirContext ctx = FhirStu3.getContext();
FhirInstanceValidator instanceValidator = new FhirInstanceValidator(ctx);
ValidationSupportChain chain = new ValidationSupportChain(new ValidationSupportSTU3(ctx), new DefaultProfileValidationSupport(ctx), new InMemoryTerminologyServerValidationSupport(ctx), new CommonCodeSystemsTerminologyService(ctx));
instanceValidator.setValidationSupport(chain);
instanceValidator.setAnyExtensionsAllowed(true);
instanceValidator.setErrorForUnknownProfiles(false);
validatorSTU3 = ctx.newValidator().registerValidatorModule(instanceValidator);
}
Aggregations