def getServiceName(self, record): serviceId = forceRef(record.value('service_id')) name = CCol.resolveValueByCaches(serviceId, [(self.serviceCache, 'name')]) if name != CCol.invalid: return name, self.ServiceSource actionId = forceRef(record.value('action_id')) name = CCol.resolveValueByCaches(actionId, [(self.actionCache, 'actionType_id'), (self.actionTypeCache, 'name')]) if name != CCol.invalid: return name, self.ActionSource visitId = forceRef(record.value('visit_id')) name = CCol.resolveValueByCaches(visitId, [(self.visitCache, 'service_id'), (self.serviceCache, 'name')]) if name != CCol.invalid: return name, self.VisitSource eventId = forceRef(record.value('event_id')) name = CCol.resolveValueByCaches(eventId, [(self.eventCache, 'eventType_id'), (self.eventTypeCache, 'name')]) return name, self.EventSource
def __init__(self, title, fields, defaultWidth, alignment, shortTitle=None, displayFieldNumber=0, otherRolesInfo=None): if not otherRolesInfo: otherRolesInfo = {} CCol.__init__(self, title, fields, defaultWidth, alignment) self._shortTitle = shortTitle if shortTitle else title self._displayFieldNumber = displayFieldNumber self._otherRolesInfo = otherRolesInfo
def __init__(self, title, fields, defaultWidth, colIndex, alignment='l', **params): CCol.__init__(self, title, fields, defaultWidth, alignment, **params) self._colIndex = colIndex
def updateServiceName(self): serviceId = self.cmbService.value() if serviceId: sourceName = u'Услуга' name = forceString( CCol.resolveValueByCaches(serviceId, [(self.serviceCache, 'name')])) else: sourceName = u'' name = u'' self.lblServiceNameSource.setText(sourceName) self.lblServiceName.setText(name)
def cols(self): self._cols = [CCol(u'Дата и время приема', ['directionDate'], 20, 'l'), CCol(u'Тип', ['actionType_id'], 15, 'l'), CCol(u'Назначил', ['setPerson_id'], 20, 'l'), CCol(u'Специалист', ['person_id'], 20, 'l'), CCol(u'Каб', ['office'], 6, 'l'), CCol(u'Визит', ['person_id', 'scene_id'], 30, 'l'), CCol(u'Примечания', ['note'], 6, 'l') ] return self._cols
def __init__(self, title, fields, defaultWidth, alignment='l'): CCol.__init__(self, title, fields, defaultWidth, alignment)
def setTitle(self, title, short = False): if short: self._shortTitle = title else: CCol.setTitle(self, title)
def title(self, short = False): if short: return self._shortTitle return CCol.title(self)
def __init__(self, title, fields, defaultWidth): CCol.__init__(self, title, fields, defaultWidth, 'l') self._cacheValues = {} self._isRTF = True
def cols(self): self._cols = [CCol(u'Дата', ['execDate'], 20, 'l'), CCol(u'Время', ['execDate'], 20, 'l') ] return self._cols
def __init__(self, title, defaultWidth, showFields=CRBComboBox.showName, alignment='l'): CCol.__init__(self, title, ('actionType_id', 'specifiedName'), defaultWidth, alignment) self.data = CRBModelDataCache.getData('ActionType', True, '') self.showFields = showFields
def __init__(self, title, fields, defaultWidth, alignment='l'): CCol.__init__(self, title, fields, defaultWidth, alignment) db = QtGui.qApp.db self._cache = CTableRecordCache(db, db.table('Action'), 'actionType_id')
def getFromCache(self, key): counts = CCol.getFromCache(self, key) return counts[self._colIndex]
def __init__(self, title, fields, defaultWidth): CCol.__init__(self, title, fields, defaultWidth, 'l')
def cols(self): self._cols = [ CCol(u'Начало "Движения"', ['setDate'], 20, 'l'), CCol(u'Конец "Движения"', ['setDate'], 20, 'l'), CCol(u'Отделение пребывания', ['nameOS'], 20, 'l'), CCol(u'Название койки', ['bedName'], 20, 'l'), CCol(u'Профиль койки', ['bedName'], 20, 'l'), CCol(u'Диагноз отделения', ['diagnosis'], 20, 'l'), CCol(u'Количество койко-дней', ['days'], 20, 'l'), CCol(u'Начало события', ['setDate'], 20, 'l'), CCol(u'Конец события', ['execDate'], 20, 'l'), CCol(u'Тип события', ['eventTypeId'], 30, 'l'), CCol(u'MKB', ['MKB'], 20, 'l'), CCol(u'Код стандарта', ['codeMes'], 20, 'l'), CCol(u'Наименование стандарта', ['nameMes'], 30, 'l'), CCol(u'Ответственный', ['namePerson'], 30, 'l') ] return self._cols
def __init__(self, title, fields, defaultWidth, alignment): CCol.__init__(self, title, fields, defaultWidth, alignment) self.valuesCache = {}