def redirigir(self,*args,**kw): sess = Sesion() if sess.load(): validopaciente=GraboPaciente() validodr=ValidoDoctor() if validopaciente.ExistePaciente(sess.getUser()) or validodr.ExisteDr(sess.getUser()): return func(self, *args, **kw) else: Mensaje("No tiene los permisos necesarios")
def get(self): MyPath=AbsolutePath() path=MyPath.getAbsolutePath() pathtemplate = os.path.join(path, 'templates/diagnosticos.html') sess = Sesion() template_values ={ 'diagnosticos':self.ObtengoDiagnosticos(sess.getUser()), 'dr':self.EsDoctor(sess.getUser()) } self.response.out.write(template.render(pathtemplate, template_values))
def redirigir(self,*args,**kw): sess = Sesion() if sess.load(): validosecre=GraboSecretaria() if validosecre.ExisteSecretaria(sess.getUser()): return func(self, *args, **kw) else: Mensaje("No tiene los permisos necesarios")
def get(self): """ABC de altas de doctores""" MyPath=AbsolutePath() path=MyPath.getAbsolutePath() pathtemplate = os.path.join(path, 'templates/datosdr.html') template_values =None session=Sesion() dr=ValidoDoctor() if dr.ExisteDr(session.getUser()): template_values = { 'FormaDoctor' :FormaDoctor(instance=dr.instanciaDoctor(session.getUser())), } else: template_values = { 'FormaDoctor' :FormaDoctor(), } self.response.out.write(template.render(pathtemplate, template_values))
def get(self): """ABC de altas de doctores""" MyPath=AbsolutePath() path=MyPath.getAbsolutePath() pathtemplate = os.path.join(path, 'templates/datospaciente.html') session=Sesion() paciente=GraboPaciente() cita=Citas() #para obtener la lista de dr relacionados con el usuario doctores=cita.ObtenerDoctores(session.getUser()) if paciente.ExistePaciente(session.getUser()): template_values = { 'FormaPaciente' :FormaPaciente(instance=paciente.instanciaPaciente(session.getUser())), 'existe': False, 'doctores':doctores, } else: template_values = { 'FormaPaciente' :FormaPaciente(), 'existe': True, 'doctores':doctores, } self.response.out.write(template.render(pathtemplate, template_values))
def get(self): """ABC de Citas""" MyPath=AbsolutePath() path=MyPath.getAbsolutePath() pathtemplate = os.path.join(path, 'templates/citas.html') fecha=str(dt.date.today().day)+"/"+str(dt.date.today().month)+"/"+str(dt.date.today().year)[2:] fechaVer2=str(dt.date.today().day)+"-"+str(dt.date.today().month)+"-"+str(dt.date.today().year) sess = Sesion() doctores=self.ObtenerDoctores(sess.getUser()) template_values={ 'horarios':self.Agenda(doctores[0].usuario.usuario,fecha),#self.horario(), 'doctores':doctores, 'hoy':fechaVer2, #'citas':self.Citas(doctores[0].usuario.usuario,fecha), } self.response.out.write(template.render(pathtemplate, template_values))