Beispiel #1
0
    def getRecord(self):
        record = CItemEditorBaseDialog.getRecord(self)

        getRBComboBoxValue(self.cmbServiceGroup, record, 'group_id')
        getLineEditValue(self.edtCode, record, rbCode)
        getTextEditValue(self.edtName, record, rbName)
        getCheckBoxValue(self.chkeisLegacy, record, 'eisLegacy')
        getCheckBoxValue(self.chkNomenclatureLegacy, record,
                         'nomenclatureLegacy')
        getComboBoxValue(self.cmbLicense, record, 'license')
        getRBComboBoxValue(self.cmbCaseCast, record, 'caseCast_id')
        getLineEditValue(self.edtInfis, record, 'infis')
        getDateEditValue(self.edtBegDate, record, 'begDate')
        getDateEditValue(self.edtEndDate, record, 'endDate')
        getDoubleBoxValue(self.edtUetAdultDoctor, record, 'adultUetDoctor')
        getDoubleBoxValue(self.edtUetChildDoctor, record, 'childUetDoctor')
        getDoubleBoxValue(self.edtUetAdultAvarageMedWorker, record,
                          'adultUetAverageMedWorker')
        getDoubleBoxValue(self.edtUetChildAvarageMedWorker, record,
                          'childUetAverageMedWorker')
        getDoubleBoxValue(self.edtQualityLevel, record, 'qualityLevel')
        getDoubleBoxValue(self.edtSuperviseComplexityFactor, record,
                          'superviseComplexityFactor')
        getRBComboBoxValue(self.cmbMedicalAidProfile, record,
                           'medicalAidProfile_id')
        getRBComboBoxValue(self.cmbMedicalAidKind, record, 'medicalAidKind_id')
        getRBComboBoxValue(self.cmbMedicalAidType, record, 'medicalAidType_id')
        getRBComboBoxValue(self.cmbServiceCategory, record, 'category_id')
        return record
Beispiel #2
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, rbCode)
     getLineEditValue(self.edtFlatCode, record, 'flatCode')
     getLineEditValue(self.edtName, record, rbName)
     getCheckBoxValue(self.chkIsSelectable, record, 'isSelectable')
     return record
Beispiel #3
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue( self.edtCode,              record, 'code')
     getLineEditValue( self.edtName,              record, 'name')
     getLineEditValue( self.edtRegionalCode,      record, 'regionalCode')
     getCheckBoxValue(self.chkIsObsolete, record, 'isObsolete')
     return record
Beispiel #4
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtSerial, record, 'serial')
     getLineEditValue(self.edtNumber, record, 'number')
     getDateEditValue(self.edtDate, record, 'date')
     getRBComboBoxValue(self.cmbPerson, record, 'person_id')
     getRBComboBoxValue(self.cmbExpert, record, 'expert_id')
     getLineEditValue(self.edtDestination, record, 'destination')
     getRBComboBoxValue(self.cmbReason, record, 'reason_id')
     getTextEditValue(self.edtNote, record, 'note')
     getCheckBoxValue(self.chkInsuranceOfficeMark, record,
                      'insuranceOfficeMark')
     record.setValue('tempInvalid_id', toVariant(self.tempInvalidId))
     getLineEditValue(self.edtPlaceWork, record, 'placeWork')
     if not self.defaultBlankMovingId:
         blankMovingId = self.edtSerial.value()
     else:
         blankMovingId = self.defaultBlankMovingId
     if blankMovingId:
         db = QtGui.qApp.db
         tableBlankTempInvalidMoving = db.table('BlankTempInvalid_Moving')
         recordMoving = db.getRecordEx(tableBlankTempInvalidMoving, u'*', [
             tableBlankTempInvalidMoving['deleted'].eq(0),
             tableBlankTempInvalidMoving['id'].eq(blankMovingId)
         ])
         if recordMoving:
             used = forceInt(recordMoving.value('used'))
             recordMoving.setValue('used', toVariant(used + 1))
             db.updateRecord(tableBlankTempInvalidMoving, recordMoving)
     return record
