Search in sources :

Example 76 with ValidationMessage

use of org.hl7.fhir.utilities.validation.ValidationMessage in project org.hl7.fhir.core by hapifhir.

the class SnapShotGenerationTests method testGen.

private void testGen(boolean fail, TestDetails test, SnapShotGenerationTestsContext context) throws Exception {
    if (!Utilities.noString(test.register)) {
        List<ValidationMessage> messages = new ArrayList<ValidationMessage>();
        ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), messages, null);
        pu.setNewSlicingProcessing(true);
        for (StructureDefinition sd : test.included) {
            pu.setIds(sd, false);
        }
        for (StructureDefinition sd : test.included) {
            if (!TestingUtilities.context().hasResource(StructureDefinition.class, sd.getUrl())) {
                TestingUtilities.context().cacheResource(sd);
            }
        }
        StructureDefinition base = TestingUtilities.context().fetchResource(StructureDefinition.class, test.included.get(0).getBaseDefinition());
        if (base != null) {
            pu.generateSnapshot(base, test.included.get(0), test.included.get(0).getUrl(), "http://test.org/profile", test.included.get(0).getName());
        }
        int ec = 0;
        for (ValidationMessage vm : messages) {
            if (vm.getLevel() == IssueSeverity.ERROR) {
                System.out.println(vm.summary());
                ec++;
            }
        }
        if (ec > 0)
            throw new FHIRException("register gen failed: " + messages.toString());
    }
    StructureDefinition base = getSD(test.getSource().getBaseDefinition(), context);
    if (!base.getUrl().equals(test.getSource().getBaseDefinition()))
        throw new Exception("URL mismatch on base: " + base.getUrl() + " wanting " + test.getSource().getBaseDefinition());
    StructureDefinition output = test.getSource().copy();
    ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), messages, new TestPKP());
    pu.setNewSlicingProcessing(test.isNewSliceProcessing());
    pu.setThrowException(false);
    pu.setDebug(test.isDebug());
    pu.setIds(test.getSource(), false);
    if (!TestingUtilities.context().hasPackage(CommonPackages.ID_XVER, CommonPackages.VER_XVER)) {
        NpmPackage npm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION).loadPackage(CommonPackages.ID_XVER, CommonPackages.VER_XVER);
        TestingUtilities.context().loadFromPackage(npm, new TestLoader(new String[] { "StructureDefinition" }), new String[] { "StructureDefinition" });
    }
    pu.setXver(new XVerExtensionManager(TestingUtilities.context()));
    if (test.isSort()) {
        List<String> errors = new ArrayList<String>();
        int lastCount = output.getDifferential().getElement().size();
        pu.sortDifferential(base, output, test.getSource().getName(), errors, false);
        if (errors.size() > 0)
            throw new FHIRException("Sort failed: " + errors.toString());
    }
    try {
        messages.clear();
        pu.generateSnapshot(base, output, test.getSource().getUrl(), "http://test.org/profile", test.getSource().getName());
        List<ValidationMessage> ml = new ArrayList<>();
        for (ValidationMessage vm : messages) {
            if (vm.getLevel() == IssueSeverity.ERROR) {
                ml.add(vm);
            }
        }
        if (ml.size() > 0) {
            throw new FHIRException("Snapshot Generation failed: " + ml.toString());
        }
    } catch (Throwable e) {
        System.out.println("\r\nException: " + e.getMessage());
        throw e;
    }
    if (output.getDifferential().hasElement()) {
        RenderingContext rc = new RenderingContext(TestingUtilities.context(), null, null, "http://hl7.org/fhir", "", null, ResourceRendererMode.END_USER);
        rc.setDestDir(Utilities.path("[tmp]", "snapshot"));
        rc.setProfileUtilities(new ProfileUtilities(TestingUtilities.context(), null, new TestPKP()));
        RendererFactory.factory(output, rc).render(output);
    }
    if (!fail) {
        test.output = output;
        TestingUtilities.context().cacheResource(output);
        File dst = new File(TestingUtilities.tempFile("snapshot", test.getId() + "-expected.xml"));
        if (dst.exists())
            dst.delete();
        IOUtils.copy(TestingUtilities.loadTestResourceStream("r5", "snapshot-generation", test.getId() + "-expected.xml"), new FileOutputStream(dst));
        new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(TestingUtilities.tempFile("snapshot", test.getId() + "-actual.xml")), output);
        StructureDefinition t1 = test.expected.copy();
        t1.setText(null);
        StructureDefinition t2 = test.output.copy();
        t2.setText(null);
        Assertions.assertTrue(t1.equalsDeep(t2), "Output does not match expected");
    }
}
Also used : FilesystemPackageCacheManager(org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager) RenderingContext(org.hl7.fhir.r4b.renderers.utils.RenderingContext) XmlParser(org.hl7.fhir.r4b.formats.XmlParser) ValidationMessage(org.hl7.fhir.utilities.validation.ValidationMessage) ArrayList(java.util.ArrayList) FHIRException(org.hl7.fhir.exceptions.FHIRException) FileNotFoundException(java.io.FileNotFoundException) SAXException(org.xml.sax.SAXException) NotImplementedException(org.apache.commons.lang3.NotImplementedException) DefinitionException(org.hl7.fhir.exceptions.DefinitionException) PathEngineException(org.hl7.fhir.exceptions.PathEngineException) IOException(java.io.IOException) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) FHIRException(org.hl7.fhir.exceptions.FHIRException) StructureDefinition(org.hl7.fhir.r4b.model.StructureDefinition) ProfileUtilities(org.hl7.fhir.r4b.conformance.ProfileUtilities) NpmPackage(org.hl7.fhir.utilities.npm.NpmPackage) XVerExtensionManager(org.hl7.fhir.r4b.utils.XVerExtensionManager) FileOutputStream(java.io.FileOutputStream) File(java.io.File)

