FILED
United States Court of Appeals
Tenth Circuit

April 18, 2007

Elisabeth A. Shumaker
Clerk of Court

UNITED STATES COURT OF APPEALS

FOR THE TENTH CIRCUIT

*TONY MADRID,

		Plaintiff‑Appellant,

v.

MICHAEL J. ASTRUE, Commissioner of the Social Security Administration,

		Defendant‑Appellee.	

No. 06-2235
(D.C. No. CIV-04-753-LCS)
(D. N.M.)	

ORDER AND JUDGMENT**

Before LUCERO, Circuit Judge, BRORBY, Senior Circuit Judge, and McCONNELL, Circuit Judge.

	Plaintiff Tony Madrid appeals from a district court order denying his motion for attorneys’ fees under the Equal Access to Justice Act (EAJA), 28 U.S.C. § 2412(d)(1)(A), based on its finding that the government’s position was substantially justified.  Because the district court acted within its discretion in making such a finding, we exercise our jurisdiction under 28 U.S.C. § 1291 to AFFIRM.
I.
	“The [EAJA] provides for the award of fees and expenses to the prevailing party in a civil action against the Federal Government, unless the position of the United States was substantially justified.”  Harris v. R.R. Ret. Bd., 990 F.2d 519, 520 (10th Cir. 1993) (quotations omitted).  The Supreme Court has held that a position is substantially justified for purposes of the EAJA if it is “justified in substance or in the main – that is, justified to a degree that could satisfy a reasonable person.”  Pierce v. Underwood, 487 U.S. 552, 565 (1988) (quotation omitted).  In other words, the government’s position must have had a reasonable basis both in law and fact.  See id.  
	Mr. Madrid claims he is entitled to attorneys’ fees under the EAJA because he was the prevailing party in an appeal of the Commissioner’s denial of his application for social security disability benefits.  He filed his application for benefits in December 2002, alleging an inability to work since September 2002 due to bilateral carpal tunnel syndrome and pain in his neck, shoulders, elbows, wrists, back, knees, ankles, and feet.  After his application was denied, Mr. Madrid obtained a de novo hearing before an administrative law judge (ALJ), at which he appeared pro se.  
	The ALJ denied the application because he concluded that despite being afflicted with severe ailments, Mr. Madrid retained the residual functional capacity to perform light work with certain limitations.  The ALJ stated that his decision was based on a careful consideration of all the evidence in the record.  Absent from the record, however, were the results of Mr. Madrid’s rheumatoid factor test, a test commonly used to diagnose rheumatoid arthritis.  The ALJ acknowledged that Mr. Madrid had submitted to a rheumatology work-up and even mentioned that “[t]here [was] a copy of a bill in the record, which indicate[d] that a rheumatoid factor test was performed.”  Aplt. App. at 15-16.  But the test results were not in the record, and the ALJ did not inquire into their whereabouts.  Nonetheless, he went on to conclude that Mr. Madrid did not suffer from any impairments included in the regulatory Listing of Impairments, including the listing for inflammatory arthritis. 
	Mr. Madrid unsuccessfully appealed the ALJ’s decision to the Appeals Council and the district court and then filed an appeal in this court.  We reversed, holding that under the circumstances of this case “the ALJ committed legal error by not requesting Mr. Madrid’s rheumatoid factor test results.”  Madrid v. Barnhart, 447 F.3d 788, 791 (10th Cir. 2006) (citing 20 C.F.R. § 404.1512(e)).  We explained, 
This failure is especially troubling because Mr. Madrid was not represented by counsel at his December 2003 administrative hearing, the test results were in existence at the time of the hearing and apparently available, and the ALJ was aware the test was performed.

