def setParams(self, params): self.edtBegDate.setDate( getVal(params, 'begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate( getVal(params, 'endDate', QtCore.QDate.currentDate())) self.cmbOrgStructure.setValue(getVal(params, 'orgStructureId', None)) self.cmbPerson.setValue(getVal(params, 'personId', None))
def setParams(self, params): self.edtBegDate.setDate( getVal(params, 'begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate( getVal(params, 'endDate', QtCore.QDate.currentDate())) self.cmbEventPurpose.setValue(params.get('eventPurposeId', None)) self.cmbOrgStructure.setValue(getVal(params, 'orgStructureId', None)) self.cmbPerson.setValue(getVal(params, 'personId', None)) self.cmbRowGrouping.setCurrentIndex( getVal(params, 'advancedRowGrouping', 0)) if self.cmbVisitPayStatus.isVisible(): self.cmbVisitPayStatus.setCurrentIndex( params.get('visitPayStatus', 0)) self.chkDetailChildren.setChecked(params.get('detailChildren', False)) self.chkVisitHospital.setChecked(params.get('visitHospital', False)) self.chkVisitDisp.setChecked(params.get('visitDisp', False)) self.chkCountCall.setChecked(params.get('countCall', False)) self.cmbSex.setCurrentIndex(params.get('sex', 0)) self.edtAgeFrom.setValue(params.get('ageFrom', 0)) self.edtAgeTo.setValue(params.get('ageTo', 150)) self.chkADN.setChecked(params.get('ADN', False)) self.chkAmbVisits.setChecked(params.get('ambVisits', False)) self.chkCombine.setChecked(params.get('combine', False)) self.edtEventBegDatetime.setDateTime( params.get('eventBegDatetime', QtCore.QDateTime.currentDateTime())) self.edtEventEndDatetime.setDateTime( params.get('eventEndDatetime', QtCore.QDateTime.currentDateTime())) self.gbEventDatetimeParams.setChecked( params.get('isEventCreateParams', False))
def DoSchemaSync(): serverName = forceString( getVal(QtGui.qApp.preferences.appPrefs, 'SchemaSyncServerName', '')) serverPort = forceInt( getVal(QtGui.qApp.preferences.appPrefs, 'SchemaSyncServerPort', 0)) dbName = forceString( getVal(QtGui.qApp.preferences.appPrefs, 'SchemaSyncDbName', '')) userName = forceString( getVal(QtGui.qApp.preferences.appPrefs, 'SchemaSyncUserName', '')) dlg = CSchemaSyncDialog() dlg.edtServerName.setText(serverName) dlg.edtServerPort.setValue(serverPort) dlg.edtDatabaseName.setText(dbName) dlg.edtUserName.setText(userName) dlg.exec_() QtGui.qApp.preferences.appPrefs['SchemaSyncServerName'] = toVariant( dlg.edtServerName.text()) QtGui.qApp.preferences.appPrefs['SchemaSyncServerPort'] = toVariant( dlg.edtServerPort.value()) QtGui.qApp.preferences.appPrefs['SchemaSyncDbName'] = toVariant( dlg.edtDatabaseName.text()) QtGui.qApp.preferences.appPrefs['SchemaSyncUserName'] = toVariant( dlg.edtUserName.text())
def setParams(self, params): self.dtFrom.setDate( getVal(params, 'begDate', QtCore.QDate.currentDate())) self.dtTo.setDate(getVal(params, 'endDate', QtCore.QDate.currentDate())) self.cmbPerson.setValue(params.get('personId', None)) self.cmbOrgStruct.setValue(getVal(params, 'orgStructureId', None))
def build(self, params): begDate = getVal(params, 'begDate', QtCore.QDate()) endDate = getVal(params, 'endDate', QtCore.QDate()) eventTypeId = getVal(params, 'eventTypeId', None) sex = params.get('sex', 0) ageFrom = params.get('ageFrom', 0) ageTo = params.get('ageTo', 150) actionTypeClass = params.get('actionTypeClass', None) actionTypeId = params.get('actionTypeId', None) onlyPermanentAttach = params.get('onlyPermanentAttach', None) MKBFilter = params.get('MKBFilter', 0) MKBFrom = params.get('MKBFrom', '') MKBTo = params.get('MKBTo', '') onlyPayedEvents = params.get('onlyPayedEvents', False) begPayDate = params.get('begPayDate', QtCore.QDate()) endPayDate = params.get('endPayDate', QtCore.QDate()) query = selectData(begDate, endDate, eventTypeId, sex, ageFrom, ageTo, actionTypeClass, actionTypeId, onlyPermanentAttach, MKBFilter, MKBFrom, MKBTo, onlyPayedEvents, begPayDate, endPayDate) # db = QtGui.qApp.db reportData = [] self.setQueryText(forceString(query.lastQuery())) while query.next(): record = query.record() name = forceString(record.value('name')) amount = forceDouble(record.value('amount')) done = forceDouble(record.value('done')) cnt = forceInt(record.value('cnt')) reportData.append([name, cnt, amount, done]) doc = QtGui.QTextDocument() cursor = QtGui.QTextCursor(doc) cursor.setCharFormat(CReportBase.ReportTitle) cursor.insertText(self.title()) cursor.insertBlock() self.dumpParams(cursor, params) cursor.insertBlock() tableColumns = [ ('6%', [u'№ п/п'], CReportBase.AlignRight), ('30%', [u'Наименование'], CReportBase.AlignLeft), ('10%', [u'Случаев'], CReportBase.AlignRight), ('20%', [u'Назначено'], CReportBase.AlignRight), ('20%', [u'Выполнено'], CReportBase.AlignRight), ] table = createTable(cursor, tableColumns) for row in reportData: i = table.addRow() table.setText(i, 0, i) for j in xrange(len(row)): table.setText(i, j + 1, row[j]) return doc
def setParams(self, params): self.edtBegDate.setDate(params.get('begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate(params.get('endDate', QtCore.QDate.currentDate())) self.cmbSocStatusClass.setValue(params.get('socStatusClassId', None)) self.cmbSocStatusType.setValue(params.get('socStatusTypeId', None)) self.cmbEventPurpose.setValue(params.get('purposeId', None)) self.cmbEventType.setValue(params.get('eventTypeId', None)) self.cmbPerson.setValue(getVal(params, 'personId', None)) self.cmbOrganisation.setValue(getVal(params, 'orgId', None))
def build(self, params): begDate = getVal(params, 'begDate', QtCore.QDate()) endDate = getVal(params, 'endDate', QtCore.QDate()) eventTypeId = getVal(params, 'eventTypeId', None) db = QtGui.qApp.db reportData = [] query = selectData(begDate, endDate, eventTypeId) self.setQueryText(forceString(query.lastQuery())) while query.next(): record = query.record() login = forceString(record.value('login')) lastName = forceString(record.value('lastName')) firstName = forceString(record.value('firstName')) patrName = forceString(record.value('patrName')) cnt1 = forceInt(record.value('cnt1')) cnt2 = forceInt(record.value('cnt2')) reportData.append( [login, lastName, firstName, patrName, cnt1, cnt2]) doc = QtGui.QTextDocument() cursor = QtGui.QTextCursor(doc) cursor.setCharFormat(CReportBase.ReportTitle) cursor.insertText(self.title()) cursor.insertBlock() self.dumpParams(cursor, params) cursor.insertBlock() tableColumns = [ ('10%', [u'Регистрационное имя'], CReportBase.AlignLeft), ('20%', [u'Фамилия'], CReportBase.AlignLeft), ('20%', [u'Имя'], CReportBase.AlignLeft), ('20%', [u'Отчество'], CReportBase.AlignLeft), ('10%', [u'Всего'], CReportBase.AlignRight), ('10%', [u'В т.ч. без даты выполнения'], CReportBase.AlignRight), ] table = createTable(cursor, tableColumns) totalCnt1 = 0 totalCnt2 = 0 for row in reportData: i = table.addRow() for j in xrange(len(row)): table.setText(i, j, row[j]) totalCnt1 += row[4] totalCnt2 += row[5] i = table.addRow() table.mergeCells(i, 0, 1, 4) table.setText(i, 0, u'всего', CReportBase.TableTotal) table.setText(i, 4, totalCnt1, CReportBase.TableTotal) table.setText(i, 5, totalCnt2, CReportBase.TableTotal) return doc
def setParams(self, params): self.edtBegDate.setDate( getVal(params, 'begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate( getVal(params, 'endDate', QtCore.QDate.currentDate())) # self.chkDocDoc.setChecked(getVal(params, 'docDoc', 0)) # self.chkMend.setChecked(getVal(params, 'onMend', 0)) self.chkManyEvents.setChecked(getVal(params, 'manyEvents', 0)) self.lstSource.setValues(getVal(params, 'lstSource', []))
def setParams(self, params): self.edtBegDate.setDate(getVal(params, 'begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate(getVal(params, 'endDate', QtCore.QDate.currentDate())) self.edtBegTime.setTime(getVal(params, 'begTime', QtCore.QTime.currentTime())) self.edtEndTime.setTime(getVal(params, 'endTme', QtCore.QTime.currentTime())) self.cmbPerson.setValue(params.get('personId', None)) self.cmbEventType.setValue(params.get('eventTypeId', None)) self.cmbOrgStructure.setValue(getVal(params, 'orgStructureId', None)) self.cmbContract.setPath(params.get('contractPath', u'')) self.cmbVisitPayStatus.setCurrentIndex(params.get('visitPayStatus', 0))
def setParams(self, params): self.edtBegDate.setDate(getVal(params, 'begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate(getVal(params, 'endDate', QtCore.QDate.currentDate())) self.cmbOrgStructure.setValue(getVal(params, 'orgStructureId', None)) self.cmbPerson.setValue(getVal(params, 'personId', None)) self.cmbRowGrouping.setCurrentIndex(getVal(params, 'rowGrouping', 0)) self.cmbSex.setCurrentIndex(params.get('sex', 0)) self.cmbSocStatusClass.setValue(params.get('socStatusClassId', None)) self.cmbSocStatusType.setValue(params.get('socStatusTypeId', None)) self.chkGroup.setChecked(params.get('group', False)) self.chkRegAddress.setChecked(params.get('regAddress', False)) self.chkAddress.setChecked(params.get('address', False))
def __init__(self, parent): CDialogBase.__init__(self, parent) self.setupUi(self) self.setWindowTitle(u'Импорт снимков в ПАКС-хранилище') self.btnImport.setEnabled(False) self.edtFileName.setText(forceString(getVal(QtGui.qApp.preferences.appPrefs, 'ImportPACSFileName', ''))) self.edtAddress.setText(forceString(getVal(QtGui.qApp.preferences.appPrefs, 'ImportPACSAddress', ''))) self.edtPort.setText(forceString(getVal(QtGui.qApp.preferences.appPrefs, 'ImportPACSPort', ''))) self.command = ['dcmsend', '-v', '-aet', 'POL120', '-aec', 'POL120', # '--read-from-dicomdir', '--scan-directories', '--recurse'] self.btnImport.clicked.connect(self.startImport)
def setParams(self, params): self.edtBegDate.setDate( getVal(params, 'begDate', QtCore.QDate().currentDate())) self.edtEndDate.setDate( getVal(params, 'endDate', QtCore.QDate().currentDate())) self.cmbSex.setCurrentIndex(params.get('sex', 0)) self.edtAgeFrom.setValue(params.get('ageFrom', 0)) self.edtAgeTo.setValue(params.get('ageTo', 150)) self.cmbEventType.setValue(params.get('eventTypeId', None)) self.cmbSocStatusClass.setValue(params.get('socStatusClassId', None)) self.cmbOrgStructure.setValue(params.get('orgStructureId', None))
def setParams(self, params): self.edtBegDate.setDate( getVal(params, 'begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate( getVal(params, 'endDate', QtCore.QDate.currentDate())) self.cmbEventPurpose.setValue(params.get('eventPurposeId', None)) self.cmbEventType.setValue(params.get('eventTypeId', None)) self.cmbOrgStructure.setValue(getVal(params, 'orgStructureId', None)) self.cmbPerson.setValue(getVal(params, 'personId', None)) self.cmbVisitPayStatus.setCurrentIndex(params.get('visitPayStatus', 0)) self.chkDetailChildren.setChecked(params.get('detailChildren', False)) self.chkVisitHospital.setChecked(params.get('visitHospital', False)) self.cmbSex.setCurrentIndex(params.get('sex', 0)) self.edtAgeFrom.setValue(params.get('ageFrom', 0)) self.edtAgeTo.setValue(params.get('ageTo', 150))
def setParams(self, params): currentDate = QtCore.QDate.currentDate() self.edtBegDate.setDate(params.get('begDate', QtCore.QDate(currentDate.year(), currentDate.month(), 1))) self.edtEndDate.setDate( params.get('endDate', QtCore.QDate(currentDate.year(), currentDate.month(), currentDate.daysInMonth()))) self.cmbOrgStructure.setValue((getVal(params, 'orgStructureId', None))) self.lstFilterProfile.setValues(params.get('profileBedId', []))
def setParams(self, params): self.edtBegDate.setDate( params.get('begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate( params.get('endDate', QtCore.QDate.currentDate())) self.cmbPerson.setValue(params.get('personId', None)) self.cmbRowGrouping.setCurrentIndex(getVal(params, 'rowGrouping', 0))
def setParams(self, params): self.edtBegDate.setDate( params.get('begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate( params.get('endDate', QtCore.QDate.currentDate())) self.cmbEventPurpose.setValue(params.get('eventPurposeId', None)) self.cmbEventType.setValue(params.get('eventTypeId', None)) self.cmbOrgStructure.setValue(getVal(params, 'orgStructureId', None)) self.cmbTypeFinance.setValue(params.get('typeFinanceId', None)) self.cmbTariff.setCurrentIndex(params.get('tariff', 0)) self.cmbSocStatusClass.setValue(params.get('socStatusClassId', None)) self.cmbSocStatusType.setValue(params.get('socStatusTypeId', None)) self.cmbVisitPayStatus.setCurrentIndex(params.get('visitPayStatus', 0)) self.cmbGrouping.setCurrentIndex(params.get('groupingRows', 0)) self.chkDetailChildren.setChecked(params.get('detailChildren', False)) self.chkVisitHospital.setChecked(params.get('visitHospital', False)) self.chkVisitEmergency.setChecked(params.get('visitEmergency', False)) self.chkVisitDisp.setChecked(params.get('visitDisp', False)) self.cmbSex.setCurrentIndex(params.get('sex', 0)) self.edtAgeFrom.setValue(params.get('ageFrom', 0)) self.edtAgeTo.setValue(params.get('ageTo', 150)) self.chkDivideWeekdays.setChecked( bool(params.get('divideWeekdays', False))) self.cmbInsurer.setValue(params.get('insurerId', None)) self.cmbPrimary.setCurrentIndex(params.get('primaryStatus', 0)) self.edtEventBegDatetime.setDateTime( params.get('eventBegDatetime', QtCore.QDateTime.currentDateTime())) self.edtEventEndDatetime.setDateTime( params.get('eventEndDatetime', QtCore.QDateTime.currentDateTime())) self.gbEventDatetimeParams.setChecked( params.get('isEventCreateParams', False))
def setParams(self, params): self.edtBegDate.setDate(params.get('begDate', QtCore.QDate())) self.edtEndDate.setDate( params.get('endDate', QtCore.QDate.currentDate())) self.cmbWorkOrganisation.setValue(params.get('workOrgId', None)) self.cmbSex.setCurrentIndex(params.get('sex', 0)) self.edtAgeFrom.setValue(params.get('ageFrom', 0)) self.edtAgeTo.setValue(params.get('ageTo', 150)) areaIdEnabled = bool(params.get('areaIdEnabled', False)) self.chkArea.setChecked(areaIdEnabled) self.cmbArea.setEnabled(areaIdEnabled) self.cmbArea.setValue(params.get('areaId', None)) MKBFilter = params.get('MKBFilter', 0) self.cmbMKBFilter.setCurrentIndex(MKBFilter if MKBFilter else 0) self.edtMKBFrom.setText(params.get('MKBFrom', 'A00')) self.edtMKBTo.setText(params.get('MKBTo', 'Z99.9')) MKBExFilter = params.get('MKBExFilter', 0) self.cmbMKBExFilter.setCurrentIndex(MKBExFilter if MKBExFilter else 0) self.edtMKBExFrom.setText(params.get('MKBExFrom', 'A00')) self.edtMKBExTo.setText(params.get('MKBExTo', 'Z99.9')) self.cmbPerson.setValue(params.get('personId', None)) self.cmbSpeciality.setValue(params.get('specialityId', None)) self.cmbSocStatusType.setValue(params.get('socStatusType', None)) self.cmbSocStatusClass.setValue(params.get('socStatusClass', None)) self.cmbRowGrouping.setCurrentIndex(getVal(params, 'rowGrouping', 0)) self.cmbOrgStructureAttachType.setValue( params.get('orgStructureAttachTypeId', None))
def __init__(self, parent): QtGui.QDialog.__init__(self, parent) self.setupUi(self) super(CImportSPR73, self).__init__(self, self.log) self.progressBar.setFormat('%v') self.edtFileName.setText(forceString(getVal(QtGui.qApp.preferences.appPrefs, 'ImportSPR73FileName', ''))) self.setWindowTitle(u'Загрузка услуг из SPR73')
def save(self): fileDir = forceStringEx( QtGui.QFileDialog.getExistingDirectory( self._parent, u'Укажите директорию для сохранения файлов выгрузки', forceStringEx( getVal(QtGui.qApp.preferences.appPrefs, 'ExportReportConstructor', '')))) if not fileDir: return nameParts = [] if len(self.idList) == 1: nameParts.append( forceString( QtGui.qApp.db.translate('rcReport', 'id', self.idList[0], 'name'))) else: nameParts.append(u'ReportExchange') nameParts.append( forceString(QtCore.QDateTime.currentDateTime().toString( 'yyyy-MM-dd hh-mm'))) name = u' '.join(nameParts) self._enging.save(fileDir, name) QtGui.QMessageBox.information(self._parent, u'Файл сохранен', u'Файл %s.zip сохранён.' % name, QtGui.QMessageBox.Ok, QtGui.QMessageBox.Ok) QtGui.qApp.preferences.appPrefs['ExportReportConstructor'] = toVariant( fileDir)
def __init__(self, parent): QtGui.QDialog.__init__(self, parent) self.setupUi(self) super(CImportSPR64, self).__init__(self, self.log) self.progressBar.setFormat('%v') self.newServices = [] self.edtFileName.setText(forceString(getVal(QtGui.qApp.preferences.appPrefs, 'ImportSPR64FileName', ''))) self.setWindowTitle(u'Загрузка справочника ошибок из SPR64')
def setParams(self): currentDate = QtCore.QDate().currentDate() month = currentDate.month() year = currentDate.year() begDate = forceDate( getVal(QtGui.qApp.preferences.appPrefs, 'begDate', None)) if not begDate: begDate = QtCore.QDate(year, month, 1) self.edtBegDate.setDate(begDate) endDate = forceDate( getVal(QtGui.qApp.preferences.appPrefs, 'endDate', None)) if not endDate: endDate = QtCore.QDate(year, month, 15) self.edtEndDate.setDate(endDate) self.chkTemperature.setChecked( forceBool( getVal(QtGui.qApp.preferences.appPrefs, 'chkTemperature', False))) self.chkPulse.setChecked( forceBool( getVal(QtGui.qApp.preferences.appPrefs, 'chkPulse', False))) self.chkAPMax.setChecked( forceBool( getVal(QtGui.qApp.preferences.appPrefs, 'chkAPMax', False))) self.chkAPMin.setChecked( forceBool( getVal(QtGui.qApp.preferences.appPrefs, 'chkAPMin', False))) multipleDimension = forceInt( getVal(QtGui.qApp.preferences.appPrefs, 'multipleDimension', 0)) if not multipleDimension: multipleDimension = 2 self.edtMultipleDimension.setValue(multipleDimension)
def __init__(self, parent): CDialogBase.__init__(self, parent) self.db = QtGui.qApp.db self.setupUi(self) self.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.WindowMaximizeButtonHint | QtCore.Qt.WindowCloseButtonHint) if not forceBool( getVal(QtGui.qApp.preferences.appPrefs, 'smpService', False)) or not forceString( getVal(QtGui.qApp.preferences.appPrefs, 'smpAddress', '')): QtGui.QMessageBox.warning(self, u'Ошибка', u'Не введен адрес сервиса') try: self.exchange = SmpExchange() except Exception as ex: QtGui.QMessageBox.warning( self, u'Ошибка', u'Не удалось установить соединение \n %s' % forceString(ex.message)) self.addModels('Events', CEventsModel(self)) self.addModels('CallsSmp', CCallsSmpModel(self)) self.tblEvents.setModel(self.modelEvents) self.tblEvents.setSelectionModel(self.selectionModelEvents) self.setModels(self.tblCallsSmp, self.modelCallsSmp, self.selectionModelCallsSmp) self.connect(self.selectionModelEvents, QtCore.SIGNAL('currentChanged(QModelIndex, QModelIndex)'), self.on_selectionModelEvents_currentChanged) self.exchange.getEventList() self.loadData() self.clearData() # Типы событий. Не вижу смысла для этого создавать отдельную таблицу. eventTypes = [ u'', u'Принят звонок от пациента', u'Пациент отказался от вызова', u'Отказ ПНМП', u'Принят звонок из ПНМП', u'Изменился адрес', u'Вызов выполнен', u'Вызов передан на 03', u'Вызов безрезультатный', u'Назначен ошибочный ПНМП' ] self.cmbResult.addItems(eventTypes) self.dtFilterDate.setDate(QtCore.QDate.currentDate()) self.edtCallSmpBegDate.setDate(QtCore.QDate.currentDate()) self.edtCallSmpEndDate.setDate(QtCore.QDate.currentDate()) self.tblCallsSmp.setSortingEnabled(True)
def __init__(self, parent, clientId): QtGui.QDialog.__init__(self, parent) self.setupUi(self) self.clientId = clientId self.getPatientInfo() # replace lpuList variable with a new data useRemoteList = forceBool( getVal(QtGui.qApp.preferences.appPrefs, 'EGISZ', '')) if useRemoteList: remoteAddress = forceString( getVal(QtGui.qApp.preferences.appPrefs, 'EGISZAddress', '')) lpuRes = urllib.urlopen(remoteAddress + r"/lpulist.php").read() lpuRes = json.loads(lpuRes) locator = s11_client.s11ServiceLocator() ##self.port = locator.gets11Port(remoteAddress + r"/soap/proxy.php?wsdl") for item in lpuRes: if forceString(item.get('key', None)).lower() != u'понко' and forceString(item.get('key', None)).lower() != u'п48'\ and forceString(item.get('key', None)).lower() != u'п51': continue # if item not in self.trueLpuList: continue # !!! for test !!! if (item['internal']): url = remoteAddress + r"/proxy.php?wsdl" else: url = item['url'] + r"?wsdl" port = locator.gets11Port(url) if item.has_key('name'): lpuName = item['name'] else: req = s11_client.getOrganisationInfoIn() req._serverId = item['key'] result = port.getOrganisationInfo(req) lpuName = unicode(result._shortName.decode('utf-8')) self.addLpuToList({ 'name': lpuName, 'proxy': url, 'serverId': item['key'] }) for item in self.lpuList: self.cmbLpuList.addItem(item['name'])
def ImportPayRefuseR85(widget, accountId, accountItemIdList): dlg = CImportPayRefuseR85(accountId, accountItemIdList) dlg.edtFileName.setText( forceString( getVal(QtGui.qApp.preferences.appPrefs, 'ImportPayRefuseR29FileName', ''))) dlg.exec_() QtGui.qApp.preferences.appPrefs['ImportPayRefuseR29FileName'] = toVariant( dlg.edtFileName.text())
def __init__(self, parent, begDate, endDate): CReport.__init__(self, parent) self.setTitle(u'Отчет: вызовы СМП') self.begDate = begDate self.endDate = endDate if not forceBool( getVal(QtGui.qApp.preferences.appPrefs, 'smpService', False)) or not forceString( getVal(QtGui.qApp.preferences.appPrefs, 'smpAddress', '')): QtGui.QMessageBox.warning(self, u'Ошибка', u'Не введен адрес сервиса') try: self.exchange = SmpExchange() except Exception as ex: QtGui.QMessageBox.warning( self, u'Ошибка', u'Не удалось установить соединение \n %s' % forceString(ex.message))
def setParams(self, params): self.edtBegDate.setDate( getVal(params, 'begDate', QtCore.QDate.currentDate())) self.edtEndDate.setDate( getVal(params, 'endDate', QtCore.QDate.currentDate())) self.cmbSex.setCurrentIndex(params.get('sex', 0)) self.edtAgeFrom.setValue(params.get('ageFrom', 0)) self.edtAgeTo.setValue(params.get('ageTo', 150)) self.edtDDPlan.setText(forceString(params.get('planTotal', 0))) self.cmbTerType.setCurrentIndex(params.get('terType', 0)) self.chkCountUnfinished.setChecked(params.get('countUnfinished', False)) payStatus = params.get('payStatusCode', None) self.cmbPayStatus.setCurrentIndex((payStatus + 1) if payStatus is not None else 0) self.cmbEventType.setValue(params.get('eventTypeId', None)) self.cmbSocStatusClass.setValue(params.get('socStatusClassId', None)) self.cmbSocStatusType.setValue(params.get('socStatusTypeId', None))
def __init__(self, parent): QtGui.QDialog.__init__(self, parent) self.setupUi(self) super(CImportSPR18, self).__init__(self, self.log) self.progressBar.setFormat('%v') self.newServices = [] self.edtFileName.setText( forceString( getVal(QtGui.qApp.preferences.appPrefs, 'ImportSPR18FileName', '')))
def __init__(self, parent): QtGui.QDialog.__init__(self, parent) self.setupUi(self) super(CImportSPR15, self).__init__(self, self.log) self.progressBar.setFormat('%v') self.edtFileName.setText( forceString( getVal(QtGui.qApp.preferences.appPrefs, 'ImportSPR15FileName', ''))) self.setWindowTitle(u'Импорт причин отказов из SPR15')
def __init__(self, parent): QtGui.QDialog.__init__(self, parent) self.setupUi(self) super(CImportSPR01, self).__init__(self, self.log) self.progressBar.setFormat('%v') self.newServices = [] self.edtFileName.setText( forceString( getVal(QtGui.qApp.preferences.appPrefs, 'ImportSPR01FileName', ''))) self.setWindowTitle(u'Загрузка медицинских организаций из SPR01')
def setParams(self, params): self.edtBegDate.setDate( params.get('begDate', QtCore.QDate().currentDate())) self.edtEndDate.setDate( params.get('endDate', QtCore.QDate().currentDate())) self.cmbOrgStructure.setValue(getVal(params, 'orgStructureId', None)) self.cmbAttach.setCurrentIndex(params.get('attach', 0)) self.chkGroupByArea.setChecked(params.get('groupByArea', False)) self.chkGroupByYear.setChecked(params.get('groupByYear', False))