pacsifier.cli.add_karnak_tags module

Add private DICOM tags to several studies so that Karnak can de-identify them using provided patient codes and route them to the appropriate Kheops album.

pacsifier.cli.add_karnak_tags.get_parser() ArgumentParser[source]

Get parser object for command line arguments of the script.

pacsifier.cli.add_karnak_tags.main()[source]

Main function of the script that calls tag_all_dicoms_within_root_folder().

pacsifier.cli.add_karnak_tags.tag_all_dicoms_within_root_folder(data_path: str, new_ids: Dict[str, str], day_shift: Dict[str, str], album_name: str) None[source]

Tag all dicom images located at the datapath for Karnak, adding an album name and patientCode private tags.

Parameters:
  • data_path – path to the dicom images

  • new_ids – real:code mapping to be used after de-identifying the original ids

  • day_shift – day shift per patient

  • album_name – name of the Kheops album

pacsifier.cli.add_karnak_tags.tag_dicom_file(filename: str, patient_code: str, patient_shift: str, album_name: str) None[source]

Tag the dicom image located at filename by adding patient code and Kheops album name to private tags for subsequent de-identification.

Parameters:
  • filename – path to dicom image

  • patient_code – pseudonymous patient code

  • album_name – Kheops album name