mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Merge branch 'master' into translations
This commit is contained in:
commit
a7f6f9cc37
@ -810,10 +810,12 @@ ChannelID Day::getPressureChannelID() {
|
||||
// Determined the preferred pressure channel (CPAP_IPAP or CPAP_Pressure)
|
||||
CPAPMode cpapmode = (CPAPMode)(int)settings_max(CPAP_Mode);
|
||||
|
||||
// TODO: This is also an awful hack. Why would CPAP/APAP have IPAP channels but not Pressure channels?
|
||||
// TODO: PRS1 ventilators in CPAP mode report IPAP rather than pressure...but their pressure setting channel is CPAP_Pressure,
|
||||
// so this currently gets fixed in the welcome screen manually.
|
||||
// And why would ASV or AVAPS have Pressure channels?
|
||||
QList<ChannelID> preferredIDs = { CPAP_Pressure, CPAP_PressureSet, CPAP_IPAP, CPAP_IPAPSet };
|
||||
if (cpapmode == MODE_ASV || cpapmode == MODE_ASV_VARIABLE_EPAP || cpapmode == MODE_AVAPS) {
|
||||
if (cpapmode == MODE_ASV || cpapmode == MODE_ASV_VARIABLE_EPAP || cpapmode == MODE_AVAPS ||
|
||||
cpapmode == MODE_BILEVEL_FIXED || cpapmode == MODE_BILEVEL_AUTO_FIXED_PS || cpapmode == MODE_BILEVEL_AUTO_VARIABLE_PS) {
|
||||
preferredIDs = { CPAP_IPAP, CPAP_IPAPSet, CPAP_Pressure, CPAP_PressureSet };
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,10 @@ void setupResMedTranslationMap(); // forward
|
||||
void ResmedLoader::initChannels()
|
||||
{
|
||||
using namespace schema;
|
||||
|
||||
// Channel(ChannelID id, ChanType type, MachineType machtype, ScopeType scope, QString code, QString fullname,
|
||||
// QString description, QString label, QString unit, DataType datatype = DEFAULT, QColor = Qt::black, int link = 0);
|
||||
|
||||
Channel * chan = new Channel(RMS9_Mode = 0xe203, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_Mode", QObject::tr("Mode"), QObject::tr("CPAP Mode"), QObject::tr("Mode"), "", LOOKUP, Qt::green);
|
||||
|
||||
@ -87,20 +91,16 @@ void ResmedLoader::initChannels()
|
||||
chan->addOption(2, QObject::tr("VPAP-T"));
|
||||
chan->addOption(3, QObject::tr("VPAP-S"));
|
||||
chan->addOption(4, QObject::tr("VPAP-S/T"));
|
||||
chan->addOption(5, QObject::tr("??"));
|
||||
chan->addOption(5, QObject::tr("?5?"));
|
||||
chan->addOption(6, QObject::tr("VPAPauto"));
|
||||
chan->addOption(7, QObject::tr("ASV"));
|
||||
chan->addOption(8, QObject::tr("ASVAuto"));
|
||||
chan->addOption(9, QObject::tr("???"));
|
||||
chan->addOption(10, QObject::tr("???"));
|
||||
chan->addOption(9, QObject::tr("?9?"));
|
||||
chan->addOption(10, QObject::tr("?10?"));
|
||||
chan->addOption(11, QObject::tr("Auto for Her"));
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_EPR = 0xe201, SETTING, MT_CPAP, SESSION,
|
||||
"EPR", QObject::tr("EPR"),
|
||||
QObject::tr("ResMed Exhale Pressure Relief"),
|
||||
QObject::tr("EPR"),
|
||||
"", LOOKUP, Qt::green));
|
||||
|
||||
"EPR", QObject::tr("EPR"), QObject::tr("ResMed Exhale Pressure Relief"), QObject::tr("EPR"), "", LOOKUP, Qt::green));
|
||||
|
||||
chan->addOption(0, STR_TR_Off);
|
||||
chan->addOption(1, QObject::tr("Ramp Only"));
|
||||
@ -108,114 +108,81 @@ void ResmedLoader::initChannels()
|
||||
chan->addOption(3, QObject::tr("Patient???"));
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_EPRLevel = 0xe202, SETTING, MT_CPAP, SESSION,
|
||||
"EPRLevel", QObject::tr("EPR Level"),
|
||||
QObject::tr("Exhale Pressure Relief Level"),
|
||||
QObject::tr("EPR Level"),
|
||||
"", LOOKUP, Qt::blue));
|
||||
"EPRLevel", QObject::tr("EPR Level"), QObject::tr("Exhale Pressure Relief Level"), QObject::tr("EPR Level"), STR_UNIT_CMH2O, LOOKUP, Qt::blue));
|
||||
|
||||
chan->addOption(0, QObject::tr("0cmH2O"));
|
||||
chan->addOption(1, QObject::tr("1cmH2O"));
|
||||
chan->addOption(2, QObject::tr("2cmH2O"));
|
||||
chan->addOption(3, QObject::tr("3cmH2O"));
|
||||
chan->addOption(0, QObject::tr("Off"));
|
||||
// chan->addOption(1, QObject::tr("1cmH2O"));
|
||||
// chan->addOption(2, QObject::tr("2cmH2O"));
|
||||
// chan->addOption(3, QObject::tr("3cmH2O"));
|
||||
|
||||
// RMS9_SmartStart, RMS9_HumidStatus, RMS9_HumidLevel,
|
||||
// RMS9_PtAccess, RMS9_Mask, RMS9_ABFilter, RMS9_ClimateControl, RMS9_TubeType,
|
||||
// RMS9_Temp, RMS9_TempEnable;
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_SmartStart = 0xe204, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_SmartStart", QObject::tr("SmartStart"),
|
||||
QObject::tr("Machine auto starts by breathing"),
|
||||
QObject::tr("Smart Start"),
|
||||
"", LOOKUP, Qt::black));
|
||||
"RMS9_SmartStart", QObject::tr("SmartStart"), QObject::tr("Machine auto starts by breathing"), QObject::tr("Smart Start"), "", LOOKUP, Qt::black));
|
||||
|
||||
chan->addOption(0, STR_TR_Off);
|
||||
chan->addOption(1, STR_TR_On);
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_HumidStatus = 0xe205, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_HumidStat", QObject::tr("Humid. Status"),
|
||||
QObject::tr("Humidifier Enabled Status"),
|
||||
QObject::tr("Humidifier Status"),
|
||||
"", LOOKUP, Qt::black));
|
||||
"RMS9_HumidStat", QObject::tr("Humid. Status"), QObject::tr("Humidifier Enabled Status"), QObject::tr("Humidifier Status"), "", LOOKUP, Qt::black));
|
||||
|
||||
chan->addOption(0, STR_TR_Off);
|
||||
chan->addOption(1, STR_TR_On);
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_HumidLevel = 0xe206, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_HumidLevel", QObject::tr("Humid. Level"),
|
||||
QObject::tr("Humidity Level"),
|
||||
QObject::tr("Humidity Level"),
|
||||
"", LOOKUP, Qt::black));
|
||||
"RMS9_HumidLevel", QObject::tr("Humid. Level"), QObject::tr("Humidity Level"), QObject::tr("Humidity Level"), "", LOOKUP, Qt::black));
|
||||
|
||||
chan->addOption(0, STR_TR_Off);
|
||||
chan->addOption(1, "1");
|
||||
chan->addOption(2, "2");
|
||||
chan->addOption(3, "3");
|
||||
chan->addOption(4, "4");
|
||||
chan->addOption(5, "5");
|
||||
chan->addOption(6, "6");
|
||||
chan->addOption(7, "7");
|
||||
chan->addOption(8, "8");
|
||||
// chan->addOption(1, "1");
|
||||
// chan->addOption(2, "2");
|
||||
// chan->addOption(3, "3");
|
||||
// chan->addOption(4, "4");
|
||||
// chan->addOption(5, "5");
|
||||
// chan->addOption(6, "6");
|
||||
// chan->addOption(7, "7");
|
||||
// chan->addOption(8, "8");
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_Temp = 0xe207, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_Temp", QObject::tr("Temperature"),
|
||||
QObject::tr("ClimateLine Temperature"),
|
||||
QObject::tr("Temperature"),
|
||||
"ºC", INTEGER, Qt::black));
|
||||
"RMS9_Temp", QObject::tr("Temperature"), QObject::tr("ClimateLine Temperature"), QObject::tr("Temperature"), "ºC", INTEGER, Qt::black));
|
||||
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_TempEnable = 0xe208, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_TempEnable", QObject::tr("Temp. Enable"),
|
||||
QObject::tr("ClimateLine Temperature Enable"),
|
||||
QObject::tr("Temperature Enable"),
|
||||
"", LOOKUP, Qt::black));
|
||||
"RMS9_TempEnable", QObject::tr("Temp. Enable"), QObject::tr("ClimateLine Temperature Enable"), QObject::tr("Temperature Enable"), "", LOOKUP, Qt::black));
|
||||
|
||||
chan->addOption(0, STR_TR_Off);
|
||||
chan->addOption(1, "1");
|
||||
chan->addOption(2, "2");
|
||||
chan->addOption(3, "3");
|
||||
// chan->addOption(1, "1");
|
||||
// chan->addOption(2, "2");
|
||||
// chan->addOption(3, "3");
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_ABFilter= 0xe209, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_ABFilter", QObject::tr("AB Filter"),
|
||||
QObject::tr("Antibacterial Filter"),
|
||||
QObject::tr("Antibacterial Filter"),
|
||||
"", LOOKUP, Qt::black));
|
||||
"RMS9_ABFilter", QObject::tr("AB Filter"), QObject::tr("Antibacterial Filter"), QObject::tr("Antibacterial Filter"), "", LOOKUP, Qt::black));
|
||||
|
||||
chan->addOption(0, STR_TR_No);
|
||||
chan->addOption(1, STR_TR_Yes);
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_PtAccess= 0xe20A, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_PTAccess", QObject::tr("Pt. Access"),
|
||||
QObject::tr("Patient Access"),
|
||||
QObject::tr("Patient Access"),
|
||||
"", LOOKUP, Qt::black));
|
||||
"RMS9_PTAccess", QObject::tr("Pt. Access"), QObject::tr("Patient Access"), QObject::tr("Patient Access"), "", LOOKUP, Qt::black));
|
||||
|
||||
chan->addOption(0, STR_TR_No);
|
||||
chan->addOption(1, STR_TR_Yes);
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_ClimateControl= 0xe20B, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_ClimateControl", QObject::tr("Climate Control"),
|
||||
QObject::tr("Climate Control"),
|
||||
QObject::tr("Climate Control"),
|
||||
"", LOOKUP, Qt::black));
|
||||
"RMS9_ClimateControl", QObject::tr("Climate Control"), QObject::tr("Climate Control"), QObject::tr("Climate Control"), "", LOOKUP, Qt::black));
|
||||
|
||||
chan->addOption(0, QObject::tr("Auto"));
|
||||
chan->addOption(1, QObject::tr("Manual"));
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_Mask= 0xe20C, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_Mask", QObject::tr("Mask"),
|
||||
QObject::tr("ResMed Mask Setting"),
|
||||
QObject::tr("Mask"),
|
||||
"", LOOKUP, Qt::black));
|
||||
"RMS9_Mask", QObject::tr("Mask"), QObject::tr("ResMed Mask Setting"), QObject::tr("Mask"), "", LOOKUP, Qt::black));
|
||||
|
||||
chan->addOption(0, QObject::tr("Pillows"));
|
||||
chan->addOption(1, QObject::tr("Full Face"));
|
||||
chan->addOption(2, QObject::tr("Nasal"));
|
||||
|
||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_RampEnable = 0xe20D, SETTING, MT_CPAP, SESSION,
|
||||
"RMS9_RampEnable", QObject::tr("Ramp"),
|
||||
QObject::tr("Ramp Enable"),
|
||||
QObject::tr("Ramp"),
|
||||
"", LOOKUP, Qt::black));
|
||||
"RMS9_RampEnable", QObject::tr("Ramp"), QObject::tr("Ramp Enable"), QObject::tr("Ramp"), "", LOOKUP, Qt::black));
|
||||
|
||||
chan->addOption(0, STR_TR_Off);
|
||||
chan->addOption(1, STR_TR_On);
|
||||
|
@ -5,6 +5,7 @@
|
||||
<p>
|
||||
<b>Changes and fixes in OSCAR v1.1.0-BETA?</b>
|
||||
<ul>
|
||||
<li>[fix] AHI and Usage bars in overview graphs now show the correct height when oximetry usage is significantly longer than CPAP usage.
|
||||
<li>[fix] Improved import of Philips Respironics settings. In particular:
|
||||
<ul>
|
||||
<li>The settings for PC, S, and S/T modes are now displayed correctly.</li>
|
||||
@ -12,6 +13,7 @@
|
||||
<li>Backup breath settings are now imported and displayed.</li>
|
||||
<li>The settings for CPAP-Check and Auto-Trial modes are now displayed correctly.</li>
|
||||
</ul>
|
||||
<li>[fix] Fix regression in Welcome page pressure display
|
||||
<li>[fix] Several crashes have been fixed.
|
||||
</ul>
|
||||
|
||||
|
@ -241,11 +241,18 @@ QString Welcome::GenerateCPAPHTML()
|
||||
pressSettingChanID = pressChanID;
|
||||
}
|
||||
|
||||
ChannelID epapDataChanID = CPAP_EPAP;
|
||||
if (day->channelHasData(CPAP_EPAPSet)) {
|
||||
epapDataChanID = CPAP_EPAPSet;
|
||||
}
|
||||
|
||||
if (pressChanID == NoChannel) {
|
||||
qWarning() << "Unable to find pressure channel for welcome summary!";
|
||||
}
|
||||
if (cpapmode == MODE_CPAP) {
|
||||
pressSettingChanID = CPAP_Pressure; // DreamStation ventilators report EPAP/IPAP data, but the setting is Pressure
|
||||
EventDataType pressure = day->settings_max(pressSettingChanID);
|
||||
qDebug() << pressSettingChanID << pressure;
|
||||
html += tr("Your CPAP machine used a constant %1 %2 of air").arg(pressure).arg(schema::channel[pressChanID].units());
|
||||
} else if (cpapmode == MODE_APAP) {
|
||||
EventDataType pressure = day->percentile(pressChanID, perc/100.0);
|
||||
@ -256,19 +263,18 @@ QString Welcome::GenerateCPAPHTML()
|
||||
html += tr("Your machine used a constant %1-%2 %3 of air.").arg(epap).arg(ipap).arg(schema::channel[pressChanID].units());
|
||||
} else if (cpapmode == MODE_BILEVEL_AUTO_FIXED_PS) {
|
||||
EventDataType ipap = day->percentile(pressChanID, perc/100.0);
|
||||
EventDataType epap = day->percentile(CPAP_EPAP, perc/100.0);
|
||||
EventDataType epap = day->percentile(epapDataChanID, perc/100.0);
|
||||
html += tr("Your machine was under %1-%2 %3 for %4% of the time.").arg(epap).arg(ipap).arg(schema::channel[pressChanID].units()).arg(perc);
|
||||
} else if (cpapmode == MODE_ASV || cpapmode == MODE_AVAPS){
|
||||
EventDataType ipap = day->percentile(pressChanID, perc/100.0);
|
||||
EventDataType epap = qRound(day->settings_wavg(CPAP_EPAP));
|
||||
|
||||
html += tr("Your EPAP pressure fixed at %1 %2.").arg(epap).arg(schema::channel[CPAP_EPAP].units())+"<br/>";
|
||||
html += tr("Your EPAP pressure fixed at %1 %2.").arg(epap).arg(schema::channel[epapDataChanID].units())+"<br/>";
|
||||
html += tr("Your IPAP pressure was under %1 %2 for %3% of the time.").arg(ipap).arg(schema::channel[pressChanID].units()).arg(perc);
|
||||
} else if (cpapmode == MODE_ASV_VARIABLE_EPAP){
|
||||
} else if (cpapmode == MODE_ASV_VARIABLE_EPAP || cpapmode == MODE_BILEVEL_AUTO_VARIABLE_PS){
|
||||
EventDataType ipap = day->percentile(pressChanID, perc/100.0);
|
||||
EventDataType epap = day->percentile(CPAP_EPAP, perc/100.0);
|
||||
EventDataType epap = day->percentile(epapDataChanID, perc/100.0);
|
||||
|
||||
html += tr("Your EPAP pressure was under %1 %2 for %3% of the time.").arg(epap).arg(schema::channel[CPAP_EPAP].units()).arg(perc)+"<br/>";
|
||||
html += tr("Your EPAP pressure was under %1 %2 for %3% of the time.").arg(epap).arg(schema::channel[epapDataChanID].units()).arg(perc)+"<br/>";
|
||||
html += tr("Your IPAP pressure was under %1 %2 for %3% of the time.").arg(ipap).arg(schema::channel[pressChanID].units()).arg(perc);
|
||||
}
|
||||
html += "<br/>";
|
||||
|
Loading…
Reference in New Issue
Block a user