mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-13 00:04:49 +00:00
more config for validator
This commit is contained in:
parent
6c351837e9
commit
99466e9fe3
@ -132,8 +132,6 @@ public interface IResourceValidator {
|
||||
OPTIONAL, REQUIRED, PROHIBITED
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* how much to check displays for coded elements
|
||||
* @return
|
||||
@ -214,6 +212,8 @@ public interface IResourceValidator {
|
||||
public boolean isCrumbTrails();
|
||||
public void setCrumbTrails(boolean crumbTrails);
|
||||
|
||||
public boolean isValidateValueSetCodesOnTxServer();
|
||||
public void setValidateValueSetCodesOnTxServer(boolean value);
|
||||
|
||||
/**
|
||||
* Bundle validation rules allow for requesting particular entries in a bundle get validated against particular profiles
|
||||
@ -223,6 +223,7 @@ public interface IResourceValidator {
|
||||
* @return
|
||||
*/
|
||||
public List<BundleValidationRule> getBundleValidationRules();
|
||||
|
||||
/**
|
||||
* Validate suite
|
||||
*
|
||||
|
@ -365,6 +365,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||
private ProfileUtilities profileUtilities;
|
||||
private boolean crumbTrails;
|
||||
private List<BundleValidationRule> bundleValidationRules = new ArrayList<>();
|
||||
private boolean validateValueSetCodesOnTxServer;
|
||||
|
||||
public InstanceValidator(IWorkerContext theContext, IEvaluationContext hostServices) {
|
||||
super(theContext);
|
||||
@ -4824,4 +4825,14 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||
return bundleValidationRules ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidateValueSetCodesOnTxServer() {
|
||||
return validateValueSetCodesOnTxServer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValidateValueSetCodesOnTxServer(boolean value) {
|
||||
this.validateValueSetCodesOnTxServer = value;
|
||||
}
|
||||
|
||||
}
|
@ -114,7 +114,7 @@ public class ValueSetValidator extends BaseValidator {
|
||||
}
|
||||
cc++;
|
||||
}
|
||||
if (batch.size() > 0) {
|
||||
if (parent.isValidateValueSetCodesOnTxServer() && batch.size() > 0) {
|
||||
long t = System.currentTimeMillis();
|
||||
if (parent.isDebug()) {
|
||||
System.out.println(" : Validate "+batch.size()+" codes from "+system+" for "+vsid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user