Evaluating GPT's Capability in Identifying Stages of Cognitive Impairment from Electronic Health Data