-
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.
- Loading branch information
Showing
6 changed files
with
251 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
Patient Methods | ||
^^^^^^^^^^^^^^^ | ||
|
||
The :meth:`getPatients` method can provide insight to the | ||
patient metadata available in the NBIA database. | ||
|
||
.. automethod:: nbiatoolkit.NBIAClient.getPatients | ||
|
||
|
||
By default, the :meth:`getPatients` method will return all | ||
patients in the NBIA database. However, the method can be | ||
filtered by `Collection`. | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Python | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Get all patients | ||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
patients = client.getPatients() | ||
|
||
print(patients.head()) | ||
|
||
.. tab:: Filter by Collection | ||
|
||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
patients = client.getPatients(Collection = "TCGA-BLCA") | ||
|
||
print(patients.head()) | ||
|
||
|
||
For more granular filtering, the :meth:`getPatientsByCollectionAndModality` method | ||
can be used to filter by `Collection` **and** `Modality` as both are required. | ||
Unlike the :meth:`getPatients` method which returns additional metadata such as | ||
`SpeciesCode`, `SpeciesDescription`, `PatientSex`, and `EthnicGroup`, this method will | ||
only return a list of Patient IDs. | ||
|
||
.. automethod:: nbiatoolkit.NBIAClient.getPatientsByCollectionAndModality | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Python | ||
|
||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
patients = client.getPatientsByCollectionAndModality(Collection = "TCGA-BLCA", Modality = "MR") | ||
|
||
print(patients.head()) | ||
|
||
|
||
.. automethod:: nbiatoolkit.NBIAClient.getNewPatients | ||
|
||
The :meth:`getNewPatients` method can be used to retrieve a list of patients that | ||
have been added to the NBIA database within a specified time frame. | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Python | ||
|
||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
patients = client.getNewPatients( | ||
Collection="CMB-LCA", | ||
Date="2022/12/06", | ||
) | ||
|
||
print(patients.head()) |
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,53 @@ | ||
Series Methods | ||
^^^^^^^^^^^^^^ | ||
|
||
The :meth:`getSeries` method can provide insight to the available series | ||
in the NBIA database. | ||
|
||
.. automethod:: nbiatoolkit.NBIAClient.getSeries | ||
|
||
By default, the method will return all the series in the database. However, | ||
it can be filtered by the following parameters: | ||
|
||
- **Collection** | ||
- **PatientID** | ||
- **StudyInstanceUID** | ||
- **Modality** | ||
- **SeriesInstanceUID** | ||
- **BodyPartExamined** | ||
- **ManufacturerModelName** | ||
- **Manufacturer** | ||
|
||
The following examples demonstrate using the :meth:`getSeries`. | ||
|
||
.. tabs:: | ||
.. tab:: Python | ||
.. tabs:: | ||
.. tab:: Filter by Collection | ||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
series = client.Series( | ||
Collection = "TCGA-BLCA" | ||
) | ||
|
||
print(series.iloc[0]) | ||
|
||
.. tab:: Filter by Collection and PatientID | ||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
series = client.getSeries( | ||
Collection = "TCGA-BLCA", | ||
PatientID = "TCGA-G2-A2EK" | ||
) | ||
|
||
print(series.iloc[0]) |
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,50 @@ | ||
Studies Methods | ||
^^^^^^^^^^^^^^^ | ||
|
||
The :meth:`getStudies` method can provide insight to the available studies in the | ||
NBIA database. | ||
|
||
|
||
.. automethod:: nbiatoolkit.NBIAClient.getStudies | ||
|
||
By default, the method requires filtering by **Collection**, but can optionally | ||
be also filtered by **PatientID** and/or **StudyInstanceUID** as well. | ||
|
||
|
||
The following example demonstrates how to use the :meth:`getStudies` method to filter the studies by the collection name. | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Python | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Get all studies | ||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
studies = client.getStudies( | ||
Collection = "TCGA-BLCA" | ||
) | ||
|
||
print(studies.iloc[0]) | ||
|
||
.. tab:: Filter by Collection | ||
|
||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
studies = client.getStudies( | ||
Collection = "TCGA-BLCA", | ||
PatientID = "TCGA-G2-A2EK" | ||
) | ||
|
||
print(studies.iloc[0]) |
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