An Automated Approach towards Smart Healthcare with Blockchain and Smart Contracts