Individuals should be allowed unrestricted access to their medical records except in cases where a psychiatrist feels the information would harm the patient. If the patient perists, the matter should be decided by a court.

This is the most controversial recommendation of a two-year study of medical record keeping and the safe-guarding of citizens' right to privacy. The $130,000 study, made public yesterday by the National Bureau of Standards, was directed by Alan F. Westin, professor of law at Columbia University and an expert in privacy issues. It is believed to be the first indepth study on the subject by a government agency.

Besides advocating fuller access to an individual's own medical records, the Westin report recommends that access by third parties, such as insurance companies, courts, the media and social researchers, be limited to safe-guard individual privacy. The report's main focus is on records kept in computerized data banks.

Westin said at a press conference here he had not found any examples of malicious use of computerized medical information. "It is much easier to bribe a hospital employee to get [manual] records than it is to tap into a computer," he said. However, he noted that 10 years ago experts were unaware that stealing money by computer would become a problem, so it is timely to seek remedies to prevent, so it abuses now that manual records are increasingly being transferred to computerized records and before a national health system is set up.

The bureau's study, intended as voluntary guidelines for running health data systems an as the basis for possible future privacy legislation, also recommends that only relevant information be collected, disseminated, and retained.

He cited cases where women found their records still contained letters testifying to their mental instability many years after they were forced to use this ruse to obtain abortions. Parents who fear that a record of psychiatric treatment on a child's record can prevent him in later years from getting a job either forego seeking help or pay the costs themselves to avoid any trace of it on insurance records.

Insurance companies, Westin observed, habitually inquire about individuals' sex preferences while life insurance policies are issued on the grounds that homosexuals tend to die earlier and committ suicide more frequently than heterosexuals.

Stripping personal identification out of data circulated to third parties is the "greatest key" to safeguarding privacy in Westin's opinion. Last year the Supreme Court ruled that persons could have "no legitimate expectation of Privacy" in bank transactions because their records belong to the bank. There has been no ruling on medical records.

The study also recommends that individuals be given advance notice of the uses to which their personal information will be put and that they be able to correct mistakes.

The study recommends that health data systems - the computerized banks of medical information on individuals used by hospitals, insurance companies and corporate medical plans - be set up with privacy safe-guards. New system would be subject to review by an outside authority, such as a state health commission and public hearings would be held. Existing systems would be reviewed periodically by independent authorities to make sure they uphold privacy principles.

But it is in the area of doctor-patient relationships that the study is most controversial. "We're no longer in the days of Marcus Welby and Dr. Kildare." Westin observed, "Medical care today is an impersonal system involving many specialist and institutiions. It's an antiquated notion that any doctor alone knows all about his patient." "Therfore, Westin believes records should be made available to the patient on request, even if it takes a court order.

Asked about the interposition of judge between doctor and patient. Dr. Alfred M. Freedman, a past president of the Ameican Psychiatric Association and currently chairman of the National Commission on Confidentiality of Health Records, commented: Courts should always be a last resort. A court procedure is complicated and cumbersome, and precipitates an adversary relationship between the patient and the psychiatrist which might disrupt the therapeutic process."