"Tricking" someone into confessing could be construed as entrapment.
Taped confessions are made with the acknowledgement of the confessor, unless it is done with a wiretap while the perpetrator is in the act of committing a crime.
Going through someone's medical records, which were recorded when someone was (presumably) not committing a crime, and then using what one finds against the person, is something else entireley.
The chronology of one's medical records could be seen as the same as when a scientist cuts down a tree and inspects the rings in the trunk for changes in weather over the years the tree was alive. Or, it could be seen as when drug testers take hair samples (not urine samples, which are immediate) to see if the person used drugs during the prior 8-16 weeks (depending on hair length).
It seems to me that this is self-incrimination if there is no other evidence from which to charge someone.
-PJ