
517 A.2d 310 (1986)
In the Matter of Amelia SCOTT, Appellant.
No. 85-492.
District of Columbia Court of Appeals.
Argued August 19, 1986.
Decided November 13, 1986.
*311 James Thomas Maloney, Washington, D.C., for appellant.
William A. Bradford, Jr., Washington, D.C., appointed by this court, as amicus curiae.
Mary Ellen Abrecht, Asst. U.S. Atty., with whom Joseph E. diGenova, U.S. Atty., and Michael W. Farrell, Asst. U.S. Atty., Washington, D.C., were on brief, entered an appearance for amicus curiae United States.
Before NEBEKER, MACK and ROGERS, Associate Judges.
ROGERS, Associate Judge:
Appellant Amelia Scott challenges an order of civil contempt issued against her by the Honorable Rufus King III, for refusing to undergo a urinalysis test based on her demeanor during her testimony as a government witness at a criminal trial. She contends that because the court's power to punish for contempt is limited to situations where an individual has acted with willful disobedience and obstructed the orderly administration of justice, and because Judge King made no finding of incompetency, he acted outside the scope of his authority in this case. Amicus curiae, in addition to responding to the merits of Scott's contention, argues that she was not entitled to disobey the judge's order due to the availability of an expedited review under D.C. App. R. 4(c). We hold that Officer Scott was not entitled to disobey the contempt order because she never sought a stay or an expedited appeal of the order; accordingly, we affirm.

I
On March 12, 1985, Metropolitan Police Officer Amelia Scott was called to appear as a witness in United States v. Michael Savoy (Crim. No. M 14790-84), in order to relate the circumstances of the arrest and to identify several pictures taken at the area by a crime scene search officer. After being called to testify, she sat in the witness chair and had to be asked twice to stand to be sworn. According to Judge King, she testified lethargically. At times she did not respond to questions until the third time asked, but on the whole she testified coherently and responsively. At the conclusion of her testimony, the judge called a bench conference to express his concern about the witness, stating:
Counsel, I'm very concerned that this officer is on something. She came in here disoriented and she was snorting, sniffing, and she's got cotton in her ears. I don't profess to be an expert but that's an extremely serious appearance for the entire administration of justice in this city, at a time when there's great pressure in tough law enforcement efforts, in which this Court is participating, controlling drugs.
* * * * * *

*312 I don't know whether it affects her testimony in this case, but it's so coercive [sic] to the entire administration of justice.
The prosecutor suggested that the proper procedure for dealing with questions about the appearance of officers in court was to talk to the officer and to officials of the police department's Court Liaison Division. The judge debated whether he had jurisdiction to send the officer to the Pretrial Services Agency or whether he should conduct a voir dire examination "to find out what she's doing." The bench conference ended without resolution of the judge's concern and the trial proceeded. After lunch, the judge reiterated his reasons for believing that Officer Scott had been using drugs, because she had been in "an evident stupor," "barely able to walk," acting in "a very slow and semiconscious way" when asked to stand to be sworn, and was "snorting or sniffing" and appeared to have watery eyes. He stated that his concern stemmed not from the competency of this witness' testimony in the Savoy case, but that "twelve jurors are going to take out of here, that that Court system is so haywire that they let doped-up police officers present cases for the Government."[1]
The prosecutor suggested that counsel be appointed to represent Officer Scott and that the judge briefly voir dire her because Scott had explained to the prosecutor that she had an ear infection and had cotton in one ear which was possibly causing a hearing problem as well as an imbalance problem. In addition, she had had only two hours' sleep the night before. The judge permitted Scott to obtain counsel but rejected the idea of a voir dire, because the judge thought that if Scott were on drugs she would undoubtedly try to hide the fact, and that drug testing was the only "immediate, clear way to get the answer." Scott refused to give a urine sample, and the judge signed an order directing her to report to the Pretrial Services Agency for urinalysis and imposed a civil contempt order to compel compliance.[2] The judge also announced that he would strike Scott's testimony from the Savoy trial and finish the trial without her. The next morning, however, the judge granted Savoy's motion for a mistrial.

