Exemple #1
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, rbCode)
     getLineEditValue(self.edtName, record, rbName)
     getRBComboBoxValue(self.cmbTestGroup, record, 'testGroup_id')
     getSpinBoxValue(self.edtPosition, record, 'position')
     return record
Exemple #2
0
    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
Exemple #3
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     getLabelImageValue(self.loadedFile, record, 'image', self.tableName)
     getSpinBoxValue(self.edtMarkSize, record, 'markSize')
     return record
Exemple #4
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getRBComboBoxValue(self.cmbType, record, 'type_id')
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtRegionalCode, record, 'regionalCode')
     getLineEditValue(self.edtName, record, 'name')
     getLineEditValue(self.edtProducer, record, 'producer')
     getLineEditValue(self.edtATC, record, 'ATC')
     getSpinBoxValue(self.spnPackSize, record, 'packSize')
     record.setValue('analog_id',
                     toVariant(self.modelAnalogs.correctAlanogId()))
     return record
Exemple #5
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, 'code')
     getLineEditValue(self.edtName, record, 'name')
     getRBComboBoxValue(self.cmbRecipientPerson, record, 'recipientPerson_id')
     getDateEditValue(self.edtReleaseDate, record, 'releaseDate')
     getDateEditValue(self.edtSupplyDate, record, 'supplyDate')
     getDateEditValue(self.edtStartOperationDate, record, 'startOperationDate')
     getDateEditValue(self.edtExpiryDate, record, 'expiryDate')
     getSpinBoxValue(self.edtPlanTestQuantity, record, 'planTestQuantity')
     getLineEditValue(self.edtManufacturer, record, 'manufacturer')
     getLineEditValue(self.edtStorageConditions, record, 'storageConditions')
     return record
Exemple #6
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
Exemple #7
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
Exemple #8
0
 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)
Exemple #9
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
Exemple #10
0
 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
Exemple #11
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
Exemple #12
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
Exemple #13
0
 def getRecord(self):
     record = CItemEditorBaseDialog.getRecord(self)
     getLineEditValue(self.edtCode, record, rbCode)
     getLineEditValue(self.edtName, record, rbName)
     getSpinBoxValue(self.edtPeriod, record, 'period')
     return record