Id.  We remanded the case for further development of the record concerning Mr. Madrid’s alleged rheumatological disorder, and Mr. Madrid filed a motion in the district court for attorneys’ fees as the prevailing party under the EAJA.
	The district court denied the motion because it found that the position pressed by the government had been substantially reasonable.  The court stated that an ALJ’s duty to develop the record “does not transform the A.L.J. into a pro se plaintiff’s advocate.”  Aplt. App. at 24 (citing Henrie v. H.H.S., 13 F.3d 359, 361 (10th Cir. 1993)).  And it reasoned that the ALJ had satisfied his duty of inquiry in this case by considering extensive testimony about the nature of Mr. Madrid’s impairments and their impact on his physical abilities.  The court further explained that disability determinations “turn on the functional consequences, not the causes, of a claimant’s condition, and the mere diagnosis of a medical condition, of course, says nothing about the severity of the condition.”  Id. (quotations and alterations omitted).  Accordingly, the court reasoned that even without the rheumatoid factor test results, reasonable minds could disagree as to whether Mr. Madrid could perform the essential functions of light work, as found by the ALJ.  Thus, it held the government was substantially justified in urging an affirmance of the ALJ’s decision and attorneys’ fees under the EAJA were not warranted.  
	Mr. Madrid then filed this appeal, arguing that the government’s position could not have been substantially justified because it urged affirmance of an ALJ decision that itself was based on the legal error of failing to develop the record.
II.
	We review the district court’s determination that the government’s position was substantially justified for an abuse of discretion.  Pierce, 487 U.S. at 559; Gilbert v. Shalala, 45 F.3d 1391, 1394 (10th Cir. 1995).  “An abuse of discretion occurs when the district court bases its ruling on an erroneous conclusion of law or relies on clearly erroneous fact findings,” Kiowa Indian Tribe of Okla. v. Hoover, 150 F.3d 1163, 1165 (10th Cir. 1998), or when the district court’s decision is “arbitrary, capricious or whimsical, or results in a manifestly unreasonable judgment,” Moothart v. Bell, 21 F.3d 1499, 1504-05 (10th Cir. 1994) (quotations omitted).  Our obligation is to “carefully scrutinize the district court’s exercise of its discretion, but we may not substitute our own judgment for that of the trial court.”  Kiowa Indian Tribe, 150 F.3d at 1165 (quotation and alteration omitted).  
	The district court did not abuse its discretion in this case.  Although, as we previously held, the ALJ erred in failing to request Mr. Madrid’s rheumatoid factor test results, the government’s position that the ALJ’s decision should nonetheless be sustained was not unreasonable in law or fact.  As the government points out, in assessing whether its position was substantially justified, courts must evaluate its position at the relevant time period during the litigation, not with the benefit of hindsight.  See Gonzales v. Free Speech Coal., 408 F.3d 613, 620 (9th Cir. 2005) (“[C]ourts need to guard against being subtly influenced by the familiar shortcomings of hindsight judgment.”) (quotation omitted).  In doing so, it is apparent that the government’s position, though ultimately incorrect, had a reasonable basis in law and fact.  The ALJ did consider the evidence before him, even if it was incomplete, and Mr. Madrid does not dispute the ALJ’s interpretation of the medical reports that were available.  Furthermore, the ALJ’s ultimate denial of Mr. Madrid’s application was based in part on Mr. Madrid’s own testimony, which the ALJ was uniquely positioned to accept or reject.  See Casias v. Sec’y of Health & Human Servs., 933 F.2d 799, 801 (10th Cir. 1991) (recognizing that the ALJ is “the individual optimally positioned to observe and assess witness credibility.”).

	Of course, the ALJ also considered the extent to which “Mr. Madrid’s statements of record concerning his symptoms, including pain . . . [could] reasonably be accepted as consistent with the objective medical evidence in the record.” Aplt. App. at 16.  This should have prompted the ALJ to ask for the results of a diagnostic test for rheumatoid arthritis given that Mr. Madrid’s chief complaint was joint pain.  And if our review were de novo, we might conclude that the government was not justified in pressing an affirmance given this failure.  It is not our task, however, to substitute our judgment for that of the district court.  Its decision was not clearly erroneous, arbitrary, capricious, or whimsical and does not result in manifest injustice.  Its judgment is therefore AFFIRMED.
				Entered for the Court

				Wade Brorby
				Senior Circuit Judge