pylantir 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pylantir-0.3.0.dist-info → pylantir-0.3.1.dist-info}/METADATA +14 -13
- {pylantir-0.3.0.dist-info → pylantir-0.3.1.dist-info}/RECORD +5 -5
- {pylantir-0.3.0.dist-info → pylantir-0.3.1.dist-info}/WHEEL +0 -0
- {pylantir-0.3.0.dist-info → pylantir-0.3.1.dist-info}/entry_points.txt +0 -0
- {pylantir-0.3.0.dist-info → pylantir-0.3.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pylantir
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Python - DICOM Modality WorkList with Optional API
|
|
5
5
|
Author-email: Milton Camacho <miltoncamachoicc@gmail.com>
|
|
6
6
|
Requires-Python: >=3.11.1
|
|
@@ -64,9 +64,9 @@ Provides-Extra: test
|
|
|
64
64
|
<img src="pylantir.png" alt="Pylantir" width="50%">
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
|
-
This project's goal is to significantly reduce the number of human-related errors when
|
|
67
|
+
This project's goal is to significantly reduce the number of human-related errors when manually registering participants for medical imaging procedures.
|
|
68
68
|
|
|
69
|
-
It effectively provides a python based DICOM Modality Worklist Server (SCP) and Modality Performed Procedure Step (SCP) able to receive requests from medical imaging
|
|
69
|
+
It effectively provides a python based DICOM Modality Worklist Server (SCP) and Modality Performed Procedure Step (SCP) able to receive requests from medical imaging equipment based on DICOM network communication (e.g., C-FIND, N-CREATE, N-SET requests).
|
|
70
70
|
|
|
71
71
|
It will build/update a database based on the information entered in the study-related REDCap database using a REDCap API (You will require to have API access to the study).
|
|
72
72
|
|
|
@@ -150,7 +150,7 @@ cd pylantir/tests
|
|
|
150
150
|
Query the worklist database to check that you have some entries using:
|
|
151
151
|
|
|
152
152
|
```bash
|
|
153
|
-
python
|
|
153
|
+
python tests/query_db.py
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
Then, you can get a StudyUID from one of the entries to test the MPPS workflow. For example: 1.2.840.10008.3.1.2.3.4.55635351412689303463019139483773956632
|
|
@@ -158,19 +158,19 @@ Then, you can get a StudyUID from one of the entries to test the MPPS workflow.
|
|
|
158
158
|
Take this and run a create action to mark the worklist Procedure Step Status as IN_PROGRESS
|
|
159
159
|
|
|
160
160
|
```bash
|
|
161
|
-
python
|
|
161
|
+
python tests/mpps_tester.py --AEtitle MWL_SERVER --mpps_action create --callingAEtitle MWL_TESTER --ip 127.0.0.1 --port 4242 --study_uid 1.2.840.10008.3.1.2.3.4.55635351412689303463019139483773956632
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
You can verify that this in fact modified your database re-running:
|
|
164
|
+
You can verify that this in fact modified your database by re-running:
|
|
165
165
|
|
|
166
166
|
```bash
|
|
167
|
-
python
|
|
167
|
+
python tests/query_db.py
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
Finally, you can also simulate the
|
|
170
|
+
Finally, you can also simulate the procedure completion, effectively updating the Procedure Step Status to COMPLETED or DISCONTINUED:
|
|
171
171
|
|
|
172
172
|
```bash
|
|
173
|
-
python
|
|
173
|
+
python tests/mpps_tester.py --AEtitle MWL_SERVER --mpps_action set --mpps_status COMPLETED --callingAEtitle MWL_TESTER --ip 127.0.0.1 --port 4242 --study_uid 1.2.840.10008.3.1.2.3.4.55635351412689303463019139483773956632 --sop_uid 1.2.840.10008.3.1.2.3.4.187176383255263644225774937658729238426
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
## Usage
|
|
@@ -281,7 +281,7 @@ The new configuration format uses a `data_sources` array to define one or more d
|
|
|
281
281
|
- **`config`**: Source-specific configuration
|
|
282
282
|
- For REDCap: `site_id`, `protocol`, and optional API credentials
|
|
283
283
|
- **`field_mapping`**: Maps source fields to DICOM worklist fields
|
|
284
|
-
- **`window_mode`** (Calpendo optional): `rolling` (default) or `
|
|
284
|
+
- **`window_mode`** (Calpendo optional): `rolling` (default) or `today`
|
|
285
285
|
- **`daily_window`** (Calpendo optional): `{"start_time": [h, m], "end_time": [h, m]}`
|
|
286
286
|
|
|
287
287
|
### Multiple Data Sources Example
|
|
@@ -432,7 +432,7 @@ export CALPENDO_PASSWORD=<your_calpendo_password>
|
|
|
432
432
|
- **`timezone`** (optional, default: `"America/Edmonton"`): Timezone for booking timestamps
|
|
433
433
|
- **`resource_modality_mapping`** (optional): Map resource names to DICOM modality codes
|
|
434
434
|
- **`field_mapping`** (at data source root): Maps Calpendo fields to worklist fields
|
|
435
|
-
- **`window_mode`** (optional): `rolling` (default) or `
|
|
435
|
+
- **`window_mode`** (optional): `rolling` (default) or `today`
|
|
436
436
|
- **`daily_window`** (optional): `{"start_time": [h, m], "end_time": [h, m]}`
|
|
437
437
|
- Use **`_extract`** for regex-based field extraction:
|
|
438
438
|
- **`pattern`**: Regular expression pattern (use `\\` for escaping in JSON)
|
|
@@ -488,6 +488,7 @@ Common patterns for extracting information from Calpendo booking titles:
|
|
|
488
488
|
### Workflow Notes
|
|
489
489
|
|
|
490
490
|
- MPPS status updates are owned by N-CREATE/N-SET; sync operations do not overwrite existing `performed_procedure_step_status` values.
|
|
491
|
+
- Calpendo booking times are interpreted in the configured local timezone and stored in the legacy formats `YYYY-MM-DD` (date) and `HH:MM` (time).
|
|
491
492
|
|
|
492
493
|
For more details, see the [Calpendo plugin quickstart](specs/002-calpendo-plugin/quickstart.md).
|
|
493
494
|
|
|
@@ -544,7 +545,7 @@ This is particularly useful for production deployments with frequent synchroniza
|
|
|
544
545
|
|
|
545
546
|
## FastAPI REST API (Optional)
|
|
546
547
|
|
|
547
|
-
|
|
548
|
+
Pylantir now includes an optional REST API for programmatic access to worklist data and user management.
|
|
548
549
|
|
|
549
550
|
### Installation with API Support
|
|
550
551
|
|
|
@@ -862,7 +863,7 @@ Control Cross-Origin Resource Sharing (CORS) for web frontend integration:
|
|
|
862
863
|
|
|
863
864
|
## Clean Stop of the MWL and Database Sync
|
|
864
865
|
|
|
865
|
-
To cleanly stop the MWL server and ensure the database
|
|
866
|
+
To cleanly stop the MWL server and ensure the database synchronization properly, press `Ctrl + C` (you might need to press it twice).
|
|
866
867
|
|
|
867
868
|
To stop the API server, use `Ctrl + C` in the terminal where it's running.
|
|
868
869
|
|
|
@@ -18,8 +18,8 @@ pylantir/data_sources/__init__.py,sha256=g9ishvpYxbE8rQjJwHHoAaCRNDcwJ1w0SIYmn8W
|
|
|
18
18
|
pylantir/data_sources/base.py,sha256=eOc2jo7RxYnkEdAttPHJ2o4LI3t9NdT22NXsFN9OEOg,3600
|
|
19
19
|
pylantir/data_sources/calpendo_plugin.py,sha256=tVPwFwK_38_tdgWjvh9LNmnjTaiygQqECD5jdjo0VVQ,27709
|
|
20
20
|
pylantir/data_sources/redcap_plugin.py,sha256=BEw85cz8DhF8VqZIENQ8ZDF5IB1lg1UYB6BqEIzwqbk,12816
|
|
21
|
-
pylantir-0.3.
|
|
22
|
-
pylantir-0.3.
|
|
23
|
-
pylantir-0.3.
|
|
24
|
-
pylantir-0.3.
|
|
25
|
-
pylantir-0.3.
|
|
21
|
+
pylantir-0.3.1.dist-info/entry_points.txt,sha256=vxaxvfGppLqRt9_4sqNDdP6b2jlgpcHIwP7UQfrM1T0,50
|
|
22
|
+
pylantir-0.3.1.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
|
|
23
|
+
pylantir-0.3.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
24
|
+
pylantir-0.3.1.dist-info/METADATA,sha256=XxmcpTSHgCZo8hTYUIIFVuAxMGbpWanlTcrr4aTh15o,28376
|
|
25
|
+
pylantir-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|