Skip to content

Commit c1631b6

Browse files
authored
Merge branch 'main' into milanmlft/606-add-api-uploader
2 parents 12b58e9 + bedac3e commit c1631b6

5 files changed

Lines changed: 112 additions & 26 deletions

File tree

cli/src/pixl_cli/_io.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,14 @@ def _load_csv(filepath: Path) -> pd.DataFrame:
9494
messages_df = pd.read_csv(filepath, header=0, dtype=str)
9595
messages_df = _map_columns(messages_df, MAP_CSV_TO_MESSAGE_KEYS)
9696
_raise_if_column_names_not_found(messages_df, [col.name for col in DF_COLUMNS])
97-
messages_df["series_uid"] = (
98-
messages_df.get("series_uid", pd.Series("")).replace(np.nan, "").str.strip()
97+
98+
if "series_uid" not in messages_df.columns:
99+
messages_df["series_uid"] = ""
100+
messages_df["series_uid"] = messages_df["series_uid"].replace(np.nan, "").str.strip()
101+
messages_df["accession_number"] = (
102+
messages_df["accession_number"].replace(np.nan, "").str.strip()
99103
)
104+
messages_df["study_uid"] = messages_df["study_uid"].replace(np.nan, "").str.strip()
100105
messages_df["pseudo_patient_id"] = messages_df["pseudo_patient_id"].replace(np.nan, None)
101106

102107
# Parse non string columns

pixl_imaging/src/pixl_imaging/_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ async def _get_missing_instances(
373373
logger.trace(
374374
"Instance {} is missing from study {}",
375375
sop_instance_uid,
376-
study.message.study_uid,
376+
str(study.message.study_uid),
377377
)
378378
missing_instances.append(uids_for_query)
379379

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Copyright (c) 2024 University College London Hospitals NHS Foundation Trust
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
project:
16+
name: "uclh-hic-hearing-health"
17+
modalities:
18+
- "CT"
19+
- "MR"
20+
21+
tag_operation_files:
22+
base:
23+
- "base.yaml"
24+
- "ct.yaml"
25+
- "mri.yaml"
26+
- "diffusion-weighted-mri.yaml"
27+
manufacturer_overrides: ["mri.yaml", "mri-diffusion.yaml"]
28+
29+
allowed_manufacturers:
30+
- regex: "^ge medical systems"
31+
exclude_series_numbers:
32+
- 1200
33+
- 1201
34+
- 1202
35+
- 1203
36+
- 1301
37+
- 1501
38+
- 1000
39+
- 9000
40+
- 1151418
41+
- regex: "afga"
42+
- regex: "siemens"
43+
- regex: "newtom"
44+
- regex: "toshiba"
45+
- regex: "morita"
46+
- regex: "fonar"
47+
- regex: "philips"
48+
- regex: "canon"
49+
exclude_series_numbers:
50+
- 9000
51+
52+
min_instances_per_series: 6
53+
54+
series_filters:
55+
- "localizer"
56+
- "localiser"
57+
- "scout"
58+
- "positioning"
59+
- "mip"
60+
- "fused"
61+
- "save"
62+
- "lungscreening result"
63+
- "key_images"
64+
- "color"
65+
- "casc"
66+
- "cascoring_docu_1"
67+
- "dose"
68+
- "patient protocol"
69+
- "enhancement curve"
70+
- "summary"
71+
- "report"
72+
- "medrad injection images"
73+
- "sectra reconstruction"
74+
- "impax volume viewing"
75+
- "evidence documents"
76+
- "export"
77+
78+
destination:
79+
dicom: "ftps"
80+
parquet: "ftps"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ dev = [
5555
"mypy==1.13.0",
5656
"pre-commit==4.0.1",
5757
"pytest==8.3.4",
58-
"ruff==0.8.3",
58+
"ruff>=0.11",
5959
"pytest-mock==3.14.0",
6060
"httpx==0.28.*",
6161
"pytest-asyncio==0.24.0",

uv.lock

Lines changed: 23 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)