diff --git a/api/dicom-web/controller/UPS-RS/service/create-workItem.service.js b/api/dicom-web/controller/UPS-RS/service/create-workItem.service.js index f715a93a..ab552105 100644 --- a/api/dicom-web/controller/UPS-RS/service/create-workItem.service.js +++ b/api/dicom-web/controller/UPS-RS/service/create-workItem.service.js @@ -24,9 +24,9 @@ class CreateWorkItemService extends BaseWorkItemService { let uid = _.get(this.request, "query.workitem", await UIDUtils.createUID() ); - this.dataAdjustBeforeCreatingUps(uid); - this.validateWorkItem(uid); - + await this.dataAdjustBeforeCreatingUps(uid); + await this.validateWorkItem(uid); + let patient = await this.findOneOrCreatePatient(); let workItem = new workItemModel(this.requestWorkItem.dicomJson); let savedWorkItem = await workItem.save();