refactor the code to parse component for classic prescription