-
Notifications
You must be signed in to change notification settings - Fork 0
/
ventanaAntecedentes.py
77 lines (53 loc) · 1.89 KB
/
ventanaAntecedentes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import Tkinter
from Tkinter import *
from SearchCriteria import askDb
from librerias.querys.queryList import *
class Bloque(Tkinter.Frame):
def __init__(self,nombre,query,master, **kwargs):
Frame.__init__(self, master, **kwargs)
self.vString = StringVar()
localLabel = Label(self,text=nombre+": ")
localLabel.pack()
self.localLabelShow = Label(self,textvariable=self.vString)
self.localLabelShow.pack()
self.query = query
self.pack()
pass
def update(self,idRadio):
params = (idRadio,)
listaRes = askDb(self.query,params)
stringout = ""
for elem in listaRes:
for contenido in elem:
stringout+=str(contenido).strip()+"\n"
self.vString.set(stringout)
pass
class VentanaDetalles(Tkinter.Frame):
def __init__(self, *args, **kwargs):
Tkinter.Frame.__init__(self, *args, **kwargs)
self.lista = []
#Frames
self.lista.append(Bloque("Frames", queryFrames, self))
#Alergico
self.lista.append(Bloque("Alergias", queryAlergia, self))
#Adiccion
self.lista.append(Bloque("Adicciones", queryAdiccion, self))
#Intervencion
self.lista.append(Bloque("Intervencion", queryOperacion, self))
#Medicamento
self.lista.append(Bloque("Medicamento", queryMed, self))
#Trabajo
self.lista.append(Bloque("Trabajo", queryTrabajo, self))
#Otros
self.lista.append(Bloque("Otros", queryComentario, self))
#Paciente
self.lista.append(Bloque("Paciente", queryPaciente, self))
self.pack()
pass
def setWindow(self,window):
self.window = window
def setValues(self,event):
idRadio = self.window.getCurrentIdRadio()
for bloque in self.lista:
bloque.update(idRadio)
pass