
518 N.W.2d 784 (1994)
STATE of Iowa, Appellee,
v.
Edward Cassimiro DEASES, Appellant.
No. 92-2045.
Supreme Court of Iowa.
June 22, 1994.
*786 Linda Del Gallo, State Appellate Defender, and B. John Burns, Asst. State Appellate Defender, for appellant.
Bonnie J. Campbell, Atty. Gen. and Thomas S. Tauber and Robert Glaser, Asst. Attys. Gen., for appellee.
Considered by McGIVERIN, C.J., and LARSON, CARTER, SNELL, and TERNUS, JJ.
TERNUS, Justice.
Defendant Edward Cassimiro Deases was convicted after a jury trial of first-degree murder in violation of Iowa Code section 707.2 (1993). Deases now appeals, arguing that the district court erred in admitting the testimony of three of the State's witnesses. First, Deases argues the court erred in admitting the testimony of a nurse because this evidence was protected by the professional communications privilege. Second, he contends the testimony of a correctional officer should not have been admitted because the statements of Deases to which the officer testified were obtained in violation of Deases' Fifth Amendment rights. Third, Deases asserts the court erred in admitting the testimony of a rebuttal witness because the testimony was hearsay. Deases' last assignment of error is the trial court's failure to give Deases' requested instruction on impeachment. We agree that the testimony challenged by Deases was improperly admitted. Consequently, we reverse.

I. Background Facts and Proceedings.

At the time of the offense involved in this case, Deases was an inmate of the Fort Madison Penitentiary. He and another inmate, Joseph Perea, fought in the penitentiary cafeteria. The fight ended when Deases fatally stabbed Perea with a shank (a knife-like instrument).
Deases was charged with first-degree murder. He claimed self-defense. There was conflicting evidence about who initiated the fight. There was also conflicting evidence concerning whether it was Deases or Perea who brought the shank into the cafeteria. The jury found Deases guilty and the court sentenced him to life imprisonment. We will discuss additional facts as necessary.

II. Professional Communications Privilege.

