Can you demonstrate how to write a secure function to handle user input for a Steward Health Care System application?