Skip to content

Commit

Permalink
fix comparison with incorrect values in scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
serefarikan committed Feb 15, 2018
1 parent fc7ff8b commit fb68e65
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -61,6 +61,7 @@ public class AqlFeaturesSteps {
private List<Map<String, String>> _aqlResultSet;
private String _instructionArchetypeNodeId;
private String _observationArchetypeNodeId;
private String _evaluationArchetypeNodeId;

public AqlFeaturesSteps(RestAPIBackgroundSteps backgroundSteps) {
bg = backgroundSteps;
Expand Down Expand Up @@ -105,6 +106,7 @@ public void compositionNameCriteriaUsingWHEREClause(String compositionName) thro

@And("^Instruction archetype id is (openEHR-EHR-INSTRUCTION\\.[\\w-_]*\\.v\\d+)$")
public void instructionArchetypeIdCriteria(String archetypeId) throws Throwable {
_instructionArchetypeNodeId = archetypeId;
_aqlQuery =
_aqlQuery
.replace(COMPOSITION_INSTRUCTION_ARCH_ID_PLACEHOLDER, archetypeId);
Expand Down Expand Up @@ -236,7 +238,7 @@ public void theResultsShouldBeInstructionInstances() throws Throwable {
assertTrue(_aqlResultSet.size() > 0);

_aqlResultSet.forEach(
map -> assertArchetypeNodeId(map, "instruction", MEDICATION_ORDER_ARCH_ID));
map -> assertArchetypeNodeId(map, "instruction", _instructionArchetypeNodeId));
}

private void assertArchetypeNodeId(Map<String,String> map,
Expand Down Expand Up @@ -281,7 +283,7 @@ public void compositionNameCriteriaUsingWHEREClauseIsAdverseReactionList(String

@And("^Evaluation archetype id is (openEHR-EHR-EVALUATION\\.[\\w]*\\.v\\d+)$")
public void evaluationArchetypeIdIsOpenEHREHREVALUATIONAdverse_reaction_riskV(String evaluationId) throws Throwable {
_instructionArchetypeNodeId = evaluationId;
_evaluationArchetypeNodeId = evaluationId;
evaluationArchetypeIdCriteria(evaluationId);
}

Expand All @@ -291,7 +293,7 @@ public void theResultsShouldBeEvaluationInstances() throws Throwable {
assertTrue(_aqlResultSet.size() > 0);

_aqlResultSet.forEach(
map -> assertArchetypeNodeId(map, "evaluation", _instructionArchetypeNodeId)
map -> assertArchetypeNodeId(map, "evaluation", _evaluationArchetypeNodeId)
);
}

Expand Down

0 comments on commit fb68e65

Please sign in to comment.