During the fight with Perea, Deases was cut on the palm of his hand. He was taken to the prison health care unit for treatment. Nurse Adella Hull asked Deases where he got the shank. Deases told her he made it in *787 the welding shop. Three correctional officers and the treating physician were present during Nurse Hull's conversation with Deases.
The trial court overruled Deases' motion to suppress the nurse's testimony. Deases had contended that this testimony should not be admitted because his statements to the nurse were protected by the professional communications privilege. See Iowa Code § 622.10 (1993). The district court concluded that Deases' statements were not privileged because they were made in the presence of prison guards. We review the trial court's interpretation of section 622.10 for errors of law. State v. Jones, 490 N.W.2d 787, 789 (Iowa 1992).
Iowa Code section 622.10 prohibits a physician's assistant from disclosing, in testimony, any confidential communication obtained because of the person's employment and necessary to enable the person to discharge the functions of the person's office. The physician-patient privilege is intended to promote free and full communication between a patient and his doctor so that the doctor will have the information necessary to competently diagnose and treat the patient. State v. Bedel, 193 N.W.2d 121, 124 (Iowa 1971). We construe this statute liberally to carry out its manifest purpose. State v. Tornquist, 254 Iowa 1135, 1154, 120 N.W.2d 483, 494 (1963).
The essential elements of the professional communications privilege in this case are: (1) the existence of a professional relationship between the physician's assistant and the patient; (2) the information is acquired during this relationship; and (3) the information is necessary to enable the assistant to treat the patient skillfully. Snethen v. State, 308 N.W.2d 11, 14 (Iowa 1981). However, even when these elements are present, the privilege may be lost if the patient makes statements in the presence of a third person. Tornquist, 254 Iowa at 1155, 120 N.W.2d at 495.
The State concedes that a professional relationship existed between Deases and Nurse Hull and that any information she learned from him was acquired during this relationship. However, the State argues that Deases' statement regarding where the shank came from was not privileged because it was not information necessary for Deases' treatment. We disagree.
Nurse Hull testified that she asked Deases where he got the shank so that she could decide whether to give him a tetanus shot. Hull stated it was important in treating Deases to find out whether there were shavings in his hand. She believed that the source of the shank had a bearing on whether shavings were likely to be found in Deases' cut. Based on this evidence, we conclude Deases' communications to the nurse regarding the shank were necessary to enable her to treat him skillfully.
The State also argues that Deases lost any privilege he might otherwise have had because his statements were made in the presence of third persons, the three correctional officers. Deases argues that the correctional officers were assistants to the doctor and nurse because they were there to protect the medical personnel. We have not previously considered this precise argument.
In the Tornquist case, we held that the testimony of a hospital employee concerning statements she heard the defendant make to his treating physician was admissible. Our decision was based on the lack of evidence that the hospital employee was present to assist the doctor. Tornquist, 254 Iowa at 1155, 120 N.W.2d at 495.
In State v. Flaucher, 223 N.W.2d 239, 241 (Iowa 1974), we stated in dicta that statements made by a defendant to his doctor in the presence of police officers were not privileged. However, the defendant in that case apparently did not argue that the officers' presence was necessary for the defendant to obtain treatment.
Finally, in State v. Craney, 347 N.W.2d 668 (Iowa 1984), we considered the admissibility of a police officer's testimony concerning a statement he heard the defendant make to the defendant's attorney. We held that the admission of this testimony did not violate the attorney-client privilege because the communication made by the defendant to his *788 attorney was not intended to be confidential. Craney, 347 N.W.2d at 679.
The New York Court of Appeals confronted a situation similar to that presented here in People v. Decina, 2 N.Y.2d 133, 157 N.Y.S.2d 558, 138 N.E.2d 799 (App.1956). In Decina, a police guard was present, pursuant to the district attorney's orders, during defendant's examination by a doctor. In determining whether the privilege should apply in this situation the court said that the "true test appears to be whether in the light of all the surrounding circumstances, and particularly the occasion for the presence of the third person, the communication was intended to be confidential." Decina, 157 N.Y.S.2d at 569, 138 N.E.2d at 807. Applying this test the court found that the communication was privileged and improperly admitted into evidence at trial. Id.; see also State v. Gibson, 3 Wash.App. 596, 476 P.2d 727, 730 (1970) (court applied test set forth in Decina and held that communication between defendant and doctor in presence of police guard was privileged).
Similarly, in State v. George, 223 Kan. 507, 575 P.2d 511, 517 (1978), the Kansas Supreme Court concluded that the information obtained by the defendant's physician during his examination of the defendant was privileged even though police officers were present during the examination. The court observed, "[a] patient who is in custody can hardly be expected to ask the arresting officers to leave the jail so that he may be alone with his physician." George, 575 P.2d at 517.
We hold that the presence of a third person during an otherwise confidential communication does not automatically destroy the privilege. If the third person is present to assist the physician in some way or the third person's presence is necessary to enable the defendant to obtain treatment, then the privilege protects confidential communications made in the presence of the third person.
We find that the presence of the correctional officers here was necessary for Deases to be treated. They were not casual observers. The State acknowledges the guards were there for security. The need to protect the doctor and nurse from Deases is understandable since Deases had just stabbed and killed another inmate and had previously been convicted of the brutal killing of a young woman. See State v. Deases, 479 N.W.2d 597 (Iowa App.1991). Any attempt by Deases to ask the guards to step outside would have been futile. Under these circumstances, the presence of the correctional officers did not destroy the doctor-patient privilege.
We believe this interpretation of the statute promotes its intended purpose of allowing free and full communication between the doctor and patient as needed for adequate treatment. Any other interpretation would unfairly require a prisoner to risk inadequate treatment or surrender his doctor-patient privilege.
In summary, we find that the essential elements for existence of the professional communications privilege were present. Further, we conclude that the communications Deases made to the nurse were privileged despite the presence of the correctional officers. Consequently, the district court erred in admitting the testimony of Nurse Hull into evidence.

III. Fifth Amendment Claim.

