Filter Extensions from enablewhen evaluation
This commit is contained in:
parent
3df4004539
commit
82387e6902
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<artifactId>hapi-fhir-validation</artifactId>
|
<artifactId>hapi-fhir-validation</artifactId>
|
||||||
<packaging>bundle</packaging>
|
<packaging>bundle</packaging>
|
||||||
<version>3.6.1-PHRFIX</version>
|
<version>3.6.2-PHRFIX</version>
|
||||||
|
|
||||||
<name>HAPI FHIR - Validation</name>
|
<name>HAPI FHIR - Validation</name>
|
||||||
|
|
||||||
|
|
|
@ -142,8 +142,13 @@ public class DefaultEnableWhenEvaluator implements IEnableWhenEvaluator {
|
||||||
return item.getChildrenByName(ANSWER_ELEMENT)
|
return item.getChildrenByName(ANSWER_ELEMENT)
|
||||||
.stream()
|
.stream()
|
||||||
.flatMap(c -> c.getChildren().stream())
|
.flatMap(c -> c.getChildren().stream())
|
||||||
|
.filter(DefaultEnableWhenEvaluator::notExtension)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean notExtension(Element e) {
|
||||||
|
return !Extension.class.isAssignableFrom(e.getClass());
|
||||||
|
}
|
||||||
|
|
||||||
private boolean compareCodingAnswer(Coding expectedAnswer, Coding actualAnswer, QuestionnaireItemOperator questionnaireItemOperator) {
|
private boolean compareCodingAnswer(Coding expectedAnswer, Coding actualAnswer, QuestionnaireItemOperator questionnaireItemOperator) {
|
||||||
boolean result = compareSystems(expectedAnswer, actualAnswer) && compareCodes(expectedAnswer, actualAnswer);
|
boolean result = compareSystems(expectedAnswer, actualAnswer) && compareCodes(expectedAnswer, actualAnswer);
|
||||||
|
|
Loading…
Reference in New Issue