(self, diag, category_record, parent_record=None)
It processes a ``diag`` XML node
It processes a ``diag`` XML node
It processes a diag XML node
def _icd10_process_diag(self, diag, category_record, parent_record=None):
        """ It processes a ``diag`` XML node """
        self.ensure_one()
        note = '\n'.join(
            self.__get_el_text_array(diag.find('inclusionTerm')),
        )
        pathology = self._upsert_pathology(
            name=diag.find('desc').text.strip(),
            code=diag.find('name').text.strip(),
            category=category_record,
            code_type=self.code_type_id,
            parent=parent_record,
            note=note,
            id_pref=self.ICD10_XML_PREFIX,
        )
        for child_diag in diag.iterfind('diag'):
            self._icd10_process_diag(child_diag, category_record, pathology)
def _icd10_process_diag ( self , diag , category_record , parent_record = None ) : self . ensure_one ( ) note = '\n' . join ( self . __get_el_text_array ( diag . find ( 'inclusionTerm' ) ) , ) pathology = self . _upsert_pathology ( name = diag . find ( 'desc' ) . text . strip ( ) , code = diag . find ( 'name' ) . text . strip ( ) , category = category_record , code_type = self . code_type_id , parent = parent_record , note = note , id_pref = self . ICD10_XML_PREFIX , ) for child_diag in diag . iterfind ( 'diag' ) : self . _icd10_process_diag ( child_diag , category_record , pathology )