aarnal80 commited on
Commit
a66f242
·
verified ·
1 Parent(s): 2be59fa

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +138 -101
index.html CHANGED
@@ -3,144 +3,181 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Consulta Médica</title>
7
- <!-- Bootstrap CSS -->
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
  <style>
 
 
 
11
  .recording-indicator { animation: pulse 1.5s infinite; }
12
  @keyframes pulse { 0%{opacity:1;} 50%{opacity:0.5;} 100%{opacity:1;} }
13
- </style>
14
- <style>
15
- body { background-color: #f8f9fa; }
16
- button { margin: 5px; padding: 10px 15px; border: none; background: #007BFF; color: white; border-radius: 4px; cursor: pointer; }
17
- button:disabled { opacity: 0.6; cursor: not-allowed; }
18
  #configModal {
19
- display: flex;
20
- visibility: hidden;
21
- opacity: 0;
22
- position: fixed;
23
- top: 0;
24
- left: 0;
25
- width: 100vw;
26
- height: 100vh;
27
- background: rgba(0,0,0,0.7);
28
- align-items: center;
29
- justify-content: center;
30
- z-index: 9999;
31
- transition: opacity 0.2s, visibility 0.2s;
32
- }
33
- #configModal.active {
34
- visibility: visible;
35
- opacity: 1;
36
- }
37
- #configContent {
38
- background: white;
39
- padding: 24px 20px;
40
- border-radius: 8px;
41
- width: 100%;
42
- max-width: 420px;
43
- box-shadow: 0 8px 32px rgba(0,0,0,0.25);
44
- position: relative;
45
- z-index: 10000;
46
- }
47
  textarea, pre { width: 100%; padding: 10px; margin-top: 5px; border: 1px solid #ccc; border-radius: 4px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  </style>
49
  </head>
50
  <body class="bg-gray-50 min-h-screen">
51
- <div class="mx-auto max-w-2xl p-6 my-8 bg-white rounded-xl shadow-md">
52
- <div class="text-center mb-4">
53
  <h1 class="text-xl font-bold text-blue-800 flex items-center justify-center">
54
- <i class="fas fa-user-md mr-3 text-blue-600"></i>Asistente de Consulta Médica
55
- </h1>
56
  <p class="text-gray-600 mt-1">Herramienta para transcripción y análisis</p>
57
  </div>
58
-
59
- <!-- Botón Configuración -->
60
  <div class="flex justify-end mb-4">
61
  <button id="btnConfig" class="border border-blue-500 text-blue-700 hover:bg-blue-50 px-4 py-2 rounded-lg flex items-center transition-colors">
62
  <i class="fas fa-cogs mr-2"></i>Configuración IA
63
  </button>
64
  </div>
65
-
66
- <!-- Modal Configuración -->
67
  <div id="configModal">
68
  <div id="configContent">
69
- <div id="iaConfigContainer"></div>
70
- </div>
71
  </div>
72
-
73
- <!-- Controles de grabación -->
74
- <div class="bg-blue-50 p-6 rounded-lg mb-6 border border-blue-100 shadow">
75
- <h2 class="text-base font-semibold text-blue-700 mb-3 flex items-center">
76
- <i class="fas fa-microphone-alt mr-2"></i>Audio de Consulta
77
- </h2>
78
- <div class="flex items-center gap-4 mb-3">
79
- <button id="btnStart" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-full flex items-center text-base shadow transition-colors" title="Iniciar">
80
- <i class="fas fa-play mr-2"></i>Iniciar
81
  </button>
82
- <button id="btnStop" disabled class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-full flex items-center text-base shadow transition-colors" title="Detener">
83
- <i class="fas fa-stop mr-2"></i>Detener
84
  </button>
85
- </div>
86
- <p id="recorder-status" class="text-gray-500 text-sm flex items-center">
87
- <i class="fas fa-circle text-gray-400 mr-2"></i>No hay consulta en progreso
88
- </p>
89
  </div>
 
90
 
91
- <!-- Transcripción -->
92
- <div class="bg-purple-50 p-6 rounded-lg mb-6 border border-purple-100 shadow">
93
- <h2 class="text-base font-semibold text-purple-700 mb-3 flex items-center">
94
- <i class="fas fa-keyboard mr-2"></i>Transcripción <span id="trans-model-label" class="ml-2 text-sm font-normal text-purple-500"></span>
95
- </h2>
96
- <textarea id="transcript" rows="3" readonly
97
- class="w-full p-4 mb-4 border border-gray-200 rounded-lg bg-white text-gray-800 resize-none shadow-inner focus:outline-none focus:ring-2 focus:ring-purple-300 transition overflow-y-auto"
98
- style="min-height: 0; max-height: 90px; height: 90px;">Aquí aparecerá la transcripción...</textarea>
99
- <div class="flex justify-end">
100
- <button id="btnCopyTranscript" class="bg-purple-600 hover:bg-purple-700 text-white px-3 py-1.5 rounded-lg flex items-center text-sm transition-colors" type="button">
101
- <i class="far fa-copy mr-2"></i>Copiar
102
- </button>
103
- </div>
104
- </div>
105
 
106
- <!-- Análisis Médico -->
107
- <div class="bg-indigo-50 p-6 rounded-lg mb-6 border border-indigo-100 shadow">
108
- <h2 class="text-base font-semibold text-indigo-700 mb-3 flex items-center">
109
- <i class="fas fa-clipboard-check mr-2"></i>Análisis Médico <span id="analysis-model-label" class="ml-2 text-sm font-normal text-indigo-500"></span>
110
- </h2>
111
- <div class="bg-white p-4 rounded border border-gray-200 mb-4">
112
- <div class="mb-4">
113
- <h3 class="text-sm font-medium text-indigo-600 mb-1 flex items-center">
114
- <i class="fas fa-notes-medical mr-2"></i>Enfermedad Actual
115
- </h3>
116
- <div id="output-enfermedad" class="bg-gray-50 p-3 rounded border border-gray-200 min-h-[48px]"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  </div>
118
- <div>
119
- <h3 class="text-sm font-medium text-indigo-600 mb-1 flex items-center">
120
- <i class="fas fa-procedures mr-2"></i>Exploración Física / Actuación
121
- </h3>
122
- <div id="output-exploracion" class="bg-gray-50 p-3 rounded border border-gray-200 min-h-[48px]"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  </div>
124
  </div>
125
- <div class="flex justify-end">
126
- <button id="btnCopyAnalysis" class="bg-indigo-600 hover:bg-indigo-700 text-white px-3 py-1.5 rounded-lg flex items-center text-sm transition-colors" type="button">
127
- <i class="far fa-copy mr-2"></i>Copiar
128
- </button>
129
  </div>
130
  </div>
131
-
132
- </div> <!-- /.container -->
133
-
134
  <div class="text-center mt-8 pt-6 border-t border-gray-200">
135
  <p class="text-gray-600">
136
  Desarrollado por el Dr. Antonio J. Arnal Meinhardt<br>
137
  <span class="text-sm">Médico de Urgencias | Atención Primaria</span>
138
  </p>
139
  </div>
140
-
141
- <!-- Bootstrap JS Bundle -->
142
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
143
- <!-- Main JS -->
144
  <script type="module" src="./js/main.js"></script>
145
- </body>
146
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Asistente Médico Modular</title>
 
7
  <script src="https://cdn.tailwindcss.com"></script>
8
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
  <style>
10
+ /* Estilo base del body */
11
+ body { background-color: #f8f9fa; }
12
+ /* Indicador de grabación (sin cambios) */
13
  .recording-indicator { animation: pulse 1.5s infinite; }
14
  @keyframes pulse { 0%{opacity:1;} 50%{opacity:0.5;} 100%{opacity:1;} }
15
+ /* Modal de configuración (sin cambios) */
 
 
 
 
16
  #configModal {
17
+ display: flex; visibility: hidden; opacity: 0; position: fixed; top: 0; left: 0;
18
+ width: 100vw; height: 100vh; background: rgba(0,0,0,0.7); align-items: center;
19
+ justify-content: center; z-index: 9999; transition: opacity 0.2s, visibility 0.2s;
20
+ }
21
+ #configModal.active { visibility: visible; opacity: 1; }
22
+ #configContent {
23
+ background: white; padding: 24px 20px; border-radius: 8px; width: 100%;
24
+ max-width: 420px; box-shadow: 0 8px 32px rgba(0,0,0,0.25); position: relative; z-index: 10000;
25
+ }
26
+ /* Textarea y Pre (sin cambios) */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  textarea, pre { width: 100%; padding: 10px; margin-top: 5px; border: 1px solid #ccc; border-radius: 4px; }
28
+ /* Estilo botones deshabilitados (usando Tailwind donde sea posible) */
29
+ button:disabled { opacity: 0.6; cursor: not-allowed; }
30
+
31
+ /* --- INICIO: Estilos para Pestañas y Contenido --- */
32
+ .tab-button {
33
+ /* Aplicamos clases Tailwind para estilo base y transiciones */
34
+ @apply px-4 py-2 rounded-t-lg border-b-2 border-transparent transition-colors duration-150 ease-in-out text-gray-500 hover:text-blue-600 hover:border-blue-300 focus:outline-none;
35
+ }
36
+ .tab-button.active {
37
+ /* Clases Tailwind para la pestaña activa */
38
+ @apply text-blue-700 border-blue-600 font-semibold;
39
+ }
40
+ .tab-content {
41
+ display: none; /* Ocultar contenido por defecto */
42
+ }
43
+ .tab-content.active {
44
+ display: block; /* Mostrar contenido activo */
45
+ }
46
+ /* --- FIN: Estilos para Pestañas y Contenido --- */
47
  </style>
48
  </head>
49
  <body class="bg-gray-50 min-h-screen">
50
+ <div class="mx-auto max-w-2xl p-6 my-8 bg-white rounded-xl shadow-md"> <div class="text-center mb-4">
 
51
  <h1 class="text-xl font-bold text-blue-800 flex items-center justify-center">
52
+ <i class="fas fa-user-md mr-3 text-blue-600"></i>Asistente Médico Modular </h1>
 
53
  <p class="text-gray-600 mt-1">Herramienta para transcripción y análisis</p>
54
  </div>
 
 
55
  <div class="flex justify-end mb-4">
56
  <button id="btnConfig" class="border border-blue-500 text-blue-700 hover:bg-blue-50 px-4 py-2 rounded-lg flex items-center transition-colors">
57
  <i class="fas fa-cogs mr-2"></i>Configuración IA
58
  </button>
59
  </div>
 
 
60
  <div id="configModal">
61
  <div id="configContent">
62
+ <div id="iaConfigContainer"></div>
63
+ </div>
64
  </div>
65
+ <div class="border-b border-gray-200 mb-6">
66
+ <nav class="flex -mb-px" aria-label="Tabs">
67
+ <button id="tab-medical-analysis" class="tab-button active" data-target="content-medical-analysis" type="button">
68
+ <i class="fas fa-stethoscope mr-2"></i>Análisis Médico
 
 
 
 
 
69
  </button>
70
+ <button id="tab-lab-analysis" class="tab-button" data-target="content-lab-analysis" type="button">
71
+ <i class="fas fa-flask mr-2"></i>Análisis de Exámenes
72
  </button>
73
+ </nav>
 
 
 
74
  </div>
75
+ <div id="tab-content-container">
76
 
77
+ <div id="content-medical-analysis" class="tab-content active">
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
+ <div class="bg-blue-50 p-6 rounded-lg mb-6 border border-blue-100 shadow">
80
+ <h2 class="text-base font-semibold text-blue-700 mb-3 flex items-center">
81
+ <i class="fas fa-microphone-alt mr-2"></i>Audio de Consulta
82
+ </h2>
83
+ <div class="flex items-center gap-4 mb-3">
84
+ <button id="btnStart" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-full flex items-center text-base shadow transition-colors" title="Iniciar">
85
+ <i class="fas fa-play mr-2"></i>Iniciar
86
+ </button>
87
+ <button id="btnStop" disabled class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-full flex items-center text-base shadow transition-colors" title="Detener">
88
+ <i class="fas fa-stop mr-2"></i>Detener
89
+ </button>
90
+ </div>
91
+ <p id="recorder-status" class="text-gray-500 text-sm flex items-center">
92
+ <i class="fas fa-circle text-gray-400 mr-2"></i>No hay consulta en progreso
93
+ </p>
94
+ </div>
95
+ <div class="bg-purple-50 p-6 rounded-lg mb-6 border border-purple-100 shadow">
96
+ <h2 class="text-base font-semibold text-purple-700 mb-3 flex items-center">
97
+ <i class="fas fa-keyboard mr-2"></i>Transcripción <span id="trans-model-label" class="ml-2 text-sm font-normal text-purple-500"></span>
98
+ </h2>
99
+ <textarea id="transcript" rows="3" readonly
100
+ class="w-full p-4 mb-4 border border-gray-200 rounded-lg bg-white text-gray-800 resize-none shadow-inner focus:outline-none focus:ring-2 focus:ring-purple-300 transition overflow-y-auto"
101
+ style="min-height: 0; max-height: 90px; height: 90px;">Aquí aparecerá la transcripción...</textarea>
102
+ <div class="flex justify-end">
103
+ <button id="btnCopyTranscript" class="bg-purple-600 hover:bg-purple-700 text-white px-3 py-1.5 rounded-lg flex items-center text-sm transition-colors" type="button">
104
+ <i class="far fa-copy mr-2"></i>Copiar
105
+ </button>
106
+ </div>
107
+ </div>
108
+ <div class="bg-indigo-50 p-6 rounded-lg mb-6 border border-indigo-100 shadow">
109
+ <h2 class="text-base font-semibold text-indigo-700 mb-3 flex items-center">
110
+ <i class="fas fa-clipboard-check mr-2"></i>Análisis Médico <span id="analysis-model-label" class="ml-2 text-sm font-normal text-indigo-500"></span>
111
+ </h2>
112
+ <div class="bg-white p-4 rounded border border-gray-200 mb-4">
113
+ <div class="mb-4">
114
+ <h3 class="text-sm font-medium text-indigo-600 mb-1 flex items-center">
115
+ <i class="fas fa-notes-medical mr-2"></i>Enfermedad Actual
116
+ </h3>
117
+ <div id="output-enfermedad" class="bg-gray-50 p-3 rounded border border-gray-200 min-h-[48px]"></div>
118
+ </div>
119
+ <div>
120
+ <h3 class="text-sm font-medium text-indigo-600 mb-1 flex items-center">
121
+ <i class="fas fa-procedures mr-2"></i>Exploración Física / Actuación
122
+ </h3>
123
+ <div id="output-exploracion" class="bg-gray-50 p-3 rounded border border-gray-200 min-h-[48px]"></div>
124
+ </div>
125
+ </div>
126
+ <div class="flex justify-end">
127
+ <button id="btnCopyAnalysis" class="bg-indigo-600 hover:bg-indigo-700 text-white px-3 py-1.5 rounded-lg flex items-center text-sm transition-colors" type="button">
128
+ <i class="far fa-copy mr-2"></i>Copiar
129
+ </button>
130
+ </div>
131
  </div>
132
+ </div>
133
+ <div id="content-lab-analysis" class="tab-content">
134
+ <div class="bg-pink-50 p-6 rounded-lg mb-6 border border-pink-100 shadow"> <h2 class="text-base font-semibold text-pink-700 mb-4 flex items-center">
135
+ <i class="fas fa-vial mr-2"></i>Introducir Resultados de Laboratorio
136
+ </h2>
137
+ <textarea id="lab-input-text" rows="8"
138
+ class="w-full p-4 mb-4 border border-gray-300 rounded-lg bg-white text-gray-800 shadow-inner focus:outline-none focus:ring-2 focus:ring-pink-300 transition"
139
+ placeholder="Pega aquí los resultados del análisis de laboratorio..."
140
+ ></textarea>
141
+
142
+ <div class="flex items-center gap-4 mb-6">
143
+ <button id="btnAnalyzeLabs" class="bg-pink-600 hover:bg-pink-700 text-white px-4 py-2 rounded-lg flex items-center text-base shadow transition-colors" title="Analizar Resultados">
144
+ <i class="fas fa-cogs mr-2"></i>Analizar Resultados
145
+ </button>
146
+ <div id="lab-loading-indicator" style="display: none;" class="text-pink-600 flex items-center">
147
+ <i class="fas fa-spinner fa-spin mr-2"></i>Procesando...
148
+ </div>
149
+ </div>
150
+
151
+ <div class="bg-white p-4 rounded border border-gray-200 mb-4">
152
+ <div class="flex justify-between items-center mb-3">
153
+ <h3 class="text-sm font-medium text-pink-600 flex items-center">
154
+ <i class="fas fa-file-medical-alt mr-2"></i>Resultados Procesados <span id="lab-model-label" class="ml-2 text-xs font-normal text-pink-500"></span> </h3>
155
+ <div class="flex items-center">
156
+ <input type="checkbox" id="filterAlteredLabs" class="mr-2 h-4 w-4 text-pink-600 rounded focus:ring-pink-500">
157
+ <label for="filterAlteredLabs" class="text-sm text-gray-700 select-none cursor-pointer">Mostrar solo alterados</label>
158
+ </div>
159
+ </div>
160
+ <div id="lab-results-output" class="bg-gray-50 p-3 rounded border border-gray-200 min-h-[100px] whitespace-pre-wrap font-mono text-sm">
161
+ </div>
162
+ </div>
163
+
164
+ <div class="flex justify-end">
165
+ <button id="btnCopyLabResults" class="bg-pink-600 hover:bg-pink-700 text-white px-3 py-1.5 rounded-lg flex items-center text-sm transition-colors" type="button">
166
+ <i class="far fa-copy mr-2"></i>Copiar Resultados
167
+ </button>
168
+ </div>
169
+
170
  </div>
171
  </div>
 
 
 
 
172
  </div>
173
  </div>
 
 
 
174
  <div class="text-center mt-8 pt-6 border-t border-gray-200">
175
  <p class="text-gray-600">
176
  Desarrollado por el Dr. Antonio J. Arnal Meinhardt<br>
177
  <span class="text-sm">Médico de Urgencias | Atención Primaria</span>
178
  </p>
179
  </div>
 
 
180
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
 
181
  <script type="module" src="./js/main.js"></script>
182
+ </body>
183
  </html>