Skip to content

Commit

Permalink
CARDS-2549 / CARDS-2555: Only consider patient forms in the cards:uns…
Browse files Browse the repository at this point in the history
…ubmitted permission restriction
  • Loading branch information
sdumitriu committed Aug 1, 2024
1 parent 5bb8017 commit 372ec9d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,14 @@ public boolean matches(final Tree tree, final PropertyState property)

private boolean isUnsubmitted(final Tree form)
{
boolean isSubmitted = false;
boolean isPatientForm = false;
PropertyState flags = form.getProperty("statusFlags");
for (int i = 0; i < flags.count(); ++i) {
if ("SUBMITTED".equals(flags.getValue(Type.STRING, i))) {
return false;
}
isSubmitted |= "SUBMITTED".equals(flags.getValue(Type.STRING, i));
isPatientForm |= "PATIENT SURVEY".equals(flags.getValue(Type.STRING, i));
}
return true;
return isPatientForm && !isSubmitted;
}

private boolean isForm(final Tree node)
Expand Down

0 comments on commit 372ec9d

Please sign in to comment.