mimic3wdb-matched has malformed record
Prerequisites
- [X] Put an X between the brackets on this line if you have done all of the following:
- Checked the online documentation: https://mimic.mit.edu/
- Checked that your issue isn't already addressed: https://github.com/MIT-LCP/mimic-code/issues?utf8=%E2%9C%93&q=
Description
Description of the issue, including:
- what you have tried I opened an issue and was told to open an issue with this project.
- references to similar issues https://github.com/MIT-LCP/wfdb-python/issues/430#issuecomment-1307619102
- queries demonstrating your question (if applicable)
import wfdb
line = 'p08/p086831/p086831-2130-12-29-18-28n'
line_parts = line.strip().split('/')
record = wfdb.rdrecord(line_parts[2], pn_dir=f'mimic3wdb-matched/{line_parts[0]}/{line_parts[1]}')
The above will throw an error due to an error in the database.
Comparing this record with the original de-identified record (38/3855262/3855262n), it's apparent that the original record is correct and the matched header file is broken for some reason.
This particular problem appears to affect only the one record, although there are a handful of other records that look odd (the matched header file doesn't match the original de-identified header file as I would expect):
./p02/p021734/p021734-2136-12-06-18-17n.hea
./p02/p029712/p029712-2143-09-09-13-45n.hea
./p02/p029712/p029712-2143-09-09-13-46.hea
./p02/p029712/p029712-2143-09-11-11-45.hea
./p02/p029712/p029712-2143-09-11-11-45n.hea
./p06/p069293/p069293-2185-07-26-16-46.hea
./p06/p069293/p069293-2185-07-26-16-46n.hea
./p08/p086831/p086831-2130-12-26-13-46.hea
./p08/p086831/p086831-2130-12-26-13-46n.hea
./p08/p086831/p086831-2130-12-29-18-28n.hea
p06/p069293/p069293-2185-07-26-16-46.hea has a one-sample gap randomly inserted in the middle. The others have starting timestamps that are slightly different.
I also took a look at the waveform records, and there was 1 record out of all the records that threw an error:
got FileNotFoundError on record: p01/p017488/p017488-2153-10-19-16-24
So looks like even the waveform records have some issues.