Beispiel #5
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode,        record, 'code')
     getLineEditValue(self.edtName,        record, 'name')
     getLineEditValue(self.edtMKB,         record, 'MKB')
     getRBComboBoxValue(self.cmbQuotaType, record, 'quotaType_id')
     getCheckBoxValue(self.chkIsObsolete, record, 'isObsolete')
     return record
Beispiel #6
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     setLineEditValue(self.edtTicketPrefix, record, 'ticketPrefix')
     getRBComboBoxValue(self.edtOrgStructure, record, 'orgStructure_id')
     getCheckBoxValue(self.chkImmediatelyReady, record,
                      'isImmediatelyReady')
     return record
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getDateEditValue(self.edtDate, record, 'date')
     getDatetimeEditValue(self.edtDeadlineDate, self.edtDeadlineTime,
                          record, 'deadline', True)
     getCheckBoxValue(self.chkRevoked, record, 'revoked')
     getRBComboBoxValue(self.cmbSupplier, record, 'supplier_id')
     getRBComboBoxValue(self.cmbRecipient, record, 'recipient_id')
     getLineEditValue(self.edtNote, record, 'note')
     return record
Beispiel #8
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     record.setValue('orgStructure_id',
                     toVariant(QtGui.qApp.currentOrgStructureId()))
     getComboBoxValue(self.cmbType, record, 'type')
     getDateEditValue(self.edtBegDate, record, 'begDate')
     getDateEditValue(self.edtEndDate, record, 'endDate')
     getCheckBoxValue(self.chkIsActive, record, 'isActive')
     record.setValue('deleted', toVariant(0))
     return record
Beispiel #9
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtName, record, 'name')
     getTextEditValue(self.edtDescription, record, 'description')
     getCheckBoxValue(self.chkVisible, record, 'visible')
     record.setValue('rcTable_id', toVariant(self.tableId))
     record.setValue('ref_id', toVariant(self.getReferenceValue()))
     record.setValue('field',
                     toVariant((self.fields[self.cmbField.currentIndex()])))
     return record
Beispiel #10
0
 def getRecord(self):
     record = CItemEditorDialog.getRecord(self)
     getLineEditValue(self.edtProg, record, 'prog')
     getLineEditValue(self.edtPreferentArchiver, record,
                      'preferentArchiver')
     getCheckBoxValue(self.chkEmailRequired, record, 'emailRequired')
     getLineEditValue(self.edtEmailTo, record, 'emailTo')
     getLineEditValue(self.edtSubject, record, 'subject')
     getTextEditHTML(self.edtMessage, record, 'message')
     return record
Beispiel #11
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     getComboBoxValue(self.cmbSex, record, 'sex')
     getCheckBoxValue(self.chkCounterManualInput, record,
                      'counterManualInput')
     getComboBoxValue(self.cmbCounterResetType, record, 'counterResetType')
     getLineEditValue(self.edtExternalIdLimit, record,
                      'issueExternalIdLimit')
     return record
Beispiel #12
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getComboBoxValue(self.cmbType, record, 'type')
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     getCheckBoxValue(self.checkBox, record, 'requiredDiagnosis')
     getComboBoxValue(self.cmbGrouping, record, 'grouping')
     getSpinBoxValue(self.spinPrimary, record, 'primary')
     getSpinBoxValue(self.spinProlongate, record, 'prolongate')
     getSpinBoxValue(self.spinRestriction, record, 'restriction')
     return record
Beispiel #13
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtFederalCode, record, 'federalCode')
     getLineEditValue(self.edtRegionalCode, record, 'regionalCode')
     getLineEditValue(self.edtName, record, 'name')
     getRBComboBoxValue(self.cmbGroup, record, 'group_id')
     getComboBoxValue(self.cmbSerialFormat, record, 'serial_format')
     getCheckBoxUniqueValue(self.chkDefault, record, rbDocumentType,
                            'isDefault')
     getCheckBoxValue(self.chkForeigner, record, 'isForeigner')
     return record
