Class FHIRValidator
- java.lang.Object
-
- com.ibm.fhir.validation.FHIRValidator
-
public class FHIRValidator extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<OperationOutcome.Issue>validate(Resource resource, boolean includeResourceAssertedProfiles, String... profiles)Validate aResourceagainst constraints in the base specification and resource-asserted profile references and/or specific profile references.List<OperationOutcome.Issue>validate(Resource resource, String... profiles)Validate aResourceagainst constraints in the base specification and resource-asserted profile references or specific profile references but not both.List<OperationOutcome.Issue>validate(FHIRPathEvaluator.EvaluationContext evaluationContext, boolean includeResourceAssertedProfiles, String... profiles)Validate a resource, using anFHIRPathEvaluator.EvaluationContext, against constraints in the base specification and resource-asserted profile references and/or specific profile references.List<OperationOutcome.Issue>validate(FHIRPathEvaluator.EvaluationContext evaluationContext, String... profiles)Validate a resource, using anFHIRPathEvaluator.EvaluationContext, against constraints in the base specification and resource-asserted profile references or specific profile references but not both.static FHIRValidatorvalidator()
-
-
-
Method Detail
-
validate
public List<OperationOutcome.Issue> validate(Resource resource, String... profiles) throws FHIRValidationException
Validate aResourceagainst constraints in the base specification and resource-asserted profile references or specific profile references but not both.Resource-asserted profile references that are not available in the FHIRRegistry result in issues with severity WARNING.
Unknown profile references passed as arguments to this method result in issues with severity ERROR.
Profiles that are incompatible with the resource type being validated result in issues with severity ERROR.
Profile references that are passed into this method are only applicable to the outermost resource (not contained resources).
- Parameters:
resource- aResourceinstance (the target of validation)profiles- specific profile references to validate the resource against- Returns:
- a non-null, possibly empty list of issues generated during validation (sorted by severity)
- Throws:
FHIRValidationException- for errors that occur during validation
-
validate
public List<OperationOutcome.Issue> validate(Resource resource, boolean includeResourceAssertedProfiles, String... profiles) throws FHIRValidationException
Validate aResourceagainst constraints in the base specification and resource-asserted profile references and/or specific profile references.Resource-asserted profile references that are not available in the FHIRRegistry result in issues with severity WARNING.
Unknown profile references passed as arguments to this method result in issues with severity ERROR.
Profiles that are incompatible with the resource type being validated result in issues with severity ERROR.
Profile references that are passed into this method are only applicable to the outermost resource (not contained resources).
- Parameters:
resource- aResourceinstance (the target of validation)includeResourceAssertedProfiles- whether or not to consider resource-asserted profiles during validationprofiles- specific profile references to validate the resource against- Returns:
- a non-null, possibly empty list of issues generated during validation (sorted by severity)
- Throws:
FHIRValidationException- for errors that occur during validation
-
validate
public List<OperationOutcome.Issue> validate(FHIRPathEvaluator.EvaluationContext evaluationContext, String... profiles) throws FHIRValidationException
Validate a resource, using anFHIRPathEvaluator.EvaluationContext, against constraints in the base specification and resource-asserted profile references or specific profile references but not both.Resource-asserted profile references that are not available in the FHIRRegistry result in issues with severity WARNING.
Unknown profile references passed as arguments to this method result in issues with severity ERROR.
Profiles that are incompatible with the resource type being validated result in issues with severity ERROR.
Profile references that are passed into this method are only applicable to the outermost resource (not contained resources).
- Parameters:
evaluationContext- theFHIRPathEvaluator.EvaluationContextfor this validation which includes aFHIRPathTreebuilt from aResourceinstance (the target of validation)profiles- specific profile references to validate the evaluation context against- Returns:
- a non-null, possibly empty list of issues generated during validation (sorted by severity)
- Throws:
FHIRValidationException- for errors that occur during validation
-
validate
public List<OperationOutcome.Issue> validate(FHIRPathEvaluator.EvaluationContext evaluationContext, boolean includeResourceAssertedProfiles, String... profiles) throws FHIRValidationException
Validate a resource, using anFHIRPathEvaluator.EvaluationContext, against constraints in the base specification and resource-asserted profile references and/or specific profile references.Resource-asserted profile references that are not available in the FHIRRegistry result in issues with severity WARNING.
Unknown profile references passed as arguments to this method result in issues with severity ERROR.
Profiles that are incompatible with the resource type being validated result in issues with severity ERROR.
Profile references that are passed into this method are only applicable to the outermost resource (not contained resources).
- Parameters:
evaluationContext- theFHIRPathEvaluator.EvaluationContextfor this validation which includes aFHIRPathTreebuilt from aResourceinstance (the target of validation)includeResourceAssertedProfiles- whether or not to consider resource-asserted profiles during validationprofiles- specific profile references to validate the evaluation context against- Returns:
- a non-null, possibly empty list of issues generated during validation (sorted by severity)
- Throws:
FHIRValidationException- for errors that occur during validation
-
validator
public static FHIRValidator validator()
-
-