Plaintiff appeals a judgment in favor of defendant Willamette Falls Hospital on her negligence claim. Plaintiffs claim arises from defendant’s failure to produce some of the medical records of her late husband, Simpkins, until about two years after plaintiff first requested them. Plaintiff contends that, because of defendant’s negligence in producing the records, she lost the ability to bring a medical malpractice or wrongful death claim against defendant and one of its employees, Dr. Goldenberg. The trial court concluded that plaintiffs fifth amended complaint failed to allege facts sufficient to state a claim for negligence. Because we conclude that plaintiff stated a claim, we reverse and remand for further proceedings.
In determining the sufficiency of a complaint, we accept the plaintiffs well-pleaded allegations as true and give the plaintiff the benefit of all favorable inferences that reasonably may be drawn from the facts alleged. Yeager v. Providence Health System Oregon, 195 Or App 134, 136, 96 P3d 862, rev den, 337 Or 658 (2004). Our statement of the facts comes from the allegations of plaintiffs fifth amended complaint.
After performing a stress test on Simpkins in October 1996, Goldenberg told Simpkins that the results were normal and did not recommend follow-up care, additional testing, or treatment. In fact, though, the results were abnormal and indicated a need for follow-up regarding possible coronary artery disease. Goldenberg did not relay the test results to Simpkins’s primary care physician or to the cardiologist who had referred Simpkins for the stress test, nor did he inform those doctors that the test had been conducted. As a result of negligence associated with the stress test, Simpkins suffered a fatal heart attack in April 1998 that was caused by coronary artery disease.
In 2000, plaintiff twice requested that defendant produce all records pertaining to Simpkins, and the records also were subpoenaed in the context of an action against defendant. In response, defendant produced some of Simpkins’s records, but omitted all records of the stress test *227that Goldenberg had performed. Plaintiff did not obtain those records from defendant until March 2002, by which time the parties agree that any claims arising from negligence associated with the stress test were barred by the applicable statute of limitations. Until plaintiff obtained the information showing that Goldenberg had performed a stress test on Simpkins, no records identified Goldenberg as having provided any medical services to Simpkins. Plaintiff asserted that defendant “is liable for plaintiffs lost ability to make a negligence claim against * * * Goldenberg for his medical mistakes * *
Plaintiff filed her fifth amended complaint — the complaint at issue in this appeal — in October 2003. Without answering that complaint, defendant moved for judgment on the pleadings, contending that Oregon law does not recognize a claim for negligent failure to produce records and that plaintiff had not alleged any sort of special relationship that would create a duty to protect plaintiff from economic loss. In response, plaintiff argued that defendant was trying to revive its earlier motions to dismiss and for summary judgment, which had been denied, and referred the court to her responses to those earlier motions. In those responses, plaintiff had asserted that defendant had a duty, under former ORS 192.525(2) (2001), repealed by Or Laws 2003, ch 86, § 8, to produce the medical records. Meanwhile, plaintiff filed a second motion for partial summary judgment, contending that former ORS 192.525(2) established a duty to disclose medical records and that defendant was negligent as a matter of law for failing to produce the requested records. In its response to that motion, defendant acknowledged that plaintiff was asserting that former ORS 192.525(2) provided grounds for “an action for damages for negligence contending violation of a duty imposed by statute.”
The trial court dismissed plaintiffs claim. The court reasoned that, because plaintiffs claim against defendant was for an economic loss (namely, the loss of her medical malpractice claim against Goldenberg and defendant based on the stress test), she needed to plead a source of duty outside the common law of negligence; the court concluded that plaintiff had failed to do so. Plaintiff appeals, assigning error *228to the trial court’s grant of defendant’s motion for judgment on the pleadings.
Before turning to the substance of the parties’ arguments, we consider whether defendant’s motion for judgment on the pleadings was properly before the trial court, despite being filed before defendant answered the operative complaint. ORCP 21 B provides, “After the pleadings are closed, but within such time as not to delay the trial, any party may move for judgment on the pleadings.” (Emphasis added.) Although defendant purported to move for judgment on the pleadings, defendant had not answered plaintiffs fifth amended complaint when it moved against that complaint. Thus, under ORCP 21B, a motion for judgment on the pleadings was premature.
Nevertheless, the substance of defendant’s motion was proper, because defendant could bring its motion under ORCP 21 A(8) as a motion to dismiss for failure to state ultimate facts sufficient to constitute a claim. In its motion, defendant contended that plaintiff had failed to state a claim and specifically stated the grounds on which it sought dismissal of that claim. A motion is controlled by its substance, not its caption. Welker v. TSPC, 332 Or 306, 312, 27 P3d 1038 (2001); see also Burden v. Copco Refrigeration, Inc., 339 Or 388, 393, 121 P3d 1133 (2005) (where the defendant incorrectly labeled its motion as a motion to dismiss under ORCP 21A rather than as an application for a preliminary hearing under ORCP 21 C, that mistake did not prevent the trial court from reaching the merits); Collier v. Bidleman, 98 Or App 556, 558 n 3, 779 P2d 1099 (1989), rev den, 309 Or 231 (1990) (where the defendant moved for summary judgment on the ground that the plaintiff had not stated a claim and the motion was filed after the defendant answered, the motion was treated as a motion for judgment on the pleadings). Because the substance of defendant’s motion was proper, the trial court did not err by considering it.
We turn to the parties’ arguments. Plaintiff first contends that defendant’s failure to fully and timely produce medical records is actionable under the ordinary negligence principles set forth in Fazzolari v. Portland School Dist. No. *229 1J, 303 Or 1, 734 P2d 1326 (1987), and other cases. Defendant responds that, because plaintiff alleges negligence resulting in purely economic harm, she must allege some duty beyond the common-law duty to avoid foreseeable harm. Defendant is correct.
Common-law negligence traditionally has not provided a remedy for purely economic or psychological injuries in the absence of a specific duty. Fazzolari, 303 Or at 7. Accordingly, “a negligence claim for the recovery of economic losses caused by another must be predicated on some duty of the negligent actor to the injured party beyond the common law duty to exercise reasonable care to prevent foreseeable harm.” Onita Pacific Corp. v. Trustees of Bronson, 315 Or 149, 159, 843 P2d 890 (1992) (footnote omitted); see also Hale v. Groce, 304 Or 281, 284, 744 P2d 1289 (1987) (“[O]ne ordinarily is not liable for negligently causing a stranger’s purely economic loss without injuring his person or property.” (Citations omitted.)).
To the extent that Boden v. Ford Motor Co., 86 Or App 465, 739 P2d 1067 (1987), could be understood to state a contrary conclusion, that is not a proper understanding of the case law. In Boden, we determined that a storage facility that lost a crucial piece of evidence could be liable for the impaired value of the lawsuit. The trial court had dismissed the claim, based on the defendant’s argument that it did not have a duty to preserve the evidence. 86 Or App at 467. After the case had been argued and submitted, the Supreme Court announced its decision in Fazzolari. Citing that decision, we concluded that the plaintiffs complaint stated a claim for relief in negligence because “a reasonable jury could [have found] it foreseeable that losing a piece of evidence would diminish the value of the lawsuit.” Boden, 86 Or App at 467. It appears that we simply concluded that the trial court had applied the wrong negligence principles; we did not consider the economic loss rule set forth in Fazzolari and later cases or, therefore, whether any duty arose under the circumstances of Boden on which an action for economic loss could be predicated.
Here, plaintiff contends that, because her claims arose out of a personal injury claim, they were not for purely *230economic loss and she therefore need not allege an independent duty. She asserts that, because her lost claim against defendant and Goldenberg was based on Goldenberg’s treatment of Simpkins and the resulting personal injuries and death, her negligence claim against defendant for loss of that claim is, in fact, not for purely economic loss. That argument is not persuasive. Regardless of the basis of the underlying claim, the loss of that claim was an economic loss: plaintiffs alleged injury was the loss of a right to seek financial compensation, not an injury to person or property. Plaintiffs claim is in some ways comparable to a legal malpractice claim, in which damages arise from the loss of an underlying claim. Regardless of the nature of the underlying claims, such damages are generally considered economic loss. See Gregory v. Lovlien, 174 Or App 483, 488, 26 P3d 180, rev den, 333 Or 74 (2001) (noting that “damages arising from legal malpractice claims are typically based on ‘purely economic loss’ ” (citations omitted)).
Turning to a consideration of whether defendant owed plaintiff some duty that would allow plaintiff to bring her claim despite the economic-loss rule, we conclude that defendant did owe such a duty. We first examine the nature of the duty that must be alleged in cases such as this. In Fazzolari, the court explained that “duty plays an affirmative role when an injured plaintiff invokes obligations arising from a defendant’s particular status or relationships, ox from legislation, beyond the generalized standards that the common law of negligence imposes on persons at large.” 303 Or at 10 (emphasis added). Before stating the general rule concerning foreseeable risks, the Fazzolari court approvingly cited an earlier decision, in which the court held that
“ ‘sources other than the common law of negligence,’ namely the statute governing the commitment or release of patients under the jurisdiction of the Psychiatric Security Review Board, imposed a duty on a ‘community mental health provider’ like defendant to use reasonable care to protect the public in leaving a potentially dangerous patient at large. [Cain v. Rijken, 300 Or 706, 715, 717 P2d 140 (1986)]. Whether failure to do so foreseeably created a risk of the kind of conduct by the patient and the kind of *231injuries suffered by the victim were issues to be determined by a factfinder. Id.”
Fazzolari, 303 Or at 17; see also Donaca v. Curry Co., 303 Or 30, 35, 734 P2d 1339 (1987) (addressing duty in its “primary and meaningful sense of obligations imposed or defined by sources of law external to the common law of negligence itself’ and giving examples of duties arising under a statute, ordinance, and court order).
Here, plaintiff relies on a duty arising from a statute, arguing that former ORS 192.525(2) imposed a duty on defendant to produce medical records.1 That section provided, in part:
“Except as otherwise provided by law, a health care provider must disclose a patient’s medical records after receiving a written release authorization that directs the health care provider to produce the patient’s medical records. * * * If the patient is not able to give consent to the release, the authorization must be signed by a person authorized by law to obtain the medical records sought under the authorization.”
Defendant does not deny that it is a “health care provider.” Its only argument regarding the statute (which we address later in this opinion) is that plaintiff failed to cite the statute in her fifth amended complaint or in her memorandum of law in response to defendant’s motion for judgment on the pleadings.
To determine whether a statute creates a duty, we examine the legislature’s intent. SFG Income Fund, LP v. May, 189 Or App 269, 275, 75 P3d 470 (2003) (citing Scovill v. City of Astoria, 324 Or 159, 166, 921 P2d 1312 (1996)). We determine legislative intent by examining the text and context of the statutory provision and, if the intent is not clear after that first level of analysis, by considering the legislative history. PGE v. Bureau of Labor and Industries, 317 Or 606, 610-12, 859 P2d 1143 (1993).
*232The statutory text supports plaintiffs view that the legislature intended to impose a duty on health care providers such as defendant to produce medical records to patients or persons authorized to request such records. By using the term “must,” the legislature signaled its intention that former ORS 192.525(2) mandate particular action. See Scovill, 324 Or at 167 (the legislature’s use of the word “shall” indicates a mandatory course of action and thus states a duty to act). Moreover, by specifically identifying who has a right to request and receive medical records, the legislature indicated that the statutory duty is owed to patients and those authorized to obtain records.
The next question is the scope of the statutory duty. “[W]hen a special relationship or status gives rise to the duty of care, that relationship or status may also define the scope of the duty by specifically describing the types of harms or class of persons that it encompasses.” Allstate Ins. Co. v. Tenant Screening Services, Inc., 140 Or App 41, 50, 914 P2d 16 (1996) (citation omitted; emphasis in original). We therefore consider whether former ORS 192.525(2) required defendant to produce medical records in order to protect plaintiff from the type of loss that she suffered. Cf. Oregon Steel Mills, Inc. v. Coopers & Lybrand, LLP, 336 Or 329, 347-48, 83 P3d 322 (2004) (in a negligence claim involving purely economic loss, the defendant accounting firm’s duty to the plaintiff-client was to act with reasonable competence in providing accounting services, not to protect the plaintiff from losses in the stock market); Roberts v. Fearey, 162 Or App 546, 986 P2d 690 (1999) (the attorney for a trustee had no duty to protect beneficiaries of the trust from economic losses and thus could not be liable to them for legal malpractice).
Although the legislature stated a policy of protecting both the confidentiality of medical records and individuals’ right to review their own records, former ORS 192.525(1),2 it *233did not identify in the statute the specific harms that it meant to prevent. Because the text does not plainly address that issue, then, we turn to the legislative history — which supports the view that the duty exists to protect patients from experiencing harm during litigation as a result of health care providers’ failure to fully produce medical records on request.
The Oregon State Bar Procedure and Practice Committee proposed Senate Bill (SB) 253 (1997), which added subsections (2) through (10) to former ORS 192.525, to “cure [ ] a recurring problem in litigation today: the untimely discovery that complete patient records have not been provided in response to the patient’s request.” Testimony, Senate Business, Law, and Government Committee, SB 253, Feb 27, 1997, Ex J (written statement of Oregon State Bar Procedure and Practice Committee). As a result of such failures to produce records, the Bar committee explained, patients were sometimes accused of deliberately withholding records, which could lead to problems such as the exclusion of testimony or a mistrial. Id. The Bar committee stated that the bill would reduce civil discovery disputes, improve litigation procedures, and allow for evaluation of claims for damages. Id. The staff measure summary prepared for the House Committee on Judiciary reiterated concerns that, in personal injury litigation, plaintiffs might face discovery sanctions as a result of health care providers’ failure to properly respond to patients’ request for their medical records. Staff Measure Summary, House Committee on Judiciary, SB 253B, June 24, 1997. In short, the legislature imposed a duty to disclose medical records precisely because of concerns that patients’ ability to pursue personal injury claims would be compromised unless health care providers fully complied with requests for medical records.
*234No other subsections of former ORS 192.525 limited the duty imposed by former ORS 192.525(2). Although former ORS 192.525(4) and (5) allowed providers to withhold records under certain circumstances, they required providers to give notice of the nondislosure.3 And, although former ORS 192.525(7) prohibited liability for good faith disclosures, it imposed no limitation on liability for the failure to comply with the duty to make disclosures.4 Cf. Scovill, 324 Or at 167-68 (a limitation on liability for actions taken pursuant to a statute did not limit liability for the failure to take action required by the statute). We conclude that the statute imposed a duty to protect plaintiff from the type of harm that she alleges. Accordingly, the trial court erred in concluding that plaintiff failed to state a duty sufficient to support her negligence claim.
As noted, on appeal, defendant also contends, as an alternative ground for affirming the trial court’s ruling, that plaintiff failed to adequately plead the foreseeability of the harm that she alleges. However, defendant acknowledges that it did not raise in the trial court the issue of failure to plead foreseeability, and we therefore do not consider it. See Rogers v. Valley Bronze of Oregon, Inc., 178 Or App 64, 68-69, 35 P3d 1102 (2001) (holding that a new alternative ground *235for affirming dismissal could not be considered on appeal, as the record might have developed differently had the defendant raised the argument below).
Defendant also contends that plaintiff failed to adequately plead the existence of a statutory duty to produce medical records. We disagree. A plaintiff pleads duty if the complaint “allege [s] what duty defendant owed plaintiff, or facts from which the law will imply a duty * * Settle v. PGE, 81 Or App 474, 477, 726 P2d 389, rev den, 302 Or 460 (1986) (citing Hendricks v. Sanford, 216 Or 149, 158-59, 337 P2d 974 (1959)) (holding that negligence claim failed where the plaintiff failed to allege facts to support inference that he was invitee on the defendant’s premises); see also Hendricks, 216 Or at 158-59 (where complaint alleged that the plaintiff was a helpless patient in convalescent home who paid for care and treatment and required certain care, complaint generally alleged duty to care and treat; resolving inferences in the plaintiffs favor, complaint was sufficient). A plaintiff is required to allege facts, not legal conclusions, in support of a claim. See ORCP 18 A (requiring that a claim for relief contain “[a] plain and concise statement of the ultimate facts constituting a claim for relief without unnecessary repetition”); Fearing v. Bucher, 328 Or 367, 375 n 5, 977 P2d 1163 (1999) (“An ultimate fact is a fact from which legal conclusions are drawn. A conclusion of law, by contrast, is merely a judgment about a particular set of circumstances and assumes facts that may or may not have been pleaded.”); SFG Income Fund, LP, 189 Or App at 278 (whether a duty exists is a question of law); Dahlen v. Oregon Transfer Company, 180 Or App 599, 600, 43 P3d 1214, rev den, 334 Or 492 (2002) (“ ‘[A] complaint states facts sufficient to constitute a claim for relief if it contains allegations which permit the introduction of evidence which will satisfy the elements of the claim.’ ” (quoting Davis v. Surcamp, 86 Or App 310, 312, 738 P2d 1006 (1987)). Even where a plaintiff asserts a statutory claim (as opposed to simply using a statute to support an element of a common-law tort claim), the plaintiff may make a prima facie case under a statute without specifically alleging the statute. See Gildow v. Smith, 153 Or App 648, 653, 957 P2d 199 (1998) (“[a]lthough plaintiff did not specifically allege that his action was brought under ORS 105.180, his *236amended complaint adequately pie faded] a claim for relief under that section” where the complaint alleged that the defendants had an easement for road use and, contrary to an agreement, failed to provide maintenance to the road or reimburse the plaintiff).
Here, although plaintiff did not cite the statute in her complaint, she alleged facts from which defendant’s duty under former ORS 192.525(2) may be implied. Former ORS 192.525(2) provided, in part, that “a health care provider must disclose a patient’s medical records after receiving a written release authorization that directs the health care provider to produce the patient’s medical records.” Plaintiff alleged that she twice requested the records from defendant, a hospital, and that the records also were subpoenaed from defendant. Those are allegations of fact from which legal conclusions about the applicability of former ORS 192.525(2) may be drawn. Viewing those allegations in the light most favorable to plaintiff, we conclude that plaintiff pleaded facts establishing defendant’s duty under former ORS 192.525(2).
We conclude that plaintiff stated a claim for negligence based on defendant’s statutory duty to produce the medical records.
Reversed and remanded.