Beispiel #14
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     getComboBoxValue(self.cmbSex, record, 'sex')
     record.setValue(
         'age',
         toVariant(
             composeAgeSelector(self.cmbBegAgeUnit.currentIndex(),
                                forceStringEx(self.edtBegAgeCount.text()),
                                self.cmbEndAgeUnit.currentIndex(),
                                forceStringEx(self.edtEndAgeCount.text()))))
     getCheckBoxValue(self.chkUseInCreateClients, record, 'flags')
     return record
Beispiel #15
0
    def getRecord(self):
        record = CEventEditDialog.getRecord(self)
        showTime = getEventShowTime(self.eventTypeId)

        getLineEditValue(self.edtCardNo, record, 'externalId')
        getDatetimeEditValue(self.edtBegDate, self.edtBegTime, record,
                             'setDate', showTime)
        getDatetimeEditValue(self.edtEndDate, self.edtEndTime, record,
                             'execDate', showTime)
        getRBComboBoxValue(self.cmbPerson, record, 'execPerson_id')
        getRBComboBoxValue(self.cmbResult, record, 'result_id')
        # getComboBoxValue(self.cmbOrder,         record, 'order')
        record.setValue('order', toVariant(self.cmbOrder.code()))
        getCheckBoxValue(self.chkLock, record, 'locked')
        return record
Beispiel #16
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getCheckBoxValue(self.chkHasSpace, record, 'hasSpace')
     addSpace = u' ' if self.chkHasSpace.isChecked() else u''
     record.setValue(
         'name',
         toVariant(u'%s%s' %
                   (forceString(self.edtName.text()).strip(), addSpace)))
     record.setValue(
         'function',
         toVariant(
             u'%s%s' %
             (forceString(self.edtFunction.text()).strip(), addSpace)))
     getTextEditValue(self.edtDescription, record, 'description')
     return record
Beispiel #17
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
Beispiel #18
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(   self.edtName,         record, 'name')
     getLineEditValue(   self.edtTemplate,     record, 'template')
     getCheckBoxValue(   self.chkTabRegistry,  record, 'tabRegistry')
     getCheckBoxValue(   self.chkTabEvents,    record, 'tabEvents')
     getCheckBoxValue(   self.chkTabAmbCard,   record, 'tabAmbCard')
     getCheckBoxValue(   self.chkTabActions,   record, 'tabActions')
     return record
Beispiel #19
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     getCheckBoxValue(self.chkEditable, record, 'isEditable')
     getCheckBoxValue(self.chkShowInClientInfo, record, 'showInClientInfo')
     getCheckBoxValue(self.chkIsUnique, record, 'isUnique')
     getCheckBoxValue(self.chkAutoIdentificator, record,
                      'autoIdentificator')
     getRBComboBoxValue(self.cmbCounter, record, 'counter_id')
     return record
Beispiel #20
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     getCheckBoxValue(self.chkShowInClientInfo, record,
                      'isShowInClientInfo')
     getCheckBoxValue(self.chkTightControl, record, 'tightControl')
     if u'онко' in QtGui.qApp.currentOrgInfis():
         getCheckBoxValue(self.chkSoftControl, record, 'softControl')
     getCheckBoxValue(self.chkAutoDateClose, record, 'autoCloseDate')
     record.setValue('group_id', toVariant(self.groupId))
     return record
Beispiel #21
0
    def getRecord(self):
        record = CItemEditorBaseDialog.getRecord(self)
        if self.btnAddOrgCounter.isChecked():
            self.edtCode.setText('p%s' % self.cmbCompulsoryPolisCompany.value())
            self.edtName.setText(u'[Счетчик ИФ] %s' % self.cmbCompulsoryPolisCompany.currentText())
            self.edtPrefix.setText('')
            self.edtPostfix.setText('')
            self.edtSeparator.setText('')

        getLineEditValue(self.edtCode, record, 'code')
        getLineEditValue(self.edtName, record, 'name')
        getSpinBoxValue(self.edtValue, record, 'value')
        getLineEditValue(self.edtPrefix, record, 'prefix')
        getLineEditValue(self.edtPostfix, record, 'postfix')
        getLineEditValue(self.edtSeparator, record, 'separator')
        getCheckBoxValue(self.chkSequenceFlag, record, 'sequenceFlag')
        getComboBoxValue(self.cmbReset, record, 'reset')
        getDateEditValue(self.edtStartDate, record, 'startDate')
        return record
