API de PONS
PONS recibe crear paciente, crear documento, consultar y recuperar en las transacciones que el sistema de la institución ya usa y responde cada una en su propio formato: XDS (ITI-8, ITI-41, ITI-18, ITI-43) o FHIR (ITI-104, ITI-65, ITI-67, ITI-68). Para cada operación y cada interfaz, esta página muestra el endpoint, un pedido y una respuesta reales y los errores.
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. Se puede repetir.
- Pedido y Respuesta: un pedido y una respuesta reales, con datos de prueba. Los cuerpos largos se recortan; el ejemplo completo está en la referencia.
Los bloques usan la key pública de prueba de PRE, pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrw: en XDS, como contraseña de HTTP Basic con el usuario
demo-publico (-u); en FHIR, en X-API-Key. Es pública: 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).
El detalle de cada interfaz está en Interfaz XDS e Interfaz FHIR. Para enviar el CDA por HTTP sin SOAP: CDA por HTTP.
Crear paciente
Sección titulada «Crear paciente»Crear paciente · XDS · ITI-8
Sección titulada «Crear paciente · XDS · ITI-8»Endpoint: POST /xds/pix · Content-Type: text/xml; charset=UTF-8 · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/iti8.xml"curl -s -X POST "$PONS/xds/pix" \ -u "demo-publico:$PONS_KEY" \ -H 'Content-Type: text/xml; charset=UTF-8' \ --data-binary @iti8.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> <!--Optional:--> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.3> <HD.1>MSP_1</HD.1> </MSH.3> <MSH.4> <HD.1>MSP_1</HD.1> </MSH.4> <MSH.5> <HD.1>MSP_1</HD.1> </MSH.5> <MSH.6> <HD.1>MSP_1</HD.1> </MSH.6> <MSH.7> <TS.1>201909131218</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.99999994.72768.1.67430.20190913121833.642549</MSH.10> <MSH.11> <PT.1>P</PT.1> </MSH.11> <MSH.12> <VID.1>2.5</VID.1> </MSH.12> </MSH> <EVN>… (74 líneas más en la referencia)Respuesta · 200
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:Pixack_content xmlns:ns2="urn:hl7-org:v2xml"> <MSH> <MSH.1/> <MSH.2/> <MSH.3> <HD.1>MSP_1</HD.1> <HD.2/> <HD.3/> </MSH.3> <MSH.4> <HD.1>MSP_1</HD.1> <HD.2/> <HD.3/> </MSH.4> <MSH.5> <HD.1>MSP_1</HD.1> <HD.2/> <HD.3/> </MSH.5> <MSH.6> <HD.1>MSP_1</HD.1> <HD.2/> <HD.3/> </MSH.6> <MSH.7> <TS.1>20261020130000</TS.1> <TS.2/> </MSH.7> <MSH.8/> <MSH.9> <MSG.1>ACK</MSG.1> <MSG.2>A04</MSG.2> <MSG.3>ACK</MSG.3> </MSH.9> <MSH.10>1883209</MSH.10> <MSH.11> <PT.1>P</PT.1>… (54 líneas más en la referencia)Errores
| Código | Cuándo |
|---|---|
HTTP 401 |
Falta la credencial o no es válida (Basic con el id de la institución y la key, o X-API-Key). |
SOAP Fault |
La transacción no es de este endpoint, el pedido es demasiado grande o la key no tiene el alcance. |
AE 204 |
El MRN es de otro dominio. |
AE 205 |
La cédula ya está registrada con otro MRN de la institución. |
AE 207 |
El alta de la institución no permite publicar, el servicio no está disponible o un error inesperado (“Ocurrió un error”). |
AR 100–103 |
El sobre o el mensaje no se pueden leer, o PID.3 no trae el MRN con el OID del dominio. |
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:Pixack_content xmlns:ns2="urn:hl7-org:v2xml"> <MSH> <MSH.1/> <MSH.2/> <MSH.3> <HD.1>MSP_1</HD.1> <HD.2/> <HD.3/> </MSH.3> <MSH.4> <HD.1>MSP_1</HD.1> <HD.2/> <HD.3/> </MSH.4> <MSH.5> <HD.1>MSP_1</HD.1> <HD.2/> <HD.3/> </MSH.5> <MSH.6> <HD.1>MSP_1</HD.1> <HD.2/> <HD.3/> </MSH.6> <MSH.7> <TS.1>20261020130000</TS.1> <TS.2/> </MSH.7> <MSH.8/> <MSH.9> <MSG.1>ACK</MSG.1> <MSG.2>A04</MSG.2> <MSG.3>ACK</MSG.3> </MSH.9> <MSH.10>1883209</MSH.10> <MSH.11> <PT.1>P</PT.1>… (105 líneas más en la referencia)Crear paciente · FHIR · ITI-104
Sección titulada «Crear paciente · FHIR · ITI-104»Endpoint: PUT /fhir/Patient?identifier=urn:oid:2.16.858.2.99999999.72768.1|HC-000123 · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/paciente-fhir.json"curl -s -X PUT "$PONS/fhir/Patient?identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000032" \ -H "X-API-Key: $PONS_KEY" \ -H "Content-Type: application/fhir+json" \ --data-binary @paciente-fhir.jsonPedido
{ "resourceType": "Patient", "meta": { "profile": [ "http://fhir.hcen.gub.uy/StructureDefinition/hcen-patient" ] }, "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-000123" }, { "use": "official", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "NI", "display": "National unique individual identifier" } ] }, "system": "urn:oid:2.16.858.2.10000675.68909", "value": "70000011" } ], "name": [ { "use": "official",… (9 líneas más en la referencia)Respuesta · 201
{ "resourceType": "Patient", "id": "1021", "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: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-000123" }, { "use": "official", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "NI", "display": "National unique individual identifier" }… (18 líneas más en la referencia)Errores
| Status | Cuándo |
|---|---|
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio. |
| 409 | Un documento ya es de otro paciente de la institución, u otro alta del mismo MRN está en curso (Retry-After). |
| 412 | Coincide más de un paciente. |
| 422 | El Patient no cumple lo que exige la HCEN. |
{ "resourceType": "OperationOutcome", "issue": [ { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line", "valueInteger": 1 }, { "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col", "valueInteger": 632 }, { "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id", "valueString": "Validation_VAL_Profile_Minimum_SLICE" } ], "severity": "error", "code": "processing", "details": { "coding": [ { "system": "http://hl7.org/fhir/java-core-messageId", "code": "Validation_VAL_Profile_Minimum_SLICE" } ] }, "diagnostics": "Slice 'Patient.identifier:mrn': a matching slice is required, but not found (from http://fhir.hcen.gub.uy/StructureDefinition/hcen-patient|0.1.0). Note that other slices are allowed in addition to this required slice", "location": [ "Patient", "Line[1] Col[632]" ], "expression": [ "Patient" ] } ]}Crear documento
Sección titulada «Crear documento»Crear documento · XDS · ITI-41
Sección titulada «Crear documento · XDS · ITI-41»Endpoint: POST /xds/repository · Content-Type: multipart/related; type="application/xop+xml"; boundary="MIMEBoundary_pons_ejemplo"; start="<raiz@ejemplo>"; start-info="text/xml" · wsa:Action urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b (opcional) · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/iti41.mtom"curl -s -X POST "$PONS/xds/repository" \ -u "demo-publico:$PONS_KEY" \ -H 'Content-Type: multipart/related; type="application/xop+xml"; boundary="MIMEBoundary_pons_ejemplo"; start="<raiz@ejemplo>"; start-info="text/xml"' \ --data-binary @iti41.mtomPedido
--MIMEBoundary_pons_ejemploContent-Type: application/xop+xml; charset=UTF-8; type="text/xml"Content-Transfer-Encoding: 8bitContent-ID: <raiz@ejemplo>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing"><soap:Header><wsa:Action soap:mustUnderstand="true">urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b</wsa:Action></soap:Header><soap:Body><xdsb:ProvideAndRegisterDocumentSetRequest xmlns:xdsb="urn:ihe:iti:xds-b:2007"><lcm:SubmitObjectsRequest xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"> <rim:RegistryObjectList> <rim:ExtrinsicObject home="urn:oid:2.16.858.2.10000675.73183.1" id="1.2.16.858.2.99999999.67430.20261020100000.3" 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>HC-70000033^^^&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.10000005.71867.1</rim:Value></rim:ValueList></rim:Slot> <rim:Slot name="sourcePatientInfo"><rim:ValueList> <rim:Value>PID-3|HC-70000033^^^&2.16.858.2.99999999.72768.1&ISO~70000033^^^&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> </rim:ValueList></rim:Slot> <rim:Slot name="CPOE"><rim:ValueList><rim:Value>El CPOE</rim:Value></rim:ValueList></rim:Slot> <rim:Slot name="OIDApplication"><rim:ValueList><rim:Value>2.16.858.2.99999999.1.1</rim:Value></rim:ValueList></rim:Slot> <rim:Name><rim:LocalizedString value="Consulta no urgente"/></rim:Name> <rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000007" classifiedObject="1.2.16.858.2.99999999.67430.20261020100000.3" id="cl01" nodeRepresentation=""> <rim:Slot name="authorPerson"><rim:ValueList><rim:Value>41112224^Silva^Laura^^^&2.16.858.2.10000675.68909&ISO</rim:Value></rim:ValueList></rim:Slot> <rim:Slot name="authorInstitution"><rim:ValueList><rim:Value>Policlínica Ejemplo^^^^^^^^^2.16.858.0.999999.99999</rim:Value></rim:ValueList></rim:Slot> </rim:Classification> <rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000008" classifiedObject="1.2.16.858.2.99999999.67430.20261020100000.3" id="cl02" nodeRepresentation="34108-1"> <rim:Slot name="codingScheme"><rim:ValueList><rim:Value>2.16.840.1.113883.6.1</rim:Value></rim:ValueList></rim:Slot> <rim:Name><rim:LocalizedString value="hoja de consulta no urgente"/></rim:Name> </rim:Classification> <rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000009" classifiedObject="1.2.16.858.2.99999999.67430.20261020100000.3" id="cl03" nodeRepresentation="N"> <rim:Slot name="codingScheme"><rim:ValueList><rim:Value>2.16.840.1.113883.5.25</rim:Value></rim:ValueList></rim:Slot> </rim:Classification> <rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000012" classifiedObject="1.2.16.858.2.99999999.67430.20261020100000.3" id="cl04" nodeRepresentation="6821000179104"> <rim:Slot name="codingScheme"><rim:ValueList><rim:Value>2.16.840.1.113883.6.96</rim:Value></rim:ValueList></rim:Slot> </rim:Classification> <rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000011" classifiedObject="1.2.16.858.2.99999999.67430.20261020100000.3" id="cl05" nodeRepresentation="4101000179107"> <rim:Slot name="codingScheme"><rim:ValueList><rim:Value>2.16.840.1.113883.6.96</rim:Value></rim:ValueList></rim:Slot> </rim:Classification>… (166 líneas más en la referencia)Respuesta · 200
--uuid:00000000-0000-4000-9000-000000000143Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"Content-Transfer-Encoding: binaryContent-ID: <raiz@pons>
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><xdsb:RegistryResponse xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:xdsb="urn:ihe:iti:xds-b:2007"><rs:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success" requestId=""><rs:ResponseSlotList/><rs:RegistryErrorList highestSeverity=""/></rs:RegistryResponse></xdsb:RegistryResponse></soap:Body></soap:Envelope>--uuid:00000000-0000-4000-9000-000000000143--Errores
| Código | Cuándo |
|---|---|
HTTP 401 |
Falta la credencial o no es válida (Basic con el id de la institución y la key, o X-API-Key). |
SOAP Fault |
El sobre no se puede leer, la transacción no es de este endpoint o la key no tiene el alcance. |
XDSUnknownPatientId |
El patientId no tiene la forma CX o es de otro dominio. |
XDSPatientIdDoesNotMatch |
El patientId, sourcePatientInfo o el MRN del CDA no coinciden, el documento es de otro paciente o el envío trae más de un paciente. |
XDSRepositoryMetadataError |
Falta el patientId del SubmissionSet, lo que identifica al documento no coincide con el CDA (uniqueId, hash, size) o el CDA no se puede leer. |
XDSRegistryMetadataError |
Al CDA le falta un dato que exige la HCEN. |
XDSDuplicateUniqueIdInRegistry |
Ese uniqueId ya se registró con otro contenido. |
XDSRepositoryDuplicateUniqueIdInMessage |
El mismo uniqueId dos veces en el envío. |
Warning |
Un código o una fecha del metadato no coincide con el CDA: se publica igual y vale el CDA. |
XDSMissingDocument |
El Document no está o el xop:Include apunta a una parte que no existe. |
XDSRepositoryError |
Asociación no soportada o alta de la institución incompleta. Con varios documentos, si uno falla no se guarda ninguno. |
106 |
Error inesperado (“Ocurrió un error”). |
XDSRepositoryBusy |
Servicio no disponible; reintentar. |
--uuid:00000000-0000-4000-9000-000000000149Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"Content-Transfer-Encoding: binaryContent-ID: <raiz@pons>
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><xdsb:RegistryResponse xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:xdsb="urn:ihe:iti:xds-b:2007"><rs:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure" requestId=""><rs:ResponseSlotList><rim:Slot name="" slotType=""><rim:ValueList><rim:Value/></rim:ValueList></rim:Slot></rs:ResponseSlotList><rs:RegistryErrorList highestSeverity="oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"><rs:RegistryError 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" errorCode="XDSUnknownPatientId" location="DocumentContentNew" severity="oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/></rs:RegistryErrorList></rs:RegistryResponse></xdsb:RegistryResponse></soap:Body></soap:Envelope>--uuid:00000000-0000-4000-9000-000000000149--Crear documento · FHIR · ITI-65
Sección titulada «Crear documento · FHIR · ITI-65»Endpoint: POST /fhir · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/documento-fhir.json"N=$(date +%s)sed "s/20261019103000\.[12]/&.$N/g" documento-fhir.json > documento-fhir-$N.jsoncurl -s -X POST "$PONS/fhir" \ -H "X-API-Key: $PONS_KEY" \ -H "Content-Type: application/fhir+json" \ --data-binary @documento-fhir-$N.jsonPedido
{ "resourceType": "Bundle", "meta": { "profile": [ "http://fhir.hcen.gub.uy/StructureDefinition/hcen-provide-document-bundle" ] }, "type": "transaction", "entry": [ { "fullUrl": "urn:uuid:00000000-0000-4000-8000-000000000001", "resource": { "resourceType": "List", "meta": { "profile": [ "http://fhir.hcen.gub.uy/StructureDefinition/hcen-submission-set" ] }, "extension": [ { "url": "http://fhir.hcen.gub.uy/StructureDefinition/ext-home-community-id", "valueOid": "urn:oid:2.16.858.2.99999999" }, { "url": "https://profiles.ihe.net/ITI/MHD/StructureDefinition/ihe-designationType", "valueCodeableConcept": { "coding": [ { "system": "http://loinc.org", "code": "34108-1" } ] } }, { "url": "https://profiles.ihe.net/ITI/MHD/StructureDefinition/ihe-sourceId", "valueIdentifier": { "system": "urn:ietf:rfc:3986", "value": "urn:oid:2.16.858.2.99999999" }… (696 líneas más en la referencia)Respuesta · 200
{ "resourceType": "Bundle", "type": "transaction-response", "entry": [ { "fullUrl": "urn:uuid:00000000-0000-4000-8000-000000000001", "response": { "status": "201 Created", "location": "List/1023/_history/1" } }, { "fullUrl": "urn:uuid:00000000-0000-4000-8000-000000000002", "response": { "status": "201 Created", "location": "DocumentReference/1024/_history/1" } }, { "fullUrl": "urn:uuid:00000000-0000-4000-8000-000000000003", "response": { "status": "201 Created", "location": "Bundle/hcen-00000000-0000-4000-9000-000000000023/_history/1" } }, { "fullUrl": "urn:uuid:00000000-0000-4000-8000-000000000004", "response": { "status": "200 OK", "location": "Patient/1021" } }, { "fullUrl": "urn:uuid:00000000-0000-4000-8000-000000000005", "response": { "status": "200 OK", "location": "Organization/1025/_history/1" } }, {… (22 líneas más en la referencia)Errores
| Status | Cuándo |
|---|---|
| 401 | Falta la clave de API o no es válida. |
| 409 | El documento ya estaba publicado. |
| 422 | El envío no cumple lo que exige la HCEN. |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "duplicate", "diagnostics": "el documento urn:oid:2.16.858.2.99999999.67430.20261019103000.1 ya está publicado (HCEN-PUB-004): no se registra dos veces", "expression": [ "DocumentReference.masterIdentifier" ] } ]}Consultar documentos
Sección titulada «Consultar documentos»Consultar documentos · XDS · ITI-18
Sección titulada «Consultar documentos · XDS · ITI-18»Endpoint: POST /xds/registry · Content-Type: text/xml; charset=UTF-8 · wsa:Action urn:ihe:iti:2007:RegistryStoredQuery (opcional) · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/iti18.xml"curl -s -X POST "$PONS/xds/registry" \ -u "demo-publico:$PONS_KEY" \ -H 'Content-Type: text/xml; charset=UTF-8' \ --data-binary @iti18.xmlPedido
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns4:RegistryStoredQuery xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:ns4="urn:ihe:iti:xds-b:2007"> <ns3:AdhocQueryRequest comment="" federated="false" federation="" id="1" maxResults="0" startIndex="0"> <ns2:RequestSlotList> <Slot name="authorPerson" slotType=""> <ValueList> <Value>4777771^FERNANDEZ^ANA^^^&2.16.858.2.10000675.68909&ISO</Value> </ValueList> </Slot> <Slot name="CPOE" slotType=""> <ValueList> <Value>1</Value> </ValueList> </Slot> <Slot name="OIDApplication" slotType=""> <ValueList> <Value>2.16.858.2.99999993.72768.361</Value> </ValueList> </Slot> <Slot name="breakTheGlass" slotType=""> <ValueList> <Value>0</Value> </ValueList> </Slot> <Slot name="observation" slotType=""> <ValueList> <Value>Portal auto-gestión</Value> </ValueList> </Slot> </ns2:RequestSlotList> <ns3:ResponseOption returnComposedObjects="true" returnType="LeafClass"/> <AdhocQuery home="urn:uuid:00000000-0000-4000-9000-000000000144" id="urn:uuid:00000000-0000-4000-9000-000000000144" lid="" objectType="" status=""> <Slot name="$XDSDocumentEntryPatientId" slotType=""> <ValueList> <Value>70000033^^^&2.16.858.2.10000675.68909&ISO</Value> </ValueList> </Slot> <Slot name="$XDSDocumentEntryStatus" slotType=""> <ValueList>… (18 líneas más en la referencia)Respuesta · 200
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <xdsb:RegistryStoredQueryResponse xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:xdsb="urn:ihe:iti:xds-b:2007"> <query:AdhocQueryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success" requestId="" startIndex="0" totalResultCount="1"> <rs:RegistryErrorList highestSeverity=""/> <rim:RegistryObjectList> <rim:ExtrinsicObject home="" id="1.2.16.858.2.99999999.67430.20261020100000.3" isOpaque="false" lid="" mimeType="text/xml" objectType="urn:uuid:00000000-0000-4000-9000-000000000006" status="urn:oasis:names:tc:ebxml-regrep:StatusType:Approved"> <rim:Slot name="repositoryUniqueId" slotType=""> <rim:ValueList> <rim:Value>2.16.858.2.99999999.71867.1</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="creationTime" slotType=""> <rim:ValueList> <rim:Value>20261020133000</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="hash" slotType=""> <rim:ValueList> <rim:Value>EqK4VmMgR1U/FtZJUsZXdoj51rC=</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="languageCode" slotType=""> <rim:ValueList> <rim:Value>es-UY</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="serviceStartTime" slotType=""> <rim:ValueList> <rim:Value>20261020130000</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="serviceStopTime" slotType=""> <rim:ValueList> <rim:Value>20261020133000</rim:Value> </rim:ValueList> </rim:Slot> <rim:Slot name="size" slotType=""> <rim:ValueList>… (92 líneas más en la referencia)Errores
| Código | Cuándo |
|---|---|
HTTP 401 |
Falta la credencial o no es válida (Basic con el id de la institución y la key, o X-API-Key). |
SOAP Fault |
El sobre no se puede leer, la transacción no es de este endpoint o la key no tiene el alcance. |
XDSUnknownPatientId |
El paciente no tiene la forma CX (cédula o MRN) o el MRN es de otro dominio. |
XDSUnknownStoredQuery |
La stored query no es FindDocuments ni GetDocuments. |
XDSStoredQueryMissingParam |
Falta $XDSDocumentEntryPatientId o $XDSDocumentEntryStatus. |
XDSStoredQueryParamNumber |
Más de un paciente. |
XDSTooManyResults |
Más de 500 documentos. |
Warning |
Un filtro que PONS ignora (el resultado no lo aplica). |
XDSRegistryError |
Una lista de códigos demasiado larga para un filtro: partir la consulta. |
106 |
Error inesperado (“Ocurrió un error”). |
XDSRegistryBusy |
Servicio no disponible; reintentar. |
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <xdsb:RegistryStoredQueryResponse xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:xdsb="urn:ihe:iti:xds-b:2007"> <query:AdhocQueryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure" requestId="" startIndex="0" totalResultCount="0"> <rs:RegistryErrorList highestSeverity=""> <rs:RegistryError codeContext="stored query urn:uuid:00000000-0000-4000-9000-000000000150 no soportada: FindDocuments (urn:uuid:00000000-0000-4000-9000-000000000144) o GetDocuments (urn:uuid:00000000-0000-4000-9000-000000000151)" errorCode="XDSUnknownStoredQuery" location="PONS.RegistryStoredQuery_ITI18" severity="oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/> </rs:RegistryErrorList> <rim:RegistryObjectList/> </query:AdhocQueryResponse> </xdsb:RegistryStoredQueryResponse> </soap:Body></soap:Envelope>Consultar documentos · FHIR · ITI-67
Sección titulada «Consultar documentos · FHIR · ITI-67»Endpoint: GET /fhir/DocumentReference?patient.identifier=urn:oid:2.16.858.2.99999999.72768.1|HC-000123&patient.identifier=urn:oid:2.16.858.2.10000675.68909|70000011 · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -s "$PONS/fhir/DocumentReference?patient.identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000032&patient.identifier=urn:oid:2.16.858.2.10000675.68909|70000032" \ -H "X-API-Key: $PONS_KEY"Pedido
GET /fhir/DocumentReference?patient.identifier=urn:oid:2.16.858.2.99999999.72768.1|HC-000123&patient.identifier=urn:oid:2.16.858.2.10000675.68909|70000011Respuesta · 200
{ "resourceType": "Bundle", "id": "00000000-0000-4000-9000-000000000024", "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%2F1021&status=current" } ], "entry": [ { "fullUrl": "https://ponspre.medicinainteligente.ai/fhir/DocumentReference/1024", "resource": { "resourceType": "DocumentReference", "id": "1024", "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.99999999" }, { "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 documento de la persona junto al MRN. |
| 401 | Falta la clave de API o no es válida. |
| 403 | El MRN es de otro dominio. |
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "diagnostics": "el MRN es del dominio urn:oid:2.16.858.2.99999998.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" ] } ]}Recuperar documento
Sección titulada «Recuperar documento»Recuperar documento · XDS · ITI-43
Sección titulada «Recuperar documento · XDS · ITI-43»Endpoint: POST /xds/repository · Content-Type: text/xml; charset=UTF-8 · wsa:Action urn:ihe:iti:2007:RetrieveDocumentSet (opcional) · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwcurl -sO "$PONS/desarrolladores/ejemplos/iti43.xml"curl -s -X POST "$PONS/xds/repository" \ -u "demo-publico:$PONS_KEY" \ -H 'Content-Type: text/xml; charset=UTF-8' \ --data-binary @iti43.xmlPedido
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ihe:iti:xds-b:2007" xmlns:urn1="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"> <soapenv:Header/> <soapenv:Body> <urn:RetrieveDocumentSetRequest> <!--Zero or more repetitions:--> <Slot name="CPOE" slotType="0" xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"> <ValueList> <Value>20777</Value> </ValueList> </Slot> <Slot name="authorPerson" slotType="0" xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"> <ValueList> <Value>1111111^SISTEMA.^PRUEBA^PRUEBA^^&2.16.858.2.10000675.68909&ISO</Value> </ValueList> </Slot> <Slot name="id" slotType="0" xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"> <ValueList> <Value>00000000-0000-4000-9000-000000000146</Value> </ValueList> </Slot> <Slot name="OIDApplication" slotType="0" xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"> <ValueList> <Value>2.16.858.2.99999996.2.16.858.2.99999996.72771.8.1</Value> </ValueList> </Slot> <!--Zero or more repetitions:--> <DocumentRequest xmlns="urn:ihe:iti:xds-b:2007"> <HomeCommunityId>2.16.858.2.10000675.73183.1</HomeCommunityId> <RepositoryUniqueId>2.16.858.2.99999999.71867.1</RepositoryUniqueId> <DocumentUniqueId>2.16.858.2.99999999.67430.20261020100000.3</DocumentUniqueId>… (4 líneas más en la referencia)Respuesta · 200
--uuid:00000000-0000-4000-9000-000000000147Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"Content-Transfer-Encoding: binaryContent-ID: <raiz@pons>
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><xdsb:RetrieveDocumentSetResponse xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:xdsb="urn:ihe:iti:xds-b:2007"><rs:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success" requestId=""><rs:ResponseSlotList/><rs:RegistryErrorList highestSeverity=""/></rs:RegistryResponse><xdsb:DocumentResponse><xdsb:HomeCommunityId>2.16.858.2.10000675.73183.1</xdsb:HomeCommunityId><xdsb:RepositoryUniqueId>2.16.858.2.99999999.71867.1</xdsb:RepositoryUniqueId><xdsb:DocumentUniqueId>2.16.858.2.99999999.67430.20261020100000.3</xdsb:DocumentUniqueId><xdsb:mimeType>text/xml</xdsb:mimeType><xdsb:Document><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:00000000-0000-4000-9000-000000000148@pons"/></xdsb:Document></xdsb:DocumentResponse></xdsb:RetrieveDocumentSetResponse></soap:Body></soap:Envelope>--uuid:00000000-0000-4000-9000-000000000147Content-Type: text/xmlContent-Transfer-Encoding: binaryContent-ID: <00000000-0000-4000-9000-000000000148@pons>
<?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.3"/> <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="70000033" 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>… (105 líneas más en la referencia)Errores
| Código | Cuándo |
|---|---|
HTTP 401 |
Falta la credencial o no es válida (Basic con el id de la institución y la key, o X-API-Key). |
SOAP Fault |
El sobre no se puede leer, la transacción no es de este endpoint o la key no tiene el alcance. |
R10 |
La institución no publicó ese documento: No existe documento (<uid>). |
XDSUnknownRepositoryId |
El RepositoryUniqueId no es el de la institución. |
XDSUnknownCommunity |
El HomeCommunityId no es el de Uruguay. |
PartialSuccess |
Unos documentos salen y otros no; cada falla, con su código. |
106 |
Error inesperado (“Ocurrió un error”). |
XDSRepositoryBusy |
Servicio no disponible; reintentar. |
--uuid:00000000-0000-4000-9000-000000000152Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"Content-Transfer-Encoding: binaryContent-ID: <raiz@pons>
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><xdsb:RetrieveDocumentSetResponse xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:xdsb="urn:ihe:iti:xds-b:2007"><rs:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure" requestId=""><rs:RegistryErrorList highestSeverity="oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"><rs:RegistryError codeContext="No existe documento (2.16.858.2.99999999.67430.20261020100000.3.9)." errorCode="R10" location="DocumentGet" severity="oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/></rs:RegistryErrorList></rs:RegistryResponse></xdsb:RetrieveDocumentSetResponse></soap:Body></soap:Envelope>--uuid:00000000-0000-4000-9000-000000000152--Recuperar documento · FHIR · ITI-68
Sección titulada «Recuperar documento · FHIR · ITI-68»Endpoint: GET /fhir/Bundle/hcen-00000000-0000-4000-9000-000000000023 · referencia
curl
PONS=https://ponspre.medicinainteligente.aiPONS_KEY=pons_84910691_i209g8gy38sF8ge68g7qLCUqmsxD-g_tzr0yAJWilrwURL=$(curl -s "$PONS/fhir/DocumentReference?patient.identifier=urn:oid:2.16.858.2.99999997.72768.1|HC-70000032&patient.identifier=urn:oid:2.16.858.2.10000675.68909|70000032" -H "X-API-Key: $PONS_KEY" | jq -r '.entry[0].resource.content[0].attachment.url')curl -s "$URL" \ -H "X-API-Key: $PONS_KEY"Pedido
GET /fhir/Bundle/hcen-00000000-0000-4000-9000-000000000023Respuesta · 200
{ "resourceType": "Bundle", "id": "hcen-00000000-0000-4000-9000-000000000023", "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.20261019103000.1" }, "type": "document", "timestamp": "2026-10-20T10:00:00.000-03:00", "entry": [ { "fullUrl": "urn:uuid:00000000-0000-4000-8000-000000000100", "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.20261019103000.1" }, "status": "final",… (317 líneas más en la referencia)Errores
| Status | Cuándo |
|---|---|
| 401 | Falta la clave de API o no es válida. |
| 404 | No es un documento publicado por la institución. |