-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BAC-9366: Docs data validation Squashed commit of the following: commit 1214b4c19cdefb9ff225c876a4892ff706cea59e Author: Jeroen Pinxten <jeroen.pinxten@icometrix.com> Date: Wed Jun 19 17:18:46 2024 +0200 BAC-9366: data validation docs commit c54ac15fb08952bcc8ea949a5f120bea22173308 Author: Jeroen Pinxten <jeroen.pinxten@icometrix.com> Date: Wed Jun 19 16:59:48 2024 +0200 BAC-9366: data validation examples
- Loading branch information
Showing
9 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Data validation | ||
=============== | ||
|
||
Validating imported data | ||
------------------------ | ||
|
||
.. code-block:: python | ||
from icometrix_sdk import IcometrixApi | ||
PROJECT_ID = "<your-project-uuid>" | ||
# A directory containing your DICOM files | ||
DICOM_DIR_PATH = "..." | ||
# Initialize the icometrix API | ||
ico_api = IcometrixApi() | ||
# Get the project, to make sure its there (will throw a 404 in case the project is not found) | ||
project = ico_api.projects.get_one_by_id(PROJECT_ID) | ||
# Upload a directory of DICOMs | ||
data = StartUploadDto(icobrain_report_type="icobrain_ms") | ||
upload = ico_api.uploads.upload_dicom_dir(PROJECT_ID, DICOM_DIR_PATH, data) | ||
# Wait for data to be imported | ||
upload = ico_api.uploads.wait_for_data_import(upload.folder_uri) | ||
# Get imported studies | ||
studies_in_upload = ico_api.uploads.get_studies_for_upload(upload_folder_uri=upload.folder_uri) | ||
for uploaded_study in studies_in_upload: | ||
study = ico_api.studies.get_one(uploaded_study.project_id, uploaded_study.patient_id, uploaded_study.study_id) | ||
# Add some validation logic for each study e.g. find series | ||
series = ico_api.series.get_all_for_study(study.uri) | ||
# ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ Developer Guide | |
session | ||
models | ||
anonymization | ||
data_validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ Models | |
user | ||
project | ||
patient | ||
study | ||
series | ||
upload | ||
customer_result | ||
customer_report | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Series | ||
====== | ||
|
||
.. automodule:: icometrix_sdk.models.series_entity | ||
:members: | ||
:undoc-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Study | ||
===== | ||
|
||
.. automodule:: icometrix_sdk.models.study_entity | ||
:members: | ||
:undoc-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ Resources | |
profile | ||
projects | ||
patients | ||
studies | ||
series | ||
uploads | ||
customer_results | ||
customer_reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Series | ||
====== | ||
|
||
.. automodule:: icometrix_sdk.resources.series | ||
|
||
.. autoclass:: icometrix_sdk.resources.series.Series | ||
:members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Studies | ||
======= | ||
|
||
.. automodule:: icometrix_sdk.resources.studies | ||
|
||
.. autoclass:: icometrix_sdk.resources.studies.Studies | ||
:members: | ||
:show-inheritance: |