pynetdicom._handlers.doc_handle_event_report¶
- pynetdicom._handlers.doc_handle_event_report(event: Event, *args: Sequence[Any]) Tuple[int | Dataset, Dataset | None] [source]¶
Documentation for handlers bound to
evt.EVT_N_EVENT_REPORT
.User implementation of this event handler is required if one or more services that use N-EVENT-REPORT are to be supported. If a handler is not implemented and bound to
evt.EVT_N_EVENT_REPORT
then the N-EVENT-REPORT request will be responded to using a Status value of0x0110
- Processing Failure.Event
evt.EVT_N_EVENT_REPORT
Supported Service Classes
Status
- Success
0x0000
- Success- Failure
0x0110
- Processing failure0x0112
- No such SOP Instance0x0113
- No such event type0x0114
- No such argument0x0115
- Invalid argument value0x0117
- Invalid object Instance0x0118
- No such SOP Class0x0119
- Class-Instance conflict0x0210
- Duplicate invocation0x0211
- Unrecognised operation0x0212
- Mistyped argument0x0213
- Resource limitation
- Parameters:
event (events.Event) –
The event representing a service class receiving a N-EVENT-REPORT request message.
Event
attributes are:assoc
: theAssociation
that is running the service that received the N-EVENT-REPORT request.context
: the presentation context the request was sent under as aPresentationContextTuple
.event
: the event that occurred asInterventionEvent
.request
: the receivedN-EVENT-REPORT request
timestamp
: the date and time that the N-EVENT-REPORT request was processed by the service asdatetime.datetime
.
Event
properties are:event_information
: the decodedDataset
contained within the N-EVENT-REPORT request’s Event Information parameter. Because pydicom uses a deferred read when decoding data, if the decode fails the returnedDataset
will only raise an exception at the time of use.event_type
: the N-EVENT-REPORT request’s Event Type ID parameter value asint
.message_id
: the N-EVENT-REPORT request’s Message ID asint
.
args – If the handler was bound to the event using
bind(event, handler, args)
or by passingevt_handlers=[(event, handler, args), ...]
, where args is alist
then there will be one or more optional extra parameters matching the contents of args.
- Returns:
status (pydicom.dataset.Dataset or int) – The status returned to the peer AE in the N-EVENT-REPORT response. Must be a valid N-EVENT-REPORT status value for the applicable Service Class as either an
int
or aDataset
object containing (at a minimum) a (0000,0900) Status element. If returning a Dataset object then it may also contain optional elements related to the Status (as in DICOM Standard, Part 7, Annex C).dataset (pydicom.dataset.Dataset or None) – If the status category is ‘Success’ or ‘Warning’ then a
Dataset
containing elements of the response’s Event Reply conformant to the specifications in the corresponding Service Class.If the status category is not ‘Success’ or ‘Warning’ then
None
.
- Raises:
NotImplementedError – If the handler has not been implemented and bound to
evt.EVT_N_EVENT_REPORT
by the user.
See also
send_n_event_report()
,N_EVENT_REPORT
,PrintManagementServiceClass
,ProcedureStepServiceClass
,RTMachineVerificationServiceClass
,StorageCommitmentServiceClass
,UnifiedProcedureStepServiceClass
References