{"openapi":"3.0.3","info":{"title":"Abigail API","version":"1.1.0","description":"API REST y FHIR R4 de la plataforma (flujos cl\u00ednicos ambulatorios y hospitalarios).\n\n**C\u00f3mo empezar (5 minutos):** 1) obtenga credenciales en *Super Admin \u2192 API Management* (llave `abi_test_\u2026` para\nsandbox); 2) llame a `GET \/api\/v1\/ping`; 3) consulte `GET \/api\/v1\/patients` con su llave en `X-API-Key`.\n\n**Convenciones:** respuestas JSON con sobre `{ success, message, data }`; errores `{ success:false, message, errors? }`;\nfechas ISO-8601; paginaci\u00f3n `?page=&per_page=`; cada respuesta incluye `X-Request-Id` (c\u00edtelo al pedir soporte).","contact":{"name":"Soporte Abigail","email":"soporte@abigailsoft.com"}},"servers":[{"url":"https:\/\/abigail.nfinnovations.com","description":"Servidor actual"}],"tags":[{"name":"Autenticaci\u00f3n","description":"Emisi\u00f3n y revocaci\u00f3n de tokens"},{"name":"Configuraci\u00f3n","description":"Ajustes del sistema"},{"name":"Consulta externa","description":"Consultas ambulatorias"},{"name":"Emergencia","description":"Formulario 008 y admisiones"},{"name":"FHIR R4","description":"Servidor FHIR R4 (SMART on FHIR)"},{"name":"Farmacia","description":"Inventario y dispensaci\u00f3n"},{"name":"General","description":"Servicios generales"},{"name":"Hospitalizaci\u00f3n","description":"Ingresos, camas e infraestructura"},{"name":"IA cl\u00ednica","description":"Asistencia cl\u00ednica con IA"},{"name":"Interoperabilidad","description":"Pruebas e intercambio HL7 v2 \/ FHIR"},{"name":"M\u00f3vil","description":"API de las apps m\u00f3viles (m\u00e9dico y paciente)"},{"name":"Pacientes","description":"\u00cdndice maestro de pacientes"}],"paths":{"\/api\/mobile\/v1\/appointments":{"get":{"tags":["M\u00f3vil"],"operationId":"generated::PSt4xodrBeIxv0dt","summary":"Appointments \u2014 Appointments","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/mobile\/v1\/auth\/login":{"post":{"tags":["Autenticaci\u00f3n"],"operationId":"generated::DhN5gQmxjoybnQ1s","summary":"Iniciar sesi\u00f3n desde la app m\u00f3vil y obtener un token","description":"Endpoint p\u00fablico (no requiere credenciales).","responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"},"device_name":{"type":"string"}},"required":["email","password","device_name"]}}}}}},"\/api\/mobile\/v1\/clinical\/lab-results":{"get":{"tags":["M\u00f3vil"],"operationId":"generated::Ru7FqqH0MY3HTgd4","summary":"Lab Results \u2014 Lab Results","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/mobile\/v1\/clinical\/prescriptions":{"get":{"tags":["M\u00f3vil"],"operationId":"generated::JG4wep8pb0TxpQ01","summary":"Prescriptions \u2014 Prescriptions","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/mobile\/v1\/doctor\/agenda":{"get":{"tags":["M\u00f3vil"],"operationId":"generated::tQyvUkam9A0fFIk9","summary":"Agenda \u2014 Agenda","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/mobile\/v1\/doctor\/catalogs":{"get":{"tags":["M\u00f3vil"],"operationId":"generated::imOmHNPDzRt30twc","summary":"Cat\u00e1logos cl\u00ednicos para construir formularios en la app (CIE10, ex\u00e1menes de laboratorio e imagenolog\u00eda).","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/mobile\/v1\/doctor\/consultations":{"post":{"tags":["M\u00f3vil"],"operationId":"generated::5LM69IzsiUxdBXtu","summary":"Crear una consulta de consulta externa (draft por defecto, o completed si se indica).","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/mobile\/v1\/doctor\/consultations\/{consultation}":{"get":{"tags":["M\u00f3vil"],"operationId":"generated::EHmEOBAVBDIJbtae","summary":"Detalle de una consulta (secciones + \u00f3rdenes vinculadas).","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/mobile\/v1\/doctor\/consultations\/{consultation}\/imaging-orders":{"post":{"tags":["M\u00f3vil"],"operationId":"generated::fq09MZKbHHl3LYct","summary":"Ordenar estudios de imagenolog\u00eda vinculados a la consulta.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"test_id":{"type":"string"},"quantity":{"type":"integer","minimum":1},"body_part":{"type":"string","nullable":true}}}},"notes":{"type":"string","nullable":true},"priority":{"type":"string","enum":["routine","urgent","emergency"]}},"required":["items"]}}}}}},"\/api\/mobile\/v1\/doctor\/consultations\/{consultation}\/lab-orders":{"post":{"tags":["M\u00f3vil"],"operationId":"generated::N0Yg9Bp0DTKWRktC","summary":"Ordenar ex\u00e1menes de laboratorio vinculados a la consulta.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"test_id":{"type":"string"}}}},"notes":{"type":"string","nullable":true},"priority":{"type":"string","enum":["routine","urgent","emergency"]}},"required":["items"]}}}}}},"\/api\/mobile\/v1\/doctor\/consultations\/{consultation}\/prescriptions":{"post":{"tags":["M\u00f3vil"],"operationId":"generated::vn2mx2Bv7rbegHjU","summary":"Agregar recetas a una consulta existente (solo borradores o del propio doctor).","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"prescriptions":{"type":"array","minItems":1}},"required":["prescriptions"]}}}}}},"\/api\/mobile\/v1\/doctor\/patients-today":{"get":{"tags":["M\u00f3vil"],"operationId":"generated::F9n8ylMaeZJoyKLl","summary":"Patients Today \u2014 Patients Today","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/mobile\/v1\/ips\/summary":{"get":{"tags":["M\u00f3vil"],"operationId":"generated::yshScKMsabyFb0sw","summary":"Get Current Patient I P S \u2014 Summary","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/mobile\/v1\/tokens\/current":{"delete":{"tags":["M\u00f3vil"],"operationId":"generated::WHda1ZC5cpNy4RTJ","summary":"Revoke the current access token (HIPAA: supports rapid credential invalidation).","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/mobile\/v1\/user":{"get":{"tags":["M\u00f3vil"],"operationId":"generated::qkRTbSoEx5VRF32B","summary":"Consultar user","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/tokens":{"post":{"tags":["Autenticaci\u00f3n"],"operationId":"generated::rLBTkkY6JBTar8vD","summary":"Obtener un token de acceso con permisos acotados","description":"Endpoint p\u00fablico (no requiere credenciales). **Obsoleto**: se retira el 2027-03-31. Use \/api\/v1\/tokens","responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[],"deprecated":true,"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"device_name":{"type":"string","maxLength":255},"email":{"type":"string","format":"email"},"password":{"type":"string"},"abilities":{"type":"array","items":{"type":"string"}}},"required":["device_name"]}}}}}},"\/api\/tokens\/current":{"delete":{"tags":["Autenticaci\u00f3n"],"operationId":"generated::ey0hMdpypYXfelto","summary":"Revocar el token actual (cerrar sesi\u00f3n)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`. **Obsoleto**: se retira el 2027-03-31. Use \/api\/v1\/tokens","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"deprecated":true}},"\/api\/v1\/.well-known\/smart-configuration":{"get":{"tags":["General"],"operationId":"apiV1SmartConfiguration","summary":"Return SMART configuration JSON document.","description":"Endpoint p\u00fablico (no requiere credenciales).","responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[]}},"\/api\/v1\/advancadimelco\/expand":{"post":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoExpand","summary":"Expand \u2014 Expand","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"category":{"type":"string","nullable":true}},"required":["text"]}}}}}},"\/api\/v1\/advancadimelco\/parse":{"post":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoParse","summary":"Parse \u2014 Parse","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"category":{"type":"string","nullable":true},"mode":{"type":"string","nullable":true}},"required":["text"]}}}}}},"\/api\/v1\/advancadimelco\/snippets":{"get":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoSnippetsIndex","summary":"Listar snippets","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]},"post":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoSnippetsStore","summary":"Crear snippets","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"trigger":{"type":"string","maxLength":50},"title":{"type":"string","maxLength":120},"body":{"type":"string"},"category":{"type":"string","enum":["evolution","prescription","indications","other"],"nullable":true},"language":{"type":"string","maxLength":10,"nullable":true},"is_active":{"type":"boolean","nullable":true}},"required":["trigger","title","body"]}}}}}},"\/api\/v1\/advancadimelco\/snippets\/{advancadimelcoSnippet}":{"patch":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoSnippetsUpdate","summary":"Actualizar snippets","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"advancadimelcoSnippet","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"trigger":{"type":"string","maxLength":50,"nullable":true},"title":{"type":"string","maxLength":120,"nullable":true},"body":{"type":"string","nullable":true},"category":{"type":"string","enum":["evolution","prescription","indications","other"],"nullable":true},"language":{"type":"string","maxLength":10,"nullable":true},"is_active":{"type":"boolean","nullable":true}}}}}}},"delete":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoSnippetsDestroy","summary":"Eliminar snippets","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"advancadimelcoSnippet","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/advancadimelco\/suggest":{"get":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoSuggest","summary":"Suggest \u2014 Suggest","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/advancadimelco\/terms":{"get":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoTermsIndex","summary":"Listar terms","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]},"post":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoTermsStore","summary":"Crear terms","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":50},"expansion":{"type":"string","maxLength":255},"description":{"type":"string","maxLength":255,"nullable":true},"category":{"type":"string","enum":["adcavandimelco","diagnosis","allergy","medication","laboratory","imaging","nursing","diet","general_text"],"nullable":true},"language":{"type":"string","maxLength":10,"nullable":true},"match_mode":{"type":"string","enum":["exact","prefix","contains"],"nullable":true},"priority":{"type":"integer","nullable":true},"is_active":{"type":"boolean","nullable":true}},"required":["code","expansion"]}}}}}},"\/api\/v1\/advancadimelco\/terms\/{advancadimelcoTerm}":{"patch":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoTermsUpdate","summary":"Actualizar terms","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"advancadimelcoTerm","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":50,"nullable":true},"expansion":{"type":"string","maxLength":255,"nullable":true},"description":{"type":"string","maxLength":255,"nullable":true},"category":{"type":"string","enum":["adcavandimelco","diagnosis","allergy","medication","laboratory","imaging","nursing","diet","general_text"],"nullable":true},"language":{"type":"string","maxLength":10,"nullable":true},"match_mode":{"type":"string","enum":["exact","prefix","contains"],"nullable":true},"priority":{"type":"integer","nullable":true},"is_active":{"type":"boolean","nullable":true}}}}}}},"delete":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AdvancadimelcoTermsDestroy","summary":"Eliminar terms","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"advancadimelcoTerm","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/ai\/generate-summary":{"post":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AiGenerateSummary","summary":"Generate Summary \u2014 Generate Summary","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"notes":{"type":"array"}},"required":["notes"]}}}}}},"\/api\/v1\/ai\/suggest-diagnoses":{"post":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AiSuggestDiagnoses","summary":"Suggest Diagnoses \u2014 Suggest Diagnoses","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"physical_exam":{"type":"string","nullable":true}},"required":["reason"]}}}}}},"\/api\/v1\/ai\/suggest-dosage":{"post":{"tags":["IA cl\u00ednica"],"operationId":"apiV1AiSuggestDosage","summary":"Suggest Dosage \u2014 Suggest Dosage","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"medication":{"type":"string"},"reason":{"type":"string"},"illness":{"type":"string","nullable":true}},"required":["medication","reason"]}}}}}},"\/api\/v1\/appointments":{"get":{"tags":["General"],"operationId":"apiV1IntegrationAppointmentsIndex","summary":"Listar turnos de la agenda (filtros: practitioner_id, patient_id, status, date_from, date_to)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `appointments:read`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["appointments:read"]},{"apiKeyAuth":["appointments:read"]}],"x-required-abilities":["appointments:read"],"x-phi-access":"operational"},"post":{"tags":["General"],"operationId":"apiV1IntegrationAppointmentsStore","summary":"Agendar un turno para un paciente con un profesional (sin doble reserva)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `appointments:write`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["appointments:write"]},{"apiKeyAuth":["appointments:write"]}],"x-required-abilities":["appointments:write"],"x-phi-access":"operational","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/appointments\/{appointment}":{"get":{"tags":["General"],"operationId":"apiV1IntegrationAppointmentsShow","summary":"Obtener un turno","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `appointments:read`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"appointment","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["appointments:read"]},{"apiKeyAuth":["appointments:read"]}],"x-required-abilities":["appointments:read"],"x-phi-access":"operational"}},"\/api\/v1\/appointments\/{appointment}\/status":{"patch":{"tags":["General"],"operationId":"apiV1IntegrationAppointmentsStatus","summary":"Confirmar llegada, cancelar o marcar inasistencia","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `appointments:write`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"appointment","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["appointments:write"]},{"apiKeyAuth":["appointments:write"]}],"x-required-abilities":["appointments:write"],"x-phi-access":"operational","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","confirmed","cancelled","no_show"]}},"required":["status"]}}}}}},"\/api\/v1\/auth\/token":{"post":{"tags":["Autenticaci\u00f3n"],"operationId":"apiV1AuthToken","summary":"Obtener un token de acceso (iniciar sesi\u00f3n con usuario y contrase\u00f1a)","description":"Endpoint p\u00fablico (no requiere credenciales).","responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"},"example":{"success":true,"message":"Token generado correctamente.","data":{"token":"12|aB3dE5fG7hJ9kL1mN3pQ5rS7tU9vW1xY3zA5bC7d"}}}}},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/catalogs\/{catalog}\/search":{"get":{"tags":["General"],"operationId":"apiV1CatalogsSearch","summary":"Search \u2014 Search","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `catalogs:read`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"catalog","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["catalogs:read"]},{"apiKeyAuth":["catalogs:read"]}],"x-required-abilities":["catalogs:read"]}},"\/api\/v1\/clinical\/prediction\/sepsis-early-warning":{"post":{"tags":["IA cl\u00ednica"],"operationId":"apiV1PredictionSepsisEvaluate","summary":"Evaluate patient vital signs against NEWS2 and qSOFA predictive models.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"respiratory_rate":{"type":"integer","minimum":4,"maximum":60},"oxygen_saturation":{"type":"integer","minimum":50,"maximum":100},"supplemental_oxygen":{"type":"boolean","nullable":true},"systolic_bp":{"type":"integer","minimum":40,"maximum":300},"heart_rate":{"type":"integer","minimum":20,"maximum":250},"consciousness":{"type":"string","enum":["A","V","P","U","alert","voice","pain","unresponsive"],"nullable":true},"temperature_celsius":{"type":"number","minimum":30,"maximum":45},"patient_id":{"type":"string","nullable":true},"bed_code":{"type":"string","nullable":true},"clinic_id":{"type":"integer","nullable":true}},"required":["respiratory_rate","oxygen_saturation","systolic_bp","heart_rate","temperature_celsius"]}}}}}},"\/api\/v1\/diagnoses":{"get":{"tags":["General"],"operationId":"apiV1IntegrationDiagnosesIndex","summary":"Listar diagn\u00f3sticos CIE-10 (filtros: patient_id, code)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `medical-records:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["medical-records:read"]},{"apiKeyAuth":["medical-records:read"]}],"x-required-abilities":["medical-records:read"],"x-phi-access":"audited"}},"\/api\/v1\/emergency\/form-008":{"get":{"tags":["Emergencia"],"operationId":"apiV1EmergencyForm008Index","summary":"Listar form 008","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"},"post":{"tags":["Emergencia"],"operationId":"apiV1EmergencyForm008Store","summary":"Crear form 008","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"},"example":{"success":true,"message":"Formulario 008 creado correctamente.","data":{"id":9,"mrn":"HC-111","triage":{"trauma_flag":true},"vitals":{"heart_rate":95,"spo2":97}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"header":{"type":"array","nullable":true,"properties":{"legacy_codigo_emergencia":{"type":"integer","nullable":true},"legacy_numero_hoja":{"type":"string","maxLength":10,"nullable":true},"patient_id":{"type":"integer","nullable":true},"patient_profile_id":{"type":"integer"},"mrn":{"type":"string","maxLength":50,"nullable":true},"patient_last_name_1":{"type":"string","maxLength":150,"nullable":true},"patient_last_name_2":{"type":"string","maxLength":150,"nullable":true},"patient_first_names":{"type":"string","maxLength":200,"nullable":true},"arrival_mode":{"type":"string","nullable":true},"information_source":{"type":"string","maxLength":255,"nullable":true},"responsible_phone":{"type":"string","maxLength":20,"nullable":true},"care_started_at":{"type":"string","format":"date","nullable":true},"admission_at":{"type":"string","format":"date","nullable":true},"event_date":{"type":"string","format":"date","nullable":true},"event_time":{"type":"string","format":"date","nullable":true},"event_place":{"type":"string","maxLength":255,"nullable":true},"event_address":{"type":"string","maxLength":255,"nullable":true},"police_custody":{"type":"boolean","nullable":true},"alcohol_breath":{"type":"boolean","nullable":true},"alco_check_value":{"type":"string","maxLength":20,"nullable":true},"blood_group":{"type":"string","maxLength":5,"nullable":true},"observations":{"type":"string","nullable":true},"attachments_json":{"type":"array","nullable":true}}},"triage":{"type":"array","nullable":true,"properties":{"trauma_flag":{"type":"boolean","nullable":true},"cause_clinical_flag":{"type":"boolean","nullable":true},"cause_obgyn_flag":{"type":"boolean","nullable":true},"cause_surgical_flag":{"type":"boolean","nullable":true},"police_notification_flag":{"type":"boolean","nullable":true},"other_reason_flag":{"type":"boolean","nullable":true},"other_reason_text":{"type":"string","maxLength":250,"nullable":true}}},"vitals":{"type":"array","nullable":true,"properties":{"bp_raw":{"type":"string","maxLength":15,"nullable":true},"bp_systolic":{"type":"integer","nullable":true},"bp_diastolic":{"type":"integer","nullable":true},"heart_rate":{"type":"integer","nullable":true},"resp_rate":{"type":"integer","nullable":true},"temp_oral":{"type":"string","maxLength":15,"nullable":true},"temp_axillary":{"type":"string","maxLength":15,"nullable":true},"temperature_c":{"type":"number","nullable":true},"weight_raw":{"type":"string","maxLength":15,"nullable":true},"height_raw":{"type":"string","maxLength":15,"nullable":true},"weight_kg":{"type":"number","nullable":true},"height_cm":{"type":"number","nullable":true},"bmi":{"type":"number","nullable":true},"glasgow_ocular":{"type":"integer","nullable":true},"glasgow_verbal":{"type":"integer","nullable":true},"glasgow_motor":{"type":"integer","nullable":true},"glasgow_total":{"type":"integer","nullable":true},"pupil_reaction_right":{"type":"string","maxLength":15,"nullable":true},"pupil_reaction_left":{"type":"string","maxLength":15,"nullable":true},"capillary_refill_raw":{"type":"string","maxLength":15,"nullable":true},"spo2_raw":{"type":"string","maxLength":15,"nullable":true},"spo2":{"type":"integer","nullable":true}}},"clinical":{"type":"array","nullable":true,"properties":{"personal_history":{"type":"string","nullable":true},"current_illness":{"type":"string","nullable":true},"physical_exam":{"type":"string","nullable":true},"injuries":{"type":"string","nullable":true},"requested_tests":{"type":"string","nullable":true},"diagnosis_admission":{"type":"string","nullable":true},"diagnosis_discharge":{"type":"string","nullable":true},"indications":{"type":"string","nullable":true},"medications":{"type":"string","nullable":true}}},"obgyn":{"type":"array","nullable":true,"properties":{"gestas":{"type":"string","maxLength":40,"nullable":true},"partos":{"type":"string","maxLength":40,"nullable":true},"abortos":{"type":"string","maxLength":40,"nullable":true},"cesareas":{"type":"string","maxLength":40,"nullable":true},"fum_raw":{"type":"string","maxLength":50,"nullable":true},"weeks_gestation":{"type":"string","maxLength":40,"nullable":true},"fetal_movement":{"type":"string","maxLength":40,"nullable":true},"fetal_hr":{"type":"string","maxLength":40,"nullable":true},"membranes_ruptured":{"type":"string","maxLength":40,"nullable":true},"time":{"type":"string","maxLength":40,"nullable":true},"uterine_height":{"type":"string","maxLength":40,"nullable":true},"presentation":{"type":"string","maxLength":40,"nullable":true},"dilatation":{"type":"string","maxLength":40,"nullable":true},"effacement":{"type":"string","maxLength":40,"nullable":true},"station_plane":{"type":"string","maxLength":40,"nullable":true},"pelvis_useful":{"type":"string","maxLength":40,"nullable":true},"vaginal_bleeding":{"type":"string","maxLength":40,"nullable":true},"contractions":{"type":"string","maxLength":40,"nullable":true},"score_mama":{"type":"string","maxLength":50,"nullable":true}}},"disposition":{"type":"array","nullable":true,"properties":{"discharge_home_flag":{"type":"boolean","nullable":true},"outpatient_referral_flag":{"type":"boolean","nullable":true},"observation_flag":{"type":"boolean","nullable":true},"hospitalization_flag":{"type":"boolean","nullable":true},"referral_flag":{"type":"boolean","nullable":true},"alive_flag":{"type":"boolean","nullable":true},"stable_flag":{"type":"boolean","nullable":true},"unstable_flag":{"type":"boolean","nullable":true},"disability_days":{"type":"string","maxLength":250,"nullable":true},"referral_service":{"type":"string","maxLength":250,"nullable":true},"referral_establishment":{"type":"string","maxLength":250,"nullable":true},"death_in_emergency_flag":{"type":"boolean","nullable":true},"death_cause":{"type":"string","maxLength":250,"nullable":true}}},"professional":{"type":"array","nullable":true,"properties":{"doctor_name":{"type":"string","maxLength":250,"nullable":true},"doctor_code":{"type":"string","maxLength":50,"nullable":true}}}}}}}}}},"\/api\/v1\/emergency\/form-008\/{emergencyForm008}":{"get":{"tags":["Emergencia"],"operationId":"apiV1EmergencyForm008Show","summary":"Obtener form 008","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"emergencyForm008","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"},"patch":{"tags":["Emergencia"],"operationId":"apiV1EmergencyForm008Update","summary":"Actualizar form 008","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"emergencyForm008","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"header":{"type":"array","properties":{"legacy_codigo_emergencia":{"type":"integer","nullable":true},"legacy_numero_hoja":{"type":"string","maxLength":10,"nullable":true},"patient_id":{"type":"integer","nullable":true},"patient_profile_id":{"type":"integer","nullable":true},"mrn":{"type":"string","maxLength":50,"nullable":true},"patient_last_name_1":{"type":"string","maxLength":150,"nullable":true},"patient_last_name_2":{"type":"string","maxLength":150,"nullable":true},"patient_first_names":{"type":"string","maxLength":200,"nullable":true},"arrival_mode":{"type":"string","nullable":true},"information_source":{"type":"string","maxLength":255,"nullable":true},"responsible_phone":{"type":"string","maxLength":20,"nullable":true},"care_started_at":{"type":"string","format":"date","nullable":true},"admission_at":{"type":"string","format":"date","nullable":true},"event_date":{"type":"string","format":"date","nullable":true},"event_time":{"type":"string","format":"date","nullable":true},"event_place":{"type":"string","maxLength":255,"nullable":true},"event_address":{"type":"string","maxLength":255,"nullable":true},"police_custody":{"type":"boolean","nullable":true},"alcohol_breath":{"type":"boolean","nullable":true},"alco_check_value":{"type":"string","maxLength":20,"nullable":true},"blood_group":{"type":"string","maxLength":5,"nullable":true},"observations":{"type":"string","nullable":true},"attachments_json":{"type":"array","nullable":true}}},"triage":{"type":"array","properties":{"trauma_flag":{"type":"boolean","nullable":true},"cause_clinical_flag":{"type":"boolean","nullable":true},"cause_obgyn_flag":{"type":"boolean","nullable":true},"cause_surgical_flag":{"type":"boolean","nullable":true},"police_notification_flag":{"type":"boolean","nullable":true},"other_reason_flag":{"type":"boolean","nullable":true},"other_reason_text":{"type":"string","maxLength":250,"nullable":true}}},"vitals":{"type":"array","properties":{"bp_raw":{"type":"string","maxLength":15,"nullable":true},"bp_systolic":{"type":"integer","nullable":true},"bp_diastolic":{"type":"integer","nullable":true},"heart_rate":{"type":"integer","nullable":true},"resp_rate":{"type":"integer","nullable":true},"temp_oral":{"type":"string","maxLength":15,"nullable":true},"temp_axillary":{"type":"string","maxLength":15,"nullable":true},"temperature_c":{"type":"number","nullable":true},"weight_raw":{"type":"string","maxLength":15,"nullable":true},"height_raw":{"type":"string","maxLength":15,"nullable":true},"weight_kg":{"type":"number","nullable":true},"height_cm":{"type":"number","nullable":true},"bmi":{"type":"number","nullable":true},"glasgow_ocular":{"type":"integer","nullable":true},"glasgow_verbal":{"type":"integer","nullable":true},"glasgow_motor":{"type":"integer","nullable":true},"glasgow_total":{"type":"integer","nullable":true},"pupil_reaction_right":{"type":"string","maxLength":15,"nullable":true},"pupil_reaction_left":{"type":"string","maxLength":15,"nullable":true},"capillary_refill_raw":{"type":"string","maxLength":15,"nullable":true},"spo2_raw":{"type":"string","maxLength":15,"nullable":true},"spo2":{"type":"integer","nullable":true}}},"clinical":{"type":"array","properties":{"personal_history":{"type":"string","nullable":true},"current_illness":{"type":"string","nullable":true},"physical_exam":{"type":"string","nullable":true},"injuries":{"type":"string","nullable":true},"requested_tests":{"type":"string","nullable":true},"diagnosis_admission":{"type":"string","nullable":true},"diagnosis_discharge":{"type":"string","nullable":true},"indications":{"type":"string","nullable":true},"medications":{"type":"string","nullable":true}}},"obgyn":{"type":"array","properties":{"gestas":{"type":"string","maxLength":40,"nullable":true},"partos":{"type":"string","maxLength":40,"nullable":true},"abortos":{"type":"string","maxLength":40,"nullable":true},"cesareas":{"type":"string","maxLength":40,"nullable":true},"fum_raw":{"type":"string","maxLength":50,"nullable":true},"weeks_gestation":{"type":"string","maxLength":40,"nullable":true},"fetal_movement":{"type":"string","maxLength":40,"nullable":true},"fetal_hr":{"type":"string","maxLength":40,"nullable":true},"membranes_ruptured":{"type":"string","maxLength":40,"nullable":true},"time":{"type":"string","maxLength":40,"nullable":true},"uterine_height":{"type":"string","maxLength":40,"nullable":true},"presentation":{"type":"string","maxLength":40,"nullable":true},"dilatation":{"type":"string","maxLength":40,"nullable":true},"effacement":{"type":"string","maxLength":40,"nullable":true},"station_plane":{"type":"string","maxLength":40,"nullable":true},"pelvis_useful":{"type":"string","maxLength":40,"nullable":true},"vaginal_bleeding":{"type":"string","maxLength":40,"nullable":true},"contractions":{"type":"string","maxLength":40,"nullable":true},"score_mama":{"type":"string","maxLength":50,"nullable":true}}},"disposition":{"type":"array","properties":{"discharge_home_flag":{"type":"boolean","nullable":true},"outpatient_referral_flag":{"type":"boolean","nullable":true},"observation_flag":{"type":"boolean","nullable":true},"hospitalization_flag":{"type":"boolean","nullable":true},"referral_flag":{"type":"boolean","nullable":true},"alive_flag":{"type":"boolean","nullable":true},"stable_flag":{"type":"boolean","nullable":true},"unstable_flag":{"type":"boolean","nullable":true},"disability_days":{"type":"string","maxLength":250,"nullable":true},"referral_service":{"type":"string","maxLength":250,"nullable":true},"referral_establishment":{"type":"string","maxLength":250,"nullable":true},"death_in_emergency_flag":{"type":"boolean","nullable":true},"death_cause":{"type":"string","maxLength":250,"nullable":true}}},"professional":{"type":"array","properties":{"doctor_name":{"type":"string","maxLength":250,"nullable":true},"doctor_code":{"type":"string","maxLength":50,"nullable":true}}}}}}}}},"delete":{"tags":["Emergencia"],"operationId":"apiV1EmergencyForm008Destroy","summary":"Eliminar form 008","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"emergencyForm008","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/emergency\/form-008\/{emergencyForm008}\/print":{"get":{"tags":["Emergencia"],"operationId":"apiV1EmergencyForm008Print","summary":"Print \u2014 Print","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"emergencyForm008","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/encounters":{"post":{"tags":["General"],"operationId":"apiV1IntegrationEncountersStore","summary":"Registrar una consulta completa (anamnesis, signos, diagn\u00f3sticos, plan y prescripci\u00f3n) con un profesional responsable","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `encounters:write`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["encounters:write"]},{"apiKeyAuth":["encounters:write"]}],"x-required-abilities":["encounters:write"],"x-phi-access":"audited","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}},"get":{"tags":["General"],"operationId":"apiV1IntegrationEncountersIndex","summary":"Listar consultas (filtros: patient_id, date_from, date_to)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `medical-records:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["medical-records:read"]},{"apiKeyAuth":["medical-records:read"]}],"x-required-abilities":["medical-records:read"],"x-phi-access":"audited"}},"\/api\/v1\/encounters\/{consultation}":{"get":{"tags":["General"],"operationId":"apiV1IntegrationEncountersShow","summary":"Obtener una consulta completa","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `medical-records:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["medical-records:read"]},{"apiKeyAuth":["medical-records:read"]}],"x-required-abilities":["medical-records:read"],"x-phi-access":"audited"}},"\/api\/v1\/encounters\/{consultation}\/recipe":{"get":{"tags":["General"],"operationId":"apiV1IntegrationEncountersRecipeShow","summary":"Obtener la receta vigente de una consulta","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `recipes:read`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["recipes:read"]},{"apiKeyAuth":["recipes:read"]}],"x-required-abilities":["recipes:read"],"x-phi-access":"operational"},"post":{"tags":["General"],"operationId":"apiV1IntegrationEncountersRecipeIssue","summary":"Emitir la receta de una consulta (solo el m\u00e9dico tratante)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `recipes:write`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["recipes:write"]},{"apiKeyAuth":["recipes:write"]}],"x-required-abilities":["recipes:write"],"x-phi-access":"audited","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/fhir":{"post":{"tags":["FHIR R4"],"operationId":"apiV1FhirBundle","summary":"Process a FHIR transaction or batch Bundle (POST \/api\/v1\/fhir).","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"audited","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/fhir\/.well-known\/smart-configuration":{"get":{"tags":["FHIR R4"],"operationId":"apiV1FhirSmartConfiguration","summary":"Return SMART configuration JSON document.","description":"Endpoint p\u00fablico (no requiere credenciales).","responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[]}},"\/api\/v1\/fhir\/metadata":{"get":{"tags":["FHIR R4"],"operationId":"apiV1FhirMetadata","summary":"Obtener el CapabilityStatement del servidor FHIR","description":"Endpoint p\u00fablico (no requiere credenciales). El acceso queda registrado en la bit\u00e1cora de auditor\u00eda.","responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[],"x-phi-access":"audited"}},"\/api\/v1\/fhir\/{resourceType}":{"post":{"tags":["FHIR R4"],"operationId":"apiV1FhirCreate","summary":"Create \u2014 Fhir","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"resourceType","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"audited","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}},"get":{"tags":["FHIR R4"],"operationId":"apiV1FhirSearch","summary":"Search or list resources by resource type.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"resourceType","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"audited"}},"\/api\/v1\/fhir\/{resourceType}\/$validate":{"post":{"tags":["FHIR R4"],"operationId":"apiV1FhirValidate","summary":"Operaci\u00f3n $validate: valida el recurso sin persistir (200 informaci\u00f3n o","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"resourceType","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"audited","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/fhir\/{resourceType}\/{id}":{"put":{"tags":["FHIR R4"],"operationId":"apiV1FhirUpdate","summary":"Actualizar fhir","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"resourceType","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"audited","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}},"get":{"tags":["FHIR R4"],"operationId":"apiV1FhirRead","summary":"Read a specific resource by ID.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"resourceType","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"audited"}},"\/api\/v1\/hospitalization\/active":{"get":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1HospActive","summary":"List active hospitalizations for current clinic.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"},"example":{"success":true,"message":"Hospitalizaciones activas obtenidas correctamente.","data":[{"id":7,"status":"active","admission_date":"2026-10-02T09:30:00-05:00","patient":{"id":120,"full_name":"Cevallos Andrade Juan Carlos"},"bed":{"id":3,"name":"A-12"}}]}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/hospitalization\/admit":{"post":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1HospAdmit","summary":"Admit a patient.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"patient_id":{"type":"string"},"bed_id":{"type":"string"},"admission_date":{"type":"string","format":"date"},"admission_reason":{"type":"string","nullable":true},"referral_source":{"type":"string"},"initial_notes":{"type":"string"},"diagnoses":{"type":"array","nullable":true}},"required":["patient_id","bed_id","admission_date","referral_source","initial_notes"]}}}}}},"\/api\/v1\/hospitalization\/pre-anesthetic-018\/{form}\/print":{"get":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1HospPreanesthetic018Print","summary":"Print Pre-Anesthetic (Form 018)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"form","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/hospitalization\/protocol-017\/{protocol}\/print":{"get":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1HospProtocol017Print","summary":"Print Surgical Protocol (Form 017)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"protocol","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/hospitalization\/{hospitalization}\/discharge":{"post":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1HospDischarge","summary":"Record discharge.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"hospitalization","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"discharge_date":{"type":"string","format":"date"},"epicrisis_summary":{"type":"string"},"final_diagnoses":{"type":"array","nullable":true}},"required":["discharge_date","epicrisis_summary"]}}}}}},"\/api\/v1\/hospitalization\/{hospitalization}\/evolution":{"post":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1HospEvolution","summary":"Add a medical evolution note.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"hospitalization","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"notes":{"type":"string"},"evolution_date":{"type":"string","format":"date"}},"required":["notes","evolution_date"]}}}}}},"\/api\/v1\/hospitalization\/{hospitalization}\/print-admission":{"get":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1HospPrintAdmission","summary":"Generate PDF for the admission note.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"hospitalization","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/hospitalization\/{hospitalization}\/print-anamnesis":{"get":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1HospPrintAnamnesis","summary":"Print Anamnesis \u2014 Print Anamnesis","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"hospitalization","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/hospitalization\/{hospitalization}\/print-epicrisis":{"get":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1HospPrintEpicrisis","summary":"Generate PDF for the Epicrisis.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"hospitalization","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/infrastructure\/beds\/{bed}":{"patch":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1InfraBedsUpdate","summary":"PATCH \/api\/v1\/infrastructure\/beds\/{bed}","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"bed","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":50},"status":{"type":"string","enum":["available","occupied","maintenance"]}}}}}}}},"\/api\/v1\/infrastructure\/overview":{"get":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1InfraOverview","summary":"Overview of all rooms and bed availability for the current clinic.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/infrastructure\/rooms":{"get":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1InfraRoomsIndex","summary":"GET \/api\/v1\/infrastructure\/rooms","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]},"post":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1InfraRoomsStore","summary":"POST \/api\/v1\/infrastructure\/rooms","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"type":{"type":"string","enum":["general","private","icu","pediatric","maternity","emergency"]},"is_active":{"type":"boolean"}},"required":["name","type"]}}}}}},"\/api\/v1\/infrastructure\/rooms\/{room}":{"patch":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1InfraRoomsUpdate","summary":"PATCH \/api\/v1\/infrastructure\/rooms\/{room}","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"room","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"type":{"type":"string","enum":["general","private","icu","pediatric","maternity","emergency"]},"is_active":{"type":"boolean"}}}}}}},"delete":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1InfraRoomsDestroy","summary":"DELETE \/api\/v1\/infrastructure\/rooms\/{room}","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"room","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/infrastructure\/rooms\/{room}\/beds":{"get":{"tags":["Hospitalizaci\u00f3n"],"operationId":"apiV1InfraBedsIndex","summary":"GET \/api\/v1\/infrastructure\/rooms\/{room}\/beds","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"room","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/interoperability\/fhir\/patient":{"post":{"tags":["Interoperabilidad"],"operationId":"apiV1InteropFhirPatientSend","summary":"Send Fhir Patient \u2014 Patient","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `interoperability:write`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["interoperability:write"]},{"apiKeyAuth":["interoperability:write"]}],"x-required-abilities":["interoperability:write"],"x-phi-access":"audited","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"resource":{"type":"array"}},"required":["resource"]}}}}}},"\/api\/v1\/interoperability\/fhir\/patient\/{id}":{"get":{"tags":["Interoperabilidad"],"operationId":"apiV1InteropFhirPatientGet","summary":"Get Fhir Patient \u2014 Patient","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `interoperability:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["interoperability:read"]},{"apiKeyAuth":["interoperability:read"]}],"x-required-abilities":["interoperability:read"],"x-phi-access":"audited"}},"\/api\/v1\/interoperability\/hl7\/ingest":{"post":{"tags":["Interoperabilidad"],"operationId":"apiV1InteropHl7Ingest","summary":"Ingest Hl7 \u2014 Ingest","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `interoperability:write`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["interoperability:write"]},{"apiKeyAuth":["interoperability:write"]}],"x-required-abilities":["interoperability:write"],"x-phi-access":"audited","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/interoperability\/hl7\/send":{"post":{"tags":["Interoperabilidad"],"operationId":"apiV1InteropHl7Send","summary":"Send Hl7 \u2014 Send","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `interoperability:write`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["interoperability:write"]},{"apiKeyAuth":["interoperability:write"]}],"x-required-abilities":["interoperability:write"],"x-phi-access":"audited","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["ADT","ORM","ORU"]},"patient":{"type":"array"},"message":{"type":"string"}},"required":["type"]}}}}}},"\/api\/v1\/interoperability\/map\/fhir\/patient":{"post":{"tags":["Interoperabilidad"],"operationId":"apiV1InteropMapFhirToLocal","summary":"Map Fhir To Local \u2014 Patient","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `interoperability:write`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["interoperability:write"]},{"apiKeyAuth":["interoperability:write"]}],"x-required-abilities":["interoperability:write"],"x-phi-access":"audited","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"resource":{"type":"array"}},"required":["resource"]}}}}}},"\/api\/v1\/interoperability\/map\/fhir\/patient\/{id}":{"get":{"tags":["Interoperabilidad"],"operationId":"apiV1InteropMapLocalToFhir","summary":"Map Local To Fhir \u2014 Patient","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `interoperability:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["interoperability:read"]},{"apiKeyAuth":["interoperability:read"]}],"x-required-abilities":["interoperability:read"],"x-phi-access":"audited"}},"\/api\/v1\/interoperability\/test\/fhir":{"get":{"tags":["Interoperabilidad"],"operationId":"apiV1InteropTestFhir","summary":"Test Fhir \u2014 Fhir","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `interoperability:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["interoperability:read"]},{"apiKeyAuth":["interoperability:read"]}],"x-required-abilities":["interoperability:read"],"x-phi-access":"audited"}},"\/api\/v1\/interoperability\/test\/hl7":{"get":{"tags":["Interoperabilidad"],"operationId":"apiV1InteropTestHl7","summary":"Test Hl7 \u2014 Hl7","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `interoperability:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["interoperability:read"]},{"apiKeyAuth":["interoperability:read"]}],"x-required-abilities":["interoperability:read"],"x-phi-access":"audited"}},"\/api\/v1\/ips\/patient\/{id}":{"get":{"tags":["FHIR R4"],"operationId":"apiV1IpsPatientSummary","summary":"Get Patient I P S \u2014 Patient","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/me":{"get":{"tags":["General"],"operationId":"apiV1Me","summary":"Consultar me","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/notifications\/history":{"get":{"tags":["General"],"operationId":"apiV1NotificationsHistory","summary":"Consultar history","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/notifications\/register-token":{"post":{"tags":["General"],"operationId":"apiV1NotificationsRegister","summary":"Registrar register token","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/notifications\/{notificationId}\/read":{"patch":{"tags":["General"],"operationId":"apiV1NotificationsRead","summary":"Actualizar read","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/outpatient\/consultations":{"get":{"tags":["Consulta externa"],"operationId":"apiV1OutpatientConsultationsIndex","summary":"Display a listing of consultations.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"},"example":{"success":true,"message":"Consultas obtenidas correctamente.","current_page":1,"per_page":15,"total":1,"data":[{"id":31,"clinic_id":154,"doctor_id":4,"patient_id":120,"consultation_date":"2026-10-01T18:59:00-05:00","status":"completed","patient":{"id":120,"full_name":"Cevallos Andrade Juan Carlos","document_number":"1712345674"},"doctor":{"id":4,"name":"Dra. Elena Ruiz"},"diagnoses":[{"id":1,"cie10_code":"J06.9","type":"definitive"}]}]}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"},"post":{"tags":["Consulta externa"],"operationId":"apiV1OutpatientConsultationsStore","summary":"Display the specified consultation.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/outpatient\/consultations\/{consultation}":{"get":{"tags":["Consulta externa"],"operationId":"apiV1OutpatientConsultationsShow","summary":"Display the specified consultation.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"},"example":{"success":true,"message":"Consulta obtenida correctamente.","data":{"id":31,"consultation_date":"2026-10-01T18:59:00-05:00","status":"completed","patient":{"id":120,"full_name":"Cevallos Andrade Juan Carlos"},"doctor":{"id":4,"name":"Dra. Elena Ruiz"},"anamnesis":{"reason":"Cuadro gripal de 3 d\u00edas"},"vital_signs":{"temperature":37,"pulse":72},"diagnoses":[{"cie10_code":"J06.9"}],"plan":{"therapeutic_plan":"Reposo e hidrataci\u00f3n"},"prescriptions":[]}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"},"put":{"tags":["Consulta externa"],"operationId":"apiV1OutpatientConsultationsUpdate","summary":"Update the specified consultation.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","description":"Cuerpo JSON del recurso."}}}}}},"\/api\/v1\/outpatient\/consultations\/{consultation}\/print-anamnesis":{"get":{"tags":["Consulta externa"],"operationId":"apiV1OutpatientConsultationsPrintAnamnesis","summary":"Generate PDF for the consultation.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"consultation","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/outpatient\/patients\/{patient}\/history":{"get":{"tags":["Consulta externa"],"operationId":"apiV1OutpatientPatientsHistory","summary":"List history for a patient.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"patient","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/patients":{"get":{"tags":["Pacientes"],"operationId":"apiV1PatientsIndex","summary":"Listar y buscar pacientes (paginado)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `patients:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"},"example":{"success":true,"message":"Pacientes obtenidos correctamente.","data":{"items":[{"id":120,"clinic_history_number":"HC-000120","document_number":"1712345674","document_type":"cedula","family_name":"Cevallos Andrade","given_names":"Juan Carlos","full_name":"Cevallos Andrade Juan Carlos","birth_date":"1984-11-02","sex":"M","blood_type":"A+"}],"meta":{"page":1,"per_page":25,"total":1}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["patients:read"]},{"apiKeyAuth":["patients:read"]}],"x-required-abilities":["patients:read"],"x-phi-access":"audited"},"post":{"tags":["Pacientes"],"operationId":"apiV1IntegrationPatientsStore","summary":"Registrar un paciente (409 si el documento ya existe en la cl\u00ednica)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `patients:write`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["patients:write"]},{"apiKeyAuth":["patients:write"]}],"x-required-abilities":["patients:write"],"x-phi-access":"operational","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"document_number":{"type":"string","maxLength":40},"document_type":{"type":"string","nullable":true},"given_names":{"type":"string","maxLength":255},"family_name":{"type":"string","maxLength":255},"second_family_name":{"type":"string","maxLength":255,"nullable":true},"birth_date":{"type":"string","format":"date"},"sex":{"type":"string","enum":["M","F"],"nullable":true},"phone":{"type":"string","maxLength":50,"nullable":true},"email":{"type":"string","format":"email","maxLength":255,"nullable":true},"address":{"type":"string","maxLength":500,"nullable":true},"blood_type":{"type":"string","maxLength":10,"nullable":true}},"required":["document_number","given_names","family_name","birth_date"]}}}}}},"\/api\/v1\/patients\/{patient}":{"get":{"tags":["Pacientes"],"operationId":"apiV1IntegrationPatientsShow","summary":"Obtener la identificaci\u00f3n de un paciente","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `patients:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"patient","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["patients:read"]},{"apiKeyAuth":["patients:read"]}],"x-required-abilities":["patients:read"],"x-phi-access":"audited"}},"\/api\/v1\/patients\/{patient}\/consents":{"get":{"tags":["Pacientes"],"operationId":"apiV1IntegrationPatientsConsentsShow","summary":"Consultar si el paciente tiene consentimiento vigente y si la cl\u00ednica lo exige","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `patients:read`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"patient","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["patients:read"]},{"apiKeyAuth":["patients:read"]}],"x-required-abilities":["patients:read"],"x-phi-access":"operational"},"post":{"tags":["Pacientes"],"operationId":"apiV1IntegrationPatientsConsentsStore","summary":"Registrar el consentimiento del paciente (solo personal de la cl\u00ednica; una aplicaci\u00f3n recibe 403)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `consents:write`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"patient","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["consents:write"]},{"apiKeyAuth":["consents:write"]}],"x-required-abilities":["consents:write"],"x-phi-access":"operational","requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"expires_at":{"type":"string","format":"date","nullable":true}}}}}}},"delete":{"tags":["Pacientes"],"operationId":"apiV1IntegrationPatientsConsentsDestroy","summary":"Retirar el consentimiento del paciente (rige desde la siguiente petici\u00f3n)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `consents:write`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"patient","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["consents:write"]},{"apiKeyAuth":["consents:write"]}],"x-required-abilities":["consents:write"],"x-phi-access":"operational"}},"\/api\/v1\/patients\/{patient}\/medical-record":{"get":{"tags":["Pacientes"],"operationId":"apiV1IntegrationPatientsMedicalRecord","summary":"Expediente del paciente: consultas con anamnesis, diagn\u00f3stico, tratamiento y prescripci\u00f3n, y recetas emitidas","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `medical-records:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"patient","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["medical-records:read"]},{"apiKeyAuth":["medical-records:read"]}],"x-required-abilities":["medical-records:read"],"x-phi-access":"audited"}},"\/api\/v1\/pharmacy\/dispense":{"post":{"tags":["Farmacia"],"operationId":"apiV1PharmacyDispense","summary":"Dispense medications to a patient.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"patient_id":{"type":"string"},"items":{"type":"array","minItems":1,"items":{"type":"object","properties":{"inventory_item_id":{"type":"string"},"quantity":{"type":"integer","minimum":1}}}}},"required":["patient_id","items"]}}}}}},"\/api\/v1\/pharmacy\/inventory":{"get":{"tags":["Farmacia"],"operationId":"apiV1PharmacyInventory","summary":"Display current inventory levels.","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Expone historia cl\u00ednica (PHI): sujeto a la pol\u00edtica de acceso a PHI de la cl\u00ednica y queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"},"example":{"success":true,"message":"Inventario obtenido correctamente.","data":[{"id":5,"name":"Amoxicilina 500 mg","stock":120,"min_stock":20}]}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"x-phi-access":"full"}},"\/api\/v1\/ping":{"get":{"tags":["General"],"operationId":"apiV1Ping","summary":"Comprobar que la API responde (no requiere credenciales)","description":"Endpoint p\u00fablico (no requiere credenciales).","responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"},"example":{"success":true,"message":"pong","data":{"status":"ok","time":"2026-10-04T15:04:05-05:00"}}}}},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[]}},"\/api\/v1\/practitioners":{"get":{"tags":["General"],"operationId":"apiV1IntegrationPractitionersIndex","summary":"Listar los profesionales de la cl\u00ednica","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `practitioners:read`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["practitioners:read"]},{"apiKeyAuth":["practitioners:read"]}],"x-required-abilities":["practitioners:read"]}},"\/api\/v1\/practitioners\/{practitioner}":{"get":{"tags":["General"],"operationId":"apiV1IntegrationPractitionersShow","summary":"Obtener un profesional","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `practitioners:read`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"practitioner","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["practitioners:read"]},{"apiKeyAuth":["practitioners:read"]}],"x-required-abilities":["practitioners:read"]}},"\/api\/v1\/practitioners\/{practitioner}\/availability":{"get":{"tags":["General"],"operationId":"apiV1IntegrationPractitionersAvailability","summary":"Horarios libres de un profesional en una fecha","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `appointments:read`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"practitioner","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["appointments:read"]},{"apiKeyAuth":["appointments:read"]}],"x-required-abilities":["appointments:read"]}},"\/api\/v1\/prescriptions":{"get":{"tags":["General"],"operationId":"apiV1IntegrationPrescriptionsIndex","summary":"Listar prescripciones: medicamento, dosis, frecuencia, duraci\u00f3n, v\u00eda e indicaciones","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `prescriptions:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["prescriptions:read"]},{"apiKeyAuth":["prescriptions:read"]}],"x-required-abilities":["prescriptions:read"],"x-phi-access":"audited"}},"\/api\/v1\/prescriptions\/{prescription}":{"get":{"tags":["General"],"operationId":"apiV1IntegrationPrescriptionsShow","summary":"Obtener una prescripci\u00f3n","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `prescriptions:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"prescription","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["prescriptions:read"]},{"apiKeyAuth":["prescriptions:read"]}],"x-required-abilities":["prescriptions:read"],"x-phi-access":"audited"}},"\/api\/v1\/recipes":{"get":{"tags":["General"],"operationId":"apiV1IntegrationRecipesIndex","summary":"Listar recetas emitidas (filtros: folio, status, patient_id)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `recipes:read`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["recipes:read"]},{"apiKeyAuth":["recipes:read"]}],"x-required-abilities":["recipes:read"],"x-phi-access":"operational"}},"\/api\/v1\/recipes\/{recipe}":{"get":{"tags":["General"],"operationId":"apiV1IntegrationRecipesShow","summary":"Obtener una receta con sus medicamentos","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `recipes:read`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"recipe","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["recipes:read"]},{"apiKeyAuth":["recipes:read"]}],"x-required-abilities":["recipes:read"],"x-phi-access":"operational"}},"\/api\/v1\/recipes\/{recipe}\/dispense":{"post":{"tags":["General"],"operationId":"apiV1IntegrationRecipesDispense","summary":"Registrar la dispensaci\u00f3n de una receta (requiere el c\u00f3digo de verificaci\u00f3n impreso)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `recipes:dispense`. Expone datos operativos m\u00ednimos del paciente; queda auditado. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"recipe","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["recipes:dispense"]},{"apiKeyAuth":["recipes:dispense"]}],"x-required-abilities":["recipes:dispense"],"x-phi-access":"operational","requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"verification_code":{"type":"string","maxLength":16}},"required":["verification_code"]}}}}}},"\/api\/v1\/settings":{"get":{"tags":["Configuraci\u00f3n"],"operationId":"apiV1SettingsIndex","summary":"Listar settings","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/Page"},{"$ref":"#\/components\/parameters\/PerPage"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]},"post":{"tags":["Configuraci\u00f3n"],"operationId":"apiV1SettingsStore","summary":"Crear settings","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["global","company","facility","service","user"],"nullable":true},"scope_id":{"type":"integer","nullable":true},"key":{"type":"string","maxLength":190},"value_json":{"type":"array","nullable":true},"value_text":{"type":"string","nullable":true},"value_type":{"type":"string","enum":["json","text","number","bool","date"],"nullable":true},"description":{"type":"string","maxLength":255,"nullable":true},"is_sensitive":{"type":"boolean","nullable":true},"is_active":{"type":"boolean","nullable":true}},"required":["key"]}}}}}},"\/api\/v1\/settings\/{systemSetting}":{"get":{"tags":["Configuraci\u00f3n"],"operationId":"apiV1SettingsShow","summary":"Obtener settings","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"systemSetting","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]},"patch":{"tags":["Configuraci\u00f3n"],"operationId":"apiV1SettingsUpdate","summary":"Actualizar settings","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"systemSetting","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"value_json":{"type":"array","nullable":true},"value_text":{"type":"string","nullable":true},"value_type":{"type":"string","enum":["json","text","number","bool","date"],"nullable":true},"description":{"type":"string","maxLength":255,"nullable":true},"is_sensitive":{"type":"boolean","nullable":true},"is_active":{"type":"boolean","nullable":true}}}}}}},"delete":{"tags":["Configuraci\u00f3n"],"operationId":"apiV1SettingsDestroy","summary":"Eliminar settings","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"name":"systemSetting","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/ClinicHeader"},{"$ref":"#\/components\/parameters\/IdempotencyKey"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/tokens":{"post":{"tags":["General"],"operationId":"apiV1TokensStore","summary":"Issue a scoped personal access token (HIPAA: restricts access to minimum necessary data).","description":"Endpoint p\u00fablico (no requiere credenciales).","responses":{"201":{"description":"Recurso creado.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"422":{"$ref":"#\/components\/responses\/ValidationError"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"device_name":{"type":"string","maxLength":255},"email":{"type":"string","format":"email"},"password":{"type":"string"},"abilities":{"type":"array","items":{"type":"string"}}},"required":["device_name"]}}}}}},"\/api\/v1\/tokens\/current":{"delete":{"tags":["General"],"operationId":"apiV1TokensDestroy","summary":"Revoke the current access token (HIPAA: supports rapid credential invalidation).","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}},"\/api\/v1\/treatments":{"get":{"tags":["General"],"operationId":"apiV1IntegrationTreatmentsIndex","summary":"Listar planes terap\u00e9uticos (filtro: patient_id)","description":"Requiere autenticaci\u00f3n: token Bearer (Sanctum) o llave `X-API-Key`. Permisos necesarios: `medical-records:read`. El acceso queda registrado en la bit\u00e1cora de auditor\u00eda. El alcance de los datos es la cl\u00ednica del token o de la llave; con token de usuario puede indicarse `X-Clinic-ID`.","parameters":[{"$ref":"#\/components\/parameters\/ClinicHeader"}],"responses":{"200":{"description":"Operaci\u00f3n exitosa.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Envelope"}}}},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/TooManyRequests"}},"security":[{"bearerAuth":["medical-records:read"]},{"apiKeyAuth":["medical-records:read"]}],"x-required-abilities":["medical-records:read"],"x-phi-access":"audited"}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Token personal (Sanctum). Se obtiene con `POST \/api\/v1\/auth\/token`; sus permisos son un subconjunto de los de su rol."},"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Llave de integraci\u00f3n (`abi_live_\u2026` producci\u00f3n, `abi_test_\u2026` sandbox) emitida en API Management; queda acotada a una cl\u00ednica."}},"parameters":{"ClinicHeader":{"name":"X-Clinic-ID","in":"header","required":false,"description":"Cl\u00ednica sobre la que opera un token de usuario con varias membres\u00edas. Ignorado con llave de API (queda fija a su cl\u00ednica).","schema":{"type":"integer"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Opcional. Un reintento con la misma clave y el mismo cuerpo devuelve la respuesta original (cabecera `Idempotent-Replayed: true`) en vez de duplicar la operaci\u00f3n. 8\u2013128 caracteres; v\u00e1lida 24 h. Misma clave con otro cuerpo \u2192 422; a\u00fan en proceso \u2192 409.","schema":{"type":"string","minLength":8,"maxLength":128}},"Page":{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},"PerPage":{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}},"headers":{"RequestId":{"description":"Identificador \u00fanico de la petici\u00f3n. C\u00edtelo al contactar soporte.","schema":{"type":"string","format":"uuid"}}},"schemas":{"Envelope":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"OK"},"data":{"description":"Carga \u00fatil del recurso."}}},"Error":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"No autenticado."},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Detalle por campo (solo 422)."},"request_id":{"type":"string","format":"uuid","description":"Igual a la cabecera X-Request-Id."}}}},"responses":{"Unauthorized":{"description":"Credenciales ausentes, inv\u00e1lidas, expiradas o revocadas.","headers":{"X-Request-Id":{"$ref":"#\/components\/headers\/RequestId"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"Forbidden":{"description":"Sin permiso: ability ausente, rol insuficiente o pol\u00edtica de PHI.","headers":{"X-Request-Id":{"$ref":"#\/components\/headers\/RequestId"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"NotFound":{"description":"Recurso inexistente o de otra cl\u00ednica (no se distingue a prop\u00f3sito).","headers":{"X-Request-Id":{"$ref":"#\/components\/headers\/RequestId"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"ValidationError":{"description":"Datos inv\u00e1lidos; `errors` indica cada campo.","headers":{"X-Request-Id":{"$ref":"#\/components\/headers\/RequestId"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"TooManyRequests":{"description":"L\u00edmite de peticiones superado; reintente tras `Retry-After`.","headers":{"X-Request-Id":{"$ref":"#\/components\/headers\/RequestId"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}}