The VS2 channel is unique in that it only appears (as a flag)
when there are nonzero snores during a 2-minute period. However, the
VS index isn't the number of events (nonzero intervals) per hour,
but rather the number of snores per hour.
Import was working, but the consistency checks made a few assumptions
that turned out not to be universally applicable, so they were
making a lot of unnecessary noise.
In particular F3V3 won't always create IPAPmin/max settings when in
CPAP mode or with a single IPAP setting.
Also consider ventilators to have a flex mode of "Rise Time" when
they have a rise time configured.
DreamStation ramp time and mask resistance "off" settings are now also imported.
Ventilator alarms are not yet parsed reliably enough to import at this time.
Also update Detect to retain its original behavior of letting the user
select the P-Series folder instead of the root.
Also fix what looked like a hang when backing up PRS1 files. The
progress bar still doesn't update during backup, but at least it
now says that it's backing up and the UI remains responsive.
This changes the parsing to distinguish between the "flex pressure" reported
by single-pressure modes (which remains effectively EPAP) and the average
pressure reported by bi-level modes (which returns to its former average
pressure channel).
Previously it was reporting spurious information when the humidifier was
disconnected. Now it only reports settings details when the humidifier is
connected (the only time they're valid.)
It also now reports the humidification mode (fixed, adaptive, or heated
tube), and the heated tube temperature when appropriate.
No real change to functionality, other than confirming correct behavior,
documenting observed data and adding flags for anything new.
The ParseHumidifierSettingF0V4 function has now been renamed to
ParseHumidifierSetting60Series for accuracy.
Accordingly update ParseHumidifierSetting50Series to add a parameter
controlling whether parsed settings should be imported or not,
consistent with all other PRS1 humidifier parsers.
The ParseHumidifierSettingV2 function has now been renamed to
ParseHumidifierSetting50Series for accuracy, and the code and
parameters which had been used when 60-Series machines (incorrectly)
relied on it has been removed.
The last statistics events in each slice are now correctly imported.
Previously, in the surprising edge case where two statistic periods are
reported with the same end-of-slice timestamp, they were both being duplicated
when marking the end of the slice.
Also, there were scattered instances where the final statistics in a slice
weren't being imported at all or were being imported incorrectly. These are
now fixed as well.
No change in import behavior yet, but this will be needed to deal with a weird edge
case in which two statistic periods are reported with the same end-of-slice timestamp,
the first one intended to cover the preceding 2 minutes, the second one presumably
intended to cover the fractional second after the previous interval, though all
values are 0, so it's hard to be sure.
Also add support for parsing and proceeding past a previously
unseen F5V0 event, though for now it's just getting swallowed
since its meaning isn't entirely clear.
This adds BND flagging to machines without waveform data, such as F3V3 (1160P)
and bricks (250P, 200X), as well as sessions for which waveform data was
unavailable. It also catches BNDs at the end of a session, which were
previously missed.
By duplicating the last reported event at its originally reported
event (clamped to the slice end time for F3V3), charts will now
correctly show the value during that last interval.
Also fix some slice sanity checks so they don't yell when F3V3
skips an event chunk.
This now correctly shows gaps in therapy and statistics when the
mask is off. It also corrects the initial statistics for some sessions
to 1 second later, when the initial mask-on slice begins 1 second
after the session starts.
Weird zero-length PB and LL events are now dropped on import, since
they wouldn't get drawn anyway and seem to be peculiar artifacts.
If there are no mask-on slices of nonzero duration, then there's not any
meaningful event or waveform data for the session. There is occasionally some
fragmentary data, but it's always less than 1 second.
When such fragmentary waveform data is present, it only contains 1-3 nonzero
samples, corresponding to 0.2s - 0.6s of data, which suggests that the
mask-on slice was really that long rather than precisely 0. As a result,
it appears that the timestamps of the mask-on/mask-off slices are just the
current value of the machine's internal clock, which only has 1-second
resolution.
But rather than embark on herculean efforts to derive a sub-second slice
duration from (only occasionally present) event or waveform data, we just
treat the session as having no detailed data.