II
If the trial judge has jurisdiction over the subject matter and the parties before it, an individual has an obligation to comply with an order issued by the court or to seek to have the order vacated. Walker v. City of Birmingham, 388 U.S. 307, 320-21, 87 S.Ct. 1824, 1831-32, 18 L.Ed.2d 1210 (1967); United States v. United Mine Workers, 330 U.S. 258, 293, 67 S.Ct. 677, 695, 91 L.Ed. 884 (1947); In re Marshall, 445 A.2d 5 (D.C.1982) (because court had jurisdiction over subject matter of appointing counsel in child neglect proceeding, attorney had to comply with court order appointing him or to seek to have order vacated even if order was invalid). In Walker, the Supreme Court stated that in a case where an injunction was not "transparently invalid or had only a frivolous pretense to validity," (i.e., was voidable but not void), 388 U.S. at 315, 87 S.Ct. at 1829, the proper *313 procedure was to seek to modify or dissolve the injunction in a timely fashion before disobeying it. Id. at 318, 87 S.Ct. at 1830. Because the injunction in Walker barred petitioners from demonstrating without a permit and would have prohibited a march planned for Good Friday, two days from the time the injunction was issued, the court reassured:
This case would arise in quite a different constitutional posture if the petitioners, before disobeying the injunction, had challenged it in the Alabama courts, and had been met with delay or frustration of their constitutional claims. But there is no showing that such would have been the fate of a timely motion to modify or dissolve the injunction. There was an interim of two days between the issuance of the injunction and the Good Friday march. The petitioners give absolutely no explanation of why they did not make some application to the state court during that period. The injunction had issued ex parte; if the court had been presented with the petitioners' contentions, it might well have dissolved or at least modified its order in some respects. If it had not done so, Alabama procedure would have provided for an expedited process of appellate review.
Id. at 318-19, 87 S.Ct. at 1830-31.
In the instant case, Scott concedes not only that the trial judge had jurisdiction over the criminal proceedings in the Savoy case pending before him and had the ability to punish for contempt in that context, but also that a civil contempt order to supply a urine sample would have been appropriate if the judge had had probable cause to believe a criminal contempt had been committed in his presence.[3] We agree Judge King had jurisdiction to issue a contempt order such as he did, even if, as Scott and the government contend, his order may have been erroneous given the set of facts presented to him. Accordingly, Officer Scott "could not bypass orderly judicial review of [the order] before disobeying it." Walker, supra, 388 U.S. at 320, 87 S.Ct. at 1831. She should have sought to stay the civil contempt order for the purpose of filing an expedited appeal, before deciding to disobey the order. Cf. In re Banks, 306 A.2d 270, 277 (D.C.1973) (Pair, J., dissenting) (suggesting that direct appeal from custody order was appropriate, citing D.C. Code § 11-721 (1972 Supp.) and D.C. App. R. 8).
Accordingly, the judgment is affirmed.
NOTES
[1]  Judge King's expression of doubt as to Scott's competency was limited to his statement "you can't rely on people on drugs seriously in need of maintaining a drug habit to tell the truth about anything at any time."
[2]  The contempt order stated that:

The Court is of the view that given probable cause to believe a criminal contempt has been committed, and given doubts about the witness' competence to testify truthfully, an order directing the submission of a urine sample for analysis in the Pretrial Services laboratories is appropriate and within the equity powers of the court and within the powers provided in D.C.Code § 11-944 (1981) and Super.Ct.Crim.R. 42. Noncompliance with that order, while perhaps also constituting criminal contempt, is subject to a civil contempt citation compelling compliance.
Appellant was therefore ordered to pay a fine of $25.00 per hour for each hour between 8:30 a.m. and 5:30 p.m. on each business day during which she continued to refuse to submit the urine specimen to the Pretrial Services Agency. The total fine was not to exceed $2,000.
[3]  Similarly, the government takes the position in its brief "we have no doubt that a trial judge under some circumstances may punish as contempt the willful appearance of a witness in court in a condition of intoxication. We believe, however, that the court's power to punish for contempt in such circumstances, and its ancillary power to order a urinalysis, is limited to a case in which the court has found ... that the witness' condition ... is so severe as to render him or her incompetent as a witness." Scott adopted this position at oral argument.
