Skip to content

Commit

Permalink
refactor: use StudyModel, SeriesModel instead of mongoose.model
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinlinlee committed Jan 21, 2024
1 parent b68a123 commit 92203aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/dicom-web/controller/WADO-RS/service/WADO-RS.service.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const _ = require("lodash");
const path = require("path");
const fsP = require("fs/promises");
const mongoose = require("mongoose");
const { MultipartWriter } = require("../../../../../utils/multipartWriter");
const errorResponse = require("../../../../../utils/errorResponse/errorResponseMessage");
const { raccoonConfig } = require("../../../../../config-class");
const { JSONPath } = require("jsonpath-plus");
const { DicomWebService } = require("../../../service/dicom-web.service");
const { StudyModel } = require("@dbModels/study.model");
const { SeriesModel } = require("@dbModels/series.model");
const { InstanceModel } = require("@dbModels/instance.model");
const { logger } = require("../../../../../utils/logs/log");
const { RetrieveAuditService } = require("./retrieveAudit.service");
Expand Down Expand Up @@ -150,7 +151,7 @@ class StudyImagePathFactory extends ImagePathFactory {
}

async getImagePaths() {
this.imagePaths = await mongoose.model("dicomStudy").getPathGroupOfInstances(this.uids);
this.imagePaths = await StudyModel.getPathGroupOfInstances(this.uids);
}
}

Expand All @@ -160,7 +161,7 @@ class SeriesImagePathFactory extends ImagePathFactory {
}

async getImagePaths() {
this.imagePaths = await mongoose.model("dicomSeries").getPathGroupOfInstances(this.uids);
this.imagePaths = await SeriesModel.getPathGroupOfInstances(this.uids);
}
}

Expand Down

0 comments on commit 92203aa

Please sign in to comment.