
173 Wis.2d 310 (1992)
IN RE the MENTAL CONDITION OF BILLY JO W., Alleged to be Mentally Ill:
BILLY JO W., Appellant,
v.
Gary METRO and Racine Journal Times, Respondents.[]
No. 92-0854.
Court of Appeals of Wisconsin.
Oral argument August 14, 1992.
Decided December 16, 1992.
*315 On behalf of the appellant, the cause was submitted on the briefs of William J. Tyroler and Sean M. Brown, assistant state public defenders.
On behalf of the respondents, the cause was submitted on the brief of Constantine, Christensen & Krohn, S.C. of Racine.
Before Nettesheim, P.J., Brown and Snyder, JJ.
BROWN, J.
This case concerns the construction of sec. 51.30(4)(b)4, Stats. The statute authorizes release of otherwise confidential psychiatric treatment records upon "lawful order of a court of record." The issue is whether it allows a circuit court, in its discretion, to release the records to a newspaper. We hold that the legislative intent of the statute allows a court order releasing treatment records only when it necessary to an issue before the court. The circuit court's order allowing release of Billy Jo W.'s psychiatric records to a newspaper under this statute is reversed.
In 1984, Billy Jo was charged with first-degree murder in Racine County Circuit Court. He entered a plea of not guilty by reason of mental disease or defect (NGI plea). However, he thereafter was found not competent to stand trial and was committed. On September 12, 1985, he was committed to the Winnebago Mental Health Institute under ch. 51, Stats. Yearly extensions committed him to secured settings until 1990 when, although he was recommitted, he was released to an apparent halfway house in the Racine community. In 1991, he again was recommitted to a halfway house in the Racine community.
*316 On December 6, 1991, Billy Jo was arrested and charged with two counts of armed robbery and one count of robbery. The criminal court, on its own motion, ordered Billy Jo to undergo examination for competency. On December 16, Gary Metro, a newspaper reporter for the Racine Journal Times, wrote not the criminal court, but the court assigned to ch. 51, Stats., actions, asking it to allow review of Billy Jo's past civil commitment file. It was Metro's view that the file was a public record. Metro explained that the public had a right to know how Billy Jo, "described as dangerous, psychotic and untreatable in 1985, got the freedom to walk the streets of Racine in 1991."
The court responded to the letter by advising Metro that all files and records of ch. 51, Stats., court proceedings are confidential and may be opened only to certain individuals, and then only for commitment, recommitment, detention and admission purposes. However, other persons may obtain the files either through informed consent or pursuant to a lawful order of the court. The court requested that Metro bring a formal motion before the court.
A motion was made and the court heard the motion on February 17, 1992. Meanwhile, Billy Jo had been found not competent to stand trial by the criminal court on January 3.It is significant to note that no pleas were entered in the criminal case, and, as we understand the record, no pleas have since been entered.
After the February 17 hearing, the court found that Gary Metro and the Racine Journal Times (Metro) are authorized, pursuant to sec. 905.04(4)(b), Stats., to review and, if they deem appropriate, publish any report or correspondence within the file from the 12th day of September, 1985 through the 17th day of February, 1992, prepared by or on behalf of any psychologist, psychiatrist *317 or other physician who examined Billy Jo pursuant to court order. Additionally, the court allowed Metro to review and publish any examinations and comprehensive evaluations prepared by the Racine County Human Services Department relative to the same time periods. From this order, Billy Jo appeals.
[1]
Whether a circuit court has the discretion under sec. 51.30(4)(b)4, Stats., to allow newspapers the right to examine confidential psychiatric records produced subsequent to a ch. 51, Stats., commitment requires us to interpret the meaning of the statute. Statutory interpretation is a question of law. Lang v. Lang, 161 Wis. 2d 210, 217, 467 N.W.2d 772, 774 (1991). We review questions of law de novo, paying no deference to the circuit court. Id.
Before turning to the statutory construction of sec. 51.30(4) (b)4, Stats., we rule on whether sec. 905.04(4) (b), Stats., the statute relied upon by the circuit court, governs this case. Billy Jo argues that the statute is not applicable; at oral argument, Metro conceded that it is inapplicable; and we so hold.
[2, 3]
Section 905.04(4)(b), Stats., is a rule of evidence pertaining to the physician-patient privilege.[1] It comes into play only during the course of litigation when one party attempts to assert a privilege to prevent certain *318 evidence becoming discoverable by the opposing party. As pointed out by both parties, there was no pending litigation involving ch. 51, Stats. Billy Jo's past psychiatric records were not pertinent to even the criminal proceedingthere was no NGI plea and proceedings had been suspended pending his future competency to proceed. Section 905.04(4)(b) cannot be used to grant access to Metro under the facts of this case.
[4]
Metro argues, however, that sec. 51.30(4) (b)4, Stats., is the proper vehicle for granting access to Billy Jo's treatment records. We acknowledge that this court may affirm the circuit court on a basis different than that presented to the trial court. State v. Holt, 128 Wis. 2d 110, 125, 382 N.W.2d 679, 687 (Ct. App. 1985). We now move to that issue.
[5-7]
In construing a statute, an appellate court first looks to the language of the statute itself and if the language is clear on its face, the inquiry ends; only if the statute is ambiguous will there be an examination of extrinsic sources of legislative intent. Voss v. City of Middleton, 162 Wis. 2d 737, 749, 470 N.W.2d 625, 629 (1991). If ambiguous, the court examines the history, context, subject matter, scope and object of the statute. See id. This includes the statute's origins. State ex rel. Gebarski v. Milwaukee County Circuit Court, 80 Wis. 2d 489, 496, 259 N.W.2d 531, 534 (1977). In researching its origins, the court may consider as persuasive authority an article by the principal draftsperson of the statutory enactment. See State v. Williquette, 129 Wis. 2d 239, 254, 385 N.W.2d 145, 152 (1986). With these maxims in place, we now construe the statute.
Metro claims that the statute is clear on its face. He asserts that the word "lawful" means simply that when a *319 court has the authority to do something, and does it, it is "lawful." Since the court has the authority to release "treatment records" pursuant to sec. 51.30(4)(b)4, Stats., and has further authority to give access to court records under sec. 51.30(3), it may do either in its discretion. While Metro acknowledges that there is no absolute right to release, he argues that a trial court, after weighing all factors and arguments of both sides, can release the records.
Metro claims support for his argument in State v. Taylor, 142 Wis. 2d 36, 417 N.W.2d 192 (Ct. App. 1987). In that case, Taylor was charged with first-degree murder. He had a long history of psychiatric treatment. He pled not guilty and not guilty by reason of mental disease or defect. The state sought disclosure of certain ch. 51 psychiatric records, but the trial court denied the motion. The trial court reasoned that the records were confidential and the statute did not otherwise authorize release.
This court reversed. While we recognized the confidentiality of physician-patient records in ch. 51, Stats., we determined that the confidentiality is not absolute. We concluded that when Taylor entered a plea of not guilty by reason of mental disease or defect, he lost his physician-patient privilege under sec. 905.04(4) (b), Stats. Taylor, 142 Wis. 2d at 41, 417 N.W.2d at 194. Once having lost his privilege in the case pending before the criminal court, he also lost his claim for confidentiality found in the mental commitment statutes. Id.
Taylor argued that criminal court cases and mental health cases are separate entities. He asserted that a privilege lost in criminal court is one thing, but that the mental health records in ch. 51, Stats., still maintain their confidential cloak. He claimed that, absent an enabling statute in ch. 51 allowing access when the physician-patient *320 privilege is removed in a criminal case, the confidentiality cloak must stand. He cited the very statute under consideration here, sec. 51.30(4)(b)4, Stats., in support, claiming that "lawful order" must mean an order pursuant to some specific provision allowing release under ch. 51.
[8]
We held, however, that the language in sec. 51.30(4)(b)4, Stats., was not as limited as Taylor suggested. Taylor, 142 Wis. 2d at 42-43, 417 N.W.2d at 195. Instead, sec. 51.30(4)(b)4 empowers the court to order the release of past psychiatric records when no legal impediment to their release exists. Taylor, 142 Wis. 2d at 43, 417 N.W.2d at 195. Since the legal impediment to disclosure was removed once Taylor sought to rely upon a mental condition as an element of his defense, the resulting release of the records was a "lawful order of the court." Id. at 43-44, 417 N.W.2d at 195.
Metro focuses on certain language in Taylor to support his theory that the language of the statute clearly gives a court discretion to release records to anyone. We wrote:
Although we hold that no independent statutory authorization need exist for the state to obtain the records in question, we note that sec. 51.30(4)(b)4, Stats., does empower the court to order the release of past treatment records. This provision creates a vehicle to test the question of confidentiality attaching to medical records should one exist, to obtain a protective order if the request is overbroad, to challenge the admissibility or relevance in the appropriate case, or to prohibit disclosure because of other legal impediments.
Id. at 42, 417 N.W.2d at 194-95 (footnote omitted). Metro reads this passage to say that every motion *321 brought under sec. 51.30(4)(b)4 empowers any person to ask the court to "test" confidentiality. Whether to keep a record confidential is up to the trial court in each instance. If the court decides to allow access, the result is a "lawful order of the court."
[9, 10]
That is not the meaning of the passage. Rather, the passage must be read in context with the rest of the opinion. What the passage actually means is that once the confidentiality right is removed, then it is lawful for the court to release records. However, the court still may guard the confidentiality of the records despite the fact that no legal impediment exists if the request is overbroad, the request is otherwise inadmissible in court, the request is irrelevant to the proceeding or if any other legal impediment exists. Whether the court decides to maintain the confidentiality of the records despite the lack of legal impediment is a discretionary act of the trial court.
What Metro is attempting to do is use Taylor to say that whether to keep a record confidential is always a discretionary decision in the first instance by the trial court. We cannot agree. We will not read Taylor to say that the right of confidentiality is dependent, in each particular case, upon the state of mind of the particular trial judge assigned to the case. To read Taylor in the way suggested by Metro would be to take the facts and circumstances of Taylor completely out of context and impose a statement far broader than the holding of that case. We conclude that Metro may not rely upon Taylor in support of his theory.
[11]
From Taylor then, we know that sec. 51.30(4)(b)4, Stats., means that, at the very least, the statutory right to confidentiality, called a "legal impediment" to access *322 by the Taylor court, must be removed before an order allowing access can be termed "lawful. "We also know that the act triggering the "removal" does not have to be listed in ch. 51, Stats., but may occur as a result of some other law like sec. 905.04(4)(c), Stats., dealing with waiver of the physician-patient privilege when a defendant relies upon a mental condition as an element of the offense. Still to be determined is the nature of those "other laws" which make them "lawful order[s] of a court of record." Section 51.30(4) (b)4. The statute is silent on that matter leaving the meaning ambiguous. So, we resort to extrinsic aids to find the answer.
We start with the predecessor to the present statute. The original closed record statute was created by sec. 45, ch. 485, Laws of 1947. The statute read:
Records closed. The files and records of the judge and the court in proceedings under this chapter shall be kept in locked files and shall not be open to inspection except upon the specific permission of the judge. In any action or special proceeding in a court of record, such files and records shall be made available by special order of such court, if they are relevant to the issue and competent.

