Magistrate tells man to see a doctor instead of self-medicating with cannabis