Beispiel #22
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     record.setValue('group_id', toVariant(self.groupId))
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtRegionalCode, record, 'regionalCode')
     getLineEditValue(self.edtName, record, 'name')
     getLineEditValue(self.edtListContext, record, 'listContext')
     getComboBoxValue(self.cmbActionStatusChanger, record,
                      'actionStatusChanger')
     getComboBoxValue(self.cmbActionPersonChanger, record,
                      'actionPersonChanger')
     getComboBoxValue(self.cmbActionDateChanger, record,
                      'actionDateChanger')
     getSpinBoxValue(self.edtTicketDuration, record, 'ticketDuration')
     getCheckBoxValue(self.chkShowOnlyPayed, record,
                      'showOnlyPayed')  # atronah for issue 317
     getSpinBoxValue(self.edtDurationVisibility, record,
                     'durationVisibility')
     getComboBoxValue(self.cmbTicketAssignWay, record, 'ticketAssignWay')
     getComboBoxValue(self.cmbJobStatusModifier, record,
                      'jobStatusModifier')
     return record
Beispiel #23
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode,         record, 'code')
     getLineEditValue(self.edtRegionalCode, record, 'regionalCode')
     getLineEditValue(self.edtRegionalReverseCode, record, 'regionalReverseCode')
     getLineEditValue(self.edtLeftName,     record, 'leftName')
     getLineEditValue(self.edtRightName,    record, 'rightName')
     getCheckBoxValue(self.chkDirectGeneticRelation,          record, 'isDirectGenetic')
     getCheckBoxValue(self.chkBackwardGeneticRelation,        record, 'isBackwardGenetic')
     getCheckBoxValue(self.chkDirectRepresentativeRelation,   record, 'isDirectRepresentative')
     getCheckBoxValue(self.chkBackwardRepresentativeRelation, record, 'isBackwardRepresentative')
     getCheckBoxValue(self.chkDirectEpidemicRelation,         record, 'isDirectEpidemic')
     getCheckBoxValue(self.chkBackwardEpidemicRelation,       record, 'isBackwardEpidemic')
     getCheckBoxValue(self.chkDirectDonationRelation,         record, 'isDirectDonation')
     getCheckBoxValue(self.chkBackwardDonationRelation,       record, 'isBackwardDonation')
     getComboBoxValue(self.cmbLeftSex, record, 'leftSex')
     getComboBoxValue(self.cmbRightSex, record, 'rightSex')
     return record
