Exemplo n.º 1
0
 def initAdmit(self):
     mrsman.getUuids(self)
     self.deltadate = True
     self.src = 'visits'
     self.uuid = -1
     self.callback = mrsman.addAdmission
     try:
         mrsman.runTask(self)
     except (KeyboardInterrupt, SystemExit):
         mrsman.exitFlag = True
         print('\n! Received keyboard interrupt, quitting threads.\n')
Exemplo n.º 2
0
 def initPatients(self):
     mrsman.bootstrap(self)
     self.deltadate = True
     self.src = 'patients'
     self.uuid = -1
     self.callback = mrsman.addPatient
     mrsman.numThreads = 5
     try:
         mrsman.runTask(self)
     except (KeyboardInterrupt, SystemExit):
         print('\n! Received keyboard interrupt, quitting threads.\n')
         mrsman.exitFlag = True
Exemplo n.º 3
0
 def initCaregivers(self):
     print("bootstrap")
     mrsman.bootstrap(self)
     self.src = 'caregivers'
     self.uuid = -1
     self.callback = mrsman.addCaregiver
     mrsman.numThreads = 5
     if (not self.num):
         self.num = 8000
     try:
         mrsman.runTask(self)
     except (KeyboardInterrupt, SystemExit):
         mrsman.exitFlag = True
Exemplo n.º 4
0
 def genMbEvents(self):
     mrsman.getUuids(self)
     self.deltadate = True
     self.uuid = 2
     self.src = 'visits'
     self.callback = mrsman.addMbEvents
     if (self.num):
         mrsman.numThreads = 1
         self.filter = {'hadm_id': self.num}
     else:
         mrsman.numThreads = 50
     self.num = False
     mrsman.runTask(self)
Exemplo n.º 5
0
            value_type = concepts[headers[i]]['type']
            units = concepts[headers[i]]['units']
            if (concept_uuid):
                observation = {
                    'concept_uuid': concept_uuid,
                    'value_type': value_type,
                    'value': value,
                    'units': units,
                    'date': date
                }
                observations.append(observation)
        i += 1

#print(observations)
print("adding patient_id:" + patient_id)
self = type('mrsman', (object, ), {})()
self.debug = True
self.fhir_array = []
mrsman.bootstrap(self)
mrsman.getUuids(self)
self.count = 1
self.num = 1
self.deltadate = True
self.src = 'visits'
self.uuid = 2
self.observations = observations
self.filter = {'visits.subject_id': patient_id}
self.callback = mrsman.addVisitObservations
mrsman.runTask(self)
print(self.fhir_array)
Exemplo n.º 6
0
 def genBmEvents(self):
     mrsman.getUuids(self)
     mrsman.numThreads = 50
     self.callback = mrsman.addBmEvents
     mrsman.runTask(self)