Section 51.30, Stats. (1947) (emphasis added). This statute clearly says that the order must pertain to an issue before the court. The language of the statute underwent a minor change in 1955, but remained essentially unchanged until 1975. See sec. 26, ch. 506, Laws of 1955 (deleting references to "judge").
[12]
In 1975, ch. 51, Stats., underwent major revisions in response to the federal court decision in Lessard v. Schmidt, 349 F. Supp. 1078 (E.D. Wis. 1972). See M. Munts, A Saner Mental Commitment Statute 1-2 (Press *323 Release, July 28, 1976). Section 51.30, Stats. (1955), was repealed and recreated in that revision. See sec. 18, ch. 430, Laws of 1975. In 1977, the statute again was repealed and recreated to its present form. Section 67, ch. 428, Laws of 1977. The purpose of the 1975 creation of the confidentiality section, was "to ensure that the stigma of commitment will not hinder one's efforts to become reintegrated into the community." See Munts Press Release at 4. The 1977 revision contained even more specific protections for confidentiality. We conclude that its purpose continues to be elimination of stigma and facilitation of transition to community life.
[13, 14]
Because the Munts press release is an article written by a principal draftsperson of the statute, we may consider it as persuasive authority when construing sec. 51.30(4)(b)4, Stats. See Williquette, 129 Wis. 2d at 254, 385 N.W.2d at 152. We conclude that the broad purpose of sec. 51.30 is to avoid stigmatizing mentally ill individuals by providing strict confidentiality guidelines for their treatment records. With this general purpose in mind, we are able to apply principles of statutory construction to more precisely discern the meaning of the phrase "lawful order of a court of record."
[15]
"A statutory subsection may not be considered in a vacuum, but must be considered in reference to the statute as a whole . . ." Aero Auto Parts, Inc. v. State Dept. of Transp., 78 Wis. 2d 235, 239, 253 N.W.2d 896, 897 (1977). If possible, subsections of a statute must be read to give harmony to the entire statute in light of its legislative purpose. See State v. Fouse, 120 Wis. 2d 471, 477, 355 N.W.2d 366, 369 (Ct. App. 1984).
Section 51.30(4) (b), Stats., contains twenty-five exceptions to the general rule that mental health treatment *324 records shall remain confidential unless an individual gives informed written consent to their release. See sec. 51.30(4)(a). These twenty-five exceptions provide the context in which we must interpret the phrase "lawful order of a court of record." The statute's context supports our conclusion that third parties such as a newspaper may not obtain treatment records of an individual who has been involuntarily committed.
The exceptions to the general requirement of consent fall into several categories. First, treatment records may be obtained by an agency or person who provides services to the subject individual. See sec. 51.30(4) (b)5, 6, 7, 8, 8m, 9, 10, 11, 12, 15, and 20, Stats. Each of these subdivisions either provides that the records shall remain confidential, see sec. 51.30(4)(b)5, 7, 8m, and 15, or places precise limitations upon the kind of information that may be released. See sec. 51.30(4)(b)6, 8, 10, 11, 12, and 20.
The second category of exceptions includes those situations in which the information will be used for administrative or research purposes. See secs. 51.30(4)(b)1, 2, 3, 21, and 22, Stats. Each of the subdivisions in this category also provides either confidentiality or strict guidelines for the use of the information contained in the treatment records. The remaining exceptions contemplate using the records for law enforcement, investigation, or legal counsel. See sec. 51.30(4) (b)12m, 13, 14, 16, 17, 18, 19, and 23. Again, each of these exceptions imposes strict limitations upon the use of the treatment records.
[16]
Thus, access to treatment records without the written permission of the individual is possible only in certain well-defined and limited situations. If the records are not needed for the provision of services, the statute *325 describes the amount and kind of information that may be obtained, and the uses to which the information may be put. In fact, in ch. 51, Stats., actions confidential information may be released only as necessary to provide services to the individual or for statistical purposes.[2]
[17, 18]
It is clear from this discussion that the legislature did not contemplate unrestricted access to committed individuals' treatment records. To the contrary, the legislature took great pains to preserve confidentiality. If we were to allow a newspaper to publish at will portions of mental health treatment records, we would violate the manifest legislative purpose behind sec. 51.30, Stats. An interpretation of sec. 51.30(4)(b)4 that allows media access to treatment records whenever an individual is committed by order of a court would virtually destroy the privacy of mentally ill individuals and would inhibit their reintegration into the community. We decline to interpret sec. 51.30(4) (b)4 to allow such results.
*326 [19]
We conclude, therefore, that an order is "lawful" if the third parties seeking access to mental health treatment records are involved in the care of the individual, or if the records are relevant to an issue before the court.
By the Court.Order reversed.
NOTES
[]  Petition to review granted.
[1]  Section 905.04, Stats., lists several exceptions to the general rule allowing the assertion of a physician-patient privilege during litigation. Section 905.04(4)(b) reads as follows:

Examination by order of judge. If the judge orders an examination of the physical, mental or emotional condition of the patient,... communications made and treatment records reviewed in the course thereof are not privileged under this section with respect to the particular purpose for which the examination is ordered unless the judge orders otherwise.
[2]  The Wisconsin Administrative Code provides:

HSS 118.01 Privileged communication.
(1) All information relating to "personal facts" obtained by the staff in the conduct of official business shall constitute privileged communications and shall be held confidential and shall not be divulged without the person's consent except as may be necessary to provide services needed by the individual.
(2) Personal facts shall be defined as any information ordinarily construed as a part of a medical history and physical examination and positively identifying an individual with such medical data.
(3) This rule shall in no way limit the use of information relating to "personal facts" for summary or statistical purposes or in any form which does not identify the individual; nor shall it prohibit the release of such information without consent of the individual to other recognized agencies, institutions, or individuals as may be necessary to provide services needed by the individual.
Wis. Adm. Code sec. HSS 118.01 (emphasis added).
