| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -36,7 +36,8 @@ class Formatters :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.parse = void()
 | 
					 | 
					 | 
					 | 
					        self.parse = void()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.parse.sv3 = self.sv3
 | 
					 | 
					 | 
					 | 
					        self.parse.sv3 = self.sv3
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.parse.sv2 = self.sv2
 | 
					 | 
					 | 
					 | 
					        self.parse.sv2 = self.sv2
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.sv2_parse = self.sv2
 | 
					 | 
					 | 
					 | 
					        self.sv2_parser = self.sv2
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        self.sv3_parser = self.sv3
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.sv3_parse = self.sv3
 | 
					 | 
					 | 
					 | 
					        self.sv3_parse = self.sv3
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.format_proc = self.procedure
 | 
					 | 
					 | 
					 | 
					        self.format_proc = self.procedure
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.format_diag = self.diagnosis
 | 
					 | 
					 | 
					 | 
					        self.format_diag = self.diagnosis
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -241,9 +242,11 @@ class Parser (Process):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        
 | 
					 | 
					 | 
					 | 
					        
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        # label = config['label'] if 'label' in config else None    
 | 
					 | 
					 | 
					 | 
					        # label = config['label'] if 'label' in config else None    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        handler = Formatters()
 | 
					 | 
					 | 
					 | 
					        handler = Formatters()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if 'map' not in config and hasattr(handler,config['apply']):
 | 
					 | 
					 | 
					 | 
					        if 'map' not in config and hasattr(handler,config['apply']):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					            
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            pointer = getattr(handler,config['apply'])
 | 
					 | 
					 | 
					 | 
					            pointer = getattr(handler,config['apply'])
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            object_value = pointer(row)            
 | 
					 | 
					 | 
					 | 
					            object_value = pointer(row)            
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return object_value
 | 
					 | 
					 | 
					 | 
					            return object_value
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        #
 | 
					 | 
					 | 
					 | 
					        #
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -355,8 +358,10 @@ class Parser (Process):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _cinfo   = util.get.config(self._custom_config[_code],row)
 | 
					 | 
					 | 
					 | 
					                _cinfo   = util.get.config(self._custom_config[_code],row)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else:
 | 
					 | 
					 | 
					 | 
					            else:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                _cinfo = {}
 | 
					 | 
					 | 
					 | 
					                _cinfo = {}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					            if 'SV3' in row :
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if _info :
 | 
					 | 
					 | 
					 | 
					                print (row)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                print (_info)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if _info or _cinfo:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                try:
 | 
					 | 
					 | 
					 | 
					                try:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    
 | 
					 | 
					 | 
					 | 
					                    
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -394,8 +399,8 @@ class Parser (Process):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    
 | 
					 | 
					 | 
					 | 
					                    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    pass
 | 
					 | 
					 | 
					 | 
					                    pass
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                except Exception as e :
 | 
					 | 
					 | 
					 | 
					                except Exception as e :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    
 | 
					 | 
					 | 
					 | 
					                    print (e.args[0])
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    print ('__',e.args)
 | 
					 | 
					 | 
					 | 
					                    # print ('__',(dir(e.args)))
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    pass
 | 
					 | 
					 | 
					 | 
					                    pass
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                
 | 
					 | 
					 | 
					 | 
					                
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return value if value else {}
 | 
					 | 
					 | 
					 | 
					        return value if value else {}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -464,6 +469,7 @@ class Parser (Process):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                row = row.replace('\r','')
 | 
					 | 
					 | 
					 | 
					                row = row.replace('\r','')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if not segment and not row.startswith(section):
 | 
					 | 
					 | 
					 | 
					                if not segment and not row.startswith(section):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _toprows += [row]
 | 
					 | 
					 | 
					 | 
					                    _toprows += [row]
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if row.startswith(section) and not segment:
 | 
					 | 
					 | 
					 | 
					                if row.startswith(section) and not segment:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    
 | 
					 | 
					 | 
					 | 
					                    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    segment = [row]
 | 
					 | 
					 | 
					 | 
					                    segment = [row]
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -479,6 +485,7 @@ class Parser (Process):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    #
 | 
					 | 
					 | 
					 | 
					                    #
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    # process the segment somewhere (create a thread maybe?)
 | 
					 | 
					 | 
					 | 
					                    # process the segment somewhere (create a thread maybe?)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    # 
 | 
					 | 
					 | 
					 | 
					                    # 
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    _claim = self.apply(segment,_code)
 | 
					 | 
					 | 
					 | 
					                    _claim = self.apply(segment,_code)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    
 | 
					 | 
					 | 
					 | 
					                    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if _claim :
 | 
					 | 
					 | 
					 | 
					                    if _claim :
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -496,7 +503,11 @@ class Parser (Process):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                
 | 
					 | 
					 | 
					 | 
					                
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                claim = self.apply(segment,_code)
 | 
					 | 
					 | 
					 | 
					                claim = self.apply(segment,_code)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if claim :
 | 
					 | 
					 | 
					 | 
					                if claim :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    claim['index'] = len(claims)
 | 
					 | 
					 | 
					 | 
					                    claim['index'] = len(claims)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    # for _row_ in _toprows :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                       
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    #     claim = jsonmerge.merge(claim,self.apply([_row_],_code))
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    claim = jsonmerge.merge(claim,self.apply(_toprows,_code))
 | 
					 | 
					 | 
					 | 
					                    claim = jsonmerge.merge(claim,self.apply(_toprows,_code))
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    claims.append(dict(DEFAULT_VALUE,**claim))
 | 
					 | 
					 | 
					 | 
					                    claims.append(dict(DEFAULT_VALUE,**claim))
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if type(file) != list :
 | 
					 | 
					 | 
					 | 
					            if type(file) != list :
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |