Skip to content

Commit

Permalink
feat: support PN query
Browse files Browse the repository at this point in the history
- The PN is not use the `tag.Value` to query,
so need to give the specific query
  • Loading branch information
Chinlinlee committed May 9, 2022
1 parent 4b73691 commit 61118d0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions api/dicom-web/controller/QIDO-RS/service/QIDO-RS.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,30 @@ function sortObjByFieldKey(obj) {
const vrQueryLookup = {
DA: async (value, tag) => {
let q = await mongoDateQuery(value, tag, false);
},
PN: async (value, tag) => {
let queryValue = _.cloneDeep(value[tag]);
value[tag] = {
$or : [
{
[`${tag}.Alphabetic`] : queryValue
},
{
[`${tag}.familyName`] : queryValue
},
{
[`${tag}.givenName`] : queryValue
} ,
{
[`${tag}.middleName`] : queryValue
} ,
{
[`${tag}.prefix`] : queryValue
},
{
[`${tag}.suffix`] : queryValue
}
]};
}
};

Expand Down

0 comments on commit 61118d0

Please sign in to comment.