Algorithm 1. Text correction algorithm. |
INPUT: medical_text, map_path OUTPUT: standardized_medical_text VARIABLES ( DEF medical_text: a part of medical texts from electronic medical records DEF map_path: the path of a mapping database for text correction rules DEF standardized_medical_text: the standardized text returned to the platform DEF map: the mapping list read from map_path ) map = READ_DB(map_path) medical_text = REMOVE(medical_text, EMPTY_STR) medical_text = REMOVE(medical_text, LINE_WRAP_STR) FOR i = 0 TO LENGTH(map) medical_text = medical_text.REPLACE(map[i].original, map[i].replacement) END FOR standardized_medical_text = medical_text RETURN standardized_medical_text |