Ir al contenido

Previsualizar una alergia o intolerancia sin guardar

POST
/alergias/preview
curl --request POST \
--url https://ponspre.medicinainteligente.ai/alergias/preview \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "paciente": { "tipo_documento": "CI", "numero_documento": "49876543", "pais_iso3166": 858, "primer_nombre": "Valentina", "segundo_nombre": null, "primer_apellido": "Olivera", "segundo_apellido": "Bentancor", "sexo": "F", "fecha_nacimiento": "1993-09-08" }, "profesional": { "numero_documento": "33445566", "primer_nombre": "Carlos", "primer_apellido": "Gómez", "matricula": "12345" }, "organizacion": { "nombre": "Consultorio Médico Punta Carretas", "rut": "210004445555" }, "sustancia": "Penicilina", "snomed_code": "373270004", "tipo": "alergia", "categoria": "medicamento", "criticidad": "alta", "confirmada": true, "reaccion": "Urticaria generalizada y edema de labios a los 30 minutos de la primera dosis", "fecha_registro": "2026-07-20T11:15:00" }'

Recibe el mismo cuerpo que POST /alergias y devuelve el Bundle de transacción FHIR que se guardaría, sin guardarlo.

Media typeapplication/json
AlergiaIn
object
paciente
required
PacienteIn
object
tipo_documento
TipoDocumento
string
default: CI
Allowed values: CI PASAPORTE CC
numero_documento
required
Numero Documento
string
pais_iso3166
Pais Iso3166

Código ISO-3166 numérico. Uruguay=858

integer
default: 858
primer_nombre
required
Primer Nombre
string
segundo_nombre
Any of:
string
primer_apellido
Any of:
string
segundo_apellido
Any of:
string
sexo
Sexo
string
default: DESCONOCIDO
Allowed values: M F OTRO DESCONOCIDO
fecha_nacimiento
Any of:
string format: date
telefono
Any of:
string
direccion
Any of:
string
ciudad
Any of:
string
departamento
Any of:
string
profesional
required
ProfesionalIn

Profesional que registra la alergia

object
numero_documento
Any of:
string
primer_nombre
required
Primer Nombre
string
/\S/
primer_apellido
required
Primer Apellido
string
/\S/
matricula
Any of:
string
organizacion
required
OrganizacionIn

Institución donde se registra

object
nombre
required
Nombre

Nombre de la institución

string
rut
Any of:
string
sustancia
required
Sustancia

Sustancia/alérgeno

string
snomed_code
Any of:
string
tipo
required
TipoAlergia

Alergia | intolerancia

string
Allowed values: alergia intolerancia
categoria
Any of:
CategoriaAlergia
string
Allowed values: medicamento alimento ambiente biologico
criticidad
Any of:
Criticidad
string
Allowed values: baja alta
confirmada
Any of:
boolean
reaccion
Any of:
string
fecha_registro
Any of:
string format: date-time

Examples

Examplecapturado

Pedido real

{
"paciente": {
"tipo_documento": "CI",
"numero_documento": "49876543",
"pais_iso3166": 858,
"primer_nombre": "Valentina",
"segundo_nombre": null,
"primer_apellido": "Olivera",
"segundo_apellido": "Bentancor",
"sexo": "F",
"fecha_nacimiento": "1993-09-08"
},
"profesional": {
"numero_documento": "33445566",
"primer_nombre": "Carlos",
"primer_apellido": "Gómez",
"matricula": "12345"
},
"organizacion": {
"nombre": "Consultorio Médico Punta Carretas",
"rut": "210004445555"
},
"sustancia": "Penicilina",
"snomed_code": "373270004",
"tipo": "alergia",
"categoria": "medicamento",
"criticidad": "alta",
"confirmada": true,
"reaccion": "Urticaria generalizada y edema de labios a los 30 minutos de la primera dosis",
"fecha_registro": "2026-07-20T11:15:00"
}

Éxito

Media typeapplication/json

Examples

Examplecapturado

Respuesta real

{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "urn:uuid:00000000-0000-4000-9000-000000000114",
"resource": {
"resourceType": "Patient",
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.858.1.858.68909",
"value": "49876543"
}
],
"name": [
{
"use": "official",
"given": [
"Valentina"
],
"family": "Olivera Bentancor"
}
],
"gender": "female",
"birthDate": "1993-09-08"
},
"request": {
"method": "POST",
"url": "Patient",
"ifNoneExist": "identifier=urn:oid:2.16.858.1.858.68909|49876543&_tag:not=urn:pons:hcen|paciente-institucion"
}
},
{
"fullUrl": "urn:uuid:00000000-0000-4000-9000-000000000115",
"resource": {
"resourceType": "Practitioner",
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.858.1.858.68909",
"value": "33445566"
},
{
"use": "official",
"system": "urn:uy:matricula-profesional",
"value": "12345"
}
],
"name": [
{
"use": "official",
"given": [
"Carlos"
],
"family": "Gómez"
}
]
},
"request": {
"method": "POST",
"url": "Practitioner",
"ifNoneExist": "identifier=urn:oid:2.16.858.1.858.68909|33445566"
}
},
{
"fullUrl": "urn:uuid:00000000-0000-4000-9000-000000000116",
"resource": {
"resourceType": "Organization",
"name": "Consultorio Médico Punta Carretas",
"type": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/organization-type",
"code": "prov",
"display": "Healthcare Provider"
}
]
}
],
"identifier": [
{
"system": "urn:uy:rut",
"value": "210004445555"
}
]
},
"request": {
"method": "POST",
"url": "Organization",
"ifNoneExist": "identifier=urn:uy:rut|210004445555"
}
},
{
"fullUrl": "urn:uuid:00000000-0000-4000-9000-000000000117",
"resource": {
"resourceType": "AllergyIntolerance",
"clinicalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
"code": "active"
}
]
},
"type": "allergy",
"code": {
"text": "Penicilina",
"coding": [
{
"system": "http://snomed.info/sct",
"code": "373270004"
}
]
},
"patient": {
"reference": "urn:uuid:00000000-0000-4000-9000-000000000114"
},
"recorder": {
"reference": "urn:uuid:00000000-0000-4000-9000-000000000115"
},
"verificationStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
"code": "confirmed"
}
]
},
"category": [
"medication"
],
"criticality": "high",
"reaction": [
{
"manifestation": [
{
"text": "Urticaria generalizada y edema de labios a los 30 minutos de la primera dosis"
}
]
}
],
"recordedDate": "2026-07-20T11:15:00-03:00"
},
"request": {
"method": "POST",
"url": "AllergyIntolerance"
}
}
]
}

Falta la API key, no es válida o fue revocada.

Media typeapplication/json

Examples

Examplecapturado

Respuesta real

{
"detail": "Falta la API key, no es válida o fue revocada (header X-API-Key o Authorization: Bearer)"
}

La key no tiene el alcance que pide esta operación.

Media typeapplication/json

Examples

Examplecapturado

Respuesta real

{
"detail": "La API key no tiene el alcance 'entrada'"
}

Error de validación

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}