Statuses: Working with Response status codes¶
This module provides some useful status constants. You should be aware, that some status codes depends on a command or a service you are responding to. The following tables provides list of some well known status codes grouped by commands and status types. The table is by no means cover the whole DICOM standard status codes.
Service/Command | Status | Code | Description | Related Attributes |
---|---|---|---|---|
C-ECHO | Success | 0000 | ||
Failure | 0122 | Refused: SOP Class Not Supported | ||
0210 | Duplicate Invocation | |||
0212 | Mistyped argument | |||
0211 | Unrecognized Operation | |||
C-STORE | Failure | A7xx | Refused: Out of Resources | (0000,0902) |
A9xx | Error: Data Set does not match SOP Class | (0000,0901) (0000,0902) | ||
Cxxx | Error: Cannot understand | (0000,0901) (0000,0902) | ||
0112 | Failed: SOP Class Not Supported | |||
0210 | Duplicate Invocation | |||
0117 | Invalid Object Instance | |||
0212 | Mistyped argument | |||
0211 | Unrecognized Operation | |||
0124 | Refused: Not Authorized | |||
Warning | B000 | Coercion of Data Elements | (0000,0901) (0000,0902) | |
B007 | Data Set does not match SOP Class | (0000,0901) (0000,0902) | ||
B006 | Elements Discarded | (0000,0901) (0000,0902) | ||
Success | 0000 | Success | ||
C-FIND | Failure | A700 | Refused: Out of Resources | (0000,0902) |
A900 | Error: Data Set does not match SOP Class | (0000,0901) (0000,0902) | ||
Cxxx | Failed: Unable to process | (0000,0901) (0000,0902) | ||
0112 | Failed: SOP Class Not Supported | |||
Cancel | FE00 | Matching terminated due to Cancel request | ||
Success | 0000 | Matching is complete - No final Identifier is supplied. | ||
Pending | FF00 | Matches are continuing - Current Match is supplied and any Optional Keys were supported in the same manner as Required Keys. | ||
FF01 | Matches are continuing - Warning that one or more Optional Keys were not supported for existence and/or matching for this Identifier. | |||
C-GET |
|
A701 | Refused: Out of Resources - Unable to calculate number of matches | (0000,0902) |
A702 | Refused: Out of Resources - Unable to perform sub-operations | (0000,1021) (0000,1022) (0000,1023) | ||
A900 | Error: Data Set does not match SOP Class | (0000,0901) (0000,0902) | ||
Cxxx | Failed: Unable to process | (0000,0901) (0000,0902) | ||
0112 | Failed: SOP Class Not Supported | |||
0210 | Duplicate Invocation | |||
0212 | Mistyped argument | |||
0211 | Unrecognized Operation | |||
0124 | Refused: Not Authorized | |||
FE00 | Cancel Sub-operations terminated due to Cancel Indication | (0000,1020) (0000,1021) (0000,1022) (0000,1023) | ||
B000 | Sub-operations Complete - One or more Failures or Warnings | (0000,1021) (0000,1022) (0000,1023) | ||
Success | 0000 | Sub-operations Complete - No Failures or Warnings | (0000,1021) (0000,1022) (0000,1023) | |
Pending | FF00 | Sub-operations are continuing | (0000,1020) (0000,1021) (0000,1022) (0000,1023) | |
C-MOVE | Failure | A701 | Refused: Out of Resources - Unable to calculate number of matches | (0000,0902) |
A702 | Refused: Out of Resources - Unable to perform sub-operations | (0000,1020) (0000,1021) (0000,1022) (0000,1023) | ||
A801 | Refused: Move Destination unknown | (0000,0902) | ||
A900 | Error: Data Set does not match SOP Class | (0000,0901) (0000,0902) | ||
Cxxx | Failed: Unable to process | (0000,0901) (0000,0902) | ||
AA00 | Failed: None of the frames requested were found in the SOP Instance | (0000,0902) | ||
AA01 | Failed: Unable to create new object for this SOP class | (0000,0902) | ||
AA02 | Failed: Unable to extract frames | (0000,0902) | ||
AA03 | Failed: Time-based request received for a non-time-based original SOP Instance. | (0000,0902) | ||
AA04 | Failed: Invalid Request | (0000,0901) (0000,0902) | ||
0112 | Failed: SOP Class Not Supported | |||
0210 | Duplicate Invocation | |||
0212 | Mistyped argument | |||
0211 | Unrecognized Operation | |||
0124 | Refused: Not Authorized | |||
Cancel | FE00 | Sub-operations terminated due to Cancel Indication | (0000,1020) (0000,1021) (0000,1022) (0000,1023) | |
Warning | B000 | Sub-operations Complete - One or more Failures or Warnings | (0000,1020) (0000,1021) (0000,1022) (0000,1023) | |
Success | 0000 | Sub-operations Complete - No Failures or Warnings | (0000,1020) (0000,1021) (0000,1022) (0000,1023) | |
Pending | FF00 | Sub-operations are continuing | (0000,1020) (0000,1021) (0000,1022) (0000,1023) | |
N-EVENT-REPORT | Failure | 0119 | Class-Instance Conflict | |
0210 | Duplicate Invocation | (0000,0110) | ||
0115 | Invalid Argument Value | |||
0117 | Invalid Object Instance | |||
0212 | Mistyped Argument | |||
0114 | No Such Argument | |||
0113 | No Such Event Type | |||
0118 | No Such SOP Class | |||
0112 | No Such SOP Instance | |||
0110 | Processing Failure | |||
0213 | Resource Limitation | |||
0211 | Unrecognized Operation | |||
N-ACTION | Failure | 0119 | Class-Instance Conflict | |
0210 | Duplicate Invocation | (0000,0110) | ||
0115 | Invalid Argument Value | |||
0117 | Invalid Object Instance | |||
0212 | Mistyped Argument | |||
0123 | No Such Action | |||
0114 | No Such Argument | |||
0118 | No Such SOP Class | |||
0112 | No Such SOP Instance | |||
0110 | Processing Failure | |||
0213 | Resource Limitation | |||
0211 | Unrecognized Operation | |||
0124 | Refused: Not Authorized | |||
N-GET | Failure | 0107 | Attribute List Error | |
0119 | Class-Instance Conflict | |||
0210 | Duplicate Invocation | |||
0117 | Invalid Object Instance | |||
0212 | Mistyped Argument | |||
0118 | No Such SOP Class | |||
0112 | No Such SOP Instance | |||
0110 | Processing Failure | |||
0213 | Resource Limitation | |||
0211 | Unrecognized Operation | |||
0124 | Refused: Not Authorized | |||
N-SET | Failure | 0119 | Class-Instance Conflict | |
0210 | Duplicate Invocation | |||
0106 | Invalid Attribute Value | |||
0116 | Attribute Value Out Of Range | |||
0212 | Mistyped Argument | |||
0117 | Invalid Object Instance | |||
0121 | Missing Attribute Value | |||
0105 | No Such Attribute | |||
0107 | Attribute List Error | |||
0118 | No Such SOP Class | |||
0112 | No Such SOP Instance | |||
0110 | Processing Failure | |||
0213 | Resource Limitation | |||
0211 | Unrecognized Operation | |||
0124 | Refused: Not Authorized | |||
N-CREATE | Failure | 0210 | Duplicate Invocation | |
0111 | Duplicate SOP Instance | |||
0106 | Invalid Attribute Value | |||
0116 | Attribute Value Out Of Range | |||
0117 | Invalid Object Instance | |||
0120 | Missing Attribute | |||
0121 | Missing Attribute Value | |||
0212 | Mistyped Argument | |||
0105 | No Such Attribute | |||
0107 | Attribute List Error | |||
0118 | No Such SOP Class | |||
0110 | Processing Failure | |||
0213 | Resource Limitation | |||
0211 | Unrecognized Operation | |||
0124 | Refused: Not Authorized | |||
N-DELETE | Failure | 0119 | Class-Instance Conflict | |
0210 | Duplicate Invocation | |||
0117 | Invalid Object Instance | |||
0212 | Mistyped Argument | |||
0118 | No Such SOP Class | |||
0112 | No Such SOP Instance | |||
0110 | Processing Failure | |||
0213 | Resource Limitation | |||
0211 | Unrecognized Operation | |||
0124 | Refused: Not Authorized |
New status codes can be created using statuses.Status
class:
SUCCESS = Status(0x0000)
statuses.Status
class also takes an optional argument command
to create status depending on command.
This class is a convenience wrapper around integer, that provides information on status type (Failure, Success, Warning
or Pending) and status description. If status code is unknown to the library it assumes it’s a failure with unspecified
description.
You can add new statuses by using statuses.add_status
function. By using it you will be adding new known status code
to a global library dictionary of status codes.
-
netdicom2.statuses.
s
¶ alias of
netdicom2.statuses.status
-
netdicom2.statuses.
add_status
(code, code_type, description, end=None, command=None)¶ Adds new status code to the global library dictionary of known statuses
Parameters: - code – status code or starting value for a range of statuses if
end
is provided - code_type – code type (either Success, Warning, Pending, Cancel or Failure)
- description – status description
- end – optional argument that specifies end value for a range of statuses
- command – DIMSE command, if this status is command/service specific
- code – status code or starting value for a range of statuses if
-
class
netdicom2.statuses.
Status
¶ Class represents message status.
This is a helper class that provides convenience methods for printing status codes.
-
netdicom2.statuses.
SUCCESS
= Status(0x0)¶ (0x0000) Success
-
netdicom2.statuses.
PROCESSING_FAILURE
= Status(0x110)¶ (0x0110) Processing Failure
-
netdicom2.statuses.
C_STORE_CANNON_UNDERSTAND
= Status(0xC000)¶ (0xC000) Error: Cannot understand (C-STORE)
-
netdicom2.statuses.
C_STORE_OUT_OF_RESOURCES
= Status(0xA700)¶ (0xA700) Refused: Out of Resources (C-STORE)
-
netdicom2.statuses.
C_STORE_ELEMENTS_DISCARDED
= Status(0xB006)¶ (0xB006) Elements Discarded (C-STORE)
-
netdicom2.statuses.
C_FIND_PENDING
= Status(0xFF00)¶ (0xFF00) Matches are continuing - Current Match is supplied and any Optional Keys were supported in the same manner as Required Keys. (C-FIND)
-
netdicom2.statuses.
C_FIND_PENDING_WARNING
= Status(0xFF01)¶ (0xFF01) Matches are continuing - Warning that one or more Optional Keys were not supported for existence and/or matching for this Identifier. (C-FIND)
-
netdicom2.statuses.
C_FIND_UNABLE_TO_PROCESS
= Status(0xC000)¶ (0xC000) Failed: Unable to process (C-FIND)
-
netdicom2.statuses.
C_FIND_OUT_OF_RESOURCES
= Status(0xA700)¶ (0xA700) Refused: Out of Resources (C-FIND)
-
netdicom2.statuses.
C_GET_PENDING
= Status(0xFF00)¶ (0xFF00) Sub-operations are continuing (C-GET)
-
netdicom2.statuses.
C_GET_WARNING
= Status(0xB000)¶ (0xB000) Sub-operations Complete - One or more Failures or Warnings (C-GET)
-
netdicom2.statuses.
C_GET_UNABLE_TO_PROCESS
= Status(0xC000)¶ (0xC000) Failed: Unable to process (C-GET)
-
netdicom2.statuses.
C_MOVE_PENDING
= Status(0xFF00)¶ (0xFF00) Sub-operations are continuing (C-MOVE)
-
netdicom2.statuses.
C_MOVE_WARNING
= Status(0xB000)¶ (0xB000) Sub-operations Complete - One or more Failures or Warnings (C-MOVE)
-
netdicom2.statuses.
C_MOVE_UNABLE_TO_PROCESS
= Status(0xC000)¶ (0xC000) Failed: Unable to process (C-MOVE)
-
netdicom2.statuses.
C_MOVE_DESTINATION_UNKNOWN
= Status(0xA801)¶ (0xA801) Refused: Move Destination unknown