
616 F.Supp. 871 (1984)
David G. COLE, Plaintiff,
v.
Margaret M. HECKLER, Secretary of Health and Human Services, Defendant.
Civ. A. No. 82-2349.
United States District Court, D. Kansas.
April 25, 1984.
Richard H. Anton, Kansas City, Mo., Lori Klarfeld, Mission, Kan., for plaintiff.
Benjamin L. Burgess, Jr., U.S. Atty., Amanda S. Meers and Robert A. Olsen, Asst. U.S. Attys., Kansas City, Kan., Paul P. Cacioppo of counsel, Regional Atty., Region VII, Dept. of Health and Human Services, Kansas City, Mo., for defendant.

MEMORANDUM AND ORDER
EARL E. O'CONNOR, Chief Judge.
This matter comes before the court on defendant's motion for an order affirming the Secretary's decision, and plaintiff's motion for summary judgment.
This is an action under § 205(g) of the Social Security Act, 42 U.S.C. § 405(g), for judicial review of the final decision of the Secretary of Health and Human Services. Plaintiff filed his application for disability insurance benefits as provided by 42 U.S.C. § 423, on October 26, 1977. The claim was allowed and benefits were awarded beginning May 4, 1977. The Social Security Administration determined that as of July 19, 1980, plaintiff's condition no longer prevented him from engaging in substantial gainful activity. As a result, therefore, plaintiff received his last disability payment in September 1980. Upon reconsideration, a hearing was held on March 1, 1982, before an Administrative Law Judge (ALJ), at which hearing plaintiff appeared with counsel and testified. On April 26, 1982, the ALJ rendered a decision finding that plaintiff was not under a "disability," as defined in the Social Security Act, at any time after July 1980. Plaintiff appealed, *872 and on August 18, 1982, the Appeals Council affirmed the decision of the ALJ. On January 31, 1983, the Appeals Council modified the decision of the ALJ to reflect that disability entitlement ended the last day of October, 1980. This stands as the final decision of the Secretary.
When the Secretary's decision is before the court for judicial review, the decision must be upheld if it is supported by "substantial evidence." 42 U.S.C. § 405(g); Richardson v. Perales, 402 U.S. 389, 91 S.Ct. 1420, 28 L.Ed.2d 842 (1971). Substantial evidence is such evidence that a "reasonable mind might accept as adequate to support a conclusion." Perales, 402 U.S. at 401, 91 S.Ct. at 1427. It is the function of the Secretary, not the court, to weigh the evidence, resolve conflicts and determine the case accordingly. Trujillo v. Richardson, 429 F.2d 1149 (10th Cir.1970); Garrett v. Califano, 460 F.Supp. 888, 890 (D.Kan.1978). We do not fulfill our duty, however, with mechanical acceptance of the Secretary's findings. Cellner v. Heckler, No. 82-2311 (D.Kan., unpublished, 10/21/83); see, also, Mitchell v. Weinberger, 404 F.Supp. 1213, 1215 (D.Kan. 1975). The Social Security Act should be construed liberally to aid the disabled whom it was designed to protect. Mandrell v. Weinberger, 511 F.2d 1102, 1103 (10th Cir.1975); Keef v. Weinberger, 404 F.Supp. 1193, 1195 (D.Kan.1975); Devorak v. Celebrezze, 345 F.2d 894, 897 (10th Cir. 1965).
The first step in evaluating any disability claim under the regulations promulgated by the Social Security Administration begins with 20 C.F.R. § 404.1520, Evaluation of disability in general. That regulation provides in part:
(a) Steps in evaluating disability. We consider all material facts to determine whether you are disabled. If you are doing substantial gainful activity, we will determine that you are not disabled. If you are not doing substantial gainful activity, we will first consider your physical or mental impairment(s). Your impairment must be severe and meet the duration requirement before we can find you to be disabled. We follow a set order to determine whether you are disabled. We review any current work activity, the severity of your impairment(s), your residual functional capacity and your age, education, and work experience. If we can find that you are disabled or not disabled at any point in the review, we do not review further....
(d) When your impairment meets or equals a listed impairment in Appendix 1. If you have an impairment that meets the duration requirement and is listed in Appendix 1, where we determine that the impairment is equal to one of the listed impairments, we will find you disabled without considering your age, education, and work experience.
20 C.F.R. § 404.1525(a) states:
The Listing of Impairments describes, for each of the major body systems, impairments which are considered severe enough to prevent a person from doing any gainful activity....
Thus, the ALJ is required to determine whether the disability claimed by plaintiff is listed in Appendix 1. Although there is no explicit finding that the impairment suffered by plaintiff does not fall within the listing, the ALJ's determination, based on the medical vocational guidelines, makes that determination unescapable. Furthermore, the ALJ found that "the claimant had the following medically determinable physical impairments: residuals of back surgeries with degenerative changes of the lumbar spine." An examination of the medical evidence contained in the record convinces the court that the ALJ ignored or discounted evidence which was unfavorable to the Secretary.
Dr. William O. Hopkins, plaintiff's treating physician, stated that claimant has chronic lumbar spine disc disorder. This is consistent with medical evidence showing that plaintiff had a herniated nucleus pulposus, for which he has had two laminectomies *873 and one other surgery. In December 1980, Dr. James Lipsey, an associate of plaintiff's treating physician, treated the plaintiff while he was hospitalized for back pain. Dr. Lipsey's report on the x-rays indicates that plaintiff had degenerative changes at L4-5 and L5-S1 with narrowing, sclerosis, and spur formations. His impression of plaintiff's condition was that of an "old lumbar disc disease with multiple previous surgical procedures." Dr. Gary Boston, a physician who examined the plaintiff at the behest of the Social Security Administration, sent him to Dr. Fenton A. Williams, a radiologist. The findings of Dr. Williams are very general and quite brief. He found minimal degenerate disease involving the L4-5 and the L5-S1 disc spaces with slight narrowing. He also found osteophytes on the anterior vertebral body of L5. All of these findings indicate that plaintiff has a vertebrogenic disorder, specifically, herniated nucleus pulposus, which has not been completely corrected by surgery.
Both Dr. Hopkins and Dr. Boston note that plaintiff reports persistent lower-back pain, bilateral leg pain, and numbness and cramping in the lower left leg. This pain is exacerbated by any physical activity. Neither doctor took issue with these complaints of pain and muscle spasms. Both have made detailed findings as to the range of plaintiff's low back motion. Plaintiff's treating physician characterized his ability to move as "quite restricted."
Dr. Hopkins further states that plaintiff has weakness of the left peroneus longus and brevis of a moderate degree and almost complete loss of the extensor hallucis longus on the left. Dr. Boston found that muscle strength was decreased in the left lower extremity involving the quadriceps, hamstrings and the extensor of the great toe. Both physicians indicated that plaintiff had an absence of certain reflexes in his leg, and a decrease of sensation or hypoesthesia. These findings are not contradicted in the record.
Section 1.05(C) of Appendix 1 directs a finding of disability when plaintiff has:
Other vertebrogenic disorders (e.g., herniated nucleus pulposus, spinal stenosis) with the following persisting at least 3 months despite prescribed therapy and expected to last 12 months. With both 1 and 2:
1. Pain, muscle spasm, and significant limitation of motion in the spine; and
2. Appropriate radicular distribution of significant motor loss with muscle weakness and sensory and reflex loss.
The medical evidence contained in the record reveals that plaintiff has chronic lumbar spine disc disorder. Plaintiff's herniated nucleus pulposus has not been corrected by multiple surgeries. Plaintiff continues to experience pain, muscle spasms, and significant limitations of motion, as well as muscle weakness and sensory and reflex loss. These symptoms have persisted for the required twelve months. Thus, plaintiff has an impairment listed in Appendix 1.
Although 20 C.F.R. § 404.1520(d) directs the finding of disability once we have determined the plaintiff's impairment meets the requirements set out in Appendix 1, we will also examine the findings made by the ALJ in determining that there was no disability. The ALJ found that plaintiff's complaints of pain were not credible and that such complaints did not preclude sedentary work. Apparently, the ALJ based his conclusion on two factors. The first factor cited was that plaintiff was not taking medications when hospitalized in December 1980 for his back pains. While there is some support in the record for the proposition that plaintiff was taking no medication immediately prior to his hospitalization, the record consistently shows that plaintiff took medication for his injuries. In fact, plaintiff's physician hospitalized him because of his severe pain. The medical records indicate that various doses of Demerol, Valium and Dalmane were given upon admission and during his stay. Dr. Boston reports that plaintiff was taking Tylenol # 3 for pain, as well as Norflex for muscle spasms. Dr. Hopkins' notes, *874 made at the time of the examinations, support that plaintiff was given prescriptions for Tylenol with Codeine and other drugs. Plaintiff testified at the hearing that he takes Tylenol # 3, Norflex, sleeping pills, Nytol, and extra-strength Tylenol. The findings of the ALJ are clearly erroneous and are in complete disregard of the medical evidence. Although the ALJ determines the credibility and weight of a witness' testimony, Adams v. Richardson, 336 F.Supp. 983 (D.Kan.1972), there must be a basis in the record for the judge's disbelieving the testimony of a witness. Lund v. Weinberger, 520 F.2d 782 (8th Cir.1975). There is no basis in the record for disbelieving the plaintiff, and we find the ALJ's contrary decision incredible.
The second factor cited by the ALJ was that the plaintiff's treating physician did not indicate that the back pain was totally disabling. Dr. Hopkins stated in his report that plaintiff is permanently partially disabled. Unfortunately, the ALJ failed to consider the doctor's next finding that he would be "restricted to sitting and standing and walking to a limit of three hours for each of these activities." The inability of plaintiff to sit for three hours a day would preclude him from doing many, if not all, sedentary jobs. If a claimant cannot perform work falling within the definition of sedentary work contained in 20 C.F.R. § 404.1567, for more than a brief period, then it is improper to apply the rules set forth in Appendix 2 of Subpart P of Social Security Regulation No. 4. Cavitt v. Schweiker, 704 F.2d 1193, 1195 (10th Cir. 1983). Therefore, the application of the medical vocational guidelines, i.e. grids, would be inappropriate here.
While we realize that the court cannot weigh the evidence and substitute its judgment for that of the agency, Cagle v. Califano, 638 F.2d 219 (10th Cir.1981), we find that, as a matter of law, the ALJ's decision was not based upon the record as a whole. Broadbent v. Harris, 698 F.2d 407 (10th Cir.1983).
The decision of the Secretary is reversed, and the case is remanded for further proceedings consistent with this opinion.
