def setRecord(self, record): CItemEditorDialog.setRecord(self, record) setLineEditValue(self.edtProg, record, 'prog') setLineEditValue(self.edtPreferentArchiver, record, 'preferentArchiver') setCheckBoxValue(self.chkEmailRequired, record, 'emailRequired') setLineEditValue(self.edtEmailTo, record, 'emailTo') setLineEditValue(self.edtSubject, record, 'subject') setTextEditHTML(self.edtMessage, record, 'message')
def setRecord(self, record): CItemEditorDialog.setRecord(self, record) setLineEditValue(self.edtContext, record, 'context') setLineEditValue(self.edtFileName, record, 'fileName') setTextEditValue(self.edtDefault, record, 'default') setComboBoxValue(self.cmbDPD, record, 'dpdAgreement') setComboBoxValue(self.cmbType, record, 'type') setComboBoxValue(self.cmbBanUnkeptData, record, 'banUnkeptDate') setRBComboBoxValue(self.cmbCounter, record, 'counter_id') setRBComboBoxValue(self.cmbIEMKDoc, record, 'documentType_id') setCheckBoxValue(self.chkPatientApply, record, 'isPatientAgreed') setLineEditValue(self.edtGroup, record, 'groupName') self.setIsDirty(False)
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, 'rbPrintTemplate') # self.setupUi(self) self.setWindowTitleEx(u'Шаблон печати') # self.setupDirtyCather() self.exaroEditor = forceString( QtGui.qApp.preferences.appPrefs.get('exaroEditor', '')) if not self.exaroEditor: self.btnEdit.setToolTip( u'Необходимо указать редактор отчетов Exaro на вкладке "Прочие настойки" в Умолчаниях' ) self.btnEdit.setEnabled(False) self.cmbCounter.setTable('rbCounter') self.cmbIEMKDoc.setTable('rbIEMKDocument') self.cmbCounter.setEnabled( False ) # По умолчанию нам не требуется сохранять обращение перед печатью, соответственно счетчик указывать нельзя.
def getRecord(self): record = CItemEditorDialog.getRecord(self) # getLineEditValue( self.edtCode, record, 'code') # getLineEditValue( self.edtName, record, 'name') getLineEditValue(self.edtContext, record, 'context') getLineEditValue(self.edtFileName, record, 'fileName') getTextEditValue(self.edtDefault, record, 'default') getComboBoxValue(self.cmbDPD, record, 'dpdAgreement') getComboBoxValue(self.cmbType, record, 'type') getComboBoxValue(self.cmbBanUnkeptData, record, 'banUnkeptDate') getRBComboBoxValue(self.cmbCounter, record, 'counter_id') getRBComboBoxValue(self.cmbIEMKDoc, record, 'documentType_id') getCheckBoxValue(self.chkPatientApply, record, 'isPatientAgreed') getLineEditValue(self.edtGroup, record, 'groupName') CPrintTemplatesDataCache.reset() return record
def setRecord(self, record): CItemEditorDialog.setRecord(self, record) setLineEditValue(self.edtRegionalCode, record, 'regionalCode')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbOKPF) self.setWindowTitleEx(u'ОКПФ')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbAccountExportFormat) self.setWindowTitleEx(u'Формат экспорта счетов') self.setupDirtyCather()
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbReasonOfAbsence) self.setWindowTitleEx(u'Причина отсутствия')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, 'rbBloodType') self.setWindowTitleEx(u'Группа крови')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbUnit) self.setWindowTitleEx(u'Единица измерения')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbFinance) self.setWindowTitleEx(u'Источник финансирования')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbHurtType) self.setWindowTitleEx(u'Тип вредности')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, 'rbNomenclatureClass') self.setWindowTitleEx(u'Класс ЛСиИМН')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, 'rbTempInvalidBreak') self.setWindowTitleEx(u'Нарушение режима ВУТ')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbHealthGroup) self.setWindowTitleEx(u'Группа здоровья')
def getRecord(self): record = CItemEditorDialog.getRecord(self) getLineEditValue(self.edtRegionalCode, record, 'regionalCode') return record
def checkDataEntered(self): result = CItemEditorDialog.checkDataEntered(self) result = result and (forceStringEx(self.edtContext.text()) or self.checkInputMessage(u'контекст', False, self.edtContext)) return result
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbMedicalGroup) self.setWindowTitleEx(u'Медицинские группы')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbDocumentTypeGroup) self.setWindowTitleEx(u'Группа типов документов')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbCashOperation) self.setWindowTitleEx(u'Кассовая операция')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, 'rbTempInvalidDuplicateReason') self.setWindowTitleEx(u'Причина выдачи дубликатов документов ВУТ')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, 'OrgStructure') self.setWindowTitleEx(u'Подразделение') self.on_cmbIsArea_currentIndexChanged(0) self.on_chkHasHospitalBeds_toggled(False) self.on_chkHasStocks_toggled(False) self.cmbParent.setNameField('name') self.cmbParent.setAddNone(True) self.cmbParent.setFilter('False') self.cmbParent.setTable('OrgStructure') self.cmbOrganisation.setValue(QtGui.qApp.currentOrgId()) self.cmbNet.setTable(rbNet, True) self.cmbChief.setSpecialityPresent(True) self.cmbHeadNurse.setSpecialityPresent(None) self.KLADRDelegate = CKLADRItemDelegate(self) self.StreetDelegate = CStreetItemDelegate(self) self.tblAddress.setItemDelegateForColumn(0, self.KLADRDelegate) self.tblAddress.setItemDelegateForColumn(1, self.StreetDelegate) self.tblAddress.setSelectionMode( QtGui.QAbstractItemView.ExtendedSelection) self.addModels('Address', CAddressModel(self)) self.addModels('HospitalBeds', CHospitalBedsModel(self)) self.addModels('InvoluteBeds', CInvoluteBedsModel(self)) self.modelHospitalBeds.setInvoluteBedsModel(self.modelInvoluteBeds) self.addModels('Jobs', CJobsModel(self)) self.addModels('Gaps', CGapsModel(self)) self.addModels('EventTypes', CEventTypesModel(self)) self.addModels('ActionTypes', CActionTypesModel(self)) self.addModels('DisabledAttendance', CDisabledAttendanceModel(self)) self.addModels('Stocks', CStocksModel(self)) self.addModels('Equipments', CEquipmentsModel(self)) self.setModels(self.tblAddress, self.modelAddress, self.selectionModelAddress) self.setModels(self.tblHospitalBeds, self.modelHospitalBeds, self.selectionModelHospitalBeds) self.setModels(self.tblInvoluteBeds, self.modelInvoluteBeds, self.selectionModelInvoluteBeds) self.setModels(self.tblJobs, self.modelJobs, self.selectionModelJobs) self.setModels(self.tblGaps, self.modelGaps, self.selectionModelGaps) self.setModels(self.tblEventTypes, self.modelEventTypes, self.selectionModelEventTypes) self.setModels(self.tblActionTypes, self.modelActionTypes, self.selectionModelActionTypes) self.setModels(self.tblDisabledAttendance, self.modelDisabledAttendance, self.selectionModelDisabledAttendance) self.setModels(self.tblStocks, self.modelStocks, self.selectionModelStocks) self.setModels(self.tblEquipments, self.modelEquipments, self.selectionModelEquipments) self.actAddEmpty = QtGui.QAction(u'Вставить пустую запись', self) self.actAddEmpty.setObjectName('actAddEmpty') self.actDuplicate = QtGui.QAction(u'Дублировать', self) self.actDuplicate.setObjectName('actDuplicate') self.actUp = QtGui.QAction(u'Поднять строку', self) self.actUp.setObjectName('actUp') self.actDown = QtGui.QAction(u'Опустить строку', self) self.actDown.setObjectName('actDown') self.actGetParentDisabledAttendance = QtGui.QAction( u'Копировать ограничения из вышестоящего подразделения', self) self.actGetParentDisabledAttendance.setObjectName( 'actGetParentDisabledAttendance') self.actDelRows = QtGui.QAction(u'Удалить выделенные строки', self) self.actDelRows.setObjectName('actDelRows') self.tblAddress.createPopupMenu([ self.actAddEmpty, self.actDuplicate, '-', self.actUp, self.actDown, '-', self.actDelRows ]) self.tblDisabledAttendance.createPopupMenu( [self.actGetParentDisabledAttendance, '-']) for tbl in [ self.tblHospitalBeds, self.tblInvoluteBeds, self.tblJobs, self.tblGaps, self.tblEventTypes, self.tblActionTypes, self.tblDisabledAttendance, self.tblStocks, self.tblEquipments ]: tbl.addMoveRow() tbl.addPopupSeparator() tbl.addPopupDuplicateCurrentRow() tbl.addPopupSeparator() tbl.addPopupDelRow() self.cmbType.setEnum(OrgStructureType) self.cmbIsArea.setEnum(COrgStructureAreaInfo) self.cmbParent.setNameField('name') self.cmbParent.setAddNone(True) self.cmbParent.setTable('OrgStructure') self.cmbOrganisation.setValue(QtGui.qApp.currentOrgId()) self.cmbNet.setTable(rbNet, True) self.cmbChief.setSpecialityPresent(True) self.cmbHeadNurse.setSpecialityPresent(None) self.KLADRDelegate = CKLADRItemDelegate(self) self.StreetDelegate = CStreetItemDelegate(self) self.tblAddress.setItemDelegateForColumn(0, self.KLADRDelegate) self.tblAddress.setItemDelegateForColumn(1, self.StreetDelegate) self.on_cmbIsArea_currentIndexChanged(0) self.on_chkHasHospitalBeds_toggled(False) self.on_chkHasStocks_toggled(False) self.cmbFilterAddressStreet.setCity(QtGui.qApp.defaultKLADR()) self.connect(self.tblAddress.popupMenu(), QtCore.SIGNAL('aboutToShow()'), self.popupMenuAddressAboutToShow) self.connect(self.actAddEmpty, QtCore.SIGNAL('triggered()'), self.addEmptyAddress) self.connect(self.actDuplicate, QtCore.SIGNAL('triggered()'), self.duplicateAddress) self.connect(self.actUp, QtCore.SIGNAL('triggered()'), self.upAddress) self.connect(self.actDown, QtCore.SIGNAL('triggered()'), self.downAddress) self.connect(self.actGetParentDisabledAttendance, QtCore.SIGNAL('triggered()'), self.getParentDisabledAttendance) self.connect(self.actDelRows, QtCore.SIGNAL('triggered()'), self.tblAddress.removeSelectedRows) self.connect(self.selectionModelHospitalBeds, QtCore.SIGNAL('currentChanged(QModelIndex,QModelIndex)'), self.changedInvoluteBeds) # self.edtSalaryPercentage.textChanged.connect(self.on_edtSalaryPercentage_textChanged) self._salaryPercentageRegExp = '^\d+(\.\d+)?$' # '^\-$|\d+(\.\d+)?$' self.cmbMiacHead.setVisible( QtGui.qApp.checkGlobalPreference('53', u'да')) self.lblMiacHead.setVisible( QtGui.qApp.checkGlobalPreference('53', u'да')) self.lblMiacCode.setVisible(QtGui.qApp.region() == '78') self.edtMiacCode.setVisible(QtGui.qApp.region() == '78')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbAccountType) self.setWindowTitleEx(u'Тип счета')
def getItemEditor(self): editor = CItemEditorDialog(self, 'rbUserRight') editor.setWindowTitle(u'Привилегия пользователя') return editor
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbPolicyType) self.setWindowTitleEx(u'Тип полиса')
def editSubclass(self, itemId): dialog = CItemEditorDialog(self, 'rbMKBSubclass') if itemId: dialog.load(itemId) dialog.exec_()
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbHurtFactorType) self.setWindowTitleEx(u'Фактор вредности')
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, 'rbPolicyKind') self.setWindowTitleEx(u'Вид полиса')
def getRecord(self): record = CItemEditorDialog.getRecord(self) record.setValue('master_id', toVariant(self.master_id)) return record
def __init__(self, parent): CItemEditorDialog.__init__(self, parent, rbActivity) self.setWindowTitleEx(u'Вид(тип) деятельности врача')