Index: sources/view/VTreatmentCreate.cpp =================================================================== diff -u -r6b132368f2d26c6d869ed910ee4910282c192d75 -r7914ad8a4b8450d855fcc75855ca57b6644e9f7c --- sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision 6b132368f2d26c6d869ed910ee4910282c192d75) +++ sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision 7914ad8a4b8450d855fcc75855ca57b6644e9f7c) @@ -50,6 +50,7 @@ reset_heparinBolusVolume(); reset_heparinStopTime(); reset_salineBolusVolume(); + reset_heparinType(); reset_acidConcentrate(); reset_bicarbonateConcentrate(); reset_dialyzerType(); @@ -72,24 +73,25 @@ */ void VTreatmentCreate::setTreatmentData() { - treatmentData.bloodFlowRate = _bloodFlowRate; - treatmentData.dialysateFlowRate = _dialysateFlowRate; - treatmentData.duration = _duration; - treatmentData.heparinDispensingRate = _heparinDispensingRate; - treatmentData.heparinBolusVolume = _heparinBolusVolume; - treatmentData.heparinStopTime = _heparinStopTime; - treatmentData.salineBolus = _salineBolusVolume; + treatmentData.bloodFlowRate = _bloodFlowRate; + treatmentData.dialysateFlowRate = _dialysateFlowRate; + treatmentData.duration = _duration; + treatmentData.heparinDispensingRate = _heparinDispensingRate; + treatmentData.heparinBolusVolume = _heparinBolusVolume; + treatmentData.heparinStopTime = _heparinStopTime; + treatmentData.salineBolus = _salineBolusVolume; - treatmentData.acidConcentrate = _acidConcentrate; - treatmentData.bicarbonateConcentrate = _bicarbonateConcentrate; - treatmentData.dialyzerType = _dialyzerType; - treatmentData.dialysateTemp = _dialysateTemp; - treatmentData.arterialPressureLimitLow = _arterialPressureLimitLow; - treatmentData.arterialPressureLimitHigh = _arterialPressureLimitHigh; - treatmentData.venousPressureLimitLow = _venousPressureLimitLow; - treatmentData.venousPressureLimitHigh = _venousPressureLimitHigh; - treatmentData.bloodPressureMeasureInterval = _bloodPressureMeasureInterval; - treatmentData.rinsebackFlowRate = _rinsebackFlowRate; + treatmentData.heparinType = _heparinType; + treatmentData.acidConcentrate = _acidConcentrate; + treatmentData.bicarbonateConcentrate = _bicarbonateConcentrate; + treatmentData.dialyzerType = _dialyzerType; + treatmentData.dialysateTemp = _dialysateTemp; + treatmentData.arterialPressureLimitLow = _arterialPressureLimitLow; + treatmentData.arterialPressureLimitHigh = _arterialPressureLimitHigh; + treatmentData.venousPressureLimitLow = _venousPressureLimitLow; + treatmentData.venousPressureLimitHigh = _venousPressureLimitHigh; + treatmentData.bloodPressureMeasureInterval = _bloodPressureMeasureInterval; + treatmentData.rinsebackFlowRate = _rinsebackFlowRate; } /** @@ -117,6 +119,7 @@ * \note Finished create treatment confirm... */ void VTreatmentCreate::doConfirm() { + AdjustParametersConfirmRequestData confirmTreatmentRequest; confirmTreatmentRequest.requestedState = AdjustParametersConfirmRequestData::eConfirm; emit didAdjustment(confirmTreatmentRequest); } @@ -128,6 +131,7 @@ */ void VTreatmentCreate::doCancel() { + AdjustParametersConfirmRequestData confirmTreatmentRequest; confirmTreatmentRequest.requestedState = AdjustParametersConfirmRequestData::eCancel; emit didAdjustment(confirmTreatmentRequest); } @@ -202,6 +206,11 @@ success = false; emit dialyzerType_ValidationFailed(enumToString(static_cast(data.dialyzerType))); } + if (data.heparinType != Gui::GuiRequestReasons::REQUEST_REJECT_REASON_NONE) { + if (success) emit scrollToParameter(GET_VARIABLE_NAME(data.heparinType)); + success = false; + emit heparinType_ValidationFailed(enumToString(static_cast(data.heparinType))); + } if (data.dialysateTemp != Gui::GuiRequestReasons::REQUEST_REJECT_REASON_NONE) { if (success) emit scrollToParameter(GET_VARIABLE_NAME(data.dialysateTemp)); success = false; @@ -269,6 +278,7 @@ if (!isheparinBolusVolumeSet ) return false; if (!isheparinStopTimeSet ) return false; if (!issalineBolusVolumeSet ) return false; + if (!isheparinTypeSet ) return false; if (!isacidConcentrateSet ) return false; if (!isbicarbonateConcentrateSet ) return false; if (!isdialyzerTypeSet ) return false; @@ -334,7 +344,8 @@ */ QStringList VTreatmentCreate::doGetOperatingParameterNames() { - return QStringList() << "Acid Concentrate" + return QStringList() << "Heparin Type" + << "Acid Concentrate" << "Bicarbonate Concentrate" << "Dialyzer Type" << "Dialysate Temperature" @@ -353,24 +364,34 @@ */ QStringList VTreatmentCreate::doGetOperatingParameterValues() { - QString aConcentrate; - QString bCarbConcentrate; - QString dType; + QString heparinType; + QString acidConcentrate; + QString bicarbConcentrate; + QString dialyzerType; + if ((heparinTypeOptions().length() - 1 < (int)_heparinType)) + heparinType = "None"; + else + heparinType = heparinTypeOptions().at(_heparinType); + if ((acidConcentrateOptions().length() - 1 < (int)_acidConcentrate)) - aConcentrate = "None"; + acidConcentrate = "None"; else - aConcentrate = acidConcentrateOptions().at(acidConcentrate()); + acidConcentrate = acidConcentrateOptions().at(_acidConcentrate); + if ((bicarbonateConcentrateOptions().length() - 1 < (int)_bicarbonateConcentrate)) - bCarbConcentrate = "None"; + bicarbConcentrate = "None"; else - bCarbConcentrate = bicarbonateConcentrateOptions().at(bicarbonateConcentrate()); + bicarbConcentrate = bicarbonateConcentrateOptions().at(_bicarbonateConcentrate); + if ((dialyzerTypeOptions().length() - 1 < (int)_dialyzerType) || ((int)_dialyzerType < 0)) - dType = "None"; + dialyzerType = "None"; else - dType = dialyzerTypeOptions().at(dialyzerType()); - return QStringList() << aConcentrate - << bCarbConcentrate - << dType + dialyzerType = dialyzerTypeOptions().at(_dialyzerType); + + return QStringList() << heparinType + << acidConcentrate + << bicarbConcentrate + << dialyzerType << QString("%0 °C").arg(_dialysateTemp) << QString("%0 mmHg").arg(_arterialPressureLimitLow) << QString("%0 mmHg").arg(_arterialPressureLimitHigh) @@ -391,8 +412,8 @@ */ void VTreatmentCreate::onSettingsDone() { + heparinTypeOptions ( _Settings.keys("Heparin Type" )); acidConcentrateOptions ( _Settings.keys("Acid Concentrate" )); bicarbonateConcentrateOptions ( _Settings.keys("Bicarbonate Concentrate" )); dialyzerTypeOptions ( _Settings.keys("Dialyzer Type" )); - heparinTypeOptions ( _Settings.keys("Heparin Type" )); }