While Deases was at the health care unit, a Fort Madison police sergeant advised Deases of his Miranda rights. Deases told the police officer that he did not want to talk. After Deases had been treated, the officers took him to a small office down the hall from the treatment room. There a Division of Criminal Investigations special agent also advised Deases of his Miranda rights. Deases again said that he did not want to talk. A correctional officer was present on both occasions.
After Deases refused to talk the second time, the correctional officer escorted Deases from the office room to cellhouse 317. Once there the officer questioned Deases about the stabbing incident. Deases replied, "no disrespect but I don't want to talk about it." Nonetheless the officer continued to question Deases. Deases eventually told the officer that he got the shank out of the welding shop, that the shank was made of chunk *789 steel, and that he had not planned the incident.
Deases filed a motion to suppress the correctional officer's testimony but the court allowed the officer to testify. Deases contends that the statements he made to the officer should not have been admitted because they were obtained in violation of the Fifth Amendment to the United States Constitution. He argues that his rights were violated when the officer continued to question him after he said he did not want to talk about the stabbing incident. Our review of this issue is de novo. State v. Evans, 495 N.W.2d 760, 762 (Iowa 1993).
In Miranda v. Arizona, 384 U.S. 436, 444, 86 S.Ct. 1602, 1612, 16 L.Ed.2d 694, 706 (1966), the United States Supreme Court held that the prosecution may not use statements stemming from the custodial interrogation of the defendant unless it shows procedural safeguards effective to secure the privilege against self-incrimination. Custodial interrogation is "questioning initiated by law enforcement officers after a person has been taken into custody or otherwise deprived of his freedom of action in any significant way." Id. Adequate procedural safeguards exist when the interrogating officer gives the now-familiar Miranda warnings. However, if the defendant expresses his desire to remain silent after having received these warnings, the interrogation must cease. Id.
The State does not argue that the officer's questioning of Deases was not an "interrogation." However, the State contends that Miranda does not apply here because Deases was not in custody, the correctional officer was not a law enforcement officer, and Deases' statements were within the public safety exception to the Miranda rule. We discuss each argument separately below.
A. Custodial interrogation. Miranda warnings are required only when the defendant is in custody or is otherwise deprived of his freedom of action in a significant way. Miranda, 384 U.S. at 444, 86 S.Ct. at 1612, 16 L.Ed.2d at 706. Incarceration does not automatically render an inmate in custody for purposes of Miranda. Leviston v. Black, 843 F.2d 302, 304 (8th Cir.), cert. denied, 488 U.S. 865, 109 S.Ct. 168, 102 L.Ed.2d 138 (1988); Bradley v. State, 473 N.W.2d 224, 228 (Iowa App.1991).
In the prison context there must be some added restriction on the inmate's freedom of movement stemming from the interrogation itself. Leviston, 843 F.2d at 304; Cervantes v. Walker, 589 F.2d 424, 427-28 (9th Cir.1978). The focus is on whether a reasonable person in the inmate's position would understand himself to be in custody. Leviston, 843 F.2d at 304. Relevant factors in making this determination include the language used to summon the individual, the purpose, place and manner of the interrogation, the extent to which the defendant is confronted with evidence of his guilt, and whether the defendant is free to leave the place of questioning. Id.; Cervantes, 589 F.2d at 427-28.
Applying these factors to this case, we conclude that Deases was in custody. Deases was the only inmate involved in the fight with Perea and promptly became a suspect in Perea's death. Consequently, the purpose of questioning Deases was not to generally investigate Perea's death but rather was to find out the nature and extent of Deases' culpability for that death.
Immediately after the fight Deases was tackled by a prison guard. Correctional officers then escorted Deases in restraints to the prison health care unit and later to a small office room nearby. Deases was handcuffed when he was in the office room and was surrounded by several police officers and guards.
Deases was still handcuffed when taken to cellhouse 317 and remained handcuffed once he arrived. Cellhouse 317 was not Deases' usual cell and, in fact, was in an unused part of the penitentiary. The correctional officer remained with Deases after he was placed in the cell. Deases was not free to leave. Although there is no evidence that the guard used any "strong-arm" tactics, the officer persisted in questioning Deases after the officer had heard Deases say on three occasions that he did not want to talk.
*790 We believe these facts show a restriction of Deases' freedom over and above that of his normal prison setting and that a reasonable person would have believed himself to be in custody. Therefore, Deases was in custody for Miranda purposes when the correctional officer questioned him.
B. Correctional officer as law enforcement officer. The State argues that correctional officers are not law enforcement officers because they have different duties and do not deal with the public. Certainly, a prison guard need not preface every question asked an inmate with a Miranda warning. On the other hand, the mere fact that the state official conducting the interrogation is a prison guard should not insulate the State from the requirements of Miranda where these safeguards would otherwise apply. Cf. State v. Helewa, 223 N.J.Super. 40, 537 A.2d 1328 (A.D.1988).
In Helewa, a social services caseworker conducted a custodial interview of the defendant who was charged with sexually assaulting his daughters. The New Jersey Superior Court found that the caseworker was a "law enforcement officer" for the purposes of Miranda. Helewa, 537 A.2d at 1330-33. The court focused its inquiry on the likelihood that the information elicited from questioning would be used against the defendant in criminal prosecutions. Id.; see also Estelle v. Smith, 451 U.S. 454, 101 S.Ct. 1866, 68 L.Ed.2d 359 (1981) (testimony concerning court-ordered psychiatric examination given without Miranda warnings was inadmissible in penalty proceeding of capital murder case); Mathis v. United States, 391 U.S. 1, 88 S.Ct. 1503, 20 L.Ed.2d 381 (1968) (Internal Revenue Service agent was required to give Miranda warning during questioning of defendant serving state sentence that led to criminal prosecution); United States v. Mata-Abundiz, 717 F.2d 1277 (9th Cir.1983) (Immigration and Naturalization Services agent was required to give Miranda warnings); Battie v. Estelle, 655 F.2d 692, 699 (5th Cir.1981) (applied Estelle v. Smith under similar circumstances); Commonwealth v. Chacko, 500 Pa. 571, 459 A.2d 311, 314 n. 2 (1983) (member of internal prison staff who performed custodial interrogation was required to give Miranda warnings).
We find these cases instructive and agree with the statement of the Fifth Circuit Court of Appeals that "the particular office that the official who performs the custodial interrogation represents is inconsequential." Battie, 655 F.2d at 699. As noted in Battie, a Miranda warning is given "to protect a putative defendant against the compulsion to incriminate himself arising from an official custodial interrogation." Id. That compulsion exists just as much when the custodial interrogation is conducted by a prison guard as when conducted by a police officer.
Consequently, we hold that the particular office that the official occupies does not determine whether the official must give Miranda warnings. Moreover, the mere fact that the official's customary duties do not include interrogation of criminal defendants does not mean that such officials need not be concerned with the defendant's constitutional rights. Chacko, 459 A.2d at 314 n. 2. We believe that when a state official conducts a custodial interrogation that would require a Miranda warning if undertaken by a police officer, then the official is similarly required to give a Miranda warning. Any other conclusion would allow the State to ignore a defendant's constitutional rights merely by having the interrogation conducted by someone who lacks the title "law enforcement officer" but who is otherwise performing the interrogation of such an officer.
Here, the correctional officer questioned Deases about the stabbing incident and the shank while Deases was in custody. The information that the guard elicited from Deases was likely to be used against him in a criminal prosecution for Perea's murder. Therefore, we find that the prison guard was a "law enforcement officer" for purposes of the Miranda rule.
C. Public safety exception. Next, the State argues that the interrogation of Deases meets the public safety exception to the Miranda rule. The United States Supreme Court explained the public safety exception in New York v. Quarles, 467 U.S. 649, *791 104 S.Ct. 2626, 81 L.Ed.2d 550 (1984). In Quarles, the defendant had discarded his gun in a supermarket. The police wanted to find it quickly to prevent further danger to the public. The Court held that the police did not have to give the defendant Miranda warnings before asking him where the gun was. The Court stated that "the need for answers to questions in a situation posing a threat to the public safety outweighs the need for the prophylactic rule protecting the Fifth Amendment's privilege against self-incrimination." Quarles, 467 U.S. at 655-60, 104 S.Ct. at 2631-33, 81 L.Ed.2d at 556-59.
The facts of this case do not implicate the public safety exception. Unlike the situation in Quarles, here prison officials had possession of the shank involved in the stabbing incident when the questioning of Deases occurred. Any immediate threat to public safety that the shank posed was no longer present. The State argues that the officer wanted to find out whether there were other shanks in the kitchen area that might pose a threat to inmates and prison personnel. However, the officer's questions do not reflect this limited purpose. Therefore, we do not accept this unsupported argument to justify application of the public safety exception to the Miranda rule. We conclude the exception does not apply.
D. Harmless error. Having rejected the State's arguments, we hold that Deases was subjected to a custodial interrogation by the correctional officer which required compliance with Miranda. Because the guard's questioning continued after Deases had invoked his right to remain silent, Deases' Fifth Amendment rights were violated. Consequently, the trial court erred in admitting the correctional officer's testimony.
The State argues, however, that any error in admitting the testimony of the prison guard was harmless because his testimony covered the same matters as the nurse's testimony. We disagree.
In order for a constitutional error to be harmless, the court must be able to declare it harmless beyond a reasonable doubt. Chapman v. California, 386 U.S. 18, 24, 87 S.Ct. 824, 828, 17 L.Ed.2d 705, 710-11 (1967). If substantially the same evidence is in the record, erroneously admitted evidence is not considered prejudicial. State v. Sowder, 394 N.W.2d 368, 372 (Iowa 1986). The only other evidence that Deases made the shank came from the nurse. We have decided that her testimony was improperly admitted. Therefore, the error in admitting the prison guard's testimony is not harmless beyond a reasonable doubt.

