added code to delete the posted data, now it clears the previously posted data when the patient/doctor becomes disconnected but it is not reflected on the UI yet.