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): dateTime = QDateTime(self.edtDate.date(), QTime().currentTime()) record.setValue('dateTime', dateTime) i = self.cmbSocCodes.currentIndex() socCode = forceString(self.cmbSocCodes.itemData(i)) record.setValue('socCode', socCode) pregCard = forceInt(self.edtPregCard.text()) if pregCard > 0: record.setValue('pregCard', pregCard) else: record.setNull('pregCard') getRBComboBoxValue(self.cmbFinance, record, 'finance_id') record.setValue('mkb', toVariant(self.cmbMKB.text())) getRBComboBoxValue(self.cmbDrug, record, 'formularyItem_id') getLineEditValue(self.edtDosage, record, 'dosage') getSpinBoxValue(self.spbQnt, record, 'qnt') getLineEditValue(self.edtSigna, record, 'signa') getSpinBoxValue(self.spbDuration, record, 'duration') getSpinBoxValue(self.spbNumPerDay, record, 'numPerDay') record.setValue('isVk', int(self.rbtnVkYes.isChecked())) record.setValue('printMnn', int(self.rbtnPrintMNN.isChecked())) record.setValue('percentage', int(50 if self.rbtn50proc.isChecked() else 100)) getComboBoxValue(self.cmbTerm, record, 'term') record.setValue( 'status', self.modelRecipeStatus.getCode(self.cmbStatus.currentIndex())) record.setValue('deleted', 0)
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) pType = '%.2d' % (self.cmbPaymentType.currentIndex() + 1) codePart = '%.2d' % (self.cmbCodePart.currentIndex() + 1) if (pType, codePart) in self.codes.keys(): code = '%s.%s.%.3d' % (pType, codePart, self.codes[(pType, codePart)]) else: code = '%s.%s.%.3d' % (pType, codePart, 1) record.setValue(rbCode, toVariant(code)) record.setValue('type', toVariant(self.type)) getRBComboBoxValue(self.cmbOKPF, record, 'OKPF_id') getRBComboBoxValue(self.cmbOrgId, record, 'org_id') getLineEditValue(self.edtContractNumber, record, 'contractNumber') getDateEditValue(self.edtDate, record, 'contractDate') getDateEditValue(self.edtEndDate, record, 'contractEndDate') getLineEditValue(self.edtContractSum, record, 'contractSum') if QtGui.qApp.checkGlobalPreference('68', u'нет') and type == 2: getLineEditValue(self.edtContragent, record, 'contragent') getLineEditValue(self.edtProtocolNum, record, 'protocolNumber') getLineEditValue(self.edtProtocolPhase, record, 'protocolPhase') getLineEditValue(self.edtProtocolName, record, 'protocolName') getComboBoxValue(self.cmbRecPatients, record, 'protocolRecruit') elif QtGui.qApp.checkGlobalPreference('68', u'нет') and type == 1: getLineEditValue(self.edtContragent, record, 'contragent') getLineEditValue(self.edtContractItem, record, 'contractItem') getLineEditValue(self.edtAddress, record, 'address') return record
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) getLineEditValue(self.edtCode, record, 'code') getLineEditValue(self.edtName, record, 'name') getLineEditValue(self.edtShortName, record, 'shortName') getLineEditValue(self.edtOKSOName, record, 'OKSOName') getLineEditValue(self.edtOKSOCode, record, 'OKSOCode') getLineEditValue(self.edtFederalCode, record, 'federalCode') getLineEditValue(self.edtRegionalCode, record, 'regionalCode') getLineEditValue(self.edtSyncGUID, record, 'syncGUID') getRBComboBoxValue(self.cmbLocalService, record, 'service_id') getRBComboBoxValue(self.cmbProvinceService, record, 'provinceService_id') getRBComboBoxValue(self.cmbOtherService, record, 'otherService_id') getRBComboBoxValue(self.cmbFundingService, record, 'fundingService_id') getComboBoxValue(self.cmbSex, record, 'sex') record.setValue( 'age', toVariant( composeAgeSelector(self.cmbBegAgeUnit.currentIndex(), forceStringEx(self.edtBegAgeCount.text()), self.cmbEndAgeUnit.currentIndex(), forceStringEx(self.edtEndAgeCount.text())))) record.setValue( 'versSpec', toVariant({ 0: '', 1: 'V004', 2: 'V015' }.get(self.cmbVersSpec.currentIndex(), ''))) getLineEditValue(self.edtMKBFilter, record, 'mkbFilter') return record
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) getLineEditValue(self.edtCode, record, 'code') getLineEditValue(self.edtName, record, 'name') getComboBoxValue(self.cmbQuotaStatusModifier, record, 'quotaStatusModifier') 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): record = CItemEditorBaseDialog.getRecord(self) getLineEditValue(self.edtCode, record, 'code') getLineEditValue(self.edtName, record, 'name') getComboBoxValue(self.cmbCharacterRelation, record, 'characterRelation') return record
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) getComboBoxValue(self.cmbStatus, record, 'status') getDatetimeEditValue(self.edtBegDate, self.edtBegTime, record, 'begDateTime', True) getDatetimeEditValue(self.edtEndDate, self.edtEndTime, record, 'endDateTime', True) self.saveTakenTissueRecords() return record
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) getLineEditValue( self.edtCode, record, 'code') getLineEditValue( self.edtName, record, 'name') getComboBoxValue( self.cmbProtocol, record, 'protocol') getLineEditValue( self.edtAddress, record, 'address') getLineEditValue( self.edtOwnName, record, 'ownName') getLineEditValue( self.edtLabName, record, 'labName') return record
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
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
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
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
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) getLineEditValue(self.edtCode, record, 'code') record.setValue( 'name', QtCore.QVariant(self.edtName.toPlainText().replace('\n', ' '))) group_code = self.cmbGroup.code() if group_code != '0': record.setValue('group_code', QtCore.QVariant(group_code)) else: record.setValue('group_code', QtCore.QVariant()) getComboBoxValue(self.cmbClass, record, 'class') return record
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
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
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 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
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
def getRecord(self): record = self.record() showTime = self.action.getType().showTime getDatetimeEditValue(self.edtPlannedEndDate, self.edtPlannedEndTime, record, 'plannedEndDate', showTime) getDatetimeEditValue(self.edtBegDate, self.edtBegTime, record, 'begDate', showTime) getDatetimeEditValue(self.edtEndDate, self.edtEndTime, record, 'endDate', showTime) getComboBoxValue(self.cmbStatus, record, 'status') getDoubleBoxValue(self.edtAmount, record, 'amount') getDoubleBoxValue(self.edtUet, record, 'uet') getRBComboBoxValue(self.cmbPerson, record, 'person_id') getRBComboBoxValue(self.cmbSetPerson, record, 'setPerson_id') getLineEditValue(self.edtOffice, record, 'office') getLineEditValue(self.edtNote, record, 'note') record.setValue('MKB', QtCore.QVariant(self.cmbMKB.text())) record.setValue('morphologyMKB', QtCore.QVariant(self.cmbMorphologyMKB.validText())) record.setValue('org_id', QtCore.QVariant(self.cmbOrg.value())) record.setValue('duration', toVariant(self.edtDuration.value())) record.setValue('periodicity', toVariant(self.edtPeriodicity.value())) record.setValue('aliquoticity', toVariant(self.edtAliquoticity.value())) return record
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) record.setValue('group_id', toVariant(self.groupId)) 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())))) record.setValue( 'owner_id', toVariant(self.cmbOwner.value() if self.rbVisibleToOwner.isChecked( ) else None)) record.setValue( 'speciality_id', toVariant(self.cmbSpeciality.value() if self.rbVisibleToSpeciality. isChecked() else None)) record.setValue('action_id', toVariant(self.saveAction())) return record
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
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) getComboBoxValue(self.cmbType, record, 'type') getLineEditValue(self.edtCode, record, rbCode) getLineEditValue(self.edtName, record, rbName) # getCheckBoxValue(self.chkAble, record, 'able') getComboBoxValue(self.cmbClosed, record, 'closed') getComboBoxValue(self.cmbStatus, record, 'status') 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): record = CItemEditorBaseDialog.getRecord(self) getLineEditValue(self.edtCode, record, rbCode) getLineEditValue(self.edtName, record, rbName) getRBComboBoxValue(self.cmbEquipmentType, record, 'equipmentType_id') getSpinBoxValue(self.edtTripod, record, 'tripod') getSpinBoxValue(self.edtTripodCapacity, record, 'tripodCapacity') getLineEditValue(self.edtInventoryNumber, record, 'inventoryNumber') getLineEditValue(self.edtModel, record, 'model') getDateEditValue(self.edtReleaseDate, record, 'releaseDate') getDateEditValue(self.edtStartupDate, record, 'startupDate') getComboBoxValue(self.cmbStatus, record, 'status') getSpinBoxValue(self.edtEmploymentTerm, record, 'employmentTerm') getSpinBoxValue(self.edtWarrantyTerm, record, 'warrantyTerm') getSpinBoxValue(self.edtMaintenancePeriod, record, 'maintenancePeriod') getComboBoxValue(self.cmbMaintenanceSingleInPeriod, record, 'maintenanceSingleInPeriod') getLineEditValue(self.edtManufacturer, record, 'manufacturer') getComboBoxValue(self.cmbProtocol, record, 'protocol') getLineEditValue(self.edtAddress, record, 'address') getLineEditValue(self.edtOwnName, record, 'ownName') getLineEditValue(self.edtLabName, record, 'labName') return record
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
def getRecord(self): record = CItemEditorBaseDialog.getRecord(self) getComboBoxValue(self.cmbType, record, 'type') getLineEditValue(self.edtCode, record, 'code') getLineEditValue(self.edtName, record, 'name') return record