refactored shared parser from allergies and problems