Beispiel #24
0
    def getNotes(self, record, eventTypeId):
        db = QtGui.qApp.db
        tbl = db.table('Referral')
        record.setValue('relegateOrg_id',
                        toVariant(self.cmbRelegateOrg.value()))
        getTextEditValue(self.edtEventNote, record, 'note')
        if getEventIsExternal(eventTypeId):
            getLineEditValue(self.edtEventExternalIdValue, record,
                             'externalId')
        if hasEventAssistant(eventTypeId):
            getRBComboBoxValue(self.cmbEventAssistant, record, 'assistant_id')
        if hasEventCurator(eventTypeId):
            getRBComboBoxValue(self.cmbEventCurator, record, 'curator_id')
        getRBComboBoxValue(self.cmbPatientModel, record, 'patientModel_id')
        getRBComboBoxValue(self.cmbCureType, record, 'cureType_id')
        getRBComboBoxValue(self.cmbCureMethod, record, 'cureMethod_id')
        getRBComboBoxValue(self.cmbClientPolicy, record, 'clientPolicy_id')
        if QtGui.qApp.isEventLockEnabled():
            getCheckBoxValue(self.chkLock, record, 'locked')
        refId = db.translate('Event', 'id', forceInt(record.value('id')),
                             'referral_id')
        if not refId:
            refId = db.translate('Referral', 'event_id',
                                 forceInt(record.value('id')), 'id')
        if QtGui.qApp.isReferralRequired() and not self.dontSaveReferral:
            if self.chkLPUReferral.isChecked() and not forceInt(refId):
                if not forceString(self.edtNumber.text()):
                    QtGui.QMessageBox.warning(self, u'Ошибка',
                                              u'Заполните номер направления')
                    return
                ref_record = db.getRecordEx(tbl, '*', [
                    tbl['type'].eq(forceInt(self.cmbReferralType.value())),
                    tbl['number'].eq(forceString(self.edtNumber.text())),
                    tbl['client_id'].eq(
                        forceInt(self._clientId if self._clientId else QtGui.
                                 qApp.currentClientId())), tbl['date'].eq(
                                     self.edtDate.date()),
                    tbl['isCancelled'].eq(0), tbl['deleted'].eq(0)
                ])
                if not ref_record:
                    ref_record = tbl.newRecord()
                ref_record.setValue('number',
                                    QtCore.QVariant(self.edtNumber.text()))
                ref_record.setValue(
                    'event_id',
                    QtCore.QVariant(
                        forceInt(record.value('id')
                                 ) if forceInt(record.value('id')) else self.
                        lblEventIdValue.text()))
                ref_record.setValue(
                    'relegateOrg_id',
                    QtCore.QVariant(self.cmbRelegateOrg.value()))
                ref_record.setValue(
                    'client_id',
                    QtCore.QVariant(self._clientId if self._clientId else QtGui
                                    .qApp.currentClientId()))
                ref_record.setValue('MKB', QtCore.QVariant(self.cmbMKB.text()))
                ref_record.setValue(
                    'speciality_id',
                    QtCore.QVariant(self.cmbSpeciality.value()))
                ref_record.setValue(
                    'type', QtCore.QVariant(self.cmbReferralType.value()))
                getDateEditValue(self.edtDate, ref_record, 'date')
                getDateEditValue(self.edtPlannedDate, ref_record, 'hospDate')
                getLineEditValue(self.edtPerson, ref_record, 'person')
                if self.chkFreeInput.isChecked():
                    getLineEditValue(self.edtFreeInput, ref_record,
                                     'freeInput')
                referralId = db.insertOrUpdate(db.table('Referral'),
                                               ref_record)
                record.setValue('referral_id', toVariant(referralId))
            elif forceInt(refId):
                if not forceString(self.edtNumber.text()):
                    QtGui.QMessageBox.warning(self, u'Ошибка',
                                              u'Заполните номер направления')
                    return
                record.setValue('referral_id', toVariant(refId))
                ref_record = db.getRecordEx(
                    tbl, '*', [tbl['id'].eq(refId), tbl['isSend'].eq(0)])
                if ref_record and not forceInt(ref_record.value('isSend')):
                    if self.chkLPUReferral.isChecked():
                        if ref_record:
                            ref_record.setValue(
                                'number',
                                QtCore.QVariant(self.edtNumber.text()))
                            ref_record.setValue(
                                'event_id',
                                QtCore.QVariant(
                                    forceInt(record.value('id')) if forceInt(
                                        record.value('id')) else self.
                                    lblEventIdValue.text()))
                            ref_record.setValue(
                                'relegateOrg_id',
                                QtCore.QVariant(self.cmbRelegateOrg.value()))
                            ref_record.setValue(
                                'client_id',
                                QtCore.QVariant(self._clientId if self.
                                                _clientId else QtGui.qApp.
                                                currentClientId()))
                            ref_record.setValue(
                                'MKB', QtCore.QVariant(self.cmbMKB.text()))
                            ref_record.setValue(
                                'speciality_id',
                                QtCore.QVariant(self.cmbSpeciality.value()))
                            ref_record.setValue(
                                'type',
                                QtCore.QVariant(self.cmbReferralType.value()))
                            ref_record.setValue(
                                'date', QtCore.QVariant(self.edtDate.date()))
                            ref_record.setValue(
                                'hospDate',
                                QtCore.QVariant(self.edtPlannedDate.date()))
                            ref_record.setValue(
                                'person',
                                QtCore.QVariant(self.edtPerson.text()))
                            db.updateRecord(tbl, ref_record)
                    else:
                        record.setValue('referral_id', QtCore.QVariant())
            else:
                record.setValue('referral_id', QtCore.QVariant())

            if self.chkArmyReferral.isChecked():
                armyCond = [
                    tbl['number'].eq(self.cmbArmyNumber.text()),
                    tbl['id'].eq(self.cmbArmyNumber.value())
                ]
                army_ref_record = db.getRecordEx(tbl, '*', where=armyCond)
                if not army_ref_record:
                    army_ref_record = tbl.newRecord()
                    new = True
                else:
                    new = False
                army_ref_record.setValue(
                    'number',
                    QtCore.QVariant(self.cmbArmyNumber.lineEdit().text()))
                army_ref_record.setValue(
                    'client_id',
                    QtCore.QVariant(self._clientId if self._clientId else QtGui
                                    .qApp.currentClientId()))
                army_ref_record.setValue('type', QtCore.QVariant(1))
                army_ref_record.setValue(
                    'relegateOrg_id', QtCore.QVariant(self.cmbArmyOrg.value()))
                getDateEditValue(self.edtArmyDate, army_ref_record, 'date')
                if self.chkArmyFreeInput.isChecked():
                    getLineEditValue(self.edtArmyFreeInput, army_ref_record,
                                     'freeInput')
                if new:
                    referralId = db.insertRecord(db.table('Referral'),
                                                 army_ref_record)
                else:
                    referralId = db.updateRecord(db.table('Referral'),
                                                 army_ref_record)
                record.setValue('armyReferral_id', toVariant(referralId))
                self.cmbArmyNumber.forceUpdate()
            else:
                record.setValue('armyReferral_id', QtCore.QVariant())
