patientImagingCRDP
-
class
PDCP.
patientImagingCRDP
(codesconfig=None) Bases:
PDCP.patientImaging
This class was used to collect and process datasets where connections between CT, RTSTRUCTS,RTDOSES, PLANS are required.
Methods Summary
generate_patients_data
(firstversion)A function that collects a set of patients required and verified files (CT slices, rt structs, etc.) from the orthanc server.
verify_study
(df, notes[, modality])Within this function, the links between different modalities are identified to find connections.
Methods Documentation
-
generate_patients_data
(firstversion) A function that collects a set of patients required and verified files (CT slices, rt structs, etc.) from the orthanc server.
- Parameters
orthanc_ids (list) – a list of orthanc ids
patients_ids (list) – a list of patient ids
- Returns
pids (list) – the patient ids
comments (list) – a list of the patients comments (_SUCCESS, _ERROR, or _PATIENTIMAGESNOTFOUND)
-
verify_study
(df, notes, modality='CT') Within this function, the links between different modalities are identified to find connections. It is expected that each CT will have associated RTSTRUCTS which will also have associated RTPLAN (SOPinstanceUID), which will also have links to the RTDOSES. By finding these links, we try to remove any unused RTDOSES, RTSTRUCTS, CTs
To do that, the CT SeriesInstanceUID links to the RTSTRUCT through the tag: ReferencedFrameOfReferenceSequence – > SeriesInstanceUID The RTSTRUCT SOPInstanceUID links to RTPLAN instances through the tag: ReferencedStructureSetSequence –> ReferencedSOPInstanceUID The RTDOSE SOPInstanceUID links to the RTPLAN instances through the tag: ReferencedRTPlanSequence –>
By that, it is assumed that the modalities, files used in treatment will be all connected.
Any study with no connections will be discarded. Any study with multiple connections will be discarded
- Parameters
df (Pandas dataframe) – a dataframe with the patient imaging records
notes (list) – a list that contians the notes, and is used to append new notes while verifying the patient files.
- Returns
list_of_values (list of dicts) – A list of dictionaries that contain the details of associations between studies objects.
notes (list) – list of notes appended while verifying the patient’s imaging files.
-