An automatic document processing system for medical data extraction