|
PACS System 0.1.0
PACS DICOM system library
|
ITI-18 Registry Query actor. More...
#include <registry_query.h>

Classes | |
| class | impl |
Public Member Functions | |
| registry_query (http_options opts, signing_material signing) | |
| Construct an ITI-18 Registry Query actor bound to a registry endpoint and a signing credential. | |
| registry_query (registry_query &&) noexcept | |
| registry_query & | operator= (registry_query &&) noexcept |
| registry_query (const registry_query &)=delete | |
| registry_query & | operator= (const registry_query &)=delete |
| ~registry_query () | |
| kcenon::common::Result< registry_query_result > | find_documents (const std::string &patient_id, const registry_query_options &options={}) |
| Execute the FindDocuments stored query (urn:uuid:14d4debf-8f97-4251-9a1e-a3a9d68b2a6f). | |
| kcenon::common::Result< registry_query_result > | get_documents (const std::vector< std::string > &uuids) |
| Execute the GetDocuments stored query (urn:uuid:5737b14c-8a1a-4539-b659-e03a34a5e1e4). | |
| void | set_audit_sink (std::shared_ptr< kcenon::pacs::security::xds_audit_sink > sink) |
| Install an ATNA audit sink. | |
Private Attributes | |
| std::unique_ptr< impl > | impl_ |
ITI-18 Registry Query actor.
Binds one registry endpoint and one signing credential. To query different registries or sign with different certificates, instantiate multiple registry_query objects.
The signing_material type is reused from document_source so a single deployment can share the WS-Security credential between the ITI-41 (push), ITI-43 (retrieve), and ITI-18 (query) actors without re-declaring the struct.
Thread-safety: find_documents / get_documents are NOT reentrant per instance - callers must serialize calls per instance, or create one instance per worker thread. The underlying libcurl handle is owned by the impl and may not be shared between threads.
Definition at line 66 of file registry_query.h.
| kcenon::pacs::ihe::xds::registry_query::registry_query | ( | http_options | opts, |
| signing_material | signing ) |
Construct an ITI-18 Registry Query actor bound to a registry endpoint and a signing credential.
The endpoint in opts must be the Registry Stored Query service URL on the Document Registry. The default http_options::soap_action ("urn:ihe:iti:2007:RegisterDocumentSet-b") is ITI-41-specific and is overwritten internally by the ITI-18 action URI before the POST. Callers need not clear it themselves.
Signing material is copied into the instance; the caller may then zeroize the original buffer. The constructor never throws - any material validation failure is deferred to the query methods and surfaces as a typed error_code.
Definition at line 272 of file registry_query.cpp.
|
defaultnoexcept |
|
delete |
|
default |
| kcenon::common::Result< registry_query_result > kcenon::pacs::ihe::xds::registry_query::find_documents | ( | const std::string & | patient_id, |
| const registry_query_options & | options = {} ) |
Execute the FindDocuments stored query (urn:uuid:14d4debf-8f97-4251-9a1e-a3a9d68b2a6f).
Returns the list of XDSDocumentEntry metadata the registry holds for patient_id. An empty result list on Success means the query was well-formed but no documents matched - callers should branch on the result's entries vector rather than treating empty as an error.
options is optional; pass a default-constructed registry_query_options to let the actor emit the default "Approved" status filter and no creation-time window.
TRUST CAVEAT: the response signature check is integrity-only - it binds the payload to the cert embedded in the response's BST, but does NOT validate that cert against a trust anchor. Callers must not treat a successful Result as signer-authenticated.
All failure modes surface as typed error_code values; the function never throws across the API boundary.
Definition at line 280 of file registry_query.cpp.
References find_documents().
Referenced by find_documents().


| kcenon::common::Result< registry_query_result > kcenon::pacs::ihe::xds::registry_query::get_documents | ( | const std::vector< std::string > & | uuids | ) |
Execute the GetDocuments stored query (urn:uuid:5737b14c-8a1a-4539-b659-e03a34a5e1e4).
Resolves explicit XDSDocumentEntry UUIDs to their metadata. uuids must carry at least one entry_uuid in urn:uuid: form; an empty list is rejected with registry_query_empty_uuid_list before any transport call is made.
Returns the entries the registry has for the requested UUIDs. The registry may return fewer entries than requested when some UUIDs are unknown; callers wanting a strict all-or-nothing semantic must compare entries.size() to uuids.size() themselves.
Definition at line 285 of file registry_query.cpp.
References kcenon::pacs::ihe::xds::registry_query::impl::get_documents(), and impl_.

|
delete |
|
defaultnoexcept |
| void kcenon::pacs::ihe::xds::registry_query::set_audit_sink | ( | std::shared_ptr< kcenon::pacs::security::xds_audit_sink > | sink | ) |
Install an ATNA audit sink.
When set, find_documents() and get_documents() each emit one audit event per invocation - success or failure - carrying the query kind, query keys (patient_id or uuid list), registry endpoint, and the outcome code.
Definition at line 290 of file registry_query.cpp.
References impl_, and kcenon::pacs::ihe::xds::registry_query::impl::set_audit_sink().

|
private |
Definition at line 151 of file registry_query.h.
Referenced by get_documents(), and set_audit_sink().