pynetdicom._handlers.doc_handle_action#
- pynetdicom._handlers.doc_handle_action(event: Event, *args: Sequence[Any]) tuple[int | Dataset, Dataset | None][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 of0x0110- Processing failure.Event
evt.EVT_N_ACTIONSupported Service Classes
Status
- Success
0x0000- Success- Failure
0x0112- No such SOP Instance0x0114- No such argument0x0115- Invalid argument value0x0117- Invalid object instance0x0118- No such SOP Class0x0119- Class-Instance conflict0x0123- No such action0x0124- Refused: not authorised0x0210- Duplicate invocation0x0211- Unrecognised operation0x0212- Mistyped argument0x0213- Resource limitation0xC101- Procedural Logging not available for specified Study Instance UID0xC102- Event Information does not match Template0xC103- Cannot match event to a current study0xC104- IDs inconsistent in matching a current study; Event not logged0xC10E- Operator not authorised to add entry to Medication Administration Record0xC110- Patient cannot be identified from Patient ID (0010,0020) or Admission ID (0038,0010)0xC111- Update of Medication Administration Record failed0xC112- Machine Verification requested instance not found0xC300- The UPS may no longer be updated0xC301- The correct Transaction UID was not provided0xC302- The UPS is already IN PROGRESS0xC303- The UPS may only become SCHEDULED via N-CREATE, not N-SET or N-ACTION0xC304- The UPS has not met final state requirements for the requested state change0xC307- Specified SOP Instance UID does not exist or is not a UPS Instance managed by this SCP0xC308- Receiving AE-TITLE is Unknown to this SCP0xC310- The UPS is not yet in the IN PROGRESS state0xC311- The UPS is already COMPLETED0xC312- The performer cannot be contacted0xC313- Performer chooses not to cancel0xC314- Specified action not appropriate for specified instance0xC315- SCP does not support Event Reports0xC600- Film Session SOP Instance hierarchy does not contain Film Box SOP Instances0xC601- Unable to create Print Job SOP Instance; print queue is full0xC602- Unable to create Print Job SOP Instance; print queue is full0xC603- Image size is larger than image box size0xC613- 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 Reference0xB102- Study Instance UID coercion; Event logged under a different Study Instance UID0xB104- IDs inconsistent in matching a current study; Event logged0xB301- Deletion Lock not granted0xB304- The UPS is already in the requested state of CANCELED0xB306- The UPS is already in the requested state of COMPLETED0xB601- Film session printing (collation) is not supported0xB602- 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 demagnified0xB609- 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: theAssociationthat is running the service that received the N-ACTION request.context: the presentation context the request was sent under as aPresentationContextTuple.event: the event that occurred asInterventionEvent.request: the receivedN-ACTION requesttimestamp: the date and time that the N-ACTION request was processed by the service asdatetime.datetime.
Eventproperties are:action_information: the decodedDatasetcontained within the N-ACTION request’s Action Information parameter. Because pydicom uses a deferred read when decoding data, if the decode fails the returnedDatasetwill only raise an exception at the time of use.action_type: the N-ACTION request’s Action Type ID asint.message_id: the N-ACTION 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 alistthen 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 aDatasetobject containing (at a minimum) a (0000,0900) Status element. If returning aDatasetobject 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,UnifiedProcedureStepServiceClassReferences