Ir al contenido

Previsualizar una vacuna aplicada sin guardar

POST
/vacunas/preview
curl --request POST \
--url https://ponspre.medicinainteligente.ai/vacunas/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": "42667788", "primer_nombre": "Lucía", "primer_apellido": "Rodríguez", "matricula": "4567" }, "organizacion": { "nombre": "Vacunatorio CHPR", "rut": "210009991111" }, "vacuna": "Vacuna antigripal tetravalente", "snomed_code": null, "fecha_aplicacion": "2026-07-20T09:40:00", "dosis_numero": 1, "lote": "AG26-0715" }'

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

Media typeapplication/json
VacunaIn
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

Vacunador

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 o vacunatorio

object
nombre
required
Nombre

Nombre de la institución

string
rut
Any of:
string
vacuna
required
Vacuna

Nombre de la vacuna

string
snomed_code
Any of:
string
fecha_aplicacion
required
Fecha Aplicacion

Momento de aplicación (ISO 8601)

string format: date-time
dosis_numero
Any of:
integer
>= 1
lote
Any of:
string

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": "42667788",
"primer_nombre": "Lucía",
"primer_apellido": "Rodríguez",
"matricula": "4567"
},
"organizacion": {
"nombre": "Vacunatorio CHPR",
"rut": "210009991111"
},
"vacuna": "Vacuna antigripal tetravalente",
"snomed_code": null,
"fecha_aplicacion": "2026-07-20T09:40:00",
"dosis_numero": 1,
"lote": "AG26-0715"
}

Éxito

Media typeapplication/json

Examples

Examplecapturado

Respuesta real

{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "urn:uuid:00000000-0000-4000-9000-000000000118",
"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-000000000119",
"resource": {
"resourceType": "Practitioner",
"identifier": [
{
"use": "official",
"system": "urn:oid:2.16.858.1.858.68909",
"value": "42667788"
},
{
"use": "official",
"system": "urn:uy:matricula-profesional",
"value": "4567"
}
],
"name": [
{
"use": "official",
"given": [
"Lucía"
],
"family": "Rodríguez"
}
]
},
"request": {
"method": "POST",
"url": "Practitioner",
"ifNoneExist": "identifier=urn:oid:2.16.858.1.858.68909|42667788"
}
},
{
"fullUrl": "urn:uuid:00000000-0000-4000-9000-000000000120",
"resource": {
"resourceType": "Organization",
"name": "Vacunatorio CHPR",
"type": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/organization-type",
"code": "prov",
"display": "Healthcare Provider"
}
]
}
],
"identifier": [
{
"system": "urn:uy:rut",
"value": "210009991111"
}
]
},
"request": {
"method": "POST",
"url": "Organization",
"ifNoneExist": "identifier=urn:uy:rut|210009991111"
}
},
{
"fullUrl": "urn:uuid:00000000-0000-4000-9000-000000000121",
"resource": {
"resourceType": "Immunization",
"status": "completed",
"vaccineCode": {
"text": "Vacuna antigripal tetravalente"
},
"patient": {
"reference": "urn:uuid:00000000-0000-4000-9000-000000000118"
},
"occurrenceDateTime": "2026-07-20T09:40:00-03:00",
"performer": [
{
"actor": {
"reference": "urn:uuid:00000000-0000-4000-9000-000000000119"
}
}
],
"lotNumber": "AG26-0715",
"protocolApplied": [
{
"doseNumberPositiveInt": 1
}
]
},
"request": {
"method": "POST",
"url": "Immunization"
}
}
]
}

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"
}
]
}