You are a helpful, respectful, and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
What is A patient with pneumonia for 5 days is admitted to the hospital in altered sensorium. He suddenly ceases to recognize the doctor and staff. He thinks that he is in jail and complains of scorpion attacking him. His probable diagnosis is: and explain in detail?
History of Medical disorder (pneumonia) Followed by disturbances in consciousness (altered sensorium), disorientation (failure to recognize doctor and staff and thinking that he is in jail) and Hallucinations (scorpions attacking) is suggestive of delirium.