Skip to content

Commit

Permalink
#2491 : Sorting acquisitions in mail per sorting index when imported …
Browse files Browse the repository at this point in the history
…from PACS
  • Loading branch information
DuckflipXYZ committed Dec 2, 2024
1 parent 2efa56a commit 345dd83
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void sendImportEmail(ImportJob importJob, Long userId, Examination examin
generatedMail.setUserId(userId);
generatedMail.setStudyCard(importJob.getStudyCardName());

for (DatasetAcquisition acq : generatedAcquisitions) {
for (DatasetAcquisition acq : generatedAcquisitions.stream().sorted(Comparator.comparingInt(DatasetAcquisition::getSortingIndex)).toList()) {
if (!CollectionUtils.isEmpty(acq.getDatasets())) {
for (Dataset dataset : acq.getDatasets()) {
datasets.put(dataset.getId(), dataset.getName());
Expand Down

0 comments on commit 345dd83

Please sign in to comment.