Example 77 with ValidationMessage

use of org.hl7.fhir.utilities.validation.ValidationMessage in project org.hl7.fhir.core by hapifhir.

the class ResourceComparer method renderErrors.

public XhtmlNode renderErrors(ResourceComparison csc) {
    XhtmlNode div = new XhtmlNode(NodeType.Element, "div");
    XhtmlNode tbl = div.table("grid");
    for (ValidationMessage vm : csc.messages) {
        XhtmlNode tr = tbl.tr();
        tr.style("background-color: " + colorForLevel(vm.getLevel()));
        tr.td().tx(vm.getLevel().getDisplay());
        tr.td().tx(vm.getLocation());
        tr.td().tx(vm.getMessage().replace("\"", "'"));
    }
    return div;
}
Also used : ValidationMessage(org.hl7.fhir.utilities.validation.ValidationMessage) XhtmlNode(org.hl7.fhir.utilities.xhtml.XhtmlNode)

Example 78 with ValidationMessage

use of org.hl7.fhir.utilities.validation.ValidationMessage in project org.hl7.fhir.core by hapifhir.

the class ResourceComparer method vm.

protected void vm(IssueSeverity level, String message, String path, List<ValidationMessage> genMessages, List<ValidationMessage> specMessages) {
    ValidationMessage vm = new ValidationMessage(Source.ProfileComparer, IssueType.INFORMATIONAL, path, message, level == IssueSeverity.NULL ? IssueSeverity.INFORMATION : level);
    genMessages.add(vm);
    if (specMessages != null) {
        specMessages.add(vm);
    }
}
Also used : ValidationMessage(org.hl7.fhir.utilities.validation.ValidationMessage)

Example 79 with ValidationMessage

use of org.hl7.fhir.utilities.validation.ValidationMessage in project org.hl7.fhir.core by hapifhir.

the class InstanceValidator method checkAddress.

