From 47769a3d2481fb1be4e7a51a8caf3a7f302cc651 Mon Sep 17 00:00:00 2001 From: chinlinlee Date: Sat, 23 Dec 2023 18:47:28 +0800 Subject: [PATCH] feat(mongo): use countDocuments instead of count --- .../controller/MWL-RS/service/create-mwlitem.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/dicom-web/controller/MWL-RS/service/create-mwlitem.service.js b/api/dicom-web/controller/MWL-RS/service/create-mwlitem.service.js index dd43c762..920b355d 100644 --- a/api/dicom-web/controller/MWL-RS/service/create-mwlitem.service.js +++ b/api/dicom-web/controller/MWL-RS/service/create-mwlitem.service.js @@ -89,7 +89,7 @@ class CreateMwlItemService { async checkPatientExist() { let patientID = this.requestMwlItemDicomJsonModel.getString("00100020"); - let patientCount = await PatientModel.count({ + let patientCount = await PatientModel.countDocuments({ patientID }); if (patientCount <= 0) {