infirmary-integrated
infirmary-integrated copied to clipboard
Pulsatile Waveform Length
Pulsatile waveforms scale in length (time: x axis) based on HR to accomodate tachycardia but also to allow for decent systolic-diastolic ratios in normocardia and bradycardia... in profound bradycardia, this can lead to unrealistically elongated pulsatile waveforms... need to clamp to a realistic length.
- [x] Explore the issue: What does the literature say about variations on pulsatility amplitude and timing based on heart rate?
Measuring direct tracings show that systolic features (upstroke to dicrotic notch) ~ 23% of cardiac cycle in bradycardia ~ 44 bpm (sample image in Atlas of Cardiovascular Monitoring by Mark, 1998, p.94). This would accurately prevent bradycardia from elongating the entire waveform uncontrollably.
Consider modeling both femoral and aortic pressures as options present in hemodynamics panel? But would need to delay the dicrotic notch compared to the aortic tracing... For example:
(Mark, 1998, p.95)
Judging by the rough typical model of systole being ~33% of the cardiac cycle; this could be the target in normocardia unless a better implementable model exists.
- [ ] Systolic-diastolic ratio for tachycardia?
If modeling both aortic arch and femoral artery... also consider changes in initiation of systole (timer delay). Noted in graphic from Mark, 1998 but is clearer in
from Esper, S. A., & Pinsky, M. R. (2014). Arterial waveform analysis. Best Practice & Research Clinical Anaesthesiology, 28(4), 363–380. https://doi.org/10.1016/j.bpa.2014.08.002
Can also consider modeling based on various factors included in:
from Alastruey, J., Charlton, P. H., Bikia, V., Paliakaite, B., Hametner, B., Bruno, R. M., Mulder, M. P., Vennin, S., Piskin, S., Khir, A. W., Guala, A., Mayer, C. C., Mynard, J., Hughes, A. D., Segers, P., & Westerhof, B. E. (2023). Arterial pulse wave modeling and analysis for vascular-age studies: A review from VascAgeNet. American Journal of Physiology-Heart and Circulatory Physiology, 325(1), H1–H29. https://doi.org/10.1152/ajpheart.00705.2022
Best way to model (for both bradycardia, tachycardia, etc) would be to split systolic and diastolic modeling routines, to draw systole as a finite (plotted!) waveform, complete the diacrotic notch using finite plotting, and then model the diastolic runoff as a geometric function with a consistent downward slope that ends at 0 mmHg. Then, on the following systole (regardless of heart rate), the next triggered beat could draw over the diastolic runoff.
This would work for arterial waveforms and plethysmography! And would dynamically draw accurately without clipping for heart rates up to ~170 bpm (assuming systolic time ~0.35 per tracings from Alastruey et al., 2023). Potential clipping (stacking systolic upstrokes/downstrokes) would still appear realistic but without diastolic runoff (as diastolic fill time would be reducing as well, systolic amplitude would drop per current modeling system).
Should also reference this for arterial and pulse oximetry timings:
from
And place dicrotic notch at 0.33 * HR and at .66 * SBP (maximum amplitude) per "approximately one-third of the heart period, and around one-third down the descending part of the wave (Fig. 5A and Fig. 6A; ages, 30–39 and 40–49 yr)." (Alastruey et al., 2023).
Thoughts for implementation:
- [ ] Modify physiology events to differentiate between systole and diastole for triggering
- [ ] Rename Cardiac_Ventricular_Mechanical to Cardiac_Ventricular_Systole
- [ ] Add Cardiac_Ventricular_Diastole
- [ ] Modify physiology timers to allow for timing of systole versus diastole
- [ ] Rename TimerCardiac_Ventricular_Mechanical to TimerCardiac_Ventricular_Systole
- [ ] Add TimerCardiac_Ventricular_Diastole
- [ ] Sift through current modeling to separate systole from diastole
- [ ] For drawing of pressure waveforms
- [ ] On systole, time the expected length of systole (.33 * HR)
- [ ] Start the timer to trigger diastole after length_of_systole
- [ ] Draw all systole pressure waveforms (until dicrotic notch)
- [ ] May need to account for delay in distal pressure monitoring (e.g. time delay in femoral readings compared to aortic readings)
- [ ] On diastole, trigger diastolic event
- [ ] Draw remaining pressure waveforms including dicrotic notch to diastolic runoff
This is actually true for all plotted waveforms (e.g. idioventricular rhythms).
To balance development time/effort against functional benefits, going to circumvent the modeling with some hard-coded time thresholds. Rather than model systole and diastole triggering as mentioned in https://github.com/tanjera/infirmary-integrated/issues/197#issuecomment-1613937728 it would reap bigger rewards quicker to just clamp draw times to realistic thresholds.
This is especially true for bradycardias which currently look horrendous with plotted waveforms stretching across 5 seconds.
Plan for implementation
- [x] Implement constant in plotted waveforms for declaring systolic time
- [x] Implement in Waveform Editor
- [x] Ensure pipeline propagates the value through Waveform Dictionary Builder to Waveform Plots
- [x] Calculate ratio of systolic time in waveform plot versus patient's systolic time
- [x] Calculate accurate approximation of systolic time for patient for all cardiac rates (brady, normo, tachy)
- [ ] Edit all pulsatile and/or ECG waveforms w/ systolic dependence re: timing/stretching and rebuild waveform dictionary to declare systolic times
- [x] ABP_Default.iiwf
- [x] CVP_Atrioventricular.iiwf
- [x] CVP_Ventricular.iiwf
- [x] ECG_Complex_Idioventricular.iiwf
- [x] ECG_Complex_VT.iiwf
- [x] ECG_CPR_Artifact.iiwf
- [x] ~~IABP_ABP_Default.iiwf~~
- [x] ~~IABP_ABP_Ectopic.iiwf~~
- [x] ICP_HighCompliance.iiwf
- [x] ICP_LowCompliance.iiwf
- [x] PA_Default.iiwf
- [x] PCW_Default.iiwf
- [x] RV_Default.iiwf
- [x] SpO2_Default.iiwf
- [ ] Ensure routines use SystoleTime in calculations for stretching for:
- [x] ABP_Default.iiwf
- [x] CVP_Atrioventricular.iiwf
- [x] CVP_Ventricular.iiwf
- [x] ECG_Complex_Idioventricular.iiwf
- [x] ECG_Complex_VT.iiwf
- [x] ECG_CPR_Artifact.iiwf
- [x] IABP_ABP_Default.iiwf
- [x] IABP_ABP_Ectopic.iiwf
- [x] ~~IAP_Default.iiwf~~
- [x] ICP_HighCompliance.iiwf
- [x] ICP_LowCompliance.iiwf
- [x] PA_Default.iiwf
- [x] PCW_Default.iiwf
- [x] RV_Default.iiwf
- [x] SpO2_Default.iiwf
- [ ] Give a SystoleTime of 0 to non-applicable waveforms:
- [x] ECG_Defibrillation.iiwf
- [x] ECG_Pacemaker.iiwf
- [x] EFM_Contraction.iiwf
- [x] ETCO2_Default.iiwf
- [x] IAP_Default.iiwf
- [x] IABP_ABP_Nonpulsatile.iiwf
- [x] IABP_Balloon_Default.iiwf
- [ ] Ensure non-applicable waveforms are plotted based on other factors (e.g. HR, RR intervals)
- [x] ECG_Defibrillation.iiwf
- [x] ECG_Pacemaker.iiwf
- [x] EFM_Contraction.iiwf
- [x] ETCO2_Default.iiwf
- [x] IAP_Default.iiwf
- [x] IABP_ABP_Nonpulsatile.iiwf
- [x] IABP_Balloon_Default.iiwf
- [x] Solve #188 (from which systolic times are calculated in tachy/brady situations!)
Implemented in 66511cb