pynetdicom._handlers.doc_handle_action¶
- 
pynetdicom._handlers.doc_handle_action(event, *args)[source]¶
- Documentation for handlers bound to - evt.EVT_N_ACTION.- User implementation of this event handler is required if one or more services that use N-ACTION are to be supported. If a handler is not implemented and bound to - evt.EVT_N_ACTIONthen the N-ACTION request will be responded to using a Status value of- 0x0110- Processing failure.- Event - evt.EVT_N_ACTION- Supported Service Classes - Status - Success
- 0x0000- Success
- Failure
- 0x0112- No such SOP Instance- 0x0114- No such argument- 0x0115- Invalid argument value- 0x0117- Invalid object instance- 0x0118- No such SOP Class- 0x0119- Class-Instance conflict- 0x0123- No such action- 0x0124- Refused: not authorised- 0x0210- Duplicate invocation- 0x0211- Unrecognised operation- 0x0212- Mistyped argument- 0x0213- Resource limitation- 0xC101- Procedural Logging not available for specified Study Instance UID- 0xC102- Event Information does not match Template- 0xC103- Cannot match event to a current study- 0xC104- IDs inconsistent in matching a current study; Event not logged- 0xC10E- Operator not authorised to add entry to Medication Administration Record- 0xC110- Patient cannot be identified from Patient ID (0010,0020) or Admission ID (0038,0010)- 0xC111- Update of Medication Administration Record failed- 0xC112- Machine Verification requested instance not found- 0xC300- The UPS may no longer be updated- 0xC301- The correct Transaction UID was not provided- 0xC302- The UPS is already IN PROGRESS- 0xC303- The UPS may only become SCHEDULED via N-CREATE, not N-SET or N-ACTION- 0xC304- The UPS has not met final state requirements for the requested state change- 0xC307- Specified SOP Instance UID does not exist or is not a UPS Instance managed by this SCP- 0xC308- Receiving AE-TITLE is Unknown to this SCP- 0xC310- The UPS is not yet in the IN PROGRESS state- 0xC311- The UPS is already COMPLETED- 0xC312- The performer cannot be contacted- 0xC313- Performer chooses not to cancel- 0xC314- Specified action not appropriate for specified instance- 0xC315- SCP does not support Event Reports- 0xC600- Film Session SOP Instance hierarchy does not contain Film Box SOP Instances- 0xC601- Unable to create Print Job SOP Instance; print queue is full- 0xC602- Unable to create Print Job SOP Instance; print queue is full- 0xC603- Image size is larger than image box size- 0xC613- Combined Print Image size is larger than Image Box size
- Warning
- 0xB101- Specified Synchronisation Frame of Reference UID does not match SOP Synchronisation Frame of Reference- 0xB102- Study Instance UID coercion; Event logged under a different Study Instance UID- 0xB104- IDs inconsistent in matching a current study; Event logged- 0xB301- Deletion Lock not granted- 0xB304- The UPS is already in the requested state of CANCELED- 0xB306- The UPS is already in the requested state of COMPLETED- 0xB601- Film session printing (collation) is not supported- 0xB602- Film Session SOP Instance hierarchy does not contain Image Box SOP Instances (empty page)- 0xB603- Film Box SOP Instance hierarchy does not contain Image Box SOP Instances (empty page)- 0xB604- Image size is larger than Image Box size, the image has been demagnified- 0xB609- Image size is larger than Image Box size, the image has been cropped to fit.- 0xB60A- Image size or Combined Print Image size is larger than the Image Box size. Image or Combined Print Image has been decimated to fit.
 - Parameters
- event (events.Event) – - The event representing a service class receiving a N-ACTION request message. - Eventattributes are:- assoc: the- Associationthat is running the service that received the N-ACTION request.
- context: the presentation context the request was sent under as a- PresentationContextTuple.
- event: the event that occurred as- InterventionEvent.
- request: the received- N-ACTION request
- timestamp: the date and time that the N-ACTION request was processed by the service as- datetime.datetime.
 - Eventproperties are:- action_information: the decoded- Datasetcontained within the N-ACTION request’s Action Information parameter. Because pydicom uses a deferred read when decoding data, if the decode fails the returned- Datasetwill only raise an exception at the time of use.
- action_type: the N-ACTION request’s Action Type ID as- int.
- message_id: the N-ACTION request’s Message ID as- int.
 
- args – If the handler was bound to the event using - bind(event, handler, args)or by passing- evt_handlers=[(event, handler, args), ...], where args is a- listthen 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-ACTION response. Must be a valid N-ACTION status value for the applicable Service Class as either an - intor a- Datasetobject containing (at a minimum) a (0000,0900) Status element. If returning a- Datasetobject 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 - Datasetcontaining elements for the response’s Action 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_ACTIONby the user.
 - See also - send_n_action(),- N_ACTION,- ApplicationEventLoggingServiceClass,- MediaCreationManagementServiceClass,- PrintManagementServiceClass,- RTMachineVerificationServiceClass,- StorageCommitmentServiceClass,- UnifiedProcedureStepServiceClass- References