improved parsing on empty values
updated parsing of medications