Package org.hl7.fhir.validation
Class BaseValidator
- java.lang.Object
-
- org.hl7.fhir.validation.BaseValidator
-
- All Implemented Interfaces:
org.hl7.fhir.r5.utils.validation.ValidationContextCarrier.IValidationContextResourceLoader
- Direct Known Subclasses:
BundleValidator,CodeSystemValidator,CodeSystemValidator,InstanceValidator,MeasureValidator,ProfileValidator,QuestionnaireValidator,SearchParameterValidator,StructureDefinitionValidator,ValueSetValidator
public class BaseValidator extends Object implements org.hl7.fhir.r5.utils.validation.ValidationContextCarrier.IValidationContextResourceLoader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classBaseValidator.TrackedLocationRelatedMessageclassBaseValidator.ValidationControl
-
Field Summary
Fields Modifier and Type Field Description protected StringBUNDLEprotected org.hl7.fhir.r5.context.IWorkerContextcontextprotected StringDOCUMENTprotected StringENTRYprotected StringFULL_URLprotected StringIDprotected StringLAST_UPDATEDprotected StringLINKprotected StringMESSAGEprotected List<org.hl7.fhir.utilities.validation.ValidationMessage>messagesToRemoveprotected StringMETAprotected StringPATH_ARGprotected StringRESOURCEprotected StringSEARCHSETprotected org.hl7.fhir.utilities.validation.ValidationMessage.Sourcesourceprotected TimeTrackertimeTrackerprotected List<BaseValidator.TrackedLocationRelatedMessage>trackedMessagesprotected StringTYPEprotected org.hl7.fhir.r5.utils.XVerExtensionManagerxverManager
-
Constructor Summary
Constructors Constructor Description BaseValidator(org.hl7.fhir.r5.context.IWorkerContext context, org.hl7.fhir.r5.utils.XVerExtensionManager xverManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected org.hl7.fhir.utilities.validation.ValidationMessageaddValidationMessage(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, String msg, org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity theSeverity, String id)protected org.hl7.fhir.utilities.validation.ValidationMessageaddValidationMessage(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, String msg, org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity theSeverity, org.hl7.fhir.utilities.validation.ValidationMessage.Source theSource, String id)protected voidaddValidationMessage(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, String msg, String html, org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity theSeverity, String id)booleancheckMsgId(String id, org.hl7.fhir.utilities.validation.ValidationMessage vm)protected StringdescribeReference(String reference)protected booleanfail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg)Deprecated.protected booleanfail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)protected booleanfail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg)Deprecated.protected booleanfail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String msg)Deprecated.protected booleanfail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)Deprecated.protected IndexedElementgetFromBundle(org.hl7.fhir.r5.elementmodel.Element bundle, String ref, String fullUrl, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String path, String type, boolean isTransaction)ValidationLevelgetLevel()Map<String,BaseValidator.ValidationControl>getValidationControl()org.hl7.fhir.r5.model.StructureDefinitiongetXverExt(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String path, org.hl7.fhir.r5.elementmodel.Element element, String url)org.hl7.fhir.r5.model.StructureDefinitiongetXverExt(org.hl7.fhir.r5.model.StructureDefinition profile, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String url)protected booleangrammarWord(String w)protected booleanhint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg)Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation failsprotected booleanhint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation failsprotected booleanhint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String theMessage, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation failsprotected booleanhint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation failsbooleanisXverUrl(String url)org.hl7.fhir.r5.model.ResourceloadContainedResource(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String path, org.hl7.fhir.r5.elementmodel.Element resource, String id, Class<? extends org.hl7.fhir.r5.model.Resource> class1)protected org.hl7.fhir.r5.model.ResourceloadFoundResource(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String path, org.hl7.fhir.r5.elementmodel.Element resource, Class<? extends org.hl7.fhir.r5.model.Resource> class1)protected voidremoveTrackedMessagesForLocation(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, Object location, String path)protected org.hl7.fhir.r5.model.ValueSetresolveBindingReference(org.hl7.fhir.r5.model.DomainResource ctxt, String reference, String uri)protected org.hl7.fhir.r5.model.BaseresolveInBundle(String url, org.hl7.fhir.r5.elementmodel.Element bnd)protected org.hl7.fhir.r5.elementmodel.ElementresolveInBundle(List<org.hl7.fhir.r5.elementmodel.Element> entries, String ref, String fullUrl, String type, String id)protected booleanrule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation failsprotected booleanrule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String theMessage, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation failsprotected booleanrule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String msg)Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation failsprotected booleanrule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation failsbooleanrule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.Source source, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg)protected booleanruleHtml(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html)Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation failsvoidsetLevel(ValidationLevel level)protected org.hl7.fhir.utilities.validation.ValidationMessagesignpost(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, String theMessage, Object... theMessageArguments)protected booleanslicingHint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, boolean isCritical, String msg, String html, String[] text)Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation fails.protected StringsplitByCamelCase(String s)protected StringstripPunctuation(String s, boolean numbers)protected booleansuppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleansuppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleansuppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleansuppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleansuppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected StringsystemFromCanonical(String system)protected booleantxHint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String txLink, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)protected booleantxRule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String txLink, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)protected booleantxWarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String txLink, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleantxWarningForLaterRemoval(Object location, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String txLink, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails.protected StringversionFromCanonical(String system)protected booleanwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleanwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleanwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleanwarningHtml(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleanwarningHtml(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsprotected booleanwarningOrError(boolean isError, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)protected booleanwarningOrHint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, boolean warning, String msg, Object... theMessageArguments)Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation failsorg.hl7.fhir.r5.model.StructureDefinitionxverDefn(String url)StringxverElementId(String url)org.hl7.fhir.r5.utils.XVerExtensionManager.XVerExtensionStatusxverStatus(String url)StringxverVersion(String url)
-
-
-
Field Detail
-
META
protected final String META
- See Also:
- Constant Field Values
-
ENTRY
protected final String ENTRY
- See Also:
- Constant Field Values
-
LINK
protected final String LINK
- See Also:
- Constant Field Values
-
DOCUMENT
protected final String DOCUMENT
- See Also:
- Constant Field Values
-
RESOURCE
protected final String RESOURCE
- See Also:
- Constant Field Values
-
MESSAGE
protected final String MESSAGE
- See Also:
- Constant Field Values
-
SEARCHSET
protected final String SEARCHSET
- See Also:
- Constant Field Values
-
ID
protected final String ID
- See Also:
- Constant Field Values
-
FULL_URL
protected final String FULL_URL
- See Also:
- Constant Field Values
-
PATH_ARG
protected final String PATH_ARG
- See Also:
- Constant Field Values
-
TYPE
protected final String TYPE
- See Also:
- Constant Field Values
-
BUNDLE
protected final String BUNDLE
- See Also:
- Constant Field Values
-
LAST_UPDATED
protected final String LAST_UPDATED
- See Also:
- Constant Field Values
-
source
protected org.hl7.fhir.utilities.validation.ValidationMessage.Source source
-
context
protected org.hl7.fhir.r5.context.IWorkerContext context
-
timeTracker
protected TimeTracker timeTracker
-
xverManager
protected org.hl7.fhir.r5.utils.XVerExtensionManager xverManager
-
trackedMessages
protected List<BaseValidator.TrackedLocationRelatedMessage> trackedMessages
-
messagesToRemove
protected List<org.hl7.fhir.utilities.validation.ValidationMessage> messagesToRemove
-
-
Constructor Detail
-
BaseValidator
public BaseValidator(org.hl7.fhir.r5.context.IWorkerContext context, org.hl7.fhir.r5.utils.XVerExtensionManager xverManager)
-
-
Method Detail
-
fail
@Deprecated protected boolean fail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg)
Deprecated.Test a rule and add aValidationMessage.IssueSeverity.FATALvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
fail
protected boolean fail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)
-
fail
@Deprecated protected boolean fail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String msg)
Deprecated.Test a rule and add aValidationMessage.IssueSeverity.FATALvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
fail
@Deprecated protected boolean fail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)
Deprecated.Test a rule and add aValidationMessage.IssueSeverity.FATALvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
fail
@Deprecated protected boolean fail(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg)
Deprecated.Test a rule and add aValidationMessage.IssueSeverity.FATALvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
grammarWord
protected boolean grammarWord(String w)
-
hint
protected boolean hint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg)
Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
slicingHint
protected boolean slicingHint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, boolean isCritical, String msg, String html, String[] text)
Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation fails. And mark it as a slicing hint for later recovery if appropriate- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
hint
protected boolean hint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
signpost
protected org.hl7.fhir.utilities.validation.ValidationMessage signpost(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, String theMessage, Object... theMessageArguments)
-
txHint
protected boolean txHint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String txLink, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)
-
hint
protected boolean hint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
hint
protected boolean hint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String theMessage, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.INFORMATIONvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
rule
protected boolean rule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
txRule
protected boolean txRule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String txLink, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments)
-
rule
protected boolean rule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String msg)
Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
rule
protected boolean rule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
rule
protected boolean rule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String theMessage, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
rule
public boolean rule(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.Source source, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg)
-
ruleHtml
protected boolean ruleHtml(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html)
Test a rule and add aValidationMessage.IssueSeverity.ERRORvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
splitByCamelCase
protected String splitByCamelCase(String s)
-
stripPunctuation
protected String stripPunctuation(String s, boolean numbers)
-
warning
protected boolean warning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
addValidationMessage
protected org.hl7.fhir.utilities.validation.ValidationMessage addValidationMessage(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, String msg, org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity theSeverity, String id)
-
addValidationMessage
protected org.hl7.fhir.utilities.validation.ValidationMessage addValidationMessage(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, String msg, org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity theSeverity, org.hl7.fhir.utilities.validation.ValidationMessage.Source theSource, String id)
-
checkMsgId
public boolean checkMsgId(String id, org.hl7.fhir.utilities.validation.ValidationMessage vm)
-
txWarning
protected boolean txWarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String txLink, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
txWarningForLaterRemoval
protected boolean txWarningForLaterRemoval(Object location, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String txLink, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails. Also, keep track of it later in case we want to remove it if we find a required binding for this element later- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
removeTrackedMessagesForLocation
protected void removeTrackedMessagesForLocation(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, Object location, String path)
-
warningOrError
protected boolean warningOrError(boolean isError, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)
-
warning
protected boolean warning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
warning
protected boolean warning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
warningOrHint
protected boolean warningOrHint(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, boolean warning, String msg, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
warningHtml
protected boolean warningHtml(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
warningHtml
protected boolean warningHtml(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
suppressedwarning
protected boolean suppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
suppressedwarning
protected boolean suppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, List<String> pathParts, boolean thePass, String theMessage, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
suppressedwarning
protected boolean suppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
suppressedwarning
protected boolean suppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
addValidationMessage
protected void addValidationMessage(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, String msg, String html, org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity theSeverity, String id)
-
suppressedwarning
protected boolean suppressedwarning(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, org.hl7.fhir.utilities.validation.ValidationMessage.IssueType type, String path, boolean thePass, String msg, String html, Object... theMessageArguments)
Test a rule and add aValidationMessage.IssueSeverity.WARNINGvalidation message if the validation fails- Parameters:
thePass- Set this parameter tofalseif the validation does not pass- Returns:
- Returns
thePass(in other words, returnstrueif the rule did not fail validation)
-
resolveBindingReference
protected org.hl7.fhir.r5.model.ValueSet resolveBindingReference(org.hl7.fhir.r5.model.DomainResource ctxt, String reference, String uri)
-
describeReference
protected String describeReference(String reference)
-
resolveInBundle
protected org.hl7.fhir.r5.model.Base resolveInBundle(String url, org.hl7.fhir.r5.elementmodel.Element bnd)
-
resolveInBundle
protected org.hl7.fhir.r5.elementmodel.Element resolveInBundle(List<org.hl7.fhir.r5.elementmodel.Element> entries, String ref, String fullUrl, String type, String id)
-
getFromBundle
protected IndexedElement getFromBundle(org.hl7.fhir.r5.elementmodel.Element bundle, String ref, String fullUrl, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String path, String type, boolean isTransaction)
-
getValidationControl
public Map<String,BaseValidator.ValidationControl> getValidationControl()
-
xverStatus
public org.hl7.fhir.r5.utils.XVerExtensionManager.XVerExtensionStatus xverStatus(String url)
-
xverVersion
public String xverVersion(String url)
-
xverElementId
public String xverElementId(String url)
-
getXverExt
public org.hl7.fhir.r5.model.StructureDefinition getXverExt(org.hl7.fhir.r5.model.StructureDefinition profile, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String url)
-
getXverExt
public org.hl7.fhir.r5.model.StructureDefinition getXverExt(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String path, org.hl7.fhir.r5.elementmodel.Element element, String url)
-
versionFromCanonical
protected String versionFromCanonical(String system)
-
systemFromCanonical
protected String systemFromCanonical(String system)
-
loadContainedResource
public org.hl7.fhir.r5.model.Resource loadContainedResource(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String path, org.hl7.fhir.r5.elementmodel.Element resource, String id, Class<? extends org.hl7.fhir.r5.model.Resource> class1) throws org.hl7.fhir.exceptions.FHIRException
- Specified by:
loadContainedResourcein interfaceorg.hl7.fhir.r5.utils.validation.ValidationContextCarrier.IValidationContextResourceLoader- Throws:
org.hl7.fhir.exceptions.FHIRException
-
loadFoundResource
protected org.hl7.fhir.r5.model.Resource loadFoundResource(List<org.hl7.fhir.utilities.validation.ValidationMessage> errors, String path, org.hl7.fhir.r5.elementmodel.Element resource, Class<? extends org.hl7.fhir.r5.model.Resource> class1) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setLevel
public void setLevel(ValidationLevel level)
-
getLevel
public ValidationLevel getLevel()
-
-