Electronic compliance monitoring of topical treatment after ophthalmic surgery