CDA por HTTP
Además de XDS y FHIR, PONS recibe el CDA por HTTP, sin SOAP, y responde en el formato que pide el
header Accept (JSON, FHIR o XML; en recuperar, también el CDA y el PDF). Para cada operación y cada
formato de respuesta, esta página muestra el endpoint, un pedido y una respuesta reales y los
errores posibles.
Cada panel trae tres pestañas:
- curl: el pedido completo contra PRE, listo para pegar en una terminal (bash o zsh). Descarga
el archivo de ejemplo, envía el pedido y muestra la respuesta real. Se puede repetir: el alta del
mismo paciente responde 200 (actualizado), el mismo CDA responde 200 con el resultado original y
el documento FHIR cambia sus identificadores en cada ejecución (
date +%s). Recuperar documento toma el id de la consulta conjq. - Pedido y Respuesta: un pedido y una respuesta reales de PRE, con datos de prueba. Los cuerpos largos se recortan; el ejemplo completo está en la referencia de cada operación.
Los bloques curl usan la key pública de prueba de PRE, pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrw. Es pública: cualquiera la puede
usar, ve sólo los datos que se crean con ella y en producción responde 401. Para integrar se pide
una key propia (Primeros pasos). Los archivos de ejemplo
están en /desarrolladores/ejemplos/.
El detalle de la interfaz está en Interfaz CDA. Las operaciones en XDS y en FHIR están en API de PONS.
Crear paciente
Sección titulada «Crear paciente»Crear paciente · CDA por HTTP · respuesta JSON
Sección titulada «Crear paciente · CDA por HTTP · respuesta JSON»Endpoint: POST /hcen/cda/pacientes · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/alta-paciente.xml"curl -s -X POST "$PONS/hcen/cda/pacientes" \ -H "X-API-Key: $PONS_KEY" \ -H "Content-Type: application/xml" \ --data-binary @alta-paciente.xmlPedido
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:hl7-org:v2xml"> <soapenv:Header/> <soapenv:Body> <urn:HL7Msg> <!--Optional:--> <ADT_A01> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.3> <HD.1>FNR</HD.1> </MSH.3> <MSH.4> <HD.1>SALUDUY-TEST-UNO-FACILITY</HD.1> </MSH.4> <MSH.5> <HD.1>FNR</HD.1> </MSH.5> <MSH.6> <HD.1>FNR</HD.1> </MSH.6> <MSH.7> <TS.1>201712061512</TS.1> </MSH.7> <MSH.9> <MSG.1>ADT</MSG.1> <MSG.2>A01</MSG.2> <MSG.3>ADT_A04</MSG.3> </MSH.9> <MSH.10>2.16.858.2.10002007.72768.1.67430.20171206151253.435207</MSH.10> <MSH.11> <PT.1>P</PT.1> </MSH.11> <MSH.12> <VID.1>2.5</VID.1> <VID.2/> <VID.3/> </MSH.12> <MSH.19/> <MSH.21/>… (150 líneas más en la referencia)Respuesta · 201
{ "estado": "creado", "paciente": "Patient/1009", "mrn": "urn:oid:2.16.858.2.99999999.72768.1|HC-70000013", "documentos": [ "urn:oid:2.16.858.2.10000675.68909|70000013" ]}Errores
| Status | Cuándo |
|---|---|
| 400 | El mensaje no se puede leer, o PID.3 no trae el MRN con el OID del dominio. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio, o el alta de la institución no permite publicar. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 409 | La cédula ya está registrada con otro MRN de la institución. Con Retry-After: otro alta del mismo MRN está en curso. |
| 415 | Content-Type distinto de application/xml o text/xml. |
| 422 | Los datos del paciente no cumplen lo que exige la HCEN. |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "structure", "diagnostics": "PID.3 no trae el MRN: una repetición con CX.1 = el MRN y CX.4/HD.2 = el OID del dominio (2.16.858.2.<IdInstitución>.72768.<n>)" } ]}Crear paciente · CDA por HTTP · respuesta FHIR
Sección titulada «Crear paciente · CDA por HTTP · respuesta FHIR»Endpoint: POST /hcen/cda/pacientes · Accept: application/fhir+json · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/alta-paciente.xml"curl -s -X POST "$PONS/hcen/cda/pacientes" \ -H "X-API-Key: $PONS_KEY" \ -H "Content-Type: application/xml" \ -H "Accept: application/fhir+json" \ --data-binary @alta-paciente.xmlPedido
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:hl7-org:v2xml"> <soapenv:Header/> <soapenv:Body> <urn:HL7Msg> <!--Optional:--> <ADT_A01> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.3> <HD.1>FNR</HD.1> </MSH.3> <MSH.4> <HD.1>SALUDUY-TEST-UNO-FACILITY</HD.1> </MSH.4> <MSH.5> <HD.1>FNR</HD.1> </MSH.5> <MSH.6> <HD.1>FNR</HD.1> </MSH.6> <MSH.7> <TS.1>201712061512</TS.1> </MSH.7> <MSH.9> <MSG.1>ADT</MSG.1> <MSG.2>A01</MSG.2> <MSG.3>ADT_A04</MSG.3> </MSH.9> <MSH.10>2.16.858.2.10002007.72768.1.67430.20171206151253.435207</MSH.10> <MSH.11> <PT.1>P</PT.1> </MSH.11> <MSH.12> <VID.1>2.5</VID.1> <VID.2/> <VID.3/> </MSH.12> <MSH.19/> <MSH.21/>… (150 líneas más en la referencia)Respuesta · 201
{ "resourceType": "Patient", "id": "1010", "meta": { "versionId": "1", "lastUpdated": "2026-10-20T10:00:00.000-03:00", "profile": [ "http://fhir.hcen.gub.uy/StructureDefinition/hcen-patient" ], "tag": [ { "system": "urn:pons:cliente", "code": "portal-demo" }, { "system": "urn:pons:hcen", "code": "paciente-institucion" } ] }, "identifier": [ { "use": "usual", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR", "display": "Medical record number" } ] }, "system": "urn:oid:2.16.858.2.99999999.72768.1", "value": "HC-70000013" }, { "use": "official", "type": { "coding": [ {… (33 líneas más en la referencia)Errores
| Status | Cuándo |
|---|---|
| 400 | El mensaje no se puede leer, o PID.3 no trae el MRN con el OID del dominio. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio, o el alta de la institución no permite publicar. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 409 | La cédula ya está registrada con otro MRN de la institución. Con Retry-After: otro alta del mismo MRN está en curso. |
| 415 | Content-Type distinto de application/xml o text/xml. |
| 422 | Los datos del paciente no cumplen lo que exige la HCEN. |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "structure", "diagnostics": "PID.3 no trae el MRN: una repetición con CX.1 = el MRN y CX.4/HD.2 = el OID del dominio (2.16.858.2.<IdInstitución>.72768.<n>)" } ]}Crear paciente · CDA por HTTP · respuesta XML
Sección titulada «Crear paciente · CDA por HTTP · respuesta XML»Endpoint: POST /hcen/cda/pacientes · Accept: application/xml · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/alta-paciente.xml"curl -s -X POST "$PONS/hcen/cda/pacientes" \ -H "X-API-Key: $PONS_KEY" \ -H "Content-Type: application/xml" \ -H "Accept: application/xml" \ --data-binary @alta-paciente.xmlPedido
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:hl7-org:v2xml"> <soapenv:Header/> <soapenv:Body> <urn:HL7Msg> <!--Optional:--> <ADT_A01> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.3> <HD.1>FNR</HD.1> </MSH.3> <MSH.4> <HD.1>SALUDUY-TEST-UNO-FACILITY</HD.1> </MSH.4> <MSH.5> <HD.1>FNR</HD.1> </MSH.5> <MSH.6> <HD.1>FNR</HD.1> </MSH.6> <MSH.7> <TS.1>201712061512</TS.1> </MSH.7> <MSH.9> <MSG.1>ADT</MSG.1> <MSG.2>A01</MSG.2> <MSG.3>ADT_A04</MSG.3> </MSH.9> <MSH.10>2.16.858.2.10002007.72768.1.67430.20171206151253.435207</MSH.10> <MSH.11> <PT.1>P</PT.1> </MSH.11> <MSH.12> <VID.1>2.5</VID.1> <VID.2/> <VID.3/> </MSH.12> <MSH.19/> <MSH.21/>… (150 líneas más en la referencia)Respuesta · 201
<?xml version='1.0' encoding='UTF-8'?><ACK xmlns="urn:hl7-org:v2xml"> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.3> <HD.1>PONS</HD.1> </MSH.3> <MSH.5> <HD.1>FNR</HD.1> </MSH.5> <MSH.6> <HD.1>SALUDUY-TEST-UNO-FACILITY</HD.1> </MSH.6> <MSH.7> <TS.1>20261020130000</TS.1> </MSH.7> <MSH.9> <MSG.1>ACK</MSG.1> <MSG.2>A01</MSG.2> <MSG.3>ACK</MSG.3> </MSH.9> <MSH.10>00000000-0000-4000-9000-000000000002</MSH.10> <MSH.11> <PT.1>P</PT.1> </MSH.11> <MSH.12> <VID.1>2.5</VID.1> </MSH.12> </MSH> <MSA> <MSA.1>AA</MSA.1> <MSA.2>2.16.858.2.10002007.72768.1.67430.20171206151253.435207</MSA.2> </MSA></ACK>Errores
| Status | Cuándo |
|---|---|
| 400 | El mensaje no se puede leer, o PID.3 no trae el MRN con el OID del dominio. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio, o el alta de la institución no permite publicar. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 409 | La cédula ya está registrada con otro MRN de la institución. Con Retry-After: otro alta del mismo MRN está en curso. |
| 415 | Content-Type distinto de application/xml o text/xml. |
| 422 | Los datos del paciente no cumplen lo que exige la HCEN. |
<?xml version='1.0' encoding='UTF-8'?><ACK xmlns="urn:hl7-org:v2xml"> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.3> <HD.1>PONS</HD.1> </MSH.3> <MSH.5> <HD.1>FNR</HD.1> </MSH.5> <MSH.6> <HD.1>SALUDUY-TEST-UNO-FACILITY</HD.1> </MSH.6> <MSH.7> <TS.1>20261020130000</TS.1> </MSH.7> <MSH.9> <MSG.1>ACK</MSG.1> <MSG.2>A01</MSG.2> <MSG.3>ACK</MSG.3> </MSH.9> <MSH.10>00000000-0000-4000-9000-000000000003</MSH.10> <MSH.11> <PT.1>P</PT.1> </MSH.11> <MSH.12> <VID.1>2.5</VID.1> </MSH.12> </MSH> <MSA> <MSA.1>AR</MSA.1> <MSA.2>2.16.858.2.10002007.72768.1.67430.20171206151253.435207</MSA.2> </MSA> <ERR> <ERR.3> <CWE.1>101</CWE.1> <CWE.3>HL70357</CWE.3> </ERR.3> <ERR.4>E</ERR.4>… (3 líneas más en la referencia)Crear documento
Sección titulada «Crear documento»Crear documento · CDA por HTTP · respuesta JSON
Sección titulada «Crear documento · CDA por HTTP · respuesta JSON»Endpoint: POST /hcen/cda · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/documento-cda.xml"curl -s -X POST "$PONS/hcen/cda" \ -H "X-API-Key: $PONS_KEY" \ -H "Content-Type: application/xml" \ -H "X-HCEN-Patient-Id: HC-70000031^^^&2.16.858.2.99999997.72768.1&ISO" \ --data-binary @documento-cda.xmlPedido
<?xml version='1.0' encoding='UTF-8'?><ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <typeId extension="POCD_HD000040" root="2.16.840.1.113883.1.3"/> <templateId root="2.16.858.2.10000675.72591.1.101.1"/> <id root="2.16.858.2.99999999.67430.20261020100000.1"/> <code code="34108-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="hoja de consulta no urgente"/> <title>Consulta no urgente</title> <effectiveTime value="20261020103000-0300"/> <confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/> <languageCode code="es-UY"/> <recordTarget> <patientRole> <id extension="70000012" root="2.16.858.1.858.68909"/> <patient> <name> <given>Martina</given> <family>Sosa</family> </name> <administrativeGenderCode code="2" codeSystem="2.16.858.2.10000675.69600" displayName="Femenino"/> <birthTime value="19790211"/> </patient> </patientRole> </recordTarget> <author> <time value="20261020100000-0300"/> <assignedAuthor> <id extension="41112224" root="2.16.858.1.858.68909"/> <assignedPerson> <name> <given>Laura</given> <family>Silva</family> </name> </assignedPerson> <representedOrganization> <id root="2.16.858.0.999999.99999"/> <name>Policlínica Ejemplo</name> </representedOrganization> </assignedAuthor> </author> <author>… (91 líneas más en la referencia)Respuesta · 201
{ "estado": "aceptado", "documento": { "id": "urn:oid:2.16.858.2.99999999.67430.20261020100000.1", "tipo": "consulta_no_urgente", "eje1": "34108-1", "nivel_detectado": 3, "nivel_procesado": 3, "firmado": false, "firma": null }, "fhir": { "document_reference": "DocumentReference/1001", "recursos": [ "Binary/1002", "Condition/1003", "DocumentReference/1001", "Encounter/1004", "Organization/1005", "Patient/1006", "Practitioner/1007" ] }, "advertencias": [], "hcen": { "publicado": true, "document_reference": "DocumentReference/1008", "documento": "Bundle/hcen-00000000-0000-4000-9000-000000000001", "mrn": "urn:oid:2.16.858.2.99999999.72768.1|70000012" }}Errores
| Status | Cuándo |
|---|---|
| 400 | X-HCEN-Patient-Id mal formado. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio, o el alta de la institución no permite publicar. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 409 | El MRN del header y el del CDA no coinciden, o el documento es de otro paciente. |
| 413 | El documento supera el tamaño máximo. |
| 415 | Content-Type distinto de application/xml o application/cda+xml. |
| 422 | El CDA no se puede leer, o le falta un dato para publicarlo en la HCEN. |
| 503 | Publicación demorada o servidor no disponible; se reintenta (Retry-After). |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "business-rule", "diagnostics": "el id del CDA no tiene la forma de la guía (2.16.858.2.<IdInstitución>.67430.<AAAAMMDDHHmmss de 14 dígitos>.<extras>, sin extension): 2.16.858.2.99999999.67430.261020100000.1. La guía exige que el CDA y el documento FHIR compartan el OID" } ]}Crear documento · CDA por HTTP · respuesta FHIR
Sección titulada «Crear documento · CDA por HTTP · respuesta FHIR»Endpoint: POST /hcen/cda · Accept: application/fhir+json · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/documento-cda.xml"curl -s -X POST "$PONS/hcen/cda" \ -H "X-API-Key: $PONS_KEY" \ -H "Content-Type: application/xml" \ -H "X-HCEN-Patient-Id: HC-70000031^^^&2.16.858.2.99999997.72768.1&ISO" \ -H "Accept: application/fhir+json" \ --data-binary @documento-cda.xmlPedido
<?xml version='1.0' encoding='UTF-8'?><ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <typeId extension="POCD_HD000040" root="2.16.840.1.113883.1.3"/> <templateId root="2.16.858.2.10000675.72591.1.101.1"/> <id root="2.16.858.2.99999999.67430.20261020100000.1"/> <code code="34108-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="hoja de consulta no urgente"/> <title>Consulta no urgente</title> <effectiveTime value="20261020103000-0300"/> <confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/> <languageCode code="es-UY"/> <recordTarget> <patientRole> <id extension="70000012" root="2.16.858.1.858.68909"/> <patient> <name> <given>Martina</given> <family>Sosa</family> </name> <administrativeGenderCode code="2" codeSystem="2.16.858.2.10000675.69600" displayName="Femenino"/> <birthTime value="19790211"/> </patient> </patientRole> </recordTarget> <author> <time value="20261020100000-0300"/> <assignedAuthor> <id extension="41112224" root="2.16.858.1.858.68909"/> <assignedPerson> <name> <given>Laura</given> <family>Silva</family> </name> </assignedPerson> <representedOrganization> <id root="2.16.858.0.999999.99999"/> <name>Policlínica Ejemplo</name> </representedOrganization> </assignedAuthor> </author> <author>… (91 líneas más en la referencia)Respuesta · 201
{ "resourceType": "DocumentReference", "id": "1012", "meta": { "versionId": "1", "lastUpdated": "2026-10-20T10:00:00.000-03:00", "profile": [ "http://fhir.hcen.gub.uy/StructureDefinition/hcen-document-reference" ], "tag": [ { "system": "urn:pons:cliente", "code": "portal-demo" } ] }, "extension": [ { "url": "http://fhir.hcen.gub.uy/StructureDefinition/ext-home-community-id", "valueOid": "urn:oid:2.16.858.2.10000675.73183.1" }, { "url": "http://fhir.hcen.gub.uy/StructureDefinition/ext-repository-id", "valueIdentifier": { "system": "urn:ietf:rfc:3986", "value": "urn:oid:2.16.858.2.99999999.71867.1" } } ], "masterIdentifier": { "use": "usual", "system": "urn:ietf:rfc:3986", "value": "urn:oid:2.16.858.2.99999999.67430.20261020100000.1" }, "identifier": [ { "use": "official", "system": "urn:ietf:rfc:3986", "value": "urn:uuid:1.2.16.858.2.99999999.67430.20261020100000.1" }… (94 líneas más en la referencia)Errores
| Status | Cuándo |
|---|---|
| 400 | X-HCEN-Patient-Id mal formado. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio, o el alta de la institución no permite publicar. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 409 | El MRN del header y el del CDA no coinciden, o el documento es de otro paciente. |
| 413 | El documento supera el tamaño máximo. |
| 415 | Content-Type distinto de application/xml o application/cda+xml. |
| 422 | El CDA no se puede leer, o le falta un dato para publicarlo en la HCEN. |
| 503 | Publicación demorada o servidor no disponible; se reintenta (Retry-After). |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "business-rule", "diagnostics": "el id del CDA no tiene la forma de la guía (2.16.858.2.<IdInstitución>.67430.<AAAAMMDDHHmmss de 14 dígitos>.<extras>, sin extension): 2.16.858.2.99999999.67430.261020100000.1. La guía exige que el CDA y el documento FHIR compartan el OID" } ]}Crear documento · CDA por HTTP · respuesta XML
Sección titulada «Crear documento · CDA por HTTP · respuesta XML»Endpoint: POST /hcen/cda · Accept: application/xml · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/documento-cda.xml"curl -s -X POST "$PONS/hcen/cda" \ -H "X-API-Key: $PONS_KEY" \ -H "Content-Type: application/xml" \ -H "X-HCEN-Patient-Id: HC-70000031^^^&2.16.858.2.99999997.72768.1&ISO" \ -H "Accept: application/xml" \ --data-binary @documento-cda.xmlPedido
<?xml version='1.0' encoding='UTF-8'?><ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <typeId extension="POCD_HD000040" root="2.16.840.1.113883.1.3"/> <templateId root="2.16.858.2.10000675.72591.1.101.1"/> <id root="2.16.858.2.99999999.67430.20261020100000.1"/> <code code="34108-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="hoja de consulta no urgente"/> <title>Consulta no urgente</title> <effectiveTime value="20261020103000-0300"/> <confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/> <languageCode code="es-UY"/> <recordTarget> <patientRole> <id extension="70000012" root="2.16.858.1.858.68909"/> <patient> <name> <given>Martina</given> <family>Sosa</family> </name> <administrativeGenderCode code="2" codeSystem="2.16.858.2.10000675.69600" displayName="Femenino"/> <birthTime value="19790211"/> </patient> </patientRole> </recordTarget> <author> <time value="20261020100000-0300"/> <assignedAuthor> <id extension="41112224" root="2.16.858.1.858.68909"/> <assignedPerson> <name> <given>Laura</given> <family>Silva</family> </name> </assignedPerson> <representedOrganization> <id root="2.16.858.0.999999.99999"/> <name>Policlínica Ejemplo</name> </representedOrganization> </assignedAuthor> </author> <author>… (91 líneas más en la referencia)Respuesta · 201
<?xml version='1.0' encoding='UTF-8'?><rs:RegistryResponse xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success"/>Errores
| Status | Cuándo |
|---|---|
| 400 | X-HCEN-Patient-Id mal formado. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio, o el alta de la institución no permite publicar. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 409 | El MRN del header y el del CDA no coinciden, o el documento es de otro paciente. |
| 413 | El documento supera el tamaño máximo. |
| 415 | Content-Type distinto de application/xml o application/cda+xml. |
| 422 | El CDA no se puede leer, o le falta un dato para publicarlo en la HCEN. |
| 503 | Publicación demorada o servidor no disponible; se reintenta (Retry-After). |
<?xml version='1.0' encoding='UTF-8'?><rs:RegistryResponse xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure"> <rs:RegistryErrorList highestSeverity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"> <rs:RegistryError errorCode="XDSRegistryMetadataError" codeContext="el id del CDA no tiene la forma de la guía (2.16.858.2.<IdInstitución>.67430.<AAAAMMDDHHmmss de 14 dígitos>.<extras>, sin extension): 2.16.858.2.99999999.67430.261020100000.1. La guía exige que el CDA y el documento FHIR compartan el OID" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/> </rs:RegistryErrorList></rs:RegistryResponse>Consultar documentos
Sección titulada «Consultar documentos»Consultar documentos · CDA por HTTP · respuesta JSON
Sección titulada «Consultar documentos · CDA por HTTP · respuesta JSON»Endpoint: GET /hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999999.72768.1|70000012 · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -s "$PONS/hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000031" \ -H "X-API-Key: $PONS_KEY"Pedido
GET /hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999999.72768.1|70000012Respuesta · 200
{ "total": 1, "siguiente": null, "documentos": [ { "id": "2.16.858.2.99999999.67430.20261020100000.1", "fecha": "2026-10-20T10:30:00-03:00", "tipo": "hoja de consulta no urgente centralizada - policlínica", "titulo": "Consulta no urgente", "institucion": "Policlínica Ejemplo", "estado": "vigente", "url": "https://ponspre.medicinainteligente.ai/hcen/cda/2.16.858.2.99999999.67430.20261020100000.1" } ]}Errores
| Status | Cuándo |
|---|---|
| 400 | Falta el MRN, o no es un MRN. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 409 | Dos pacientes de la institución tienen el mismo MRN. |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "diagnostics": "el MRN es del dominio urn:oid:2.16.858.2.11111111.72768.1 y la institución registra con urn:oid:2.16.858.2.99999999.72768.1: sólo se aceptan los MRN de la institución", "expression": [ "Patient.identifier" ] } ]}Consultar documentos · CDA por HTTP · respuesta FHIR
Sección titulada «Consultar documentos · CDA por HTTP · respuesta FHIR»Endpoint: GET /hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999999.72768.1|70000012 · Accept: application/fhir+json · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -s "$PONS/hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000031" \ -H "X-API-Key: $PONS_KEY" \ -H "Accept: application/fhir+json"Pedido
GET /hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999999.72768.1|70000012Accept: application/fhir+jsonRespuesta · 200
{ "resourceType": "Bundle", "id": "00000000-0000-4000-9000-000000000005", "meta": { "lastUpdated": "2026-10-20T10:00:00.000-03:00" }, "type": "searchset", "total": 1, "link": [ { "relation": "self", "url": "https://ponspre.medicinainteligente.ai/fhir/DocumentReference?_count=25&_tag=urn%3Apons%3Acliente%7Cportal-demo&patient=Patient%2F1018&status=current" } ], "entry": [ { "fullUrl": "https://ponspre.medicinainteligente.ai/fhir/DocumentReference/1008", "resource": { "resourceType": "DocumentReference", "id": "1008", "meta": { "versionId": "1", "lastUpdated": "2026-10-20T10:00:00.000-03:00", "profile": [ "http://fhir.hcen.gub.uy/StructureDefinition/hcen-document-reference" ], "tag": [ { "system": "urn:pons:cliente", "code": "portal-demo" } ] }, "extension": [ { "url": "http://fhir.hcen.gub.uy/StructureDefinition/ext-home-community-id", "valueOid": "urn:oid:2.16.858.2.10000675.73183.1" }, { "url": "http://fhir.hcen.gub.uy/StructureDefinition/ext-repository-id",… (117 líneas más en la referencia)Errores
| Status | Cuándo |
|---|---|
| 400 | Falta el MRN, o no es un MRN. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 409 | Dos pacientes de la institución tienen el mismo MRN. |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "diagnostics": "el MRN es del dominio urn:oid:2.16.858.2.11111111.72768.1 y la institución registra con urn:oid:2.16.858.2.99999999.72768.1: sólo se aceptan los MRN de la institución", "expression": [ "Patient.identifier" ] } ]}Consultar documentos · CDA por HTTP · respuesta XML
Sección titulada «Consultar documentos · CDA por HTTP · respuesta XML»Endpoint: GET /hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999999.72768.1|70000012 · Accept: application/xml · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -s "$PONS/hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000031" \ -H "X-API-Key: $PONS_KEY" \ -H "Accept: application/xml"Pedido
GET /hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999999.72768.1|70000012Accept: application/xmlRespuesta · 200
<?xml version='1.0' encoding='UTF-8'?><query:AdhocQueryResponse xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success" startIndex="0" totalResultCount="1"> <rim:RegistryObjectList> <rim:ExtrinsicObject id="1.2.16.858.2.99999999.67430.20261020100000.1" home="urn:oid:2.16.858.2.10000675.73183.1" mimeType="text/xml" objectType="urn:uuid:00000000-0000-4000-9000-000000000006" status="urn:oasis:names:tc:ebxml-regrep:StatusType:Approved"> <rim:Slot name="creationTime"> <rim:ValueList> <rim:Value>20261020133000</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="languageCode"> <rim:ValueList> <rim:Value>es-UY</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="serviceStartTime"> <rim:ValueList> <rim:Value>20261020130000</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="serviceStopTime"> <rim:ValueList> <rim:Value>20261020133000</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="sourcePatientId"> <rim:ValueList> <rim:Value>70000012^^^&2.16.858.2.99999999.72768.1&ISO</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="repositoryUniqueId"> <rim:ValueList> <rim:Value>2.16.858.2.99999999.71867.1</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="sourcePatientInfo"> <rim:ValueList> <rim:Value>PID-3|70000012^^^&2.16.858.2.99999999.72768.1&ISO~70000012^^^&2.16.858.2.10000675.68909&ISO</rim:Value> <rim:Value>PID-5|Sosa^Martina^^^</rim:Value> <rim:Value>PID-7|19790211</rim:Value> <rim:Value>PID-8|2</rim:Value>… (74 líneas más en la referencia)Errores
| Status | Cuándo |
|---|---|
| 400 | Falta el MRN, o no es un MRN. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 409 | Dos pacientes de la institución tienen el mismo MRN. |
<?xml version='1.0' encoding='UTF-8'?><query:AdhocQueryResponse xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure"> <rs:RegistryErrorList highestSeverity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"> <rs:RegistryError errorCode="XDSUnknownPatientId" codeContext="el MRN es del dominio urn:oid:2.16.858.2.11111111.72768.1 y la institución registra con urn:oid:2.16.858.2.99999999.72768.1: sólo se aceptan los MRN de la institución" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error" location="Patient.identifier"/> </rs:RegistryErrorList></query:AdhocQueryResponse>Recuperar documento
Sección titulada «Recuperar documento»Recuperar documento · CDA por HTTP · respuesta CDA
Sección titulada «Recuperar documento · CDA por HTTP · respuesta CDA»Endpoint: GET /hcen/cda/2.16.858.2.99999999.67430.20261020100000.1 · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwOID=$(curl -s "$PONS/hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000031" -H "X-API-Key: $PONS_KEY" | jq -r '.documentos[0].id')curl -s "$PONS/hcen/cda/$OID" \ -H "X-API-Key: $PONS_KEY"Pedido
GET /hcen/cda/2.16.858.2.99999999.67430.20261020100000.1Respuesta · 200
<?xml version='1.0' encoding='UTF-8'?><ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <typeId extension="POCD_HD000040" root="2.16.840.1.113883.1.3"/> <templateId root="2.16.858.2.10000675.72591.1.101.1"/> <id root="2.16.858.2.99999999.67430.20261020100000.1"/> <code code="34108-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="hoja de consulta no urgente"/> <title>Consulta no urgente</title> <effectiveTime value="20261020103000-0300"/> <confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/> <languageCode code="es-UY"/> <recordTarget> <patientRole> <id extension="70000012" root="2.16.858.1.858.68909"/> <patient> <name> <given>Martina</given> <family>Sosa</family> </name> <administrativeGenderCode code="2" codeSystem="2.16.858.2.10000675.69600" displayName="Femenino"/> <birthTime value="19790211"/> </patient> </patientRole> </recordTarget> <author> <time value="20261020100000-0300"/> <assignedAuthor> <id extension="41112224" root="2.16.858.1.858.68909"/> <assignedPerson> <name> <given>Laura</given> <family>Silva</family> </name> </assignedPerson> <representedOrganization> <id root="2.16.858.0.999999.99999"/> <name>Policlínica Ejemplo</name> </representedOrganization> </assignedAuthor> </author> <author>… (91 líneas más en la referencia)Errores
| Status | Cuándo |
|---|---|
| 400 | El id no es un OID. |
| 401 | Falta la clave de API o no es válida. |
| 404 | No es un documento publicado por la institución. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 503 | No se pudo generar el PDF; se reintenta (Retry-After). |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-found", "diagnostics": "la institución no publicó el documento 2.16.858.2.99999999.67430.20261020100000.9" } ]}Recuperar documento · CDA por HTTP · respuesta JSON
Sección titulada «Recuperar documento · CDA por HTTP · respuesta JSON»Endpoint: GET /hcen/cda/2.16.858.2.99999999.67430.20261020100000.1 · Accept: application/json · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwOID=$(curl -s "$PONS/hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000031" -H "X-API-Key: $PONS_KEY" | jq -r '.documentos[0].id')curl -s "$PONS/hcen/cda/$OID" \ -H "X-API-Key: $PONS_KEY" \ -H "Accept: application/json"Pedido
GET /hcen/cda/2.16.858.2.99999999.67430.20261020100000.1Accept: application/jsonRespuesta · 200
{ "id": "2.16.858.2.99999999.67430.20261020100000.1", "fecha": "2026-10-20T10:30:00-03:00", "tipo": "hoja de consulta no urgente centralizada - policlínica", "titulo": "Consulta no urgente", "institucion": "Policlínica Ejemplo", "estado": "vigente", "url": "https://ponspre.medicinainteligente.ai/hcen/cda/2.16.858.2.99999999.67430.20261020100000.1", "documento_fhir": "https://ponspre.medicinainteligente.ai/fhir/Bundle/hcen-00000000-0000-4000-9000-000000000001"}Errores
| Status | Cuándo |
|---|---|
| 400 | El id no es un OID. |
| 401 | Falta la clave de API o no es válida. |
| 404 | No es un documento publicado por la institución. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 503 | No se pudo generar el PDF; se reintenta (Retry-After). |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-found", "diagnostics": "la institución no publicó el documento 2.16.858.2.99999999.67430.20261020100000.9" } ]}Recuperar documento · CDA por HTTP · respuesta FHIR
Sección titulada «Recuperar documento · CDA por HTTP · respuesta FHIR»Endpoint: GET /hcen/cda/2.16.858.2.99999999.67430.20261020100000.1 · Accept: application/fhir+json · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwOID=$(curl -s "$PONS/hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000031" -H "X-API-Key: $PONS_KEY" | jq -r '.documentos[0].id')curl -s "$PONS/hcen/cda/$OID" \ -H "X-API-Key: $PONS_KEY" \ -H "Accept: application/fhir+json"Pedido
GET /hcen/cda/2.16.858.2.99999999.67430.20261020100000.1Accept: application/fhir+jsonRespuesta · 200
{ "resourceType": "Bundle", "id": "hcen-00000000-0000-4000-9000-000000000001", "meta": { "versionId": "1", "lastUpdated": "2026-10-20T10:00:00.000-03:00", "profile": [ "http://fhir.hcen.gub.uy/StructureDefinition/hcen-consulta-no-urgente-bundle" ], "tag": [ { "system": "urn:pons:cliente", "code": "portal-demo" } ] }, "identifier": { "use": "usual", "system": "urn:ietf:rfc:3986", "value": "urn:oid:2.16.858.2.99999999.67430.20261020100000.1" }, "type": "document", "timestamp": "2026-10-20T10:00:00.000-03:00", "entry": [ { "fullUrl": "urn:uuid:00000000-0000-4000-9000-000000000015", "resource": { "resourceType": "Composition", "meta": { "profile": [ "http://fhir.hcen.gub.uy/StructureDefinition/uy-consulta-no-urgente" ] }, "language": "es-UY", "identifier": { "use": "usual", "system": "urn:ietf:rfc:3986", "value": "urn:oid:2.16.858.2.99999999.67430.20261020100000.1" }, "status": "final",… (321 líneas más en la referencia)Errores
| Status | Cuándo |
|---|---|
| 400 | El id no es un OID. |
| 401 | Falta la clave de API o no es válida. |
| 404 | No es un documento publicado por la institución. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 503 | No se pudo generar el PDF; se reintenta (Retry-After). |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-found", "diagnostics": "la institución no publicó el documento 2.16.858.2.99999999.67430.20261020100000.9" } ]}Recuperar documento · CDA por HTTP · respuesta PDF
Sección titulada «Recuperar documento · CDA por HTTP · respuesta PDF»Endpoint: GET /hcen/cda/2.16.858.2.99999999.67430.20261020100000.1 · Accept: application/pdf · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwOID=$(curl -s "$PONS/hcen/cda/documentos?patient.identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000031" -H "X-API-Key: $PONS_KEY" | jq -r '.documentos[0].id')curl -s "$PONS/hcen/cda/$OID" \ -H "X-API-Key: $PONS_KEY" \ -H "Accept: application/pdf" \ -o documento.pdfPedido
GET /hcen/cda/2.16.858.2.99999999.67430.20261020100000.1Accept: application/pdfRespuesta · 200
application/pdf, 14000 bytes (binario)Errores
| Status | Cuándo |
|---|---|
| 400 | El id no es un OID. |
| 401 | Falta la clave de API o no es válida. |
| 404 | No es un documento publicado por la institución. |
| 406 | Accept no pide ningún formato que la operación responda. |
| 503 | No se pudo generar el PDF; se reintenta (Retry-After). |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-found", "diagnostics": "la institución no publicó el documento 2.16.858.2.99999999.67430.20261020100000.9" } ]}