コード例 #1
0
    def dataReceived(self, data):
        orw = oru_wav_factory.create_oru(data)
        if orw.filler[0] in self.monitIds and (not any(
                map(lambda x: isinstance(x, obx), orw.segments))):
            self.removeMonitor(orw.filler[0])
            del self.monitIds[orw.filler[0]]
            #self.organizeMonitors()
        else:
            objPatient = patient_factory.create_patient(orw.segments)

            #if orw.filler[0] not in self.monitIds and self.gridMonitores.count() < self.maxNumMonitors:
            if orw.filler[0] not in self.monitIds:
                pos = len(self.monitIds)
                self.monitores.append(MyMonitor())
                self.addMonitor(self.monitores[pos])
                self.monitIds[orw.filler[0]] = MonitorController(
                    self.monitores[pos], orw.filler[0], self.alarmslist)
                self.monitores[pos].conecta(self, self.monitIds[orw.filler[0]])
            else:
                #message ="Has reached maximum number of monitors: " + str(self.maxNumMonitors)
                #self.ui.statusbar.showMessage(message)
                if orw.filler[0] == self.iController.ident:
                    self.iController.addPaciente(
                        patient_factory.create_patient(
                            oru_wav_factory.create_oru(data).segments))

            if self.gridMonitores.count() >= self.maxNumMonitors:
                message = "Has reached maximum number of monitors: " + str(
                    self.maxNumMonitors)
                self.ui.statusbar.showMessage(message)
                print self.countTest
                self.countTest = self.countTest + 1

            self.monitIds[orw.filler[0]].addPaciente(objPatient)
コード例 #2
0
	def dataReceived(self, data):
		orw = oru_wav_factory.create_oru(data)
		if orw.filler[0] in self.monitIds and (not any(map(lambda x: isinstance(x,obx),orw.segments))):
			self.removeMonitor(orw.filler[0])
			del self.monitIds[orw.filler[0]]
			#self.organizeMonitors()
		else:
			objPatient = patient_factory.create_patient(orw.segments)
			
			#if orw.filler[0] not in self.monitIds and self.gridMonitores.count() < self.maxNumMonitors:
			if orw.filler[0] not in self.monitIds:
				pos = len(self.monitIds)
				self.monitores.append(MyMonitor())
				self.addMonitor(self.monitores[pos])
				self.monitIds[orw.filler[0]] = MonitorController(self.monitores[pos], orw.filler[0], self.alarmslist) 
				self.monitores[pos].conecta(self, self.monitIds[orw.filler[0]])
			else:
				#message ="Has reached maximum number of monitors: " + str(self.maxNumMonitors)
				#self.ui.statusbar.showMessage(message)
				if orw.filler[0] == self.iController.ident:
					self.iController.addPaciente(patient_factory.create_patient(oru_wav_factory.create_oru(data).segments))
			
			if self.gridMonitores.count() >= self.maxNumMonitors:
				message ="Has reached maximum number of monitors: " + str(self.maxNumMonitors)
				self.ui.statusbar.showMessage(message)
				print self.countTest
				self.countTest = self.countTest + 1

			self.monitIds[orw.filler[0]].addPaciente(objPatient)
コード例 #3
0
def rcvdata(data):
    orw2 = oru_wav_factory.create_oru(data)
    p2 = patient_factory.create_patient(orw2.segments)
    print p2.measures[4].channels[0].data, p2.measures[4].channels[0].descricao
コード例 #4
0
def rcvdata(data):
	orw2 = oru_wav_factory.create_oru(data)
	p2 = patient_factory.create_patient(orw2.segments)
	print p2.measures[4].channels[0].data, p2.measures[4].channels[0].descricao