Skip to content

Commit

Permalink
Merge pull request #603 from qarmin/orthanc_worklist
Browse files Browse the repository at this point in the history
Do not set query retrieve level for worklist
  • Loading branch information
Enet4 authored Dec 7, 2024
2 parents c0a1065 + f66ef73 commit 0c1b8da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ jobs:
cargo test -p dicom-pixeldata
cargo check -p dicom
env:
RUSTFLAGS: -W warnings
RUSTFLAGS: -A warnings # allows warnings, to not pollute CI with warnings that are no longer valid with stable rust version
# run Clippy with stable toolchain
- if: matrix.rust == 'stable'
run: cargo clippy
env:
RUSTFLAGS: -W warnings
RUSTFLAGS: -D warnings

check_windows:
name: Build (Windows)
Expand Down
6 changes: 4 additions & 2 deletions findscu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ fn build_query(
q: Vec<String>,
patient: bool,
study: bool,
mwl: bool,
verbose: bool,
) -> Result<InMemDicomObject, Error> {
// read query file if provided
Expand Down Expand Up @@ -150,7 +151,8 @@ fn build_query(
parse_queries(obj, &q).whatever_context("Could not build query object from terms")?;

// try to infer query retrieve level if not defined by the user
if obj.get(tags::QUERY_RETRIEVE_LEVEL).is_none() {
// but only if not using worklist
if !mwl && obj.get(tags::QUERY_RETRIEVE_LEVEL).is_none() {
// (0008,0052) CS QueryRetrieveLevel
let level = match (patient, study) {
(true, false) => "PATIENT",
Expand Down Expand Up @@ -191,7 +193,7 @@ fn run() -> Result<(), Error> {
error!("{}", snafu::Report::from_error(e));
});

let dcm_query = build_query(file, query_file, query, patient, study, verbose)?;
let dcm_query = build_query(file, query_file, query, patient, study, mwl, verbose)?;

let abstract_syntax = match (patient, study, mwl) {
// Patient Root Query/Retrieve Information Model - FIND
Expand Down

0 comments on commit 0c1b8da

Please sign in to comment.