Пример #1
0
 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')
Пример #2
0
 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)
Пример #3
0
 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
     )  # По умолчанию нам не требуется сохранять обращение перед печатью, соответственно счетчик указывать нельзя.
Пример #4
0
 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
Пример #5
0
 def setRecord(self, record):
     CItemEditorDialog.setRecord(self, record)
     setLineEditValue(self.edtRegionalCode, record, 'regionalCode')
Пример #6
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbOKPF)
     self.setWindowTitleEx(u'ОКПФ')
Пример #7
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbAccountExportFormat)
     self.setWindowTitleEx(u'Формат экспорта счетов')
     self.setupDirtyCather()
Пример #8
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbReasonOfAbsence)
     self.setWindowTitleEx(u'Причина отсутствия')
Пример #9
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, 'rbBloodType')
     self.setWindowTitleEx(u'Группа крови')
Пример #10
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbUnit)
     self.setWindowTitleEx(u'Единица измерения')
Пример #11
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbFinance)
     self.setWindowTitleEx(u'Источник финансирования')
Пример #12
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbHurtType)
     self.setWindowTitleEx(u'Тип вредности')
Пример #13
0
 def __init__(self,  parent):
     CItemEditorDialog.__init__(self, parent, 'rbNomenclatureClass')
     self.setWindowTitleEx(u'Класс ЛСиИМН')
Пример #14
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, 'rbTempInvalidBreak')
     self.setWindowTitleEx(u'Нарушение режима ВУТ')
Пример #15
0
 def __init__(self,  parent):
     CItemEditorDialog.__init__(self, parent, rbHealthGroup)
     self.setWindowTitleEx(u'Группа здоровья')
Пример #16
0
 def getRecord(self):
     record = CItemEditorDialog.getRecord(self)
     getLineEditValue(self.edtRegionalCode, record, 'regionalCode')
     return record
Пример #17
0
 def checkDataEntered(self):
     result = CItemEditorDialog.checkDataEntered(self)
     result = result and (forceStringEx(self.edtContext.text())
                          or self.checkInputMessage(u'контекст', False,
                                                    self.edtContext))
     return result
Пример #18
0
 def __init__(self,  parent):
     CItemEditorDialog.__init__(self, parent, rbMedicalGroup)
     self.setWindowTitleEx(u'Медицинские группы')
Пример #19
0
 def __init__(self,  parent):
     CItemEditorDialog.__init__(self, parent, rbDocumentTypeGroup)
     self.setWindowTitleEx(u'Группа типов документов')
Пример #20
0
 def __init__(self,  parent):
     CItemEditorDialog.__init__(self, parent, rbCashOperation)
     self.setWindowTitleEx(u'Кассовая операция')
Пример #21
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent,
                                'rbTempInvalidDuplicateReason')
     self.setWindowTitleEx(u'Причина выдачи дубликатов документов ВУТ')
Пример #22
0
    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')
Пример #23
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbAccountType)
     self.setWindowTitleEx(u'Тип счета')
Пример #24
0
 def getItemEditor(self):
     editor = CItemEditorDialog(self, 'rbUserRight')
     editor.setWindowTitle(u'Привилегия пользователя')
     return editor
Пример #25
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbPolicyType)
     self.setWindowTitleEx(u'Тип полиса')
Пример #26
0
 def editSubclass(self, itemId):
     dialog = CItemEditorDialog(self, 'rbMKBSubclass')
     if itemId:
         dialog.load(itemId)
     dialog.exec_()
Пример #27
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbHurtFactorType)
     self.setWindowTitleEx(u'Фактор вредности')
Пример #28
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, 'rbPolicyKind')
     self.setWindowTitleEx(u'Вид полиса')
Пример #29
0
 def getRecord(self):
     record = CItemEditorDialog.getRecord(self)
     record.setValue('master_id', toVariant(self.master_id))
     return record
Пример #30
0
 def __init__(self, parent):
     CItemEditorDialog.__init__(self, parent, rbActivity)
     self.setWindowTitleEx(u'Вид(тип) деятельности врача')