Open sayan801 opened 7 years ago
Vitera - Vitera_CCDA_SMART_Sample.xml
======================================================================
ERROR: test_sample_ccda_files (__main__.CcdaDocumentTestCase)
Test all sample CCDA files in the testdata directory.
----------------------------------------------------------------------
Traceback (most recent call last):
File "ccda_test.py", line 33, in test_sample_ccda_files
self._test_to_message(fp)
File "ccda_test.py", line 22, in _test_to_message
ccda_message = ccda_doc.to_message()
File "/home/chandra/code/pyccda/pyccda/ccda.py", line 231, in to_message
doc.demographics.dob = self._tree.get_dob()
File "/home/chandra/code/pyccda/pyccda/ccda.py", line 90, in get_dob
return datetime.datetime.strptime(val, '%Y%M%d')
File "/usr/lib/python2.7/_strptime.py", line 335, in _strptime
data_string[found.end():])
ValueError: unconverted data remains: 010000
Traceback (most recent call last):
File "technicise.py", line 7, in
======================================================================
ERROR: test_sample_ccda_files (__main__.CcdaDocumentTestCase)
Test all sample CCDA files in the testdata directory.
----------------------------------------------------------------------
Traceback (most recent call last):
File "ccda_test.py", line 35, in test_sample_ccda_files
self._test_to_message(fp)
File "ccda_test.py", line 22, in _test_to_message
ccda_message = ccda_doc.to_message()
File "/home/chandra/code/pyccda/pyccda/ccda.py", line 244, in to_message
**self._tree.get_birthplace())
File "/home/chandra/code/pyccda/pyccda/ccda.py", line 123, in get_birthplace
'city': _get_val(addr_node, 'city'),
File "/home/chandra/code/pyccda/pyccda/ccda.py", line 86, in _get_value_of_child_by_tag_name
return parent_node.getElementsByTagName(tag_name)[0].firstChild.nodeValue
AttributeError: 'NoneType' object has no attribute 'nodeValue'
----------------------------------------------------------------------
======================================================================
ERROR: test_sample_ccda_files (__main__.CcdaDocumentTestCase)
Test all sample CCDA files in the testdata directory.
----------------------------------------------------------------------
Traceback (most recent call last):
File "ccda_test.py", line 35, in test_sample_ccda_files
self._test_to_message(fp)
File "ccda_test.py", line 22, in _test_to_message
ccda_message = ccda_doc.to_message()
File "/home/chandra/code/pyccda/pyccda/ccda.py", line 271, in to_message
lab_parent = self._tree.get_entries_by_template(Root.LAB)[0]
IndexError: list index out of range
----------------------------------------------------------------------
Ran 1 test in 3.757s
FAILED (errors=1)
Traceback (most recent call last):
File "technicise.py", line 7, in <module>
print ccda.to_csv()
File "/home/technicise4/Documents/Pythoncode/pyccda-master/pyccda/ccda.py", line 176, in to_csv
message = self.to_message()
File "/home/technicise4/Documents/Pythoncode/pyccda-master/pyccda/ccda.py", line 228, in to_message
immunization.date = CcdaTree.get_date_from_effective_time(entry)
File "/home/technicise4/Documents/Pythoncode/pyccda-master/pyccda/ccda.py", line 139, in get_date_from_effective_time
return cls.get_date_from_value(val)
File "/home/technicise4/Documents/Pythoncode/pyccda-master/pyccda/ccda.py", line 147, in get_date_from_value
return datetime.datetime.strptime(val, datetime_format)
UnboundLocalError: local variable 'datetime_format' referenced before assignment
======================================================================
ERROR: test_sample_ccda_files (__main__.CcdaDocumentTestCase)
Test all sample CCDA files in the testdata directory.
----------------------------------------------------------------------
Traceback (most recent call last):
File "ccda_test.py", line 35, in test_sample_ccda_files
self._test_to_message(fp)
File "ccda_test.py", line 22, in _test_to_message
ccda_message = ccda_doc.to_message()
File "/home/chandra/code/pyccda/pyccda/ccda.py", line 373, in to_message
vital_result.value = long(float(value_node.getAttribute('value')))
ValueError: could not convert string to float:
----------------------------------------------------------------------
Ran 1 test in 4.333s
FAILED (errors=1)
https://github.com/sayan801/sample_ccdas