Skip to content

Commit

Permalink
fix: missing patient attribute in workitem
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinlinlee committed May 21, 2023
1 parent 20fc53c commit f778760
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion models/mongodb/models/workItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let workItemSchema = new mongoose.Schema(
}
},
{
strict: false,
strict: true,
versionKey: false,
toObject: {
getters: true
Expand All @@ -41,6 +41,14 @@ for (let tag in tagsNeedStore.UPS) {
});
}

for (let tag in tagsNeedStore.Patient) {
let vr = tagsNeedStore.Patient[tag].vr;
let tagSchema = getVRSchema(vr);
workItemSchema.add({
[tag]: tagSchema
});
}

/**
*
* @param {import("../../../utils/typeDef/dicom").DicomJsonMongoQueryOptions} queryOptions
Expand Down

0 comments on commit f778760

Please sign in to comment.