Index: sources/view/VTreatmentCreate.cpp =================================================================== diff -u -rb4d8fe6f11b7cdf0c631b3ab35ba36f18e0d7bc4 -readfcc99876849e52370db5dde4c4c42d4dbc76f --- sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision b4d8fe6f11b7cdf0c631b3ab35ba36f18e0d7bc4) +++ sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision eadfcc99876849e52370db5dde4c4c42d4dbc76f) @@ -102,6 +102,35 @@ _RxProfilesController.doSave(); } +void VTreatmentCreate::doLoadRxProfile(const QVariant &modelData, const bool isEdit) +{ + if (!modelData.canConvert()) { + qDebug() << "Expected QVariantMap, got" << modelData << isEdit; + return; + } + + QVariantMap modelDataMap = modelData.toMap(); + if (isEdit){_patientID = modelDataMap["profileName"].toString(); + _RxProfilesController.savePreviousRxProfileName(_patientID); + } + else{_patientID = "";} //Also save the previous profile Name in the controller, Clear when exit or completed + + _bloodFlowRate = modelDataMap["bloodFlow" ].toInt() ; + _dialysateFlowRate = modelDataMap["dialysateFlow" ].toInt() ; + _treatmentDuration = modelDataMap["treatmentDuration" ].toInt() ; + _acidConcentrate = modelDataMap["acidConcentrate" ].toInt() ; + _bicarbonateConcentrate = modelDataMap["bicarbConcentrate" ].toInt() ; + _dialysateTemp = modelDataMap["dialysateTemperature" ].toFloat() ; + _dialyzerType = modelDataMap["dialyzerType" ].toInt() ; + _heparinType = modelDataMap["heparinConcentrate" ].toInt() ; + _heparinBolusVolume = modelDataMap["heparinVolume" ].toFloat() ; + _heparinDispensingRate = modelDataMap["heparinDispenseRate" ].toFloat() ; + _heparinStopTime = modelDataMap["heparinStop" ].toInt() ; + _salineBolusVolume = modelDataMap["salineVolume" ].toInt() ; + _bloodPressureMeasureInterval = modelDataMap["vitalSigns" ].toInt() ; + qDebug() << "Received QML model data in C++ slot: " << modelDataMap; +} + /** * \brief VCreateTreatment::doCancel * \details Notifies FW the user has canceled confirming the treatment parameters