private void checkAddress(List<ValidationMessage> errors, String path, Element focus, Address fixed, String fixedSource, boolean pattern) {
    checkFixedValue(errors, path + ".use", focus.getNamedChild("use"), fixed.getUseElement(), fixedSource, "use", focus, pattern);
    checkFixedValue(errors, path + ".text", focus.getNamedChild("text"), fixed.getTextElement(), fixedSource, "text", focus, pattern);
    checkFixedValue(errors, path + ".city", focus.getNamedChild("city"), fixed.getCityElement(), fixedSource, "city", focus, pattern);
    checkFixedValue(errors, path + ".state", focus.getNamedChild("state"), fixed.getStateElement(), fixedSource, "state", focus, pattern);
    checkFixedValue(errors, path + ".country", focus.getNamedChild("country"), fixed.getCountryElement(), fixedSource, "country", focus, pattern);
    checkFixedValue(errors, path + ".zip", focus.getNamedChild("zip"), fixed.getPostalCodeElement(), fixedSource, "postalCode", focus, pattern);
    List<Element> lines = new ArrayList<Element>();
    focus.getNamedChildren("line", lines);
    boolean lineSizeCheck;
    if (pattern) {
        lineSizeCheck = lines.size() >= fixed.getLine().size();
        if (rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, lineSizeCheck, I18nConstants.FIXED_TYPE_CHECKS_DT_ADDRESS_LINE, Integer.toString(fixed.getLine().size()), Integer.toString(lines.size()))) {
            for (int i = 0; i < fixed.getLine().size(); i++) {
                StringType fixedLine = fixed.getLine().get(i);
                boolean found = false;
                List<ValidationMessage> allErrorsFixed = new ArrayList<>();
                List<ValidationMessage> errorsFixed = null;
                for (int j = 0; j < lines.size() && !found; ++j) {
                    errorsFixed = new ArrayList<>();
                    checkFixedValue(errorsFixed, path + ".line", lines.get(j), fixedLine, fixedSource, "line", focus, pattern);
                    if (!hasErrors(errorsFixed)) {
                        found = true;
                    } else {
                        errorsFixed.stream().filter(t -> t.getLevel().ordinal() >= IssueSeverity.ERROR.ordinal()).forEach(t -> allErrorsFixed.add(t));
                    }
                }
                if (!found) {
                    rule(errorsFixed, IssueType.VALUE, focus.line(), focus.col(), path, false, I18nConstants.PATTERN_CHECK_STRING, fixedLine.getValue(), fixedSource, allErrorsFixed);
                }
            }
        }
    } else if (!pattern) {
        lineSizeCheck = lines.size() == fixed.getLine().size();
        if (rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, lineSizeCheck, I18nConstants.FIXED_TYPE_CHECKS_DT_ADDRESS_LINE, Integer.toString(fixed.getLine().size()), Integer.toString(lines.size()))) {
            for (int i = 0; i < lines.size(); i++) {
                checkFixedValue(errors, path + ".line", lines.get(i), fixed.getLine().get(i), fixedSource, "line", focus, pattern);
            }
        }
    }
}
Also used : TypedElementDefinition(org.hl7.fhir.r5.utils.FHIRPathEngine.TypedElementDefinition) XmlParser(org.hl7.fhir.r5.elementmodel.XmlParser) IntegerType(org.hl7.fhir.r5.model.IntegerType) VersionUtilities(org.hl7.fhir.utilities.VersionUtilities) ExtensionContextType(org.hl7.fhir.r5.model.StructureDefinition.ExtensionContextType) TimeType(org.hl7.fhir.r5.model.TimeType) TerminologyServiceErrorClass(org.hl7.fhir.r5.terminologies.ValueSetExpander.TerminologyServiceErrorClass) XhtmlNode(org.hl7.fhir.utilities.xhtml.XhtmlNode) CanonicalResource(org.hl7.fhir.r5.model.CanonicalResource) ConstraintSeverity(org.hl7.fhir.r5.model.ElementDefinition.ConstraintSeverity) StringUtils(org.apache.commons.lang3.StringUtils) SearchParameterValidator(org.hl7.fhir.validation.instance.type.SearchParameterValidator) BigDecimal(java.math.BigDecimal) Document(org.w3c.dom.Document) Map(java.util.Map) DateTimeType(org.hl7.fhir.r5.model.DateTimeType) JsonParser(org.hl7.fhir.r5.elementmodel.JsonParser) ImplementationGuide(org.hl7.fhir.r5.model.ImplementationGuide) Resource(org.hl7.fhir.r5.model.Resource) Source(org.hl7.fhir.utilities.validation.ValidationMessage.Source) ObjectConverter(org.hl7.fhir.r5.elementmodel.ObjectConverter) ConceptDefinitionComponent(org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent) FormatUtilities(org.hl7.fhir.r5.formats.FormatUtilities) VersionURLInfo(org.hl7.fhir.utilities.VersionUtilities.VersionURLInfo) XVerExtensionManager(org.hl7.fhir.r5.utils.XVerExtensionManager) IssueSeverity(org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity) Timing(org.hl7.fhir.r5.model.Timing) ValidatorHostContext(org.hl7.fhir.validation.instance.utils.ValidatorHostContext) ContactPoint(org.hl7.fhir.r5.model.ContactPoint) Set(java.util.Set) CommaSeparatedStringBuilder(org.hl7.fhir.utilities.CommaSeparatedStringBuilder) TerminologyServiceException(org.hl7.fhir.exceptions.TerminologyServiceException) ResourceValidationTracker(org.hl7.fhir.validation.instance.utils.ResourceValidationTracker) StandardCharsets(java.nio.charset.StandardCharsets) TypeRefComponent(org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent) PropertyRepresentation(org.hl7.fhir.r5.model.ElementDefinition.PropertyRepresentation) StringUtils.isNotBlank(org.apache.commons.lang3.StringUtils.isNotBlank) Coding(org.hl7.fhir.r5.model.Coding) Utilities(org.hl7.fhir.utilities.Utilities) BooleanType(org.hl7.fhir.r5.model.BooleanType) ParserBase(org.hl7.fhir.r5.elementmodel.ParserBase) NamedElement(org.hl7.fhir.r5.elementmodel.ParserBase.NamedElement) ElementDefinitionSlicingDiscriminatorComponent(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent) ElementDefinitionConstraintComponent(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionConstraintComponent) BindingStrength(org.hl7.fhir.r5.model.Enumerations.BindingStrength) StructureDefinitionContextComponent(org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent) BaseValidator(org.hl7.fhir.validation.BaseValidator) BundleValidator(org.hl7.fhir.validation.instance.type.BundleValidator) ArrayList(java.util.ArrayList) ValidationPolicy(org.hl7.fhir.r5.elementmodel.ParserBase.ValidationPolicy) QuestionnaireValidator(org.hl7.fhir.validation.instance.type.QuestionnaireValidator) Calendar(java.util.Calendar) ValidationMessage(org.hl7.fhir.utilities.validation.ValidationMessage) Decimal(org.fhir.ucum.Decimal) DefinitionException(org.hl7.fhir.exceptions.DefinitionException) ValidationLevel(org.hl7.fhir.validation.cli.utils.ValidationLevel) DataType(org.hl7.fhir.r5.model.DataType) IOException(java.io.IOException) InstantType(org.hl7.fhir.r5.model.InstantType) File(java.io.File) Base(org.hl7.fhir.r5.model.Base) Manager(org.hl7.fhir.r5.elementmodel.Manager) ElementInfo(org.hl7.fhir.validation.instance.utils.ElementInfo) CodeableConcept(org.hl7.fhir.r5.model.CodeableConcept) FHIRException(org.hl7.fhir.exceptions.FHIRException) ExpressionNode(org.hl7.fhir.r5.model.ExpressionNode) TypeDetails(org.hl7.fhir.r5.model.TypeDetails) JsonObject(com.google.gson.JsonObject) NodeType(org.hl7.fhir.utilities.xhtml.NodeType) IndexedElement(org.hl7.fhir.validation.instance.utils.IndexedElement) FHIRPathEngine(org.hl7.fhir.r5.utils.FHIRPathEngine) StructureDefinitionKind(org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind) SampledData(org.hl7.fhir.r5.model.SampledData) Range(org.hl7.fhir.r5.model.Range) QuestionnaireMode(org.hl7.fhir.validation.cli.utils.QuestionnaireMode) I18nConstants(org.hl7.fhir.utilities.i18n.I18nConstants) ByteArrayInputStream(java.io.ByteArrayInputStream) StructureDefinitionMappingComponent(org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingComponent) Gson(com.google.gson.Gson) CanonicalType(org.hl7.fhir.r5.model.CanonicalType) Identifier(org.hl7.fhir.r5.model.Identifier) AggregationMode(org.hl7.fhir.r5.model.ElementDefinition.AggregationMode) Period(org.hl7.fhir.r5.model.Period) ToolingExtensions(org.hl7.fhir.r5.utils.ToolingExtensions) Collection(java.util.Collection) Reference(org.hl7.fhir.r5.model.Reference) StructureDefinitionSnapshotComponent(org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionSnapshotComponent) UUID(java.util.UUID) Quantity(org.hl7.fhir.r5.model.Quantity) PrimitiveType(org.hl7.fhir.r5.model.PrimitiveType) ChildIterator(org.hl7.fhir.validation.instance.utils.ChildIterator) List(java.util.List) ValueSetExpansionContainsComponent(org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent) CodeSystem(org.hl7.fhir.r5.model.CodeSystem) DateType(org.hl7.fhir.r5.model.DateType) ElementDefinitionBindingComponent(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent) Enumeration(org.hl7.fhir.r5.model.Enumeration) Base64InputStream(org.apache.commons.codec.binary.Base64InputStream) DecimalStatus(org.hl7.fhir.utilities.Utilities.DecimalStatus) ValidationResult(org.hl7.fhir.r5.context.IWorkerContext.ValidationResult) ImplementationGuideGlobalComponent(org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideGlobalComponent) ResolvedReference(org.hl7.fhir.validation.instance.utils.ResolvedReference) NotImplementedException(org.apache.commons.lang3.NotImplementedException) org.hl7.fhir.r5.utils.validation.constants(org.hl7.fhir.r5.utils.validation.constants) ElementDefinitionMappingComponent(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionMappingComponent) ElementDefinitionSlicingComponent(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionSlicingComponent) ValueSet(org.hl7.fhir.r5.model.ValueSet) ProfileUtilities(org.hl7.fhir.r5.conformance.ProfileUtilities) HashMap(java.util.HashMap) TypeDerivationRule(org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule) NodeStack(org.hl7.fhir.validation.instance.utils.NodeStack) DataRenderer(org.hl7.fhir.r5.renderers.DataRenderer) CodeSystemValidator(org.hl7.fhir.validation.instance.type.CodeSystemValidator) HashSet(java.util.HashSet) UriType(org.hl7.fhir.r5.model.UriType) StructureDefinition(org.hl7.fhir.r5.model.StructureDefinition) StructureDefinitionValidator(org.hl7.fhir.validation.instance.type.StructureDefinitionValidator) BuildExtensions(org.hl7.fhir.r5.utils.BuildExtensions) SearchParameter(org.hl7.fhir.r5.model.SearchParameter) ValidationOptions(org.hl7.fhir.utilities.validation.ValidationOptions) DiscriminatorType(org.hl7.fhir.r5.model.ElementDefinition.DiscriminatorType) MeasureValidator(org.hl7.fhir.validation.instance.type.MeasureValidator) PathEngineException(org.hl7.fhir.exceptions.PathEngineException) Ratio(org.hl7.fhir.r5.model.Ratio) IssueType(org.hl7.fhir.utilities.validation.ValidationMessage.IssueType) Attachment(org.hl7.fhir.r5.model.Attachment) IWorkerContext(org.hl7.fhir.r5.context.IWorkerContext) SpecialElement(org.hl7.fhir.r5.elementmodel.Element.SpecialElement) StringType(org.hl7.fhir.r5.model.StringType) Address(org.hl7.fhir.r5.model.Address) SIDUtilities(org.hl7.fhir.utilities.SIDUtilities) FhirFormat(org.hl7.fhir.r5.elementmodel.Manager.FhirFormat) Element(org.hl7.fhir.r5.elementmodel.Element) ElementDefinition(org.hl7.fhir.r5.model.ElementDefinition) Extension(org.hl7.fhir.r5.model.Extension) UnicodeUtilities(org.hl7.fhir.utilities.UnicodeUtilities) org.hl7.fhir.r5.utils.validation(org.hl7.fhir.r5.utils.validation) IEvaluationContext(org.hl7.fhir.r5.utils.FHIRPathEngine.IEvaluationContext) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) DecimalType(org.hl7.fhir.r5.model.DecimalType) ValueSetValidator(org.hl7.fhir.validation.instance.type.ValueSetValidator) FHIRLexerException(org.hl7.fhir.r5.utils.FHIRLexer.FHIRLexerException) InputStream(java.io.InputStream) HumanName(org.hl7.fhir.r5.model.HumanName) ValidationMessage(org.hl7.fhir.utilities.validation.ValidationMessage) StringType(org.hl7.fhir.r5.model.StringType) NamedElement(org.hl7.fhir.r5.elementmodel.ParserBase.NamedElement) IndexedElement(org.hl7.fhir.validation.instance.utils.IndexedElement) SpecialElement(org.hl7.fhir.r5.elementmodel.Element.SpecialElement) Element(org.hl7.fhir.r5.elementmodel.Element) ArrayList(java.util.ArrayList) ContactPoint(org.hl7.fhir.r5.model.ContactPoint)

