After three weeks of testimony from more than two dozen witnesses, including medical experts, former patients and employes, the government brought its case against Dr. Robert J. Sherman to a close yesterday with a handwriting analyst who testified that portions of Sherman's records of his treatment of a 16-year-old patient had been forged and altered.

James T. Miller, chief of the D. C. police department's "Questioned Documents" division, told a D. C. Superior Court jury that in his opinion, the signatures of Rita McDowell and her mother, Lupe, had been forged on key documents that gave the length of Rita's pregnancy at the time she went to Sherman for an abortion on March 4, 1975.

The term of McDowell's pregnancy is crucial to the government's theory that Sherman routinely performed abortions on women in his clinic past the 12th week of pregnancy, in violation of medical standards. Those standards, according to the prosecution's evidence, say that such procedures at that time of pregnancy should be conducted in a hospital.

McDowell, who the government contends was 16 weeks pregnant, died at D.C. General Hospital four days after she visited Sherman's Columbia Family Planning Clinic, once located in Northwest Washington. Sherman is charged wth second degree murder in connection with her death, and 26 counts of perjury.

Miller's testimony was offered in support of the government's charge that Sherman attempted to cover up the circumstance of McDowell's death, in particular, the term of her pregnancy and her physical condition at the time he treated her.

Days after McDowell's death Sherman turned over his records on her to the city's chief deputy medical autopsy, according to earlier testimony. Miller told the jury yesterday that one of the records, with authentic signatures of Rita and Lupe McDowell, said that Rita McDowell was 16 weeks pregnant. He testified that a second record, also received by the medical examiner, said McDowell was 12 weeks pregnant and contained forged signatures.

Miller, a handwriting expert for 22 years, testified that he based his analysis on the style and momentum of the two women's authentic handwriting compared to the same characteristics of the "questioned" signatures.

Using a sketchboard in the courtroom, Miller explained to the jury that both Rita and Lupe McDowell were "good writers" whereas the forgeries showed "a poor degree of skill."

Miller, questioned by Principal Assistant U.S. Attorney Carl S. Rauh testified that dates on some of the records giving McDowell's term of pregnancy had been altered and that some additions had been made to some of the documents in connection with McDowell's physical condition.

During cross-examination by defense attorney Robert F. Muse, Miller testified that some of the alterations were "very crude and very apparent." He also testified that he did not have a sufficient sample of Sherman's handwriting for comparison to the documents. Miller also said he did not have handwriting samples from Sherman's former employees, some of whom testified earlier that they assisted Sherman in recreating McDowell's medical records after her death.

Miller was the final witness called for the government. Rauh told Judge Fred B. Ugast late yesterday that the prosecution would formally rest its case Monday morning. At that time, Ugast is expected to hear arguments on a defense motion for a judgement of acquittal, based on the contention that the government's evidence was insufficient to prove Sherman's guilt beyond a reasonable doubt - the standard in criminal cases. If the motion is denied, the defense will begin presentation of its evidence, which is expected to take about two weeks.

Earlier yesterday, the credit manager of a Baltimore surgical supply firm testified that Sherman visited his office in August 1976, asked for duplicate copies of invoices for purchases of instruments used in abortion procedures and then "placed $500 on my desk."

The government contends Sherman deliberately refused disposable instruments in order to cut costs at his clinic. Yesterday, Robert Lovell Jr. testified that when only five instrument invoices were found, Sherman asked him to "manufacture" additional invoices, but, Lovell said, he refused. Sherman then "tried to put a $100 bill in my pocket," Lovell testified. Lovell said he turned down all the offers of money and later reported the incident to his superiors.

During cross-examination, Lovell acknowledged that he told a federal grand jury last March that only two invoices were found and said he had "no recollection" that Sherman had offered the money as a payment for a search for existing invoices.