*603A jury convicted defendant Damari Mathews of second degree robbery and firearms offenses after he robbed the victim and shot himself as he was trying to escape, and the trial court sentenced him to 13 years in prison. On appeal, Mathews contends that the court erroneously (1) refused to suppress evidence obtained from the hospital where he was being treated, allegedly in violation of his Fourth Amendment rights; (2) denied his request for personnel information about two police witnesses under Pitchess v. Superior Court (1974) 11 Cal.3d 531, 113 Cal.Rptr. 897, 522 P.2d 305 ( Pitchess ); and (3) calculated his presentence credits.
In the published portion of this decision, we conclude that the trial court properly denied the motion to suppress based on the estoppel principle announced in People v. Watkins (2009) 170 Cal.App.4th 1403, 89 Cal.Rptr.3d 135 ( Watkins ). We hold that when a defendant gives a false name to a police officer, and a record check of that name fails to reveal that the defendant is in fact subject to a probation search condition, the defendant is estopped from challenging the legality of an ensuing search or seizure that would have been authorized had the officer been aware of the condition. We also reject Mathews's remaining claims and affirm, except that we order the correction of a clerical error in the abstract of judgment.
I.
FACTUAL AND PROCEDURAL
BACKGROUND
Shortly before 6:00 p.m. on the evening of September 21, 2013, the victim, a man in *472his early sixties, was walking in San Leandro with his grandson and their family dog. As the victim was throwing away some garbage, he noticed two men standing nearby. One of them, whose face was mostly covered, approached the victim and "tried to grab [the victim's] things." The victim surrendered the contents of his pockets, which included $38, a phone card, *604and an identification card, and the man then struck the victim on the head with a gun and fled with his companion.
After the two men were out of the victim's line of sight, the victim heard a "boom sound" like a "gunshot." Other witnesses also heard the sound of a gunshot from the direction of the scene of the robbery. Witnesses then saw two men, one of whom appeared to have an injury to his lower body and was holding a gun, running through the neighborhood. Some of the witnesses remembered seeing the same two men get out of a light-colored sedan a few minutes earlier. The same sedan picked the men up and drove off. No witness was ultimately able to identify Mathews as either suspect.
At around 5:50 p.m., a silver sedan was recorded dropping Mathews off at Highland Hospital in Oakland. The timing of some of the subsequent events at the hospital is unclear, and we discuss these timing issues in more detail when addressing Mathews's Fourth Amendment claim. Generally, however, Officer Keith Ballard-Geiger and Officer Pantoja of the San Leandro Police Department arrived at the hospital within minutes and made contact with Mathews in a trauma room. Officer Ballard-Geiger observed a perforation in Mathews's scrotum and a wound to his shin. The officer also searched a bag of Mathews's clothing, which included a pair of jeans with blood in the crotch area and a small, bloodstained hole in the shin area.
Officer Ballard-Geiger also seized some possessions of Mathews's, including a cell phone, that hospital staff had stored in a safe. A subsequent forensic examination of the phone demonstrated that it was used in the vicinity of the robbery to make a call at 5:40 p.m. and "traveled east from the location ..., got on the freeway on [Highway] 580, traveled northbound, and terminated somewhere near Highland Hospital."
Mathews was charged with one count of second degree robbery, with an accompanying allegation of a principal's personal use of a firearm, one count of possession of a firearm by a felon, and one count of *473carrying a loaded firearm on one's person in a city.1 Before trial, he filed a motion under section 1538.5 to suppress the clothing, Officer Ballard-Geiger's observations of his wounds, and the cell phone and evidence derived from it. He argued that the evidence was obtained in violation of his Fourth Amendment rights. Mathews also filed a Pitchess motion to obtain discovery of the personnel files of Detective Joshua Brum, who wrote a police report that referred to the events at Highland Hospital, and Officer Ballard-Geiger. The *605trial court denied both motions, and the jury convicted Mathews of all the charges and found true the enhancement allegation.
The trial court sentenced Mathews to 13 years in prison, comprised of a term of three years for robbery and a consecutive term of ten years for the accompanying enhancement, a concurrent term of eight months for firearm possession by a felon, and a term of eight months, stayed, for carrying a loaded firearm on one's person in a city.2
II.
DISCUSSION
A. Mathews Is Not Entitled to Relief on His Fourth Amendment Claim.
Mathews claims that the trial court prejudicially erred by denying the motion to suppress. We disagree. The motion was properly denied as to the cell phone and resulting evidence, and any error related to Officer Ballard-Geiger's observations of Mathews's clothes and wounds was harmless.
1. Additional facts.
Officer Ballard-Geiger, who was the only witness to testify at the suppression hearing, stated that at 5:44 p.m. on the day in question, he and Officer Pantoja were dispatched to the scene of the robbery after receiving a report of "a possible shooting."3 Shortly after they arrived, dispatch reported that there were two possible male suspects and that "a shooting victim in a silver vehicle had possibly left the scene." Dispatch also "advised [the officers] that there was a shooting victim ... at Highland [Hospital]," and they were told to go there.
The officers arrived at the hospital at 5:52 p.m. and entered the emergency area, which included "two trauma rooms." They were met by Deputy Bixby of the Alameda County Sheriff's Department, who told them that the patient who "had been dropped off with the gunshot wounds" was in one of the trauma rooms and had identified himself as "Omari Johnson." At around 6:09 p.m., Officer Pantoja radioed for a record check on the name "Omari Johnson."
*606Meanwhile, Officer Ballard-Geiger called the patrol sergeant, who told him "that it looked like an armed robbery had actually occurred and that one of the suspects had possibly shot himself while fleeing the scene." The officer went into a trauma room, where he was "directed ... to the subject [who] had been brought in with the gunshot wounds," whom he identified in court as Mathews. Mathews told the officer that "he got shot," and he said his name was "Damari Johnson."
Officer Ballard-Geiger observed Mathews's injuries, which included "a perforation to the right side of his scrotum" and what appeared to be "a graze wound to his lower right leg, his shin area." The officer was able to see the injuries because either Mathews or a nurse moved a sheet that covered them. Hospital staff directed Officer Ballard-Geiger to a bag of clothing that Mathews was wearing when he arrived at the hospital. Officer Ballard-Geiger inspected the bag's contents, including a pair of jeans with blood on the crotch area and lower right pant leg, which also had a small hole in it. Officer Ballard-Geiger believed that Mathews "was possibly the person involved in the robbery, [and] that he might have shot himself."
Officer Ballard-Geiger ran a record check on "Damari Johnson" at 6:33 p.m. The officer could not recall whether this occurred immediately after he got the name from Mathews, and he acknowledged that it could have been as long as 20 *474minutes later. At 6:36 p.m., Officer Ballard-Geiger was notified of a possible match, but he determined that the person was not Mathews based on the accompanying photograph.
At some point, Mathews was moved from the trauma room to a hospital hallway. There, Officer Ballard-Geiger questioned him further, and Mathews "told [the officer] his true name and date of birth." Officer Ballard-Geiger ran a check on the name and learned around 6:41 p.m. that Mathews was on probation and subject to a search condition.4 Around this time, the officer arrested Mathews for robbery. Officer Ballard-Geiger left the hospital sometime after 7:00 p.m.
While Officer Ballard-Geiger was at the hospital, he recovered "a watch, some cash[,] and a cell phone" belonging to Mathews that hospital staff had placed in a safe. A hospital employee unlocked the safe and "gave [him] the items" after the officer did some paperwork. The officer was unable to recall, however, exactly when he seized this evidence. He testified that he retrieved *607these items sometime after Mathews was moved from the trauma room to the hallway. He also testified that he obtained the evidence after Mathews had told him that his name was "Damari Johnson." But the officer's testimony was inconsistent as to whether he seized the items before or after he knew about Mathews's search condition, and he did not know whether the seizure was before or after he arrested Mathews.
Although Officer Ballard-Geiger recovered the cell phone at the hospital, he did not search the phone's contents at that time. Rather, during the ensuing investigation, Detective Brum turned on the phone, which revealed an image of Mathews on the screen saver and that the phone was serviced by Metro PCS. Detective Brum obtained search warrants for information about the phone, and Metro PCS provided information upon which a prosecution expert witness eventually relied in testifying that around the time of the robbery the phone traveled from the victim's neighborhood to the vicinity of Highland Hospital.
Mathews moved to suppress evidence obtained at the hospital and evidence that was attainable later only as a result of the seizure of the cell phone. The evidence obtained at the hospital was Officer Ballard-Geiger's observations of Mathews's injuries and clothes and the phone. The evidence attainable as a result of the phone were screen shots taken from it, its identification number, and its contents. Mathews also sought to suppress "[a]ll fruit from the seizure of" the clothing and phone.
At the hearing on the motion to suppress, Mathews argued that all of this evidence was obtained in violation of his Fourth Amendment rights because, among other reasons, Officer Ballard-Geiger was not aware of the search condition at the time he observed the clothing or wounds or seized the cell phone. The trial court found no such violation and denied the motion. Relying on Watkins , the court ruled that Mathews was estopped from seeking to suppress the evidence because "by giving a false name, ... [Mathews] then precluded the officer, regardless of when the officer ran the check," from discovering that Mathews was subject to a search condition. In addition, the court accepted Officer Ballard-Geiger's testimony *475that the officer "got the name Damari Johnson early on in his contact ... and that he ran that [name]." The court observed that, had Mathews given Officer Ballard-Geiger his correct name in the first instance, "information would have come to light that would have changed everything in terms of how this thing unfolded."
2. General legal standards.
We begin by discussing general Fourth Amendment principles. The Fourth Amendment protects the "right of the people to be secure in their *608persons, houses, papers, and effects, against unreasonable searches and seizures." ( U.S. Const., 4th Amend.) " 'A warrantless search is presumed to be unreasonable, and the prosecution bears the burden of demonstrating a legal justification for the search [or seizure].' " ( People v. Suff (2014) 58 Cal.4th 1013, 1053, 171 Cal.Rptr.3d 130, 324 P.3d 1.) If the prosecution cannot meet this burden, the exclusionary rule normally requires the suppression of any evidence obtained from the search or seizure. ( Wong Sun v. United States (1963) 371 U.S. 471, 487-488, 83 S.Ct. 407, 9 L.Ed.2d 441.)
The applicable standards under which we review a trial court's order refusing to suppress evidence are well established. In reviewing the denial of a suppression motion, we consider the record in the light most favorable to the disposition and defer to the court's factual findings if supported by substantial evidence. ( People v. Tully (2012) 54 Cal.4th 952, 979, 145 Cal.Rptr.3d 146, 282 P.3d 173 ( Tully ).) Any conflicts in the evidence are resolved in favor of the court's order. ( People v. Limon (1993) 17 Cal.App.4th 524, 529, 21 Cal.Rptr.2d 397.) The court's ruling on whether the relevant law was violated is a mixed question of law and fact subject to de novo review. ( People v. Hoyos (2007) 41 Cal. 4th 872, 891, 63 Cal.Rptr.3d 1, 162 P.3d 528.) Thus, we exercise independent judgment in determining the legality of a search and seizure. ( Tully , at p. 979, 145 Cal.Rptr.3d 146, 282 P.3d 173.)
3. Mathews is estopped from challenging the admission of evidence derived from the cell phone's seizure.
In arguing that his Fourth Amendment rights were violated, Mathews does not clearly distinguish among the various evidence he contends should have been suppressed: the cell phone and evidence derived from it, the clothing, and Officer Ballard-Geiger's observations of his wounds. We first address his claim as it applies to the phone.
" '[O]ne of the specifically established exceptions to the requirements of both a warrant and probable cause is a search [or seizure] conducted pursuant to consent.' " ( People v. Woods (1999) 21 Cal.4th 668, 674, 88 Cal.Rptr.2d 88, 981 P.2d 1019.) Probationers who accept conditions of probation "may validly consent in advance to warrantless searches [or seizures] in exchange for the opportunity to avoid service of a state prison term." ( Id. at pp. 674-675, 88 Cal.Rptr.2d 88, 981 P.2d 1019.) Usually, an officer must be aware of a search condition for it to justify proceeding without a warrant, and a search or seizure cannot be "undertaken for harassment or ... for arbitrary or capricious reasons." ( People v. Bravo (1987) 43 Cal.3d 600, 610, 238 Cal.Rptr. 282, 738 P.2d 336.)
In Watkins , the decision the trial court relied on to deny the motion to suppress, a police officer stopped the defendant's vehicle, and the defendant *609stated that he was on probation but falsely identified himself as his brother. ( Watkins, supra, 170 Cal.App.4th at p. 1406, 89 Cal.Rptr.3d 135.) A record check of the brother's name did not reveal that the brother was subject to a *476search condition, but the officer nonetheless conducted a search and found contraband. ( Ibid. ) After his arrest, the defendant gave his true name, and a record check revealed that he "was on searchable probation." ( Ibid. ) The Court of Appeal held that even though the officer was not aware of the search condition when he performed the search, the defendant was estopped from challenged the legality of the search as a probation search because he had concealed that he was subject to the condition by lying about his identity. ( Id. at p. 1409, 89 Cal.Rptr.3d 135.)
Mathews relies on Myers v. Superior Court (2004) 124 Cal.App.4th 1247, 22 Cal.Rptr.3d 369 ( Myers ) in arguing that Watkins does not govern here. In Myers , a police officer stopped the defendant and asked him whether he was on parole or probation. ( Myers , at p. 1251, 22 Cal.Rptr.3d 369.) Although the defendant was on informal probation, he falsely told the officer " 'that he had discharged [from] parole ... and was not on probation.' " ( Ibid. ) The officer did no record check and instead simply searched the defendant "without a warrant, probable cause, reasonable suspicion, or knowledge [the defendant] was on probation and subject to a search condition" and discovered contraband. ( Id. at pp. 1251, 1256, 22 Cal.Rptr.3d 369.) The Court of Appeal held that the evidence should have been excluded because not applying the exclusionary rule under the circumstances "would reward police misconduct, not deter it." ( Id. at p. 1256, 22 Cal.Rptr.3d 369.) The court also rejected the argument that the defendant's lie was significant, observing that the defendant's "response should have prompted [the officer] to conduct a record check where he would have discovered [the defendant] was on probation and subject to a search condition." ( Ibid. )
Contrary to Mathews's position otherwise, Myers does not conflict with Watkins . As Watkins itself observed in distinguishing Myers , although Myers concluded that the evidence should not have been suppressed despite the defendant's misrepresentation about his parole status, the conclusion was reached because it was the officer's failure to perform a record check, not the misrepresentation, that prevented the officer from learning about the search condition. ( Watkins, supra , 170 Cal.App.4th at p. 1410, 89 Cal.Rptr.3d 135.) In contrast, in Watkins the officer performed a record check, but the "defendant's lie about his identity ensured that the ... check would not disclose his probation search condition in time." ( Ibid. ) Thus, nothing in Myers undermines Watkins 's holding that a defendant can be estopped from challenging evidence obtained after a record check fails to reveal a search condition when the check was based on false information provided by the defendant.
We also reject Mathews's implication that Watkins is inconsistent with the exclusionary rule's goal of deterring police misconduct. It is true, as *610Mathews points out, that "the primary purpose of the exclusionary rule [is] to deter police misconduct," and it is the rationale underlying the general principle that an unlawful search is not "justified by the circumstance that the suspect was subject to a search condition of which ... law enforcement officers were unaware when the search was conducted." ( People v. Sanders (2003) 31 Cal.4th 318, 334-335, 2 Cal.Rptr.3d 630, 73 P.3d 496.) It is also true, however, that this deterrent purpose does not trump all other considerations when determining whether to apply the exclusionary rule. For example, under the doctrine of inevitable discovery, the fruits of an illegal search will nevertheless be admitted "if the prosecution can establish by *477a preponderance of the evidence that the [evidence] inevitably would have been discovered by lawful means[.] ... This is so because the rule is intended to ensure that the prosecution is not placed in a better position than it would have been had no illegality occurred; the rule does not require it [to] be put in a worse one." ( People v. Coffman and Marlow (2004) 34 Cal.4th 1, 62, 17 Cal.Rptr.3d 710, 96 P.3d 30.) A similar principle justifies the holding in Watkins : where the evidence inevitably would have been lawfully obtained but for the defendant's dishonesty, the exclusionary rule should not be applied to bar it.
Having concluded that it is appropriate to follow Watkins , we turn to address its application in this case. Mathews argues that "[e]ven under Watkins , [Officer Ballard-Geiger's] actions violated" the Fourth Amendment. He claims that the evidence shows that Officer Ballard-Geiger did not run a record check on "Damari Johnson" until after seizing the cell phone, so it was the officer's failure to do a record check, not the provision of a false name, that prevented the officer from learning of the search condition.
We do not agree with either the trial court or Mathews about the relevant point in time after which a defendant who provides a false name to a police officer is estopped under Watkins from challenging the validity of a search or seizure. The court ruled that estoppel was triggered when Mathews gave a false name , and Mathews argues that it was triggered when Officer Ballard-Geiger ran the record check on "Damari Johnson." We conclude, however, that estoppel is triggered when an officer receives the results from a record check based on a false name.
In many cases, all three events will happen nearly simultaneously, as they did in Watkins . (See Watkins, supra , 170 Cal.App.4th at p. 1406, 89 Cal.Rptr.3d 135.) But, as the facts here illustrate, this is not always the case. Officer Ballard-Geiger testified that it was possible he did not run a record check on "Damari Johnson" until up to 20 minutes after Mathews gave the name to him, and the officer received the results a few minutes after running the check. Until Officer Ballard-Geiger actually ran the record check and received the results, the false name did not prevent him from discovering the search condition. We *611therefore conclude that Mathews is estopped from challenging the seizure of the cell phone and the evidence derived from it only if the seizure occurred after 6:36 p.m., when Officer Ballard-Geiger received the results of the record check on "Damari Johnson."
Contrary to Mathews's position otherwise, substantial evidence in the record shows that the seizure occurred after 6:36 p.m. In arguing that Officer Ballard-Geiger seized the cell phone before running a check on "Damari Johnson," Mathews fails to recognize that we must view the evidence in the light most favorable to the trial court's ruling and resolve any conflicts in favor of that ruling. ( Tully, supra , 54 Cal.4th at p. 979, 145 Cal.Rptr.3d 146, 282 P.3d 173 ; People v. Limon, supra , 17 Cal.App.4th at p. 529, 21 Cal.Rptr.2d 397.) We acknowledge that the officer's testimony was inconsistent on the timing of some events at the hospital. He initially testified that he seized the phone based on the search condition, and he later indicated that he was unsure whether the seizure occurred before or after he knew about the condition. But throughout his testimony, he remained clear that he ran the check on "Damari Johnson" before he "took physical custody of the phone." Because it is not reasonable to infer that Officer Ballard-Geiger obtained the phone from the safe during the two or three minutes it took for the results of the check to come back, this *478testimony is sufficient to establish that the phone was not seized until after the officer would have known about the search condition but for Mathews's dishonesty.5 Therefore, under Watkins , Mathews is estopped from challenging the admission of the phone and the other evidence derived from it.
4. Any error in the failure to suppress Officer Ballard-Geiger's observations of Mathews's clothes and wounds was harmless.
Initially, we note that Mathews does not argue that Officer Ballard-Geiger's observations of Mathews's clothing and wounds led to the discovery of any other evidence that should have been excluded as fruit of the poisonous tree. (See People v. Brendlin (2008) 45 Cal.4th 262, 268, 85 Cal.Rptr.3d 496, 195 P.3d 1074.) Nor does Mathews suggest that, had these searches not occurred, probable cause for his arrest would have been lacking. Instead, his only argument for why Officer Ballard-Geiger's observations of the clothing and wounds mattered is the cursory claim that "there was little evidence ... [of] guilt" without this evidence and the evidence related to the cell phone.
The admission of evidence in violation of the Fourth Amendment is not reversible per se. Instead, if such error is harmless beyond a reasonable doubt *612under Chapman v. California (1967) 386 U.S. 18, 87 S.Ct. 824, 17 L.Ed.2d 705, reversal is not required. ( People v. Moore (2011) 51 Cal.4th 1104, 1128-1129, 127 Cal.Rptr.3d 2, 253 P.3d 1153.) We conclude that Officer Ballard-Geiger's observations of Mathews's injuries and clothes did not appreciably contribute to the verdict. Evidence independent of those observations was introduced that demonstrated that Mathews was admitted to the hospital for a gun injury and had been shot in the area of his groin and leg. In particular, Mathews's hospital medical records, the introduction of which Mathews does not contest on appeal, described the injuries. In light of this evidence, any error in the admission of Officer Ballard-Geiger's observations of Mathews's clothing and wounds was harmless beyond a reasonable doubt.6
B.-C.**
III.
DISPOSITION
The abstract of judgment is ordered modified to include Mathews's conviction of count three, carrying a loaded firearm on one's person in a city under Penal Code section 25850, subdivision (a), which the trial court stayed pursuant to Penal Code section 654. The clerk of the superior court is ordered to forward a copy of the modified *479abstract of judgment to the Department of Corrections and Rehabilitation. As modified, the judgment is affirmed.
We concur:
Margulies, J.
Banke, J.
The charges were brought under Penal Code sections 211 (robbery), 29800, subdivision (a)(1) (firearm possession), and 25850, subdivision (a) (carrying a firearm), and the personal-use allegation was made under Penal Code section 12022.53, subdivision (b). All further statutory references are to the Penal Code unless otherwise noted.
The conviction for carrying a loaded firearm on one's person in a city is not listed on the abstract of judgment, and we order the abstract corrected to fix this clerical error. (People v. Mitchell (2001) 26 Cal.4th 181, 185-186, 109 Cal.Rptr.2d 303, 26 P.3d 1040.)
A CAD log introduced into evidence was used to establish the precise time of certain events to which Officer Ballard-Geiger testified.
The trial court took judicial notice of the fact that Mathews was on felony probation with "a four-way search clause." The court later read Mathews's search condition into the record: "Submit to search and seizure by any probation officer or any other law enforcement officer at any time of the day, with or without a search warrant, including: [v]ehicle, residence, person or any property under your control."
Because we conclude that there is substantial evidence that Officer Ballard-Geiger ran and received the results of a record check on "Damari Johnson" before seizing the cell phone, we need not address the Attorney General's argument that Mathews is estopped from challenging any evidence obtained after 6:09 p.m., when Officer Pantoja ran a record check on "Omari Johnson."
Because Mathews has failed to demonstrate prejudice, we need not decide whether Officer Ballard-Geiger's observations of Mathews's clothing and wounds were constitutional. Substantial authority, however, suggests that they were. (See, e.g., U.S. v. Davis (4th Cir. 2012) 690 F.3d 226, 238 [officer's observations of gunshot wounds and clothing while victim in emergency room was lawful as part of shooting investigation]; United States v. George (9th Cir. 1993) 987 F.2d 1428, 1432 [police could enter hospital room and search bedpan for contraband since patient had no reasonable expectation of privacy]; People v. Brown (1979) 88 Cal.App.3d 283, 291, 151 Cal.Rptr. 749 [whether patient has reasonable expectation of privacy in hospital room depends on the circumstances].)
See footnote *, ante.