Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreatePatientPrescription.qml =================================================================== diff -u -r0a5a643c3f4b47de461af259f6b174a9aa609f58 -rb33a0dc4ca14c3bf58831d49d1910c39a091e658 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreatePatientPrescription.qml (.../PreTreatmentCreatePatientPrescription.qml) (revision 0a5a643c3f4b47de461af259f6b174a9aa609f58) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreatePatientPrescription.qml (.../PreTreatmentCreatePatientPrescription.qml) (revision b33a0dc4ca14c3bf58831d49d1910c39a091e658) @@ -12,14 +12,16 @@ readonly property int cellWidth : Variables.createRxLabelUnitContainerWidth readonly property int cellHeight : Variables.createRxLabelUnitContainerHeight readonly property bool heparinFeatured : vSettings.heparinSyringePump - property bool isHDFFeatured : vTreatmentCreate.treatmentModality === HeaderBar.Mode_HDF - property bool isHeparinOn : _heparinRxControl.value === PreTreatmentCreatePatientPrescription.ON + property bool isHDFFeatured : vTreatmentCreate.treatmentModality === HeaderBar.Mode_HDF || + vTreatmentCreate.treatmentModality === HeaderBar.Mode_HD_Online_Fluid + property bool isHeparinOn : _heparinRxControl.value === PreTreatmentCreatePatientPrescription.ON property bool editingEnabled : true property int columnSpacing : 15 spacing : Variables.defaultMargin * 3 + enum HeparinEnabled { OFF, ON @@ -79,7 +81,6 @@ function clear () { vTreatmentCreate.patientID = "" - vTreatmentCreate.secondaryPatientID = "" _hdfTreatmentModeControl .clear() _subFluidVolume .clear() _bloodFlowRate .clear() @@ -112,15 +113,31 @@ LabelUnitContainer { id: _patientID text : qsTr("Patient ID") - showEdit : true - onEditClicked : _patientIdEntry.open() - contentItem : Text { id: _patientIDText - anchors.centerIn : parent - horizontalAlignment : Text.AlignRight - font.pixelSize : Fonts.fontPixelValueControl - color : Colors.offWhite - text : vTreatmentCreate.patientID !== "" ? vTreatmentCreate.patientID : Variables.emptyEntry + contentItem : TextEntry { id: _pretreatmentPatientIDEntry + clip : true + textInput.width : parent.width - Variables.defaultMargin * 4 + text : vTreatmentCreate.patientID + anchors.centerIn : parent + textInput.maximumLength : 20 // LEAHI-PRS-236 + textInput.rightPadding : Variables.defaultMargin + textInput.leftPadding : Variables.defaultMargin * 14 + textInput.inputMethodHints : Qt.ImhPreferLowercase + textInput.echoMode : TextInput.Normal + textInput.validator : RegExpValidator { regExp: Variables.regExp_PatientID } + line.visible : false + enabled : _root.editingEnabled + + Text { id: _patientIDPlaceHolderText + text : Variables.emptyEntry + anchors.fill : parent + rightPadding : 125 + horizontalAlignment : Text.AlignRight + font.pixelSize : Fonts.fontPixelValueControl + color : Colors.offWhite + visible : _pretreatmentPatientIDEntry.textInput.text.length === 0 && + ! _pretreatmentPatientIDEntry.textInput.activeFocus + } } } @@ -138,6 +155,9 @@ currentIndex : vTreatmentCreate.treatmentModality model : vTreatmentRanges.treatmentModalityOptions centerHorizontally : true + itemsEnabled : [ vTreatmentCreate.treatmentModality === HeaderBar.Mode_HD , // Mode_HD + vTreatmentCreate.treatmentModality !== HeaderBar.Mode_HD , // Mode_HDF + vTreatmentCreate.treatmentModality !== HeaderBar.Mode_HD ] // Mode_HD_Online_Fluid onActivated : { if ( ! _treatmentModality.valid ) { vTreatmentCreate.treatmentModalityRejectReason = Variables.noRejectReason }