Documente Academic
Documente Profesional
Documente Cultură
Estudiante:
CHRISTIAN GUTIÉRREZ
C.I. 17.763.461
Correo: christianguti@yahoo.es
Carrera: Lic. Matemáticas
LAPSO 2014-I
Definición de Variables:
paciente: variable de tipo registro que contiene los campos datos de paciente.
Cedula: número de cédula
Nombres: nombres del paciente
Apellidos: apellidos del paciente
Edad: edad del paciente
Sexo: sexo del paciente
FEntrada: fecha de ingreso a la clínica
FSalida: fecha de alta del paciente
HEntrada: hora de ingreso a la clínica
HSalida: hora en que fue dado de alta al paciente
Ingreso: cantidad en bolívares por Ingreso
Status: variable que indica si el paciente está activo o inactivo
Patolog: variable que almacena tipo de patología: A, B o C
Total: variable que almacena el total a pagar por el paciente.
INICIO
cantmayorfem ← 0
cantmayormas ← 0
cantmenor ← 0
TotalA ← 0
TotalB ← 0
TotalC ← 0
menu
FIN_INICIO
Procedimiento menu
Var
tecla: carácter
Inicio
Repetir
Escribir (“MENU PRINCIPAL”)
Escribir (“Selecciona una Opción”)
Escribir (“1 = Ingreso”)
Escribir (“2 = Consulta”)
Escribir (“3 = Modificar”)
Escribir (“4 = Salida”)
Escribir (“5 = Reporte”)
Escribir (“6 = Eliminar”)
Escribir (“0 = Cerrar”)
Leer (tecla)
Procedimiento pacientenuevo
Var
ced= cadena
tec= carácter
Inicio
abrir(datospac,archiv)
Crear (datospac) // en caso de no existir el archivo
Ingreso←Ingre
Status←’Activo’
Fech ← Fecha;
FEntrada ← Formatofechahora(Fech);
Hor ← Hora;
HEntrada := Formatofechahora(Hor);
Fin Procedimiento
Procedimiento consultar
Var
cedulaident: cadena
Inicio
Abrir (datospac, Archiv)
Fin Procedimiento
Procedimiento modificadatos
Var
tecl: carácter
ci: cadena
Inicio
Abrir (datospac, Archiv)
Escribir (“Cedula de identidad”)
Leer (ci)
Procedimiento eliminar
Var
opc: carácter
cid: cadena
Inicio
Abrir (datospac, Archiv)
Info.Cedula←” “
Info.Nombres← " "
Info.Apellidos← " "
Info.Edad←0
Info.Ingreso←0
Var
pulsa: carácter
cedul: cadena
d, m, an : word
d1, m1, an1 : word
d3, m3, an3 : word
totaldias: entero
Inicio
Abrir (datospac, Archiv)
Si Patolog=”a” entonces
Total←PatologA*totaldias + Ingre
TotalA←TotalA + Total
Sino
Si Patolog=”b” entonces
Total←PatologB*totaldias + Ingre
TotalB←TotalB + Total
Sino
Si Patolog=”b” entonces
Total←PatologC*totaldias + Ingre
TotalC←TotalC + Total
fin_si
fin_si
fin_si
Escribir(“Total a Cancelar”,Total)
Escribir (datospac,info)
Cerrar (datospac)
Fin_si // si status Inactivo
Fin_si // si presiona ‘s’
Sino
Escribir(“Ya fue dado de alta”)
Cerrar (datospac)
Fin_si // si status activo
Fin_con
Fin_mientras
Procedimiento reporte
Inicio
Escribir (“LISTA REPORTE” )
Escribir (“Ingresos Recaudados por Patología A“, TotalA)
Escribir (“Ingresos Recaudados por Patología”,TotalB)
Escribir (“Ingresos Recaudados por Patología C”, TotalC)
Escribir (“Total Pacientes Menores de 18 “, cantmenor)
Escribir ('”Total Pacientes Mayores de 65 Sexo Femenino”, cantmayorfem)
Escribir (“Total Pacientes Mayores de 65 Sexo Masculino”, cantmayormas)
Fin procedimiento
METODOLOGÍA MAPS
EL DIALOGO
Deseamos cargar datos de personas a un programa que luego nos permita llevar
el control de las personas atendidas según sus edades, sexo y patologías.
Para la realización de nuestro programa se deben tomar en consideración las
siguientes especificaciones:
Cuando se incluye pacientes se agrega 500 Bs. por ingreso.
Adicional al ingreso se sumaran:
o 550 Bs. por pacientes con patología A
o 430 Bs. por pacientes con patología B
o 550 Bs. por pacientes con patología C
El programa debe mostrar un menú principal con las opciones de incluir,
consultar, modificar, reporte y salida.
ENTRADA SALIDA
Cédula, Ingreso total por patología A
Nombres Ingreso total por patología B
Apellidos Ingreso total por patología C
Edad Total pacientes menores de edad
Sexo Total pacientes mayores de 65 años (sexo femenino)
Patología Total pacientes mayores de 65 años (sexo masculino)
LAS ESPECIFICACIONE
Pre-Condiciones:
(Cedula1, Cedula2,..., Cedulan) ∧ 𝑛 > 0 ∧ ∀𝑖 ∈ {1, … , 𝑛}: Cedulai ∈
{0,…,100000000}
(Nombres1, Nombres2,..., Nombresn) ∧ 𝑛 > 0 ∧ ∀𝑖 ∈ {1, … , 𝑛}: Nombresi ∈
{Secuencia de caracteres Ci…Cn}
(Apellidos1, Apellidos2,..., Apellidosn) ∧ 𝑛 > 0 ∧ ∀𝑖 ∈ {1, … , 𝑛}: Apellidosi ∈
{Secuencia de caracteres Ci…Cn}
(Edad1, Edad2,..., Edadn) ∧ 𝑛 > 0 ∧ ∀𝑖 ∈ {1, … , 𝑛}: Edadi ∈ {0, … ,100}
(Sexo1, Sexo2,…, Sexon) ∧ 𝑛 > 0 ∧ ∀𝑖 ∈ {1, … , 𝑛}: Sexoi ∈ {′𝑓′, ′𝐹′, ′𝑚′, ′𝑀′}
(Patolog1, Patolog2,…, Patologn) ∧ 𝑛 > 0 ∧ ∀𝑖 ∈ {1, … , 𝑛} : Patologi ∈ {‘a’, ‘A’, ‘b’,
‘B’, ‘c’, ‘C’}
Post-Condiciones
LA PARTICIÓN
Las rutinas principales del problema son:
5. Presentar reportes
a) Mostrar ingresos recaudados según patología
b) Mostrar Pacientes atendidos según edad
DEFINICIÓN DE ABSTRACCIONES
En esta parte vamos a definir las rutinas. Una rutina es una parte de un algoritmo
que puede reutilizarse en otros contextos de resolución de problemas algorítmicos.
La idea en esta sección es que una vez que se ingresan los datos de un paciente
se vayan acumulando la cantidad de pacientes mayores y menores en las
variables de tipo contador correspondientes. Se utilizan sentencias if anidadas en
el caso de que la edad pase los 65.
Se mostrará el código del programa Clínica “La Mejor” en Lenguaje Pascal al final
para evitar repeticiones.
PRUEBA Y VERIFICACIÓN
Assign(datospac, Archiv);
{$I-} Reset(datospac); {$I+}
If(IoResult<>0) Then
rewrite(datospac);
repeat
write('Cedula de Identidad: ');
readln(ced);
if (ced =’ ‘) then
writeln('<<< Introduzca un Numero Valido >>>');
until (ced <> ‘ ‘);
repeat
write('Nombres : ');
readln(Nombres);
if Nombres = ' ' then
writeln('<<< Introduzca un Nombre >>>');
until Nombres <> ' ';
Verificar ingreso de datos en la edad:
repeat
write('Edad : ');
readln(Edad);
if (Edad > 100) then
writeln('<<< Introduzca un Numero Valido >>>');
until (Edad <= 100);
Assign(datospac, Archiv);
{$I-}
Reset(datospac);
{$I+}
If(IoResult<>0) Then
begin
writeln(' Archivo No Encontrado');
readkey;
exit;
end;
PRESENTACIÓN
Program La_mejor;
{Este Programa permite registrar informacion de pacientes en una Clinica
que atiende ciertos casos de patologias y presenta un informe de dicha
informacion ordenados de acuerdo a las edades y sus patologías.
Autor: Christian Gutierrez}
Uses
Crt, dos, Sysutils;
{Declaracion de Constantes}
Const
Archiv = 'infopacient.dat';
Ingre = 500;
patologA = 550;
patologB = 430;
patologC = 620;
end;
var
info : paciente; {Declaracion Global de la Variable "info" de tipo "paciente"}
datospac : file of paciente; {Declaracion Global de la Variable "datospac" que
controla un archivo que almacena registros de "paciente"}
Fecha, Hora : extended;
cantmenor : integer;
cantmayorfem, cantmayormas : integer;
TotalA, TotalB, TotalC : Real; {Variables para los Ingresos Totales por Patologias
A, B y C respectivamente}
{Procedimiento Registro de Pacientes Nuevos con la Opcion Incluir}
procedure pacientenuevo;
var
ced: string[9];
tec : char;
Begin
clrscr;
textcolor(yellow);
gotoxy(30,2);
writeln('--INCLUIR PACIENTE-- ');
writeln;
Assign(datospac, Archiv); { Asignacion del nombre del archivo al "datospac"}
{$I-} { <--- Directivas para deshabilitar mensajes de error del Sistema Operativo
}
Reset(datospac); {Intenta abrir el archivo Archiv('infopacient.dat') en modo de
lectura/escritura}
{$I+}
If(IoResult<>0) Then
rewrite(datospac); { Crea el archivo en caso de no existir }
repeat
gotoxy(22,4);
write('Cedula de Identidad: ');
readln(ced);
if (ced='') then
begin
gotoxy(22,5);
writeln('<<< Introduzca un Numero Valido >>>');
end;
until (ced<>'');
repeat
gotoxy(20,8);
write('Apellidos : ');
readln(Apellidos);
if Apellidos = '' then
begin
gotoxy(20,9);
writeln('<<< Introduzca un Apellido >>>');
end;
until Apellidos <> '';
repeat
gotoxy(20,10);
write('Edad : ');
readln(Edad);
if (Edad > 100) then
begin
gotoxy(20,11);
writeln('<<< Introduzca un Numero Valido >>>');
end;
until (Edad <= 100);
gotoxy(20,12);
write('Sexo [F/M] : ');
repeat
Sexo := upcase(readkey);
until Sexo in ['f','F','m','M'];
write(Sexo);
readkey;
gotoxy(20,14);
write('Tipo Patologia [A/B/C] : ');
repeat
Patolog := upcase(readkey);
until Patolog in ['a','A','b','B','c','C'];
write(Patolog);
readkey;
Ingreso := Ingre;
Fecha:=Date;
FEntrada := FormatDateTime('ddddd',Fecha);
Hora:=Time;
HEntrada := FormatDateTime('t',Hora);
Status := 'Activo';
gotoxy(18,16);
write('¿Desea Guardar la Informacion [S/N]? ');
repeat
tec := upcase(readkey);
until tec in['S','N'];
if (tec = 'S') or (tec = 's') then
begin
info.Cedula:=Ced;
write(datospac,info); { Grabar el Registro completo }
close(datospac); { Cierra el archivo }
gotoxy(16,18);
textcolor(green);
writeln(' INFORMACION GUARDADA EXITOSAMENTE ');
gotoxy(16,20);
textcolor(7);
writeln('Presiona una Tecla para volver al Menu Principal');
readkey;
end; // if
end; // with
End;
procedure consultar;
var
cedulaident: string[9];
Begin
clrscr;
gotoxy(28,2);
textcolor(yellow);
writeln(' --CONSULTA DE PACIENTES--');
repeat
gotoxy(22,4);
write('Cedula de Identidad: ');
readln(cedulaident);
if (cedulaident='') then
begin
gotoxy(22,5);
writeln('<<< Introduzca un Numero Valido >>>');
end;
until (cedulaident<>'');
While(Not Eof(datospac)) Do
begin
Read(datospac,info);
If(info.Cedula=cedulaident) Then
begin
with info do
begin
clrscr;
gotoxy(25,3);
textcolor(yellow);
writeln(' +++DATOS DEL PACIENTE+++');
gotoxy(20,5);
textcolor(7);
writeln(' Status : ',Status);
gotoxy(20,7);
writeln(' Cedula : ',Cedula);
gotoxy(20,8);
writeln(' Nombres : ',Nombres);
gotoxy(20,9);
writeln(' Apellidos : ',Apellidos);
gotoxy(20,10);
writeln(' Edad : ',Edad);
gotoxy(20,11);
Case Edad of
0..18: writeln(' Categoria : Menor De Edad');
19..64 : writeln(' Categoria : Adulto');
65..107 : writeln(' Categoria : Mayor');
end; // case
gotoxy(20,12);
writeln(' Sexo : ',Sexo);
gotoxy(20,13);
writeln(' Tipo Patología : ',Patolog);
gotoxy(20,14);
writeln(' Fecha Ingreso : ',FEntrada);
gotoxy(20,15);
writeln(' Hora Ingreso : ',HEntrada);
gotoxy(16,21);
textcolor(7);
writeln('Presiona una Tecla para volver al Menu Principal');
close(datospac);
Readkey;
exit;
end; // with
end; // IF
end; // while
writeln;
textcolor(red);
writeln(' Cedula de Identidad No Registrada');
close(datospac);
writeln;
textcolor(7);
writeln('Presiona una Tecla para volver al Menu Principal');
readkey;
End;
{Procedimiento Modificar Paciente}
procedure modificadatos;
var
tecl : char;
ci : string[9];
Begin
clrscr;
gotoxy(28,2);
textcolor(yellow);
writeln(' --MODIFICAR DATOS DE PACIENTES--');
repeat
gotoxy(22,4);
write('Cedula de Identidad: ');
readln(ci);
if (ci='') then
begin
gotoxy(22,5);
writeln('<<< Introduzca un Numero Valido >>>');
end;
until (ci<>'');
While(Not Eof(datospac)) Do
begin
Read(datospac,info);
If(info.Cedula=ci) Then
begin
with info do
begin
clrscr;
gotoxy(25,2);
textcolor(yellow);
writeln(' +++DATOS DEL PACIENTE+++');
gotoxy(20,4);
textcolor(7);
writeln(' Status : ',Status);
gotoxy(20,5);
writeln(' Cedula : ',Cedula);
gotoxy(20,6);
writeln(' Nombres : ',Nombres);
gotoxy(20,7);
writeln(' Apellidos : ',Apellidos);
gotoxy(20,8);
writeln(' Edad : ',Edad);
gotoxy(20,9);
writeln(' Sexo : ',Sexo);
gotoxy(20,10);
writeln(' Patologia : ',Patolog);
textcolor(green);
gotoxy(20,12);
writeln(' Selecciona La Opción Que desea Modificar');
gotoxy(20,14);
textcolor(7);
writeln(' 1 = Nombres');
gotoxy(20,15);
writeln(' 2 = Apellidos');
gotoxy(20,16);
writeln(' 3 = Edad');
gotoxy(20,17);
writeln(' 4 = Sexo');
gotoxy(20,18);
writeln(' 5 = Patologia');
gotoxy(20,20);
writeln(' 0 = Volver Al Menu Principal');
repeat
tecl := upcase(readkey);
until tecl in['1','2','3','4','5','0'];
clrscr;
case tecl of
'1' : begin
writeln;
repeat
write('Nombres : ');
readln(info.Nombres);
if info.Nombres = '' then
writeln('<<< Introduzca un Nombre >>>');
until info.Nombres <> '';
end;
'2' : begin
writeln;
repeat
write('Apellidos : ');
readln(info.Apellidos);
if info.Apellidos = '' then
writeln('<<< Introduzca un Nombre >>>');
until info.Apellidos <> '';
end;
'3' : begin
repeat
writeln;
write('Edad : ');
readln(info.Edad);
if (info.Edad > 100) then
writeln('<<< Introduzca un Numero Valido >>>');
until (info.Edad <= 100);
end;
'4' :begin
writeln;
write(' Sexo : ');
repeat
info.Sexo := upcase(readkey);
until info.Sexo in ['f','F','m','M'];
write(info.Sexo);
end;
'5' : begin
writeln;
write(' Patologia : ');
repeat
info.Patolog := upcase(readkey);
until info.Patolog in ['a','A','b','B','c','C'];
write(info.Patolog);
end;
'0' : begin
writeln;
writeln(' ¡¡¡NO SE HAN REALIZADO CAMBIOS!!! ');
writeln;
writeln('Presiona una Tecla para volver al Menu Principal');
close(datospac);
readkey;
exit;
end;
end; // case
writeln;
write('¿Desea Guardar la Informacion [S/N]? ');
repeat
tecl := upcase(readkey);
until tecl in['S','N'];
if (tecl='S') or (tecl='s') then
begin
{Es necesario reposicionar el apuntador del archivo al principio
del registro que se desea modificar, ya que al leer un registro,
el apuntador se posiciona en el registro siguiente, la funcion
FilePos(datospac) devuelve la posición donde se encuentra el
apuntador}
seek(datospac,FilePos(datospac)-1);
write(datospac,info); { Graba el registro con los nuevos campos}
close(datospac); { Cierra el archivo }
textcolor(green);
writeln;
writeln(' Archivo Modificado Exitosamente!!!');
writeln;
textcolor(7);
writeln('Presiona una Tecla para volver al Menu Principal');
readkey;
exit;
end // if
else
writeln;
writeln(' ¡¡¡NO SE HAN REALIZADO CAMBIOS!!! ');
writeln;
writeln('Presiona una Tecla para volver al Menu Principal');
close(datospac);
readkey;
exit;
end; // with
end; // If
end; // while
writeln;
textcolor(red);
writeln(' Cedula de Identidad No Registrada!');
close(datospac);{Cierra el Archivo}
writeln;
textcolor(7);
writeln('Presiona una Tecla para volver al Menu Principal');
readkey;
End;
Begin
clrscr;
gotoxy(28,2);
textcolor(yellow);
writeln(' --ELIMINAR DATOS PACIENTE--');
writeln;
repeat
gotoxy(22,4);
write('Cedula de Identidad: ');
readln(cid);
if (cid='') then
begin
gotoxy(22,5);
writeln('<<< Introduzca un Numero Valido >>>');
end;
until (cid<>'');
While(Not Eof(datospac)) Do
begin
Read(datospac,info);
If(info.Cedula = cid) Then
begin
with info do
begin
textcolor(7);
gotoxy(20,7);
writeln(' Status : ',Status);
gotoxy(20,9);
writeln(' Nombres : ',Nombres);
gotoxy(20,10);
writeln(' Apellidos : ',Apellidos);
gotoxy(20,11);
writeln(' Edad : ',Edad);
gotoxy(20,12);
writeln(' Patologia : ',Patolog);
gotoxy(20,13);
writeln(' Fecha Ingreso : ',FEntrada);
info.Cedula:='';
info.Nombres:='';
info.Apellidos:='';
info.Edad:=0;
info.Ingreso:=0;
info.FEntrada:='';
gotoxy(16,15);
write( '¿Desea Eliminar Los Datos Mostrados (S/N)?');
repeat
opc := upcase(readkey);
until opc in['S','N'];
if (opc='S') or (opc='s')then
begin
seek(datospac,Filepos(datospac)-1);
write(datospac,info);
close(datospac); { Cierra los archivos }
gotoxy(16,17);
textcolor(green);
writeln(' Paciente Eliminado Exitosamente !!!');
gotoxy(16,19);
textcolor(7);
writeln('Presiona una Tecla para volver al Menu Principal');
readkey;
exit;
end // if
else
gotoxy(16,18);
writeln(' ¡¡¡NO SE HAN REALIZADO CAMBIOS!!! ');
gotoxy(16,20);
writeln('Presiona una Tecla para volver al Menu Principal');
close(datospac);
readkey;
exit;
end; // with
end; // IF
end; // while
writeln;
textcolor(red);
writeln(' Cedula de Identidad No Registrada');
close(datospac);
writeln;
textcolor(7);
writeln('Presiona una Tecla para volver al Menu Principal');
readkey;
End;
begin
clrscr;
gotoxy(30,2);
textcolor(yellow);
writeln(' --SALIDA DE PACIENTES--');
repeat
gotoxy(22,4);
write('Cedula de Identidad: ');
readln(cedul);
if (cedul='') then
begin
gotoxy(22,5);
writeln('<<< Introduzca un Numero Valido >>>');
end;
until (cedul<>'');
gotoxy(16,17);
write(' ¿Dar de Alta a este Paciente (S/N)? ');
repeat
pulsa := upcase(readkey);
until pulsa in['S','N'];
clrscr;
gotoxy(23,5);
textcolor(green);
writeln (' ¡¡¡ PACIENTE DADO DE ALTA !!! ');
textcolor(7);
if Status='Inactivo'then
begin
dar := copy(info.FEntrada,1,2);
val(dar,d,error);
dar := copy(info.FEntrada,4,2);
val(dar,m,error);
ay := copy(info.FEntrada,7,4);
val(ay,an,error);
dar := copy(info.FSalida,1,2);
val(dar,d1,error);
dar := copy(info.FSalida,4,2);
val(dar,m1,error);
ay := copy(info.FSalida,7,4);
val(ay,an1,error);
d3 := 0;
m3 := 0;
an3 := 0;
d3 := d1 - d;
m3 := m1 - m;
an3 := an1 - an;
totaldias := (m3 * 30) + d3;
gotoxy(30,7);
writeln('--FACTURACION--');
gotoxy(25,9);
writeln(' Total Dias = ',totaldias);
gotoxy(25,11);
writeln(' TOTAL A CANCELAR = ',Total:0:2);
seek(datospac,filepos(datospac)-1);
write(datospac,info);
close(datospac);
gotoxy(18,15);
writeln('Presiona una Tecla para volver al Menu Principal');
readkey;
exit;
end; // if Status=Inactivo
end // if Puls S
else
gotoxy(16,19);
writeln(' ¡¡¡NO SE HAN REALIZADO CAMBIOS!!! ');
gotoxy(16,21);
writeln('Presiona una Tecla para volver al Menu Principal');
close(datospac);
readkey;
exit;
end // if
else
gotoxy(18,8);
writeln(' ¡¡¡YA FUE DADO DE ALTA!!! ');
gotoxy(18,12);
writeln('Presiona una Tecla para volver al Menu Principal');
close(datospac);
readkey;
exit;
end; // with
end; // If
end; // while
writeln;
textcolor(red);
writeln(' Cedula de Identidad No Registrada');
close(datospac);
writeln;
textcolor(7);
writeln('Presiona una Tecla para volver al Menu Principal');
readkey;
End;
procedure reporte;
Begin
clrscr;
gotoxy(28,3);
textcolor(yellow);
writeln(' -- LISTA REPORTE --');
textcolor(7);
gotoxy(12,6);
writeln(' Ingresos Recaudados por Patología A = ',TotalA:0:2);
gotoxy(12,7);
writeln(' Ingresos Recaudados por Patología B = ',TotalB:0:2);
gotoxy(12,8);
writeln(' Ingresos Recaudados por Patología C = ',TotalC:0:2);
gotoxy(12,10);
writeln(' Total Pacientes Menores de 18 = ',cantmenor);
gotoxy(12,11);
writeln(' Total Pacientes Mayores de 65 Sexo Femenino = ',cantmayorfem);
gotoxy(12,12);
writeln('Total Pacientes Mayores de 65 Sexo Masculino = ',cantmayormas);
gotoxy(8,15);
writeln(' *** PRESIONA CUALQUIER TECLA PARA VOLVER AL MENU
PRINCIPAL ***');
readkey;
End;
procedure menu;
var
tecla : char;
cerrar : boolean;
Begin
cerrar := false;
repeat
clrscr;
textcolor(yellow);
gotoxy(15,2);
writeln('_________________________________________');
gotoxy(15,4);
writeln('*** C L I N I C A L A M E J O R ***');
gotoxy(15,5);
writeln('_________________________________________');
gotoxy(27,8);
writeln('--MENU PRINCIPAL--');
gotoxy(22,10);
textcolor(7);
writeln('B I E N V E N I D O');
gotoxy(26,12);
textcolor(green);
writeln('Selecciona una Opcion');
textcolor(7);
gotoxy(20,15);
writeln('1 = Ingreso');
gotoxy(20,17);
writeln('2 = Consulta');
gotoxy(20,19);
writeln('3 = Modificar');
gotoxy(39,15);
writeln('4 = Salida');
gotoxy(39,17);
writeln('5 = Reporte');
gotoxy(39,19);
writeln('6 = Eliminar');
gotoxy(28,20);
writeln('________________');
gotoxy(28,22);
writeln(' 0 = Cerrar');
gotoxy(28,23);
writeln('________________');
repeat
tecla := upcase(readkey);
until tecla in['1','2','3','4','5', '6','0'];
clrscr;
case tecla of
'1' : pacientenuevo;
'2' : consultar;
'3' : modificadatos;
'4' : altas;
'5' : reporte;
'6' : eliminar;
'0' : cerrar := true;
end; // case
End;
BEGIN
cantmayorfem:=0;
cantmayormas:=0;
cantmenor:=0;
TotalA:=0;
TotalB:=0;
TotalC:=0;
clrscr;
menu;
END.