MIT-LCP / wfdb-python

Native Python WFDB package
MIT License
744 stars 300 forks source link

Extract measurement types of waveforms, group e.g. all Blood Presssures #100

Closed steph409 closed 5 years ago

steph409 commented 6 years ago

Hi,

I am using the mimic iii database and it would be useful to have more Mean Arterial Pressure, heartrate and temperature measurements. Hence I want to extract this data from the waveforms. I downloaded the matched waveforms and timestamped the samples using the filename and the frequency fields.get('fs'). My questions are:

    sig, fields = wfdb.srdsamp('/home/matched/p00/p000020/p000020-2183-04-28-17-47n')
    print('Signames:', fields.get('signame'))

    sig, fields = wfdb.srdsamp('/home/matched/p00/p000030/p000030-2172-10-16-12-22n')
    print('Signames:', fields.get('signame'))

gives the following result:

Signames: ['HR', 'ABPSys', 'ABPDias', 'ABPMean', 'PAPSys', 'PAPDias', 'PAPMean', 'CVP', 'PULSE', 'RESP', 'SpO2', 'NBPSys', 'NBPDias', 'NBPMean', 'CO']
Signames: ['HR', 'PULSE', 'RESP', 'SpO2', 'NBPSys', 'NBPDias', 'NBPMean']
alistairewj commented 6 years ago

I'll answer your questions in turn.

If you do create a signal dictionary, I'm sure we could find a place for it in this repository.

I'll also mention: be very careful combining signals. For example, you mention that you have found a few mean arterial pressure signals, but UAP and PAP are not mean arterial pressures. UAP is an intra-abdominal pressure and PAP is pulmonary artery pressure. They should not be combined with MAP. Note that the signal dictionary mentioned earlier groups these various blood pressures together though clinically they mean very different things (the list of groups is here). You probably need to modify and create your own.

Finally I'll mention that we often call these signals the "numerics" (one value per second), so that we can easily differentiate them from the waveforms (125 Hz signals) - but that's just a convention.

steph409 commented 6 years ago

Hi Alistar,

thank you for your response. I did what you proposed and I will push my dictionary once its finished. I still have some questions:

gives me the following plot: plot_1.pdf I also made another plot where I added MIMIC III chartevent values for the specific patient (plot_2.pdf) I call the numerics "raw data" in plot_2 and chartevent measurements "nurse validated". The nurse-validated data seems to confirm that behavior (or at least, that the measurements are somehow correct).

For me it seems strange that the value is constant for some time (30-60 minutes) and then jumps (not a lot of course). Is there a reason for this kind of behavior? plot_1.pdf plot_2.pdf

Then I wonder what else I could push from my code, maybe you can say what you think about the following:

Best regards, Stephanie

alistairewj commented 6 years ago

Well, NBP stands for non-invasive blood pressure, which they can measure by having a cuff inflate aperiodically on an automated timer or initiating the measurement themselves. To be honest, I hadn't really realized that non-invasive blood pressures were contained in the numerics, and certainly didn't realize that they were recorded every minute. I think the fastest they would reasonably sample NBPs is every 15 minutes - if resolution is needed any faster than that and they usually resort to invasive arterial blood pressure measurement. It seems that, in the numerics, the last value recorded is held for some time! Your second plot nicely highlights this as well, with the nurse validated measurement preceding the sample and held measures.

Regarding your point 2, I don't see any flagged measurements in that plot, so unfortunately I'm not sure what you are referring to.

Absolutely this code would be useful. We can find a place for it in the repo for sure, perhaps in a folder dedicated for working with the matched waveforms. It would also be nice to start creating some collaborative documentation around the waveforms, which describes situations like this sample and hold to help other researchers.

steph409 commented 6 years ago

Hi Alistar, thank you so much for your help. there are just few questions left: according to the waveform signal list, we encounter some signals we couldn't define or find out what kind of value was actually measured. Perhaps you can help us with following signals:

Signalname: SV Count Does it mean stroke volume or "super ventricular"? if not are there signals which represent stroke volume?

What kind of Blood pressure type do the different signals P1 to P4 and [62130] with each type (1/3:systolic, 2/3:diastolic, 3/3:mean) represent?

Then there are statistical curiosities: e.g. PAP is different from pap mean and ABP as well is different from ABP_mean. What is the difference between the signal with and without "mean"? We made some statistics and e.g. ABP seems to be higher than other mean arterial pressure measurements (BP MEAN. ABP Mean, ART mean, ABPMEAN, NBP...) which range from median:75-82.

ABP (median:107, mean:113) ABP MEAN (median: 78, mean:79) Do you have an explanation why ABP is higher?

The same behavior shows the signal PAP: Pap: median 50, PAP Mean, PAP MEAN, PAPMean: 25-28.

Many thanks in advance, Stephi

alistairewj commented 6 years ago

SV Count: probably count of the number of supraventricular beats.. for the other measures, I'm not really sure. It could be that different areas of the hospital use different colloquialisms, e.g. CCU uses PAP while MICU uses PAP mean (this you can check as I think the comments have the unit).. or it could be a different device is used for the measurement.. or ABP mean could be derived using the 2/3rds 1/3rd equation while ABP is calculated from the area of the waveform. I don't really have answers, sorry!

waqaraziz123 commented 6 years ago

Hi Stephanie,

Are you still working with matched waveform data ?

Thanks

Yanjiayork commented 5 years ago

I try to understand what ART BP systolic mean in the dataset, especially what ART mean here? Any idea? Thanks. Yan

qinfeng commented 5 years ago

@Yanjiayork

I try to understand what ART BP systolic mean in the dataset, especially what ART mean here? Any idea? Thanks. Yan

Refer to this link: https://physionet.org/physiobank/signals.shtml

ART BP : arterial blood pressure

peiyaoli commented 5 years ago

i think it might be arterial blood pressure发自我的华为手机-------- 原始邮件 --------主题:Re: [MIT-LCP/wfdb-python] Extract measurement types of waveforms, group e.g. all Blood Presssures (#100)发件人:qinfeng 收件人:MIT-LCP/wfdb-python 抄送:Subscribed I try to understand what ART BP systolic mean in the dataset, especially what ART mean here? Any idea? Thanks. Yan

Refer to this link: https://physionet.org/physiobank/signals.shtml ART BP : arterial blood pressure

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

Yanjiayork commented 5 years ago

@qinfeng @peiyaoli Thanks both. The link is very helpful.

vinay-hebb commented 2 years ago

iving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

https://archive.physionet.org/physiobank/signals.shtml I could not understand difference between (ABP, BP) and (ART, BP). Both have description as arterial blood pressure. In which way, these are different