Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLAG-67: Fix rendering of flags via simple objects that is currently broken in platform version greater than 2.5.* #77

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ public SimpleObject processPatientFlags(@FragmentParam("patientId") Patient pati
intersection.retainAll(userRoles);
if (intersection.size() > 0) {
flag.setMessage(patientFlag.getMessage());
flagsString.append("<li><span style='").append(flag.getPriority().getStyle()).append("'>").append(flag.evalMessage(patient.getPatientId())).append("</span></li>");
flagsString.append("<li><span ").append(flag.getPriority().getStyle()).append(">").append(flag.evalMessage(patient.getPatientId())).append("</span></li>");
continue;
}
}
}

SimpleObject simpleObject = new SimpleObject();

simpleObject.put("", flagsString);
simpleObject.put("patientflags", flagsString);

return simpleObject;
}
Expand Down
2 changes: 1 addition & 1 deletion omod/src/main/webapp/fragments/patientflagsDashboard.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if (!response) {
${ ui.message("coreapps.none ") }
} else {
jq("#flags").html(response.replace("{=", "").replace("}", ""));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wikumChamith does this work on lower platform versions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on Reference Application 2.11.0 but this is not working there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wikumChamith meaning that this change breaks the module for those who are running lower platform versions.

jq("#flags").html(response.patientflags);
}
});
</script>
Expand Down
Loading