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
def getLocalContractRecord(self, eventId): record = self.localContractRecord if self.isControlsCreate and self.grpLocalContract.isChecked(): record = self.localContractRecord if self.localContractRecord else QtGui.qApp.db.record( self.localContractTableName) record.setValue('master_id', toVariant(eventId)) record.setValue( 'deleted', QtCore.QVariant(0 if self.grpLocalContract.isChecked() else 1)) getDateEditValue(self.edtCoordDate, record, 'coordDate') getLineEditValue(self.edtCoordAgent, record, 'coordAgent') getLineEditValue(self.edtCoordInspector, record, 'coordInspector') getTextEditValue(self.edtCoordText, record, 'coordText') getDateEditValue(self.edtContractDate, record, 'dateContract') getLineEditValue(self.edtContractNumber, record, 'numberContract') getLineEditValue(self.edtSumLimit, record, 'sumLimit') getLineEditValue(self.edtLastName, record, 'lastName') getLineEditValue(self.edtFirstName, record, 'firstName') getLineEditValue(self.edtPatrName, record, 'patrName') getDateEditValue(self.edtBirthDate, record, 'birthDate') getRBComboBoxValue(self.cmbDocType, record, 'documentType_id') getLineEditValue(self.edtDocSerialLeft, record, 'serialLeft') getLineEditValue(self.edtDocSerialRight, record, 'serialRight') getLineEditValue(self.edtDocNumber, record, 'number') getLineEditValue(self.edtRegAddress, record, 'regAddress') getRBComboBoxValue(self.cmbOrganisation, record, 'org_id') return record
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) getLineEditValue(self.edtName, record, 'name') getLineEditValue(self.edtTable, record, 'table') getTextEditValue(self.edtDescription, record, 'description') getLineEditValue(self.edtGroup, record, 'group') return record
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
def getRecord(self): db = QtGui.qApp.db record = CItemEditorBaseDialog.getRecord(self) getLineEditValue(self.edtCode, record, 'DiagID') record.setValue( 'Prim', QtCore.QVariant('*' if self.chkPrim.isChecked() else '')) getTextEditValue(self.edtName, record, 'DiagName') if self.cmbMKBSubclass.isEnabled(): getRBComboBoxValue(self.cmbMKBSubclass, record, 'MKBSubclass_id') else: record.setValue('MKBSubclass_id', QtCore.QVariant()) getComboBoxValue(self.cmbCharacters, record, 'characters') getComboBoxValue(self.cmbSex, record, 'sex') record.setValue( 'age', toVariant( composeAgeSelector(self.cmbBegAgeUnit.currentIndex(), forceStringEx(self.edtBegAgeCount.text()), self.cmbEndAgeUnit.currentIndex(), forceStringEx(self.edtEndAgeCount.text())))) getSpinBoxValue(self.edtDuration, record, 'duration') self.modelServiceSpecialty.saveItems(self.itemId()) record.setValue('begDate', toVariant(self.edtBegDate.date())) record.setValue('endDate', toVariant(self.edtEndDate.date())) record.setValue('OMS', toVariant(self.chkOMS.isChecked())) record.setValue('MTR', toVariant(self.chkMTR.isChecked())) record.setValue('parent_code', toVariant(self.parentCode)) clearCache() return record
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) getRBComboBoxValue(self.cmbFirstActionType, record, 'firstActionType_id') getRBComboBoxValue(self.cmbSecondActionType, record, 'secondActionType_id') getTextEditValue(self.edtReason, record, 'reason') return record
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
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
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 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
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())
def getNotes(self, record, eventTypeId): getTextEditValue(self.edtEventNote, record, 'note') getRBComboBoxValue(self.cmbClientPolicy, record, 'clientPolicy_id')