Drag some ASV notes of of git stash

This commit is contained in:
Mark Watkins 2013-10-19 22:51:25 +10:00
parent 9b51e2ecd3
commit 65540d1b51
2 changed files with 178 additions and 114 deletions

View File

@ -478,8 +478,46 @@ bool PRS1Loader::ParseSummary(Machine *mach, qint32 sequence, quint32 timestamp,
session->really_set_first(qint64(timestamp)*1000L); session->really_set_first(qint64(timestamp)*1000L);
EventDataType max,min; EventDataType max,min;
min=float(data[0x03])/10.0; //////////////////////////////////////////////////////////////////////////////////////////
max=float(data[0x04])/10.0; // ASV Codes (Family 5) Recheck 17/10/2013
// These are all confirmed off Encore reports
//cpapmax=EventDataType(data[0x02])/10.0; // Max Pressure in ASV machines
//minepap=EventDataType(data[0x03])/10.0; // Min EPAP
//maxepap=EventDataType(data[0x04])/10.0; // Max EPAP
//minps=EventDataType(data[0x05])/10.0 // Min Pressure Support
//maxps=EventDataType(data[0x06])/10.0 // Max Pressure Support
//duration=data[0x1B] | data[0x1C] << 8) // Session length in seconds
//epap90=EventDataType(data[0x21])/10.0; // EPAP 90%
//epapavg=EventDataType(data[0x22])/10.0; // EPAP Average
//ps90=EventDataType(data[0x23])/10.0; // Pressure Support 90%
//psavg=EventDataType(data[0x24])/10.0; // Pressure Support Average
//TODO: minpb=data[0x] | data[0x] << 8; // Minutes in PB
//TODO: minleak=data[0x] | data[0x] << 8; // Minutes in Large Leak
//TODO: oa_cnt=data[0x] | data[0x] << 8; // Obstructive events count
//ca_cnt=data[0x2d] | data[0x2e] << 8; // Clear Airway Events count
//h_cnt=data[0x2f] | data[0x30] << 8; // Hypopnea events count
//fl_cnt=data[0x33] | data[0x34] << 8; // Flow Limitation events count
//avg_leak=EventDataType(data[0x35]); // Average Leak
//avgptb=EventDataType(data[0x36]); // Average Patient Triggered Breaths %
//avgbreathrate=EventDataType(data[0x37]); // Average Breaths Per Minute
//avgminvent=EventDataType(data[0x38]); // Average Minute Ventilation
//avg_tidalvol=EventDataType(data[0x39])*10.0; // Average Tidal Volume
//////////////////////////////////////////////////////////////////////////////////////////
min=float(data[0x03])/10.0; // Min EPAP
max=float(data[0x04])/10.0; // Max EPAP
int offset=0; int offset=0;
if (family==5) { //data[0x05]!=0) { // This is a time value for ASV stuff if (family==5) { //data[0x05]!=0) { // This is a time value for ASV stuff
@ -558,10 +596,11 @@ bool PRS1Loader::ParseSummary(Machine *mach, qint32 sequence, quint32 timestamp,
//session->setWavg(CPAP_Pressure,min); //session->setWavg(CPAP_Pressure,min);
} }
} else { } else {
// 0X28 & 0X29 is length on r5
// 0X28 & 0X29 is length on r5
if (family == 0 && familyVersion >= 4) if (family == 0 && familyVersion >= 4)
offset += 12; offset += 12;
duration=data[offset+0x14] | (data[offset+0x15] << 8); duration=data[offset+0x14] | (data[offset+0x15] << 8);
if (!duration) { if (!duration) {
qDebug() << "!duration exit"; qDebug() << "!duration exit";

View File

@ -338,7 +338,7 @@ QToolButton:pressed {
#qt_calendar_monthbutton { #qt_calendar_monthbutton {
background: transparent; background: transparent;
border: 2px solid transparent; border: 2px solid transparent;
border-radius: 8px; border-radius: 8px;
width: 6em; width: 6em;
} }
@ -364,7 +364,9 @@ QToolButton:pressed {
#qt_calendar_yearbutton:pressed { #qt_calendar_yearbutton:pressed {
border: 2px solid #456789; border: 2px solid #456789;
background: #89abcd; background: #89abcd;
}</string> }
</string>
</property> </property>
<property name="firstDayOfWeek"> <property name="firstDayOfWeek">
<enum>Qt::Monday</enum> <enum>Qt::Monday</enum>
@ -493,121 +495,144 @@ QToolButton:pressed {
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <widget class="QFrame" name="frame_3">
<property name="spacing"> <property name="styleSheet">
<number>0</number> <string notr="true"/>
</property> </property>
<item> <property name="frameShape">
<widget class="QLabel" name="label_5"> <enum>QFrame::StyledPanel</enum>
<property name="sizePolicy"> </property>
<sizepolicy hsizetype="Fixed" vsizetype="Preferred"> <property name="frameShadow">
<horstretch>0</horstretch> <enum>QFrame::Raised</enum>
<verstretch>0</verstretch> </property>
</sizepolicy> <layout class="QHBoxLayout" name="horizontalLayout_3">
</property> <property name="spacing">
<property name="text"> <number>2</number>
<string>Journal</string> </property>
</property> <property name="leftMargin">
</widget> <number>4</number>
</item> </property>
<item> <property name="topMargin">
<spacer name="horizontalSpacer"> <number>0</number>
<property name="orientation"> </property>
<enum>Qt::Horizontal</enum> <property name="rightMargin">
</property> <number>0</number>
<property name="sizeHint" stdset="0"> </property>
<size> <property name="bottomMargin">
<width>40</width> <number>0</number>
<height>20</height> </property>
</size> <item>
</property> <widget class="QLabel" name="label_5">
</spacer> <property name="sizePolicy">
</item> <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<item> <horstretch>0</horstretch>
<widget class="QComboBox" name="JournalNotesFontsize"> <verstretch>0</verstretch>
<property name="maximumSize"> </sizepolicy>
<size>
<width>85</width>
<height>16777215</height>
</size>
</property>
<property name="maxVisibleItems">
<number>3</number>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
<item>
<property name="text">
<string>Small</string>
</property> </property>
</item>
<item>
<property name="text"> <property name="text">
<string>Medium</string> <string>Journal</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>342</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="JournalNotesItalic">
<property name="font">
<font>
<italic>true</italic>
</font>
</property> </property>
</item>
<item>
<property name="text"> <property name="text">
<string>Big</string> <string> i </string>
</property> </property>
</item> <property name="shortcut">
</widget> <string>Ctrl+I</string>
</item> </property>
<item> </widget>
<widget class="QToolButton" name="JournalNotesColour"> </item>
<property name="styleSheet"> <item>
<string notr="true">color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 0, 0, 255), stop:0.166 rgba(255, 255, 0, 255), stop:0.333 rgba(0, 255, 0, 255), stop:0.5 rgba(0, 255, 255, 255), stop:0.666 rgba(0, 0, 255, 255), stop:0.833 rgba(255, 0, 255, 255), stop:1 rgba(255, 0, 0, 255))</string> <widget class="QToolButton" name="JournalNotesBold">
</property> <property name="font">
<property name="text"> <font>
<string>Color</string> <weight>75</weight>
</property> <bold>true</bold>
</widget> </font>
</item> </property>
<item> <property name="text">
<widget class="QToolButton" name="JournalNotesItalic"> <string>B</string>
<property name="font"> </property>
<font> <property name="shortcut">
<italic>true</italic> <string>Ctrl+B</string>
</font> </property>
</property> </widget>
<property name="text"> </item>
<string> i </string> <item>
</property> <widget class="QToolButton" name="JournalNotesUnderline">
<property name="shortcut"> <property name="font">
<string>Ctrl+I</string> <font>
</property> <underline>true</underline>
</widget> </font>
</item> </property>
<item> <property name="text">
<widget class="QToolButton" name="JournalNotesUnderline"> <string>u</string>
<property name="font"> </property>
<font> </widget>
<underline>true</underline> </item>
</font> <item>
</property> <widget class="QToolButton" name="JournalNotesColour">
<property name="text"> <property name="styleSheet">
<string>u</string> <string notr="true">color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 0, 0, 255), stop:0.166 rgba(255, 255, 0, 255), stop:0.333 rgba(0, 255, 0, 255), stop:0.5 rgba(0, 255, 255, 255), stop:0.666 rgba(0, 0, 255, 255), stop:0.833 rgba(255, 0, 255, 255), stop:1 rgba(255, 0, 0, 255))</string>
</property> </property>
</widget> <property name="text">
</item> <string>Color</string>
<item> </property>
<widget class="QToolButton" name="JournalNotesBold"> </widget>
<property name="font"> </item>
<font> <item>
<weight>75</weight> <widget class="QComboBox" name="JournalNotesFontsize">
<bold>true</bold> <property name="maximumSize">
</font> <size>
</property> <width>85</width>
<property name="text"> <height>16777215</height>
<string>B</string> </size>
</property> </property>
<property name="shortcut"> <property name="maxVisibleItems">
<string>Ctrl+B</string> <number>3</number>
</property> </property>
</widget> <property name="sizeAdjustPolicy">
</item> <enum>QComboBox::AdjustToContents</enum>
</layout> </property>
<item>
<property name="text">
<string>Small</string>
</property>
</item>
<item>
<property name="text">
<string>Medium</string>
</property>
</item>
<item>
<property name="text">
<string>Big</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="QTextEdit" name="JournalNotes"> <widget class="QTextEdit" name="JournalNotes">