Skip to content

Commit

Permalink
Merge pull request #2528 from DuckflipXYZ/2491
Browse files Browse the repository at this point in the history
#2491 : Sorting acquisitions in mail per sorting index when imported from PACS
  • Loading branch information
michaelkain authored Dec 2, 2024
2 parents 73d8150 + 345dd83 commit 695f5ba
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 695f5ba

Please sign in to comment.