Author Kobo Abe and practicing medicine

In the biographical sections of many of his novels, it states vaguely that Kobo Abe graduated from Medical School “under the agreement that he would never practice medicine”. Looking online briefly now some websites say he just did not enjoy medicine and never practiced it because he preferred writing.

Is it even possible to graduate from medical school in Japan “as long as you agree not to practice medicine”? That obviously wouldn’t fly in the U.S. but I can see in a different culture the possibility. If so, was this a handshake, a contractual thing or what?