pacsretrieve/pacsretrieve.py
def retrieveMessageCopy_localPathDetermine(self, *args, **kwargs):
        """
        Determine the local path name based on seriesUID and directory
        template.
        """
        str_seriesUID   = ''
        b_status        = False
        d_ret           = {}
        str_path        = self.options.str_pullDirTemplate

        for k, v in kwargs.items():
            if k == 'seriesUID':   str_seriesUID    = v 

        if len(str_seriesUID):
            d_dicomTag_getCommand   = {
                'action':   'internalDB',
                'meta': {
                    'do':   'DICOMtagsGet',
                    'on': {
                        'series_uid':   str_seriesUID
                    }
                }
            }
            d_tags  = self.service_call(msg = d_dicomTag_getCommand)
            if d_tags['status']:
                d_dicom = d_tags['DICOMtagsGet']['d_dicom']
                for el in d_dicom.keys():
                    str_replaceTag  = '%%%s' % el
                    s               = d_dicom[el]
                    s               = re.sub(r'[^\w\s-]', '', s).strip()
                    s               = re.sub(r"\s+", '_', s)
                    str_path        = str_path.replace(str_replaceTag, s)
                b_status    = d_tags['status']

        return {
            'status':   b_status,
            'path':     str_path
        }

        Determine the local path name based on seriesUID and directory
        template.
        
Determine the local path name based on seriesUID and directory
template.
Determine the local path name based on seriesUID and directory template .
def retrieveMessageCopy_localPathDetermine(self, *args, **kwargs):
        str_seriesUID   = ''
        b_status        = False
        d_ret           = {}
        str_path        = self.options.str_pullDirTemplate
        for k, v in kwargs.items():
            if k == 'seriesUID':   str_seriesUID    = v 
        if len(str_seriesUID):
            d_dicomTag_getCommand   = {
                'action':   'internalDB',
                'meta': {
                    'do':   'DICOMtagsGet',
                    'on': {
                        'series_uid':   str_seriesUID
                    }
                }
            }
            d_tags  = self.service_call(msg = d_dicomTag_getCommand)
            if d_tags['status']:
                d_dicom = d_tags['DICOMtagsGet']['d_dicom']
                for el in d_dicom.keys():
                    str_replaceTag  = '%%%s' % el
                    s               = d_dicom[el]
                    s               = re.sub(r'[^\w\s-]', '', s).strip()
                    s               = re.sub(r"\s+", '_', s)
                    str_path        = str_path.replace(str_replaceTag, s)
                b_status    = d_tags['status']
        return {
            'status':   b_status,
            'path':     str_path
        }
def retrieveMessageCopy_localPathDetermine ( self , * args , ** kwargs ) : str_seriesUID = '' b_status = False d_ret = { } str_path = self . options . str_pullDirTemplate for k , v in kwargs . items ( ) : if k == 'seriesUID' : str_seriesUID = v if len ( str_seriesUID ) : d_dicomTag_getCommand = { 'action' : 'internalDB' , 'meta' : { 'do' : 'DICOMtagsGet' , 'on' : { 'series_uid' : str_seriesUID } } } d_tags = self . service_call ( msg = d_dicomTag_getCommand ) if d_tags [ 'status' ] : d_dicom = d_tags [ 'DICOMtagsGet' ] [ 'd_dicom' ] for el in d_dicom . keys ( ) : str_replaceTag = '%%%s' % el s = d_dicom [ el ] s = re . sub ( r'[^\w\s-]' , '' , s ) . strip ( ) s = re . sub ( r"\s+" , '_' , s ) str_path = str_path . replace ( str_replaceTag , s ) b_status = d_tags [ 'status' ] return { 'status' : b_status , 'path' : str_path }
Determine the local path name based on seriesUID and directory
template.
Determine the local path name based on seriesUID and directory template .
"""
        Determine the local path name based on seriesUID and directory
        template.
        """
self