Skip to content

Commit

Permalink
34 : if expression with name defaultBusinessStatus then expression wi…
Browse files Browse the repository at this point in the history
…ll be used to populate the business status of generated tasks
  • Loading branch information
rehammuzzamil committed Jun 25, 2020
1 parent b5baa7e commit 93a7ae9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ public void generateTask(Resource resource, Action action, String planIdentifier
task.setLastModified(DateTime.now());
if (action.getDynamicValue() != null && action.getDynamicValue().getExpression() != null &&
action.getDynamicValue().getExpression().getName().equals("defaultBusinessStatus")) {
FHIRPathElementNode node = PathEvaluatorLibrary.getInstance()
.evaluateElementExpression(resource, action.getDynamicValue().getExpression().getExpression());
com.ibm.fhir.model.type.String businessStatus = node.element().as(com.ibm.fhir.model.type.String.class);
task.setBusinessStatus(businessStatus.getValue());
task.setBusinessStatus(action.getDynamicValue().getExpression().getExpression());
} else {
task.setBusinessStatus("Not Visited");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public class TestData {
+ "\"dynamicValue\": {\n"
+ "\"expression\": {\n"
+ "\"name\": \"defaultBusinessStatus\",\n"
+ "\"expression\": \"\"\n"
+ "\"expression\": \"expression\"\n"
+ "}\n"
+ "}\n"
+ "}]\n"
Expand Down

0 comments on commit 93a7ae9

Please sign in to comment.