-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlaboratorio.h
96 lines (63 loc) · 2.13 KB
/
laboratorio.h
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#pragma once
#include "paciente.h"
typedef int Posicao;
typedef struct Material {
char codigo[10];
char nome[40];
float valor;
} Tipomaterial;
typedef struct exame {
char codigo[4];
/* Lmedico "nome do ponteiro da lista de medicamentos" */
Tipopaciente* paciente;
Tipomaterial* material;
char resultado[500];
} Exame;
typedef struct celulaExame {
Exame exame;
struct CelulaExame* prox;
} CelulaExame;
typedef struct filaExames {
CelulaExame* inicio;
CelulaExame* fim;
} FilaExames;
typedef struct laboratorio {
char codigo;
Exame* exameTipo1;
Exame* exameTipo2;
Exame* exameTipo3;
Exame* exameTipo4;
Exame* exameTipo5;
Exame* exameTipo6;
} Laboratorio;
typedef struct celulaLaboratorio {
Laboratorio laboratorio;
struct CelulaLaboratorio* prox;
} CelulaLaboratorio;
typedef struct listaLaboratorios {
CelulaLaboratorio* primeiro;
CelulaLaboratorio* ultimo;
} ListaLaboratorios;
#pragma region [ Funções gerais de exame ]
Exame* inicializa_Exame(char codigo[], Tipopaciente *paciente, char resultado[]);
FilaExames* inicializa_filaExames();
void encerra_filaExames(FilaExames* fila);
int filaExamesIsEmpty(FilaExames* fila);
int filaExamesIsFull(FilaExames* fila);
void insere_exame(Exame* exame, FilaExames *fila);
void retira_exame(Exame *exame, FilaExames *fila);
void imprime_filaExames(FilaExames* fila);
#pragma endregion
#pragma region [ Funções gerais de laboratório ]
Laboratorio* inicializa_laboratorio(char codigo, Exame *tipo1,
Exame *tipo2, Exame *tipo3, Exame *tipo4, Exame *tipo5, Exame *tipo6);
ListaLaboratorios* inicializa_listaLaboratorios();
//Falta implementar função para zerar listaLaboratorios
int listaLaboratoriosIsEmpty(ListaLaboratorios* lista);
int listaLaboratoriosIsFull(ListaLaboratorios* lista);
void insere_laboratorio(Laboratorio* laboratorio, ListaLaboratorios* lista);
void retira_laboratorio(ListaLaboratorios *lista, char v);
void imprime_listaLaboratorios(ListaLaboratorios* lista);
#pragma endregion
void receberMaterialExame(Tipopaciente* paciente, Tipomaterial* material, Laboratorio* laboratorio, Exame* exame);
void registrarResultadoExame(Tipopaciente* paciente, char resultado[]);