This story has been updated.

The first time Matthew Moore, 46, saw Elaine Jones, it was for a routine checkup in April 2013. Tests revealed that he was vitamin B-12 deficient, had high blood pressure and high cholesterol.

Apparently he also suffered from “homosexual behavior.” It was listed as a “chronic condition” on his medical records.

Now Moore, of Los Angeles, is suing his doctor and health-care network for intentional infliction of emotional distress and libel.

Moore told NBC he was shocked to see the diagnosis on both his medical records and patient plan when he returned to Jones’s office in Torrance, Calif., to discuss the results of his physical.

“My jaw was on the floor. At first, I kind of laughed, I thought, ‘Here’s another way that gay people are lessened and made to feel less-than,’ and then as I thought about it and as I dealt with it, it angered me,” Moore said.

Moore also said Jones defended the diagnosis by saying that whether homosexuality is a disease is still a subject of debate within the medical community.

Actually, homosexuality hasn’t been classified as a mental illness since 1973. It was listed as a “sociopathic personality disturbance” in the Diagnostic and Statistical Manual of Mental Disorders (DSM) in the first edition in 1953 before being recast as “sexual deviation” in 1968. Ultimately the American Psychiatric Association agreed that being gay wasn’t a mental illness and removed it from the DSM.

After Moore complained to Jones’s employer, they promised to remove the diagnosis from his records. He got this apology from Torrance Health Association senior director Heidi Assigal: “We would like to unequivocally state that the Torrance Memorial Physician Network does not view homosexuality as a disease or a chronic condition, and we do not endorse or approve of the use of Code 302.0 as a diagnosis for homosexuality.”

Moore’s diagnosis of “homosexual behavior” was coded 302.0 on his medical records — the code for “ego-dystonic sexual orientation” in the 9th edition of the International Classification of Diseases (ICD), a coding system used for medical billing and record-keeping purposes. The 9th edition of the ICD dates back to 1979 but is still widely used in the United States today.

Before it was removed from the DSM in 1987, ego-dystonic homosexuality was defined as: (1) a persistent lack of heterosexual arousal, which the patient experienced as interfering with initiation or maintenance of wanted heterosexual relationships, and (2) persistent distress from a sustained pattern of unwanted homosexual arousal.

Basically, it describes a person who is unhappy with their sexual orientation.

“I never said I had an issue with my sexuality,” Moore told NBC.

In a media statement obtained by NBC last year, the association said the diagnosis code was a result of “human error” and claimed that “upon notification by the patient the record was corrected.”

But a year later, the offending diagnosis was still there. In May, Moore got a copy of his medical records. The code 302.0 had been removed, but “homosexual behavior” was still listed, this time as a “chronic problem” rather than “chronic condition.” He was later given a second copy of his records with the reference removed.

Jones filed suit in July against Jones, her network and the Torrance Health Association. Moore accuses the health-care providers of conduct that “went beyond all bounds of that which is usually tolerated in this enlightened community.” He seeks punitive and compensatory damages in yet-to-be determined amounts.

“I don’t want any gay, lesbian, transgender or bisexual ever to hear from a doctor that their normal and healthy sexuality is anything other than that,” Moore told NBC, noting the number of suicides among LGBT youth is higher than among other groups.

Last week the health-care providers filed a motion to strike, saying Moore’s allegations are “vague and ambiguous” and not supported by the facts.

In a statement provided to NBC News on Monday, the Torrance Memorial Physicians Network said employees made “every effort” to remove the information from Moore’s records.

“Due to the highly complex software used in creating an electronic medical record, the incorrect code continued to exist in an electronic table only,” it said. “As a result, this incorrect diagnosis code was included on a paper copy of the record, which was provided only to the patient.”

Shane Snowdon, who heads the Human Rights Campaign Foundation’s health and aging program, told NBC Moore’s situation is not unusual.

“Unfortunately, this kind of ignorance and bias is still all too common among health professionals,” she said. “This incident underlines the importance of our ongoing efforts to educate healthcare providers about knowledgeable, respectful treatment of LGBT Americans. When we consult a physician, we have a right to expect care uncontaminated by personal prejudice.”