Studies Methods

The getStudies() method can provide insight to the available studies in the NBIA database.

NBIAClient.getStudies(Collection: str, PatientID: str = '', StudyInstanceUID: str = '', return_type: ReturnType | str | None = None) List[dict[Any, Any]] | DataFrame[source]

Retrieves studies from the NBIA API based on the specified parameters.

Parameters:
  • Collection (str) – The name of the collection to retrieve studies from.

  • PatientID (str, optional) – The patient ID to filter the studies by. Defaults to “”.

  • StudyInstanceUID (str, optional) – The study instance UID to filter the studies by. Defaults to “”.

  • return_type (Optional[Union[ReturnType, str]], optional) – The desired return type. Defaults to None.

Returns:

A list of dictionaries or a pandas DataFrame containing the retrieved studies.

Return type:

List[dict[Any, Any]] | pd.DataFrame

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 getStudies() method to filter the studies by the collection name.

with NBIAClient(return_type="dataframe") as client:
   studies = client.getStudies(
     Collection = "TCGA-BLCA"
 )

print(studies.iloc[0])
StudyInstanceUID                 1.3.6.1.4.1.14519.5.2.1.8421.4016.447463489999...
StudyDate                                                    2004-01-20 00:00:00.0
StudyDescription                                          CT ABDOMEN PELVIS W CONT
PatientAge                                                                    058Y
PatientID                                                             TCGA-CU-A3QU
PatientName                                                           TCGA-CU-A3QU
PatientSex                                                                       M
EthnicGroup                                                                      1
Collection                                                               TCGA-BLCA
SeriesCount                                                                      2
AdmittingDiagnosesDescription                                                  NaN
Name: 0, dtype: object