Example 80 with ValidationMessage

use of org.hl7.fhir.utilities.validation.ValidationMessage in project org.hl7.fhir.core by hapifhir.

the class InstanceValidator method checkInvariants.

private void checkInvariants(ValidatorHostContext hostContext, List<ValidationMessage> errors, String path, StructureDefinition profile, ElementDefinition ed, String typename, String typeProfile, Element resource, Element element, boolean onlyNonInherited) throws FHIRException, FHIRException {
    if (noInvariantChecks)
        return;
    for (ElementDefinitionConstraintComponent inv : ed.getConstraint()) {
        if (inv.hasExpression() && (!onlyNonInherited || !inv.hasSource() || (!isInheritedProfile(profile, inv.getSource()) && !isInheritedProfile(ed.getType(), inv.getSource())))) {
            @SuppressWarnings("unchecked") Map<String, List<ValidationMessage>> invMap = executionId.equals(element.getUserString(EXECUTION_ID)) ? (Map<String, List<ValidationMessage>>) element.getUserData(EXECUTED_CONSTRAINT_LIST) : null;
            if (invMap == null) {
                invMap = new HashMap<>();
                element.setUserData(EXECUTED_CONSTRAINT_LIST, invMap);
                element.setUserData(EXECUTION_ID, executionId);
            }
            List<ValidationMessage> invErrors = null;
            // We key based on inv.expression rather than inv.key because expressions can change in derived profiles and aren't guaranteed to be consistent across profiles.
            String key = fixExpr(inv.getExpression(), inv.getKey());
            if (!invMap.keySet().contains(key)) {
                invErrors = new ArrayList<ValidationMessage>();
                invMap.put(key, invErrors);
                checkInvariant(hostContext, invErrors, path, profile, resource, element, inv);
            } else {
                invErrors = (ArrayList<ValidationMessage>) invMap.get(key);
            }
            errors.addAll(invErrors);
        }
    }
}
Also used : ValidationMessage(org.hl7.fhir.utilities.validation.ValidationMessage) ArrayList(java.util.ArrayList) List(java.util.List) ElementDefinitionConstraintComponent(org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionConstraintComponent)

