John W. Hinckley Jr., filled with self-importance and showing no sympathy for his victims, talked about writing a book about his attack on President Reagan just three weeks after the shooting, a government psychiatrist testified yesterday.

Dr. Sally A.C. Johnson, who conducted 55 interviews with Hinckley in the three months after his arrest, told the jury that Hinckley tried to blame others for his actions.

She said Hinckley told her his parents were too strict, that neither they nor his hometown psychiatrist recognized he was "sick," that the Secret Service was lax in protecting Reagan and that the government was at fault for not imposing tough gun-control laws.

At the same time, Hinckley believed he would go down in the history for what he had done and "spend the rest of his life in a semispotlight," Johnson said. In addition to talking about a book, she said, Hinckley mentioned that his volume of mail was "just tremendous" and said his attorneys were pursued with requests for interviews with him.

Johnson said Hinckley told her one request came from ABC network news correspondent Barbara Walters, whom Hinckley called "Barbara WaWa."

Johnson said Hinckley said his name was being printed in thousands of newspapers, and went on to talk about his "shift from obscurity to notoriety." She said he told her he read and criticized many of the news accounts and that he believed some of the things they said about him were untrue, which "caused him to lose respect for some of the media."

Later in her testimony, Johnson said that when she talked to Hinckley about the shooting victims he showed "no remorse, sympathy or sorrow" for them and was unable to empathize with their feelings about the attack.

Johnson, who evaluated Hinckley's mental state while he was at a federal prison in North Carolina, said that two months after his arrest Hinckley staged a hunger strike, demanding that he be allowed to telephone actress Jodie Foster, whom he had pursued in the months before the shooting.

Johnson said Hinckley felt "people weren't taking him seriously enough" and was upset because his attorneys were not visiting him and the press coverage of his case had diminished. Hinckley, who had asked prison staff how long a person could last without food or drink, never stopped eating entirely and eventually gave up his effort after losing 10 pounds, Johnson testified.

During her testimony yesterday, Johnson began describing to the jury her diagnosis that Hinckley suffered from a personality disorder when he fired on Reagan outside the Washington Hilton Hotel on March 30, 1981. Johnson is expected to continue her testimony today at an unusual Saturday session in the trial, now at the end of its sixth week of testimony.

Johnson, on the witness stand for more than five hours yesterday, said Hinckley told her that he remembered firing three shots outside the Hilton before he was tackled by law enforcement officials. Hinckley said that as he was led from the scene "out of the corner of his eye" he saw someone on the ground, bleeding, whom he recognized was not Reagan, Johnson told the jury.

Johnson testified that Hinckley told her he said to himself "Oh, hell." When she asked him what he meant, Johnson said Hinckley told her "he hadn't intended to hurt anyone. . . . "

As Johnson described the scene to the jury, Hinckley sat at the defense table posing, making faces and mouthing words in the direction of a group of news artists who occupy a front row of the spectators gallery every trial day. Hinckley broke his stare, which went on for about 15 minutes, and lowered his head after defense lawyer Gregory B. Craig spoke with him.

Johnson, a staff psychiatrist at the federal correctional institution at Butner, N.C., undertook her examination of Hinckley after a federal judge ordered him sent there for evaluation.

Her report on Hinckley's mental state was submitted to the court in July 1981. Four months later, psychiatric experts retained by the prosecution and the defense each submitted separate reports to the court containing their evaluations of Hinckley's mental condition.

There has already been testimony that Johnson's findings concurred with the prosecution experts, who said Hinckley was not legally insane when he fired on the president and should be held criminally responsible for his acts.

At the outset of Johnson's testimony yesterday, Judge Barrington D. Parker ruled that the jury could not be told that Johnson had conducted the evaluation under a court appointment. The defense objected late Thursday when, as she opened her testimony, Johnson had briefly mentioned that appointment.

Hinckley's lawyers protested that the jury would place more significance on Johnson's testimony if it was presented as under the "neutrality of the court." The prosecution said in court papers that the "obvious significance" of Johnson's testimony was that unlike any of the opposing psychiatric experts, she conducted her examination for the court.

Johnson, who is testifying as a government witness, told the jury yesterday that she had "no relationship" with either the prosecution or the defense when she conducted her interviews with Hinckley. She said she considered her evaluation "independent" from the start.

Johnson testified that Hinckley alluded to Foster in his first interview with her and later described in detail how he sought Foster's attention with letters and phone calls, then stalked her with a gun in what Johnson said turned into a love and hate relationship after Foster rejected him.

The psychiatrist said Hinckley told her that he learned from his lawyers that the actress Helen Hayes had been talking to Foster in the aftermath of the shooting and that Hayes had telephoned Hinckley's lawyers to talk to them.

Hinckley said Hayes told them, "Jodie was going through a hard time now," Johnson testified.