Beispiel #25
0
    def getRecord(self):
        obsoleteInfisCode = forceString(self.edtObsoleteInfisCode.text())
        obsoleteInfisCode = forceStringEx(obsoleteInfisCode.replace(
            ',', ' ')).replace(' ', ',')

        record = CItemEditorBaseDialog.getRecord(self)
        getLineEditValue(self.edtFullName, record, 'fullName')
        getLineEditValue(self.edtShortName, record, 'shortName')
        getLineEditValue(self.edtTitle, record, 'title')
        getLineEditValue(self.edtAddress, record, 'address')
        getRBComboBoxValue(self.cmbNet, record, 'net_id')
        getLineEditValue(self.edtInfisCode, record, 'infisCode')
        record.setValue('obsoleteInfisCode', toVariant(obsoleteInfisCode))
        getLineEditValue(self.edtMiacCode, record, 'miacCode')
        getLineEditValue(self.edtOKVED, record, 'OKVED')
        getLineEditValue(self.edtINN, record, 'INN')
        getLineEditValue(self.edtKPP, record, 'KPP')
        getLineEditValue(self.edtOGRN, record, 'OGRN')
        getLineEditValue(self.edtFSS, record, 'FSS')
        getLineEditValue(self.edtOKATO, record, 'OKATO')
        getLineEditValue(self.edtOKPO, record, 'OKPO')
        getLineEditValue(self.edtNetricaCode, record, 'netrica_Code')
        getRBComboBoxValue(self.cmbOKPF, record, 'OKPF_id')
        getRBComboBoxValue(self.cmbOKFS, record, 'OKFS_id')
        getLineEditValue(self.edtChief, record, 'chief')
        getLineEditValue(self.edtPhone, record, 'phone')
        getLineEditValue(self.edtAccountant, record, 'accountant')
        getCheckBoxValue(self.chkIsInsurer, record, 'isInsurer')
        getCheckBoxValue(self.chkIsCompulsoryInsurer, record,
                         'isCompulsoryInsurer')
        getCheckBoxValue(self.chkIsVoluntaryInsurer, record,
                         'isVoluntaryInsurer')
        area = self.cmbArea.code()
        record.setValue('area', toVariant(area))
        getCheckBoxValue(self.chkCompulsoryServiceStop, record,
                         'compulsoryServiceStop')
        getCheckBoxValue(self.chkVoluntaryServiceStop, record,
                         'voluntaryServiceStop')
        getCheckBoxValue(self.chkCanOmitPolicyNumber, record,
                         'canOmitPolicyNumber')
        getComboBoxValue(self.cmbIsMedical, record, 'isMedical')
        getTextEditValue(self.edtNotes, record, 'notes')
        getRBComboBoxValue(self.cmbHead, record, 'head_id')
        return record
