Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml =================================================================== diff -u -r1f6d3544ea05941cd4c4d5ebf48603d2668cb421 -rb532926372ae9d55831088c7c2ff3d4c95fc552a --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision 1f6d3544ea05941cd4c4d5ebf48603d2668cb421) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreateContent.qml (.../PreTreatmentCreateContent.qml) (revision b532926372ae9d55831088c7c2ff3d4c95fc552a) @@ -38,6 +38,7 @@ readonly property bool isValidated : vTreatmentCreate.parametersValidated property bool editingEnabled : true + property bool isRxProfile : false onIsValidatedChanged : if ( ! isValidated ) { enableEditing () } @@ -88,7 +89,8 @@ _dialyzerTypeComboBox .active && _dialysateTemperatureControl .active && _dialysateTemperature .valid && _salineBolusVolumeControl .active && _salineBolusVolume .valid && - _bpMeasurementIntervalControl .active && _bpMeasurementInterval .valid + _bpMeasurementIntervalControl .active && _bpMeasurementInterval .valid && + (_root.isRxProfile ? _patientID.text != "" : true ) } function validate () { @@ -164,6 +166,7 @@ break case PreTreatmentCreateContent.Select: print("TODO: Open and Select from Prescription Manager " ) + _rxManagerDialog.open() break case PreTreatmentCreateContent.Clear: _root.clear() @@ -193,7 +196,7 @@ LabelUnitContainer { id: _patientID anchors.verticalCenter : parent.verticalCenter - text : qsTr("Patient ID") + text : _root.isRxProfile ? qsTr("Profile Name") : qsTr("Patient ID") showUnit : false height : cellHeight - Variables.defaultMargin contentArea.anchors.leftMargin : 120 @@ -206,7 +209,9 @@ textInput.font.pixelSize : Fonts.fontPixelValueControl textInput.inputMethodHints : Qt.ImhPreferLowercase textInput.echoMode : TextInput.Normal - textInput.validator : RegExpValidator { regExp: Variables.regExp_PatientID } + textInput.validator : RegExpValidator { regExp: _root.isRxProfile + ? Variables.regExp_RxProfileName + : Variables.regExp_PatientID } line.visible : false enabled : _root.editingEnabled onEditingFinished : vTreatmentCreate.patientID = text @@ -367,16 +372,16 @@ spacing : Variables.defaultMargin anchors.left : parent.left - QRCode { id: _qrCode + QRCode { id: _qrCode0 anchors.verticalCenter : parent.verticalCenter anchors.verticalCenterOffset: -5 - qrcode : vTreatmentCreate.txCode + qrcode : _root.isRxProfile ? "" : vTreatmentCreate.txCode clear : ! _root.visible } Text { id: _txCode - anchors.bottom : _qrCode.bottom - text : vTreatmentCreate.txCode ? qsTr("Tx Code: ") + vTreatmentCreate.txCode : " " + anchors.bottom : _qrCode0.bottom + text : _root.isRxProfile ? " " : (vTreatmentCreate.txCode ? qsTr("Tx Code: ") + vTreatmentCreate.txCode : " ") color : "#DBE9FA" font.pixelSize : Fonts.fontPixelButton }