pacsifier.cli.extract_carestream_report module
Script to extract plain text from Carestream radiology reports in SR.
- pacsifier.cli.extract_carestream_report.extract_txt_report(data_folder: str) None[source]
This function loops over a BIDS-like (Brain Imaging Data Structure) dataset.
If some SRc files are found, it converts them to txt files and saves them in the same directory.
Note
The function assumes that each subject is stored as
~/.../sub-XXXXXX/ses-YYYYYYYYYYYYY/00001-CarestreamPACSReports/ SRc.x.x.x.- Parameters:
data_folder (str) – path to BIDS-like dataset
- pacsifier.cli.extract_carestream_report.get_parser() ArgumentParser[source]
Get parser object for command line arguments of the script.
Note
It is assumed that each subject is stored as
~/.../sub-XXXXXX/ses-YYYYYYYYYYYYY/00001-CarestreamPACSReports.
- pacsifier.cli.extract_carestream_report.main()[source]
Main function of the script that calls
extract_txt_report().
- pacsifier.cli.extract_carestream_report.replace_special_char_combinations(input_report, print_clean_report=False) str[source]
This function corrects encoding errors that occur in the reports.
- Parameters:
input_report (str) – report that needs to be cleaned
print_clean_report (bool) – whether we want to print the cleaned report
- Returns:
clean report without encoding errors
- Return type:
cleaned_report (str)