Aggregations

ValidationMessage (org.hl7.fhir.utilities.validation.ValidationMessage)170 ArrayList (java.util.ArrayList)114 FHIRException (org.hl7.fhir.exceptions.FHIRException)92 Element (org.hl7.fhir.r5.elementmodel.Element)60 IOException (java.io.IOException)46 DefinitionException (org.hl7.fhir.exceptions.DefinitionException)44 StructureDefinition (org.hl7.fhir.r5.model.StructureDefinition)38 NodeStack (org.hl7.fhir.validation.instance.utils.NodeStack)30 IndexedElement (org.hl7.fhir.validation.instance.utils.IndexedElement)28 NotImplementedException (org.apache.commons.lang3.NotImplementedException)21 ProfileUtilities (org.hl7.fhir.r5.conformance.ProfileUtilities)20 ValueSet (org.hl7.fhir.r5.model.ValueSet)20 SpecialElement (org.hl7.fhir.r5.elementmodel.Element.SpecialElement)19 NamedElement (org.hl7.fhir.r5.elementmodel.ParserBase.NamedElement)19 PathEngineException (org.hl7.fhir.exceptions.PathEngineException)18 ElementDefinition (org.hl7.fhir.r5.model.ElementDefinition)18 FileNotFoundException (java.io.FileNotFoundException)17 StructureDefinition (org.hl7.fhir.dstu3.model.StructureDefinition)16 ContactPoint (org.hl7.fhir.r5.model.ContactPoint)16 CommaSeparatedStringBuilder (org.hl7.fhir.utilities.CommaSeparatedStringBuilder)16