Beispiel #26
0
 def getRecord(self):
     record = super(CRBActionAssistantTypeEditor, self).getRecord()
     getCheckBoxValue(self.chkFreeInput, record, 'isEnabledFreeInput')
     return record
Beispiel #27
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     record.setValue('type', toVariant(self.type_))
     getRBComboBoxValue(self.cmbDoctype, record, 'doctype_id')
     record.setValue('client_id', toVariant(self.clientId))
     getRBComboBoxValue(self.cmbReason, record, 'tempInvalidReason_id')
     getRBComboBoxValue(self.cmbExtraReason, record,
                        'tempInvalidExtraReason_id')
     getWidgetValue(self.cmbBusyness, record, 'busyness')
     getLineEditValue(self.edtPlaceWork, record, 'placeWork')
     # getLineEditValue(self.edtSerial,    record, 'serial')
     getLineEditValue(self.edtNumber, record, 'number')
     getComboBoxValue(self.cmbOtherSex, record, 'sex')
     getSpinBoxValue(self.edtOtherAge, record, 'age')
     getCheckBoxValue(self.chkInsuranceOfficeMark, record,
                      'insuranceOfficeMark')
     getLineEditValue(self.edtMainNumber, record, 'mainNumber')
     fullLength, externalLength = self.modelPeriods.calcLengths()
     record.setValue('begDate', toVariant(self.modelPeriods.begDate()))
     record.setValue('endDate', toVariant(self.modelPeriods.endDate()))
     record.setValue('duration', toVariant(fullLength))
     date = self.modelPeriods.endDate()
     if not date:
         date = self.modelPeriods.begDate()
     diagnosisTypeId = 1  #diagnosisType = закл
     diagnosis = getDiagnosisId2(date, self.modelPeriods.lastPerson(),
                                 self.clientId, diagnosisTypeId,
                                 self.edtDiagnosis.text(), u'',
                                 self.cmbDiseaseCharacter.value(), None,
                                 None)
     record.setValue('diagnosis_id', toVariant(diagnosis[0]))
     if (self.prolonging or forceInt(record.value('closed'))
             == 2) and (not self.saveProlonging):
         closed = 2
     else:
         closed = self.modelPeriods.getTempInvalidClosedStatus()
     #self.closed = closed
     record.setValue('closed', toVariant(closed))
     record.setValue('prev_id', toVariant(self.prevId))
     record.setValue('person_id', toVariant(self.modelPeriods.lastPerson()))
     if not self.caseBegDate:
         self.caseBegDate = self.modelPeriods.begDate()
     record.setValue('caseBegDate', toVariant(self.caseBegDate))
     db = QtGui.qApp.db
     table = db.table('TempInvalid')
     tableBlankTempInvalidMoving = db.table('BlankTempInvalid_Moving')
     if not self.defaultBlankMovingId:
         blankMovingId = None
     else:
         blankMovingId = self.defaultBlankMovingId
     if blankMovingId:
         recordMoving = db.getRecordEx(tableBlankTempInvalidMoving, u'*', [
             tableBlankTempInvalidMoving['deleted'].eq(0),
             tableBlankTempInvalidMoving['id'].eq(blankMovingId)
         ])
         used = forceInt(recordMoving.value('used'))
         recordMoving.setValue('used', toVariant(used + 1))
         db.updateRecord(tableBlankTempInvalidMoving, recordMoving)
     if self.saveProlonging:
         recordTempInvalid = table.newRecord()
         recordTempInvalid.setValue('type', toVariant(self.type_))
         recordTempInvalid.setValue('client_id', toVariant(self.clientId))
         tempInvalidId = db.insertOrUpdate(table, recordTempInvalid)
         record.setValue('id', toVariant(tempInvalidId))
         self.modelPeriods.saveItems(tempInvalidId)
         self.saveProlonging = False
     else:
         self.tempInvalidId = db.insertOrUpdate(table, record)
         record.setValue('id', toVariant(self.tempInvalidId))
         self.modelPeriods.saveItems(self.tempInvalidId)
     return record
