Previsualizar una vacuna aplicada sin guardar
POST
/vacunas/preview
const url = 'https://ponspre.medicinainteligente.ai/vacunas/preview';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"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"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
VacunaIn
object
paciente
required
PacienteIn
object
tipo_documento
TipoDocumento
string
numero_documento
required
Numero Documento
string
pais_iso3166
Pais Iso3166
Código ISO-3166 numérico. Uruguay=858
integer
primer_nombre
required
Primer Nombre
string
sexo
Sexo
string
profesional
required
organizacion
required
vacuna
required
Vacuna
Nombre de la vacuna
string
fecha_aplicacion
required
Fecha Aplicacion
Momento de aplicación (ISO 8601)
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": "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"}Responses
Sección titulada «Responses»É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>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}