Merge branch 'master' into gg-202110-CVE-2021-42574
This commit is contained in:
commit
e8ead0696b
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>5.5.9-SNAPSHOT</version>
|
||||
<version>5.5.10-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5384,57 +5384,76 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
// this is a hack work around for past publication of wrong FHIRPath expressions
|
||||
// R4
|
||||
// waiting for 4.0.2
|
||||
//TODO is this expression below correct? @grahamegrieve
|
||||
if ("probability is decimal implies (probability as decimal) <= 100".equals(expr)) {
|
||||
return "probablility.empty() or ((probability is decimal) implies ((probability as decimal) <= 100))";
|
||||
}
|
||||
|
||||
if ("enableWhen.count() > 2 implies enableBehavior.exists()".equals(expr)) {
|
||||
return "enableWhen.count() >= 2 implies enableBehavior.exists()";
|
||||
}
|
||||
|
||||
if ("txt-2".equals(key)) {
|
||||
return "htmlChecks2()";
|
||||
}
|
||||
|
||||
// handled in 4.0.1
|
||||
if ("(component.empty() and hasMember.empty()) implies (dataAbsentReason or value)".equals(expr))
|
||||
if ("(component.empty() and hasMember.empty()) implies (dataAbsentReason or value)".equals(expr)) {
|
||||
return "(component.empty() and hasMember.empty()) implies (dataAbsentReason.exists() or value.exists())";
|
||||
if ("isModifier implies isModifierReason.exists()".equals(expr))
|
||||
}
|
||||
if ("isModifier implies isModifierReason.exists()".equals(expr)) {
|
||||
return "(isModifier.exists() and isModifier) implies isModifierReason.exists()";
|
||||
if ("(%resource.kind = 'logical' or element.first().path.startsWith(%resource.type)) and (element.tail().not() or element.tail().all(path.startsWith(%resource.differential.element.first().path.replaceMatches('\\\\..*','')&'.')))".equals(expr))
|
||||
}
|
||||
if ("(%resource.kind = 'logical' or element.first().path.startsWith(%resource.type)) and (element.tail().not() or element.tail().all(path.startsWith(%resource.differential.element.first().path.replaceMatches('\\\\..*','')&'.')))".equals(expr)) {
|
||||
return "(%resource.kind = 'logical' or element.first().path.startsWith(%resource.type)) and (element.tail().empty() or element.tail().all(path.startsWith(%resource.differential.element.first().path.replaceMatches('\\\\..*','')&'.')))";
|
||||
if ("differential.element.all(id) and differential.element.id.trace('ids').isDistinct()".equals(expr))
|
||||
}
|
||||
if ("differential.element.all(id) and differential.element.id.trace('ids').isDistinct()".equals(expr)) {
|
||||
return "differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct()";
|
||||
if ("snapshot.element.all(id) and snapshot.element.id.trace('ids').isDistinct()".equals(expr))
|
||||
}
|
||||
if ("snapshot.element.all(id) and snapshot.element.id.trace('ids').isDistinct()".equals(expr)) {
|
||||
return "snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct()";
|
||||
}
|
||||
|
||||
// R3
|
||||
if ("(code or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217')".equals(expr))
|
||||
if ("(code or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217')".equals(expr)) {
|
||||
return "(code.exists() or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217')";
|
||||
if ("value.empty() or code!=component.code".equals(expr))
|
||||
}
|
||||
if ("value.empty() or code!=component.code".equals(expr)) {
|
||||
return "value.empty() or (code in component.code).not()";
|
||||
if ("(code or value.empty()) and (system.empty() or system = %ucum) and (value.empty() or value > 0)".equals(expr))
|
||||
}
|
||||
if ("(code or value.empty()) and (system.empty() or system = %ucum) and (value.empty() or value > 0)".equals(expr)) {
|
||||
return "(code.exists() or value.empty()) and (system.empty() or system = %ucum) and (value.empty() or value > 0)";
|
||||
if ("element.all(definition and min and max)".equals(expr))
|
||||
}
|
||||
if ("element.all(definition and min and max)".equals(expr)) {
|
||||
return "element.all(definition.exists() and min.exists() and max.exists())";
|
||||
if ("telecom or endpoint".equals(expr))
|
||||
}
|
||||
if ("telecom or endpoint".equals(expr)) {
|
||||
return "telecom.exists() or endpoint.exists()";
|
||||
if ("(code or value.empty()) and (system.empty() or system = %ucum) and (value.empty() or value > 0)".equals(expr))
|
||||
}
|
||||
if ("(code or value.empty()) and (system.empty() or system = %ucum) and (value.empty() or value > 0)".equals(expr)) {
|
||||
return "(code.exists() or value.empty()) and (system.empty() or system = %ucum) and (value.empty() or value > 0)";
|
||||
if ("searchType implies type = 'string'".equals(expr))
|
||||
}
|
||||
if ("searchType implies type = 'string'".equals(expr)) {
|
||||
return "searchType.exists() implies type = 'string'";
|
||||
if ("abatement.empty() or (abatement as boolean).not() or clinicalStatus='resolved' or clinicalStatus='remission' or clinicalStatus='inactive'".equals(expr))
|
||||
}
|
||||
if ("abatement.empty() or (abatement as boolean).not() or clinicalStatus='resolved' or clinicalStatus='remission' or clinicalStatus='inactive'".equals(expr)) {
|
||||
return "abatement.empty() or (abatement is boolean).not() or (abatement as boolean).not() or (clinicalStatus = 'resolved') or (clinicalStatus = 'remission') or (clinicalStatus = 'inactive')";
|
||||
if ("(component.empty() and related.empty()) implies (dataAbsentReason or value)".equals(expr))
|
||||
}
|
||||
if ("(component.empty() and related.empty()) implies (dataAbsentReason or value)".equals(expr)) {
|
||||
return "(component.empty() and related.empty()) implies (dataAbsentReason.exists() or value.exists())";
|
||||
|
||||
}
|
||||
if ("reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))".equals(expr)) {
|
||||
return "(reference = '#') or reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))";
|
||||
}
|
||||
if ("reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))".equals(expr)) {
|
||||
return "(reference = '#') or reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))";
|
||||
}
|
||||
if ("".equals(expr))
|
||||
if ("probability is decimal implies probability.as(decimal) <= 100".equals(expr)) {
|
||||
if (key.equals("ras-2")) {
|
||||
return "probability.empty() or (probability is decimal implies probability.as(decimal) <= 100)";
|
||||
}
|
||||
}
|
||||
if ("".equals(expr)) {
|
||||
return "";
|
||||
}
|
||||
return expr;
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,6 @@ public class ValidationTests implements IEvaluationContext, IValidatorResourceFe
|
|||
|
||||
List<Object[]> objects = new ArrayList<Object[]>(examples.size());
|
||||
for (String id : names) {
|
||||
//if (id.equals("bundle-documentation-miss-last-updated"))
|
||||
objects.add(new Object[]{id, examples.get(id)});
|
||||
}
|
||||
return objects;
|
||||
|
|
Loading…
Reference in New Issue