Beispiel #28
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     getCheckBoxValue(self.chkObserved, record, 'observed')
     return record
Beispiel #29
0
    def getRecord(self):
        record = CItemEditorBaseDialog.getRecord(self)
        getRBComboBoxValue(self.cmbOrganisation, record, 'organisation_id')
        getRBComboBoxValue(self.cmbParent, record, 'parent_id')
        getLineEditValue(self.edtCode, record, 'code')
        getLineEditValue(self.edtName, record, 'name')
        getLineEditValue(self.edtAddress, record, 'address')
        getWidgetValue(self.cmbType, record, 'type')
        getRBComboBoxValue(self.cmbNet, record, 'net_id')
        getRBComboBoxValue(self.cmbChief, record, 'chief_id')
        getRBComboBoxValue(self.cmbHeadNurse, record, 'headNurse_id')
        getLineEditValue(self.edtInfisCode, record, 'infisCode')
        getLineEditValue(self.edtAttachCode, record, 'attachCode')
        getLineEditValue(self.edtBookkeeperCode, record, 'bookkeeperCode')
        getLineEditValue(self.edtInfisInternalCode, record,
                         'infisInternalCode')
        getLineEditValue(self.edtInfisDepTypeCode, record, 'infisDepTypeCode')
        getLineEditValue(self.edtInfisTariffCode, record, 'infisTariffCode')
        getLineEditValue(self.edtDayLimit, record, 'dayLimit')
        getLineEditValue(self.edtStorageCode, record, 'storageCode')
        getLineEditValue(self.edtSyncGUID, record, 'syncGUID')
        getLineEditValue(self.edtMiacCode, record, 'miacCode')

        getSpinBoxValue(self.edtSalaryPercentage, record, 'salaryPercentage')
        getSpinBoxValue(self.edtQuota, record, 'quota')

        getComboBoxValue(self.cmbIsArea, record, 'isArea')
        if self.cmbMiacHead.isEnabled():
            getRBComboBoxValue(self.cmbMiacHead, record, 'miacHead_id')
        else:
            record.setValue('miacHead_id', toVariant(None))
        getCheckBoxValue(self.chkHasHospitalBeds, record, 'hasHospitalBeds')
        getCheckBoxValue(self.chkHasStocks, record, 'hasStocks')
        getCheckBoxValue(self.chkHasDS, record, 'hasDayStationary')
        getCheckBoxValue(self.chkAvailableForExternal, record,
                         'availableForExternal')
        getCheckBoxValue(self.chkInheritEventTypes, record,
                         'inheritEventTypes')
        getCheckBoxValue(self.chkInheritGaps, record, 'inheritGaps')
        getCheckBoxValue(self.chkInheritActionTypes, record,
                         'inheritActionTypes')
        getCheckBoxValue(self.chkVisibleInDR, record, 'isVisibleInDR')
        return record