Index: sources/view/VCreateTreatment.cpp =================================================================== diff -u -ra19862d191c2501faa4e8cde64804ef18b80c6b3 -r7a4f59af7287d30e8790e6b580327684d4e02e55 --- sources/view/VCreateTreatment.cpp (.../VCreateTreatment.cpp) (revision a19862d191c2501faa4e8cde64804ef18b80c6b3) +++ sources/view/VCreateTreatment.cpp (.../VCreateTreatment.cpp) (revision 7a4f59af7287d30e8790e6b580327684d4e02e55) @@ -22,6 +22,7 @@ connect(&_GuiController, SIGNAL(didActionReceive(GuiActionType,QVariantList)), this, SLOT(onFWValidationResponse(GuiActionType,QVariantList))); + loadTreatmentParameterRanges(); } /** @@ -41,72 +42,42 @@ { QJsonValue value = obj.value(key); - if (key == GET_VARIABLE_NAME(bloodFlowRateMin)) - _bloodFlowRateMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(bloodFlowRateMax)) - _bloodFlowRateMax = value.toInt(); - else if (key == GET_VARIABLE_NAME(dialysateFlowRateMin)) - _dialysateFlowRateMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(dialysateFlowRateMax)) - _dialysateFlowRateMax = value.toInt(); - else if (key == GET_VARIABLE_NAME(durationMin)) - _durationMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(durationMax)) - _durationMax = value.toInt(); - else if (key == GET_VARIABLE_NAME(heparinDispensingRateMin)) - _heparinDispensingRateMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(heparinDispensingRateMax)) - _heparinDispensingRateMax = value.toInt(); - else if (key == GET_VARIABLE_NAME(heparinBolusVolumeMin)) - _heparinBolusVolumeMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(heparinBolusVolumeMax)) - _heparinBolusVolumeMax = value.toInt(); - else if (key == GET_VARIABLE_NAME(heparinStopTimeMin)) - _heparinStopTimeMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(heparinStopTimeMax)) - _heparinStopTimeMax = value.toInt(); - //options - else if (key == GET_VARIABLE_NAME(salineBolusOptions)) - _salineBolusOptions = jsonArrayToStringList(value.toArray()); - else if (key == GET_VARIABLE_NAME(acidConcentrateOptions)) - _acidConcentrateOptions = jsonArrayToStringList(value.toArray()); - else if (key == GET_VARIABLE_NAME(bicarbonateConcentrateOptions)) - _bicarbonateConcentrateOptions = jsonArrayToStringList(value.toArray()); - else if (key == GET_VARIABLE_NAME(dialyzerTypeOptions)) - _dialyzerTypeOptions = jsonArrayToStringList(value.toArray()); + if (key == GET_VARIABLE_NAME(bloodFlowRateMin)) _bloodFlowRateMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(bloodFlowRateMax)) _bloodFlowRateMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(dialysateFlowRateMin)) _dialysateFlowRateMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(dialysateFlowRateMax)) _dialysateFlowRateMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(durationMin)) _durationMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(durationMax)) _durationMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(heparinDispensingRateMin)) _heparinDispensingRateMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(heparinDispensingRateMax)) _heparinDispensingRateMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(heparinBolusVolumeMin)) _heparinBolusVolumeMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(heparinBolusVolumeMax)) _heparinBolusVolumeMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(heparinStopTimeMin)) _heparinStopTimeMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(heparinStopTimeMax)) _heparinStopTimeMax = value.toInt(); + // options + else if (key == GET_VARIABLE_NAME(salineBolusOptions)) _salineBolusOptions = jsonArrayToStringList(value.toArray()); + else if (key == GET_VARIABLE_NAME(acidConcentrateOptions)) _acidConcentrateOptions = jsonArrayToStringList(value.toArray()); + else if (key == GET_VARIABLE_NAME(bicarbonateConcentrateOptions)) _bicarbonateConcentrateOptions = jsonArrayToStringList(value.toArray()); + else if (key == GET_VARIABLE_NAME(dialyzerTypeOptions)) _dialyzerTypeOptions = jsonArrayToStringList(value.toArray()); - else if (key == GET_VARIABLE_NAME(dialysateTempMin)) - _dialysateTempMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(dialysateTempMax)) - _dialysateTempMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(dialysateTempMin)) _dialysateTempMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(dialysateTempMax)) _dialysateTempMax = value.toInt(); // arterial - else if (key == GET_VARIABLE_NAME(arterialPressureLimitLowMin)) - _arterialPressureLimitLowMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(arterialPressureLimitLowMax)) - _arterialPressureLimitLowMax = value.toInt(); - else if (key == GET_VARIABLE_NAME(arterialPressureLimitHighMin)) - _arterialPressureLimitHighMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(arterialPressureLimitHighMax)) - _arterialPressureLimitHighMax = value.toInt(); - //venous - else if (key == GET_VARIABLE_NAME(venousPressureLimitLowMin)) - _venousPressureLimitLowMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(venousPressureLimitLowMax)) - _venousPressureLimitLowMax = value.toInt(); - else if (key == GET_VARIABLE_NAME(venousPressureLimitHighMin)) - _venousPressureLimitHighMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(venousPressureLimitHighMax)) - _venousPressureLimitHighMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(arterialPressureLimitLowMin)) _arterialPressureLimitLowMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(arterialPressureLimitLowMax)) _arterialPressureLimitLowMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(arterialPressureLimitHighMin)) _arterialPressureLimitHighMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(arterialPressureLimitHighMax)) _arterialPressureLimitHighMax = value.toInt(); + // venous + else if (key == GET_VARIABLE_NAME(venousPressureLimitLowMin)) _venousPressureLimitLowMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(venousPressureLimitLowMax)) _venousPressureLimitLowMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(venousPressureLimitHighMin)) _venousPressureLimitHighMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(venousPressureLimitHighMax)) _venousPressureLimitHighMax = value.toInt(); - else if (key == GET_VARIABLE_NAME(bloodPressureMeasureIntervalMin)) - _bloodPressureMeasureIntervalMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(bloodPressureMeasureIntervalMax)) - _bloodPressureMeasureIntervalMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(bloodPressureMeasureIntervalMin)) _bloodPressureMeasureIntervalMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(bloodPressureMeasureIntervalMax)) _bloodPressureMeasureIntervalMax = value.toInt(); - else if (key == GET_VARIABLE_NAME(rinsebackFlowRateMin)) - _rinsebackFlowRateMin = value.toInt(); - else if (key == GET_VARIABLE_NAME(rinsebackFlowRateMax)) - _rinsebackFlowRateMax = value.toInt(); + else if (key == GET_VARIABLE_NAME(rinsebackFlowRateMin)) _rinsebackFlowRateMin = value.toInt(); + else if (key == GET_VARIABLE_NAME(rinsebackFlowRateMax)) _rinsebackFlowRateMax = value.toInt(); else { qDebug() << "Invalid treatment parameter range: " << key;