예제 #1
0
    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
예제 #2
0
 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
예제 #3
0
 def __init__(self,
              title,
              fields,
              defaultWidth,
              colIndex,
              alignment='l',
              **params):
     CCol.__init__(self, title, fields, defaultWidth, alignment, **params)
     self._colIndex = colIndex
예제 #4
0
 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)
예제 #5
0
 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
예제 #6
0
 def __init__(self, title, fields, defaultWidth, alignment='l'):
     CCol.__init__(self, title, fields, defaultWidth, alignment)
예제 #7
0
 def setTitle(self, title, short = False):
     if short:
         self._shortTitle = title
     else:
         CCol.setTitle(self, title)
예제 #8
0
 def title(self, short = False):
     if short:
         return self._shortTitle
     return CCol.title(self)
예제 #9
0
 def __init__(self, title, fields, defaultWidth):
     CCol.__init__(self, title, fields, defaultWidth, 'l')
     self._cacheValues = {}
     self._isRTF = True
예제 #10
0
 def cols(self):
     self._cols = [CCol(u'Дата',     ['execDate'], 20, 'l'),
                   CCol(u'Время',    ['execDate'], 20, 'l')
                   ]
     return self._cols
예제 #11
0
 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
예제 #12
0
 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')
예제 #13
0
 def getFromCache(self, key):
     counts = CCol.getFromCache(self, key)
     return counts[self._colIndex]
예제 #14
0
 def __init__(self, title, fields, defaultWidth):
     CCol.__init__(self, title, fields, defaultWidth, 'l')
예제 #15
0
 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
예제 #16
0
 def __init__(self, title, fields, defaultWidth, alignment):
     CCol.__init__(self, title, fields, defaultWidth, alignment)
     self.valuesCache = {}