Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Introducción
Una de las claves en este ejercicio es tener claridad los conceptos Arquitectura de Soft-
ware, donde la aplicación del principio de Modularidad es fundamental. En este ejercicio se
desarrollará una arquitectura de Tres Capas.
1. Requerimientos Funcionales
Se implementará el Sistema de Información Hospitalaria en su fase inicial de modo que
hasta el momento solo se utilizarán las tablas, Hospital y Doctor. El esquema de la base de
datos es el siguiente:
Images/ER_BD_Hospital.jpg
1
Por otro lado, la Arquitectura de Software empleada debe de ser la siguiente:
Images/DiagramaPaquetes_H.jpg
Images/DiagramaComponenteGUI_H.jpg
Obtener información del médico y del hospital utilizando el nombre del hospital y la
identificación del médico.
2
2. Requerimientos de la Arquitectura de Software
Esta aplicación debe de:
4. Por cada Diagrama UML usted debe de brindar una descripción del diagrama de modo
que se pueda tener un contexto sobre el mismo.
3
3.1. Escenario
4
3.3. Vista de Proceso
5
3.4. Vista de Desarrollo
6
3.5. Vista de Física
4. Evidencias
4.1. Código fuente de Declaración de la Interface ICrud
1 class Doctor :
2 def __init__ ( self , ide , hoid , name , speciality ) :
3 self . doctor_id = id
4 self . hospital_id = hoid
5 self . doctor_name = name
6 self . speciality = speciality
7
8 def editDoctor ( self , ide = None , hoid = None , name = None , speciality = None ) :
9 self . doctor_id = ide
10 self . hospital_id = hoid
11 self . doctor_name = name
12 self . speciality = speciality
7
18 if x . id == ide :
19 x . editDoctor ( ide , hoid , name , spec )
20
21 print ( " Editado correctamente . " )
22
23 def serchDoctor ( self , name ) :
24 ban =0
25 for x in self . doctors :
26 if x . name == name :
27 print ( x . id , x . hospital_id , x . name , x . speciality )
28 ban = 1
29 if ban == 0:
30 print ( " No hubo resultados . " )
31
32
33 from base import *
34
35 class CRUdHospital :
36 def __init__ ( self ) :
37 self . hospitals = []
38
39 def addHospital ( self , ide , name ) :
40 new = Hospital ( ide , name )
41 self . hospitals . append ( new )
42 print ( " \ n \ nHospital A a d i d o . " )
43
8
4
5 def main () :
6 CRUDH = CRUdHospital ()
7 CRUDD = CRUDDoctor ()
8 print ( " 1. Agregar hospital .\ n2 . Eliminar Hospital .\ n3 . Editar
Hospital \ n4 . Buscar Hospital .\ n5 . Agregar Doctor \ n6 . Eliminar
Doctor \ n7 . Editar Doctor \ n8 . Buscar Doctor . " )
9 x = input ()
10 x = int ( x )
11 while x > 0 and x < 9:
12 if x == 1:
13 print ( " Ingrese id : " )
14 a = input ()
15 print ( " Ingrese nombre : " )
16 b = input ()
17 CRUDH . addHospital (a , b )
18 if x == 2:
19 print ( " Ingrese id : " )
20 a = input ()
21 CRUDH . deleteHospital ( a )
22 if x == 3:
23 print ( " Ingrese id : " )
24 a = input ()
25 print ( " Ingrese nombre : " )
26 b = input ()
27 CRUDH . editHospital (a , b )
28 if x == 4:
29 print ( " Ingrese nombre : " )
30 b = input ()
31 CRUDH . searchHospital ( b )
32 if x == 5:
33 print ( " Ingrese id : " )
34 a = input ()
35 print ( " Ingrese nombre : " )
36 b = input ()
37 print ( " Ingrese id del hospital : " )
38 c = input ()
39 print ( " Ingrese e s p e c i a l i z a c i n : " )
40 d = input ()
41 CRUDD . addDoctor (a ,c ,b , d )
42 if x == 6:
43 print ( " Ingrese id : " )
44 a = input ()
45 CRUDD . deleteDoctor ( a )
46 if x == 7:
47 print ( " Ingrese id : " )
48 a = input ()
49 print ( " Ingrese nombre : " )
50 b = input ()
51 print ( " Ingrese id del hospital : " )
52 c = input ()
53 print ( " Ingrese e s p e c i a l i z a c i n : " )
54 d = input ()
55 CRUDD . editDoctor (a ,c ,b , d )
9
56 if x == 8:
57 print ( " Ingrese nombre : " )
58 b = input ()
59 CRUDD . searchDoctor ( b )
60 print ( " \ n \ n \ n1 . Agregar hospital .\ n2 . Eliminar Hospital .\ n3 . Editar
Hospital \ n4 . Buscar Hospital .\ n5 . Agregar Doctor \ n6 . Eliminar
Doctor \ n7 . Editar Doctor \ n8 . Buscar Doctor . " )
61 x = input ()
62 x = int ( x )
63
64 if __name__ == " __main__ " :
65 main ()
4.4. Pantallas
10
11
12
13