Skip to main content
. 2018 Feb 27;15(3):402. doi: 10.3390/ijerph15030402
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