ITI-18: consultar documentos
POST
/xds/registry
const url = 'https://ponspre.medicinainteligente.ai/xds/registry';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'text/xml'}, body: '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\n <soap:Body>\n <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">\n <ns3:AdhocQueryRequest comment="" federated="false" federation="" id="1" maxResults="0" startIndex="0">\n <ns2:RequestSlotList>\n <Slot name="authorPerson" slotType="">\n <ValueList>\n <Value>4777771^FERNANDEZ^ANA^^^&2.16.858.2.10000675.68909&ISO</Value>\n </ValueList>\n </Slot>\n <Slot name="CPOE" slotType="">\n <ValueList>\n <Value>1</Value>\n </ValueList>\n </Slot>\n <Slot name="OIDApplication" slotType="">\n <ValueList>\n <Value>2.16.858.2.99999993.72768.361</Value>\n </ValueList>\n </Slot>\n <Slot name="breakTheGlass" slotType="">\n <ValueList>\n <Value>0</Value>\n </ValueList>\n </Slot>\n <Slot name="observation" slotType="">\n <ValueList>\n <Value>Portal auto-gestión</Value>\n </ValueList>\n </Slot>\n </ns2:RequestSlotList>\n <ns3:ResponseOption returnComposedObjects="true" returnType="LeafClass"/>\n <AdhocQuery home="urn:uuid:00000000-0000-4000-9000-000000000144" id="urn:uuid:00000000-0000-4000-9000-000000000144" lid="" objectType="" status="">\n <Slot name="$XDSDocumentEntryPatientId" slotType="">\n <ValueList>\n <Value>70000033^^^&2.16.858.2.10000675.68909&ISO</Value>\n </ValueList>\n </Slot>\n <Slot name="$XDSDocumentEntryStatus" slotType="">\n <ValueList>\n <Value>urn:oasis:names:tc:ebxml-regrep:StatusType:Approved</Value>\n </ValueList>\n </Slot>\n <Slot name="$XDSDocumentEntryServiceStartTimeFrom" slotType="0">\n <ValueList>\n <Value>20250617000000</Value>\n </ValueList>\n </Slot>\n <Slot name="$XDSDocumentEntryServiceStartTimeTo" slotType="0">\n <ValueList>\n <Value>20271231235900</Value>\n </ValueList>\n </Slot>\n </AdhocQuery>\n </ns3:AdhocQueryRequest>\n </ns4:RegistryStoredQuery>\n </soap:Body>\n</soap:Envelope>'};
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/xds/registry \ --header 'Content-Type: text/xml' \ --header 'X-API-Key: <X-API-Key>' \ --data '<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> <Value>urn:oasis:names:tc:ebxml-regrep:StatusType:Approved</Value> </ValueList> </Slot> <Slot name="$XDSDocumentEntryServiceStartTimeFrom" slotType="0"> <ValueList> <Value>20250617000000</Value> </ValueList> </Slot> <Slot name="$XDSDocumentEntryServiceStartTimeTo" slotType="0"> <ValueList> <Value>20271231235900</Value> </ValueList> </Slot> </AdhocQuery> </ns3:AdhocQueryRequest> </ns4:RegistryStoredQuery> </soap:Body></soap:Envelope>'Registry Stored Query (AdhocQueryRequest, suelto o dentro de RegistryStoredQuery): FindDocuments por el MRN ($XDSDocumentEntryPatientId) y $XDSDocumentEntryStatus, con los filtros de fechas y códigos, y GetDocuments por uniqueId. Responde AdhocQueryResponse con un ExtrinsicObject por documento.
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typetext/xml
string
Examples
Pedido real
<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> <Value>urn:oasis:names:tc:ebxml-regrep:StatusType:Approved</Value> </ValueList> </Slot> <Slot name="$XDSDocumentEntryServiceStartTimeFrom" slotType="0"> <ValueList> <Value>20250617000000</Value> </ValueList> </Slot> <Slot name="$XDSDocumentEntryServiceStartTimeTo" slotType="0"> <ValueList> <Value>20271231235900</Value> </ValueList> </Slot> </AdhocQuery> </ns3:AdhocQueryRequest> </ns4:RegistryStoredQuery> </soap:Body></soap:Envelope>ITI-18 con una stored query no soportada: `Failure`, `XDSUnknownStoredQuery`
<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-000000000150" id="urn:uuid:00000000-0000-4000-9000-000000000150" 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> <Value>urn:oasis:names:tc:ebxml-regrep:StatusType:Approved</Value> </ValueList> </Slot> <Slot name="$XDSDocumentEntryServiceStartTimeFrom" slotType="0"> <ValueList> <Value>20250617000000</Value> </ValueList> </Slot> <Slot name="$XDSDocumentEntryServiceStartTimeTo" slotType="0"> <ValueList> <Value>20271231235900</Value> </ValueList> </Slot> </AdhocQuery> </ns3:AdhocQueryRequest> </ns4:RegistryStoredQuery> </soap:Body></soap:Envelope>Responses
Sección titulada «Responses»La respuesta XDS (con éxito o con falla) o el ACK
Media typetext/xml
Examples
Respuesta real
<?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><rim:Value>6136</rim:Value></rim:ValueList></rim:Slot><rim:Slot name="sourcePatientId" slotType=""><rim:ValueList><rim:Value>HC-70000033^^^&2.16.858.2.99999999.72768.1&ISO</rim:Value></rim:ValueList></rim:Slot><rim:Slot name="sourcePatientInfo" slotType=""><rim:ValueList><rim:Value>PID-3|70000033^^^&2.16.858.2.10000675.68909&ISO~HC-70000033^^^&2.16.858.2.99999999.72768.1&ISO</rim:Value><rim:Value>PID-5|MARTINEZ^CARLOS^JOSE^^</rim:Value><rim:Value>PID-7|19900101</rim:Value><rim:Value>PID-8|1</rim:Value></rim:ValueList></rim:Slot><rim:Description><rim:LocalizedString charset="" value="Consulta no urgente" xml:lang="es-uy"/></rim:Description><rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000008" nodeRepresentation="34108-1" classificationNode="" classifiedObject="" home="" id="" lid="" objectType="" status=""><rim:Slot name="codingScheme" slotType=""><rim:ValueList><rim:Value>2.16.840.1.113883.6.1</rim:Value></rim:ValueList></rim:Slot><rim:Name><rim:LocalizedString charset="" value="hoja de consulta no urgente" xml:lang="es-uy"/></rim:Name></rim:Classification><rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000145" nodeRepresentation="" classificationNode="" classifiedObject="" home="" id="" lid="" objectType="" status=""><rim:Slot name="codingScheme" slotType=""><rim:ValueList><rim:Value>1.3.6.1.4.1.19376.1.2.3</rim:Value></rim:ValueList></rim:Slot><rim:Name><rim:LocalizedString charset="" value="" xml:lang="es-uy"/></rim:Name></rim:Classification><rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000011" nodeRepresentation="4101000179107" classificationNode="" classifiedObject="" home="" id="" lid="" objectType="" status=""><rim:Slot name="codingScheme" slotType=""><rim:ValueList><rim:Value>2.16.840.1.113883.6.96</rim:Value></rim:ValueList></rim:Slot><rim:Name><rim:LocalizedString charset="" value="servicio de traumatología y ortopedia" xml:lang="es-uy"/></rim:Name></rim:Classification><rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000012" nodeRepresentation="6821000179104" classificationNode="" classifiedObject="" home="" id="" lid="" objectType="" status=""><rim:Slot name="codingScheme" slotType=""><rim:ValueList><rim:Value>2.16.840.1.113883.6.96</rim:Value></rim:ValueList></rim:Slot><rim:Name><rim:LocalizedString charset="" value="hoja de consulta no urgente centralizada - policlínica" xml:lang="es-uy"/></rim:Name></rim:Classification><rim:Classification classificationScheme="urn:uuid:00000000-0000-4000-9000-000000000007" nodeRepresentation="" classificationNode="" classifiedObject="" home="" id="" lid="" objectType="" status=""><rim:Slot name="authorPerson" slotType=""><rim:ValueList><rim:Value>41112224^Silva^Laura^^^&2.16.858.2.10000675.68909&ISO</rim:Value></rim:ValueList></rim:Slot><rim:Slot name="authorInstitution" slotType=""><rim:ValueList><rim:Value>Policlínica Ejemplo</rim:Value></rim:ValueList></rim:Slot><rim:Slot name="authorRole" slotType=""><rim:ValueList><rim:Value></rim:Value></rim:ValueList></rim:Slot></rim:Classification><rim:ExternalIdentifier home="" id="" identificationScheme="urn:uuid:00000000-0000-4000-9000-000000000013" lid="" objectType="" registryObject="" status="" value="HC-70000033^^^&2.16.858.2.99999999.72768.1&ISO"><rim:Name><rim:LocalizedString charset="" value="XDSDocumentEntry.patientId" xml:lang="es-uy"/></rim:Name></rim:ExternalIdentifier><rim:ExternalIdentifier home="" id="" identificationScheme="urn:uuid:00000000-0000-4000-9000-000000000014" lid="" objectType="" registryObject="" status="" value="2.16.858.2.99999999.67430.20261020100000.3"><rim:Name><rim:LocalizedString charset="" value="XDSDocumentEntry.uniqueId" xml:lang="es-uy"/></rim:Name></rim:ExternalIdentifier></rim:ExtrinsicObject></rim:RegistryObjectList></query:AdhocQueryResponse></xdsb:RegistryStoredQueryResponse></soap:Body></soap:Envelope>ITI-18 con una stored query no soportada: `Failure`, `XDSUnknownStoredQuery`
<?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>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'"}SOAP Fault: Content-Type no admitido
SOAP Fault (SOAP 1.1)