Skip to content

Commit

Permalink
refactor: duplicate codes in dicom schemas
Browse files Browse the repository at this point in the history
- Add base dicom schema definition for reusable
- Add DicomSchemaOptionsFactory
  - The not implemented function need to implement in each schema
  • Loading branch information
Chinlinlee committed Nov 5, 2023
1 parent a9676d8 commit 2f7c950
Show file tree
Hide file tree
Showing 6 changed files with 512 additions and 598 deletions.
6 changes: 3 additions & 3 deletions models/mongodb/deleteSchedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function deleteExpireStudies() {
deletedStudy.delete()
]);

await deletedStudy.deleteStudyFolder();
await deletedStudy.deleteDicomInstances();
}
}
}
Expand Down Expand Up @@ -74,7 +74,7 @@ async function deleteExpireSeries() {
aDeletedSeries.delete()
]);

await aDeletedSeries.deleteSeriesFolder();
await aDeletedSeries.deleteDicomInstances();
}
}
}
Expand All @@ -94,8 +94,8 @@ async function deleteExpireInstances() {
let diff = now.diff(updateAtDate, "days");
if (diff >= 30) {
logger.info("delete expired instance: " + instanceUID);
await deletedInstance.deleteInstance();
await deletedInstance.delete();
await deletedInstance.deleteDicomInstances();
}
}
}
Loading

0 comments on commit 2f7c950

Please sign in to comment.