IV. Testimony of State's Witness: Hearsay and Lack of Personal Knowledge.

Inmate Spencer Pierce testified on behalf of Deases that he spoke with Perea the morning of the fight and Perea said he was going to confront someone. Pierce also testified that when he was in the penitentiary cafeteria, he saw Perea take the shank out of his pants and start the fight. On cross-examination the State asked Pierce if he had told a different account of the fight to the Division of Criminal Investigation (DCI). The State questioned Pierce about specific statements he had allegedly made. Pierce denied making any of the statements.
In rebuttal the State called a DCI agent who testified to three prior statements made by Pierce: (1) that Pierce saw Deases coming towards Perea with a metal object; (2) that if the agent knew why Perea was in protective custody he would know why Perea was killed; and (3) that Pierce thought Deases killed Perea for someone else.
The district court overruled Deases' objections to this testimony. Deases contends on appeal that the agent's testimony was inadmissible hearsay and that Pierce lacked personal knowledge of the statements concerning the motivation for Perea's murder. We review for an abuse of discretion. State v. Jones, 490 N.W.2d 787, 789 (Iowa 1992).
A. Hearsay. The State contends that the agent's testimony concerning Pierce's prior inconsistent statements is not hearsay. Hearsay is defined as "a statement, other than one made by the declarant while testifying at the trial or hearing, offered in evidence to prove the truth of the matter asserted." Iowa R.Evid. 801(c). Iowa Rule of Evidence 801(d)(1) provides that a prior inconsistent *792 statement "given under oath, subject to the penalty of perjury at a trial, hearing, or other proceeding, or in a deposition" is not hearsay. However, the State cannot rely on this rule because Pierce's statements to the DCI agent were not given under oath, at a trial, hearing, deposition, or other proceeding.
The State argues that it offered the agent's testimony for the limited purpose of impeaching Pierce, not for the truth of the matter asserted. See State v. Sowder, 394 N.W.2d 368, 370 (Iowa 1986) (A prior statement is not hearsay if it is not offered to prove the truth of the statement, "but rather to prove the fact the witness made a statement at a previous time."). But the mere fact that a prior statement is inconsistent with a witness' trial testimony will not support admission of the prior statement. If that were the case, the oath requirement of rule 801(d)(1) would be meaningless. The fact that the statement was made must be relevant beyond showing an inconsistency between the substance of the prior statement and the witness' trial testimony. In other words, the making of the prior statement must be relevant independent of the truth of the content of the statement.
Consequently, we must decide whether Pierce's prior statements were offered to prove the truth of the statements or to prove the statements were made. In making this determination we look at the real purpose of the offered testimony. Id. at 371. Our determination "is an objective finding based on the facts and circumstances developed by the record." Id. We will consider the scope of the examination in determining the real reason that the testimony was offered. Id.
We believe the State's real purpose in offering the DCI agent's testimony went beyond an attempt to impeach Pierce. The fact that Pierce made a statement at a previous time was not important; it was the content of that statement that was crucial to the State's case. Moreover, the agent's testimony introduced a totally new idea, that Deases carried out a contract murder. The real purpose of this testimony was to contradict Deases' claim of self-defense and to give the jury a reason for Deases' murder of Perea. Therefore, we believe the trial court abused its discretion in admitting the DCI agent's testimony.
B. Lack of personal knowledge. Because we conclude that the agent's testimony was inadmissible hearsay, we need not consider whether this testimony was also inadmissible under Iowa Rule of Evidence 602 because Pierce lacked personal knowledge of the matter asserted.

V. Instruction on Credibility.

Deases argues that the district court erred in failing to instruct the jury on the credibility of two defense witnesses who were convicted felons. The State argues that Deases did not preserve error on this issue because he did not object to the final instruction.
To preserve error counsel must make a specific objection to the instructions in their final form. In the absence of such an objection, any alleged error in the instruction is waived. State v. Welch, 507 N.W.2d 580, 584 (Iowa 1993). We find that error was not preserved here.
Deases objected to the court's proposed instruction concerning the credibility of witnesses. The court then revised the instruction and read it to Deases' counsel. Counsel made no objection to the revised instruction and the court submitted it to the jury. In the absence of an objection to the new instruction, the court was justified in assuming Deases had abandoned any objection. Welch, 507 N.W.2d at 584.

VI. Disposition.

Because we find that the testimony of three witnesses was improperly admitted into evidence, we reverse Deases' conviction of first-degree murder and remand to the district court for a new trial.
REVERSED AND REMANDED.
