Extract method to parse prescription state