This was a very specific edge case: when there was a single new DS1
session, the error resulting from encountering DS2 data would make
OSCAR think that it had imported zero sessions, even though it had
half-imported the DS1 session. (Those sessions would be lost after
quitting OSCAR.)
Now all CPAP loaders have access to the unsupported/untested/brick signals
and CHECK_VALUE and UNEXPECTED_VALUE macros.
Also remove superfluous unsupported flag in MachineLoader.
Now that the post-process calcLeaks properly handles discontinuous
data, don't make the loader pretend that the machine generated
CPAP_Leak data when it didn't.
The resulting data is nearly identical, except for around edge cases
where the "correct" result is isn't clear. For example, when a
pressure changes within a 2-minute reporting interval, the
post-process calcLeaks will use that pressure when calculating
the unintended leak for that interval. The previous PRS1 loader
calculations were inconsistent, but would often apply the pressure
in place at the beginning of the 2-minute interval instead.
Either interpretation could be reasonable, but consistency is
preferred.
These minor differences aren't worth pursuing further, since the
calculated unintended leak looks dubious regardless.
This affects all CPAP/APAP/BiPAP models in the 4xx-7xx range.
In contrast, most ventilators and ASV record unintended leak
data (only the oldest ones don't), and so aren't affected by
these changes.
Also move some previously static functions into their associated classes,
which lets us remove a few unnecessary wrapper functions used for testing.
No change in functionality.
Use git blame dd9a087 to follow the history before this refactoring.
No change in functionality.
This is almost entirely copy/paste, with the main exception of moving the
contents() method definitions out of the class definitions and moving the
needed TYPE definitions out of the header file.
Use git blame dd9a087 to follow the history before this refactoring.
Most of the gains were from replacing endl with '\n', which avoids
unnecessary flushing. But there were a few hot functions whose
inefficiency ended up having a significan impact.
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.