Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
elif uid in _INSTANCE_AVAILABILITY_CLASSES.values():
return InstanceAvailabilityNotificationServiceClass
elif uid in _MEDIA_CREATION_CLASSES.values():
return MediaCreationManagementServiceClass
elif uid in _MEDIA_STORAGE_CLASSES.values():
return ServiceClass # Not yet implemented
elif uid in _NON_PATIENT_OBJECT_CLASSES.values():
return NonPatientObjectStorageServiceClass
elif uid in _PRINT_MANAGEMENT_CLASSES.values():
return PrintManagementServiceClass
elif uid in _PROCEDURE_STEP_CLASSES.values():
return ProcedureStepServiceClass
elif uid in _PROTOCOL_APPROVAL_CLASSES.values():
return ProtocolApprovalQueryRetrieveServiceClass
elif uid in _QR_CLASSES.values():
return QueryRetrieveServiceClass
elif uid in _RELEVANT_PATIENT_QUERY_CLASSES.values():
return RelevantPatientInformationQueryServiceClass
elif uid in _RT_MACHINE_VERIFICATION_CLASSES.values():
return RTMachineVerificationServiceClass
elif uid in _STORAGE_CLASSES.values():
return StorageServiceClass
elif uid in _STORAGE_COMMITMENT_CLASSES.values():
return StorageCommitmentServiceClass
elif uid in _SUBSTANCE_ADMINISTRATION_CLASSES.values():
return SubstanceAdministrationQueryServiceClass
elif uid in _UNIFIED_PROCEDURE_STEP_CLASSES.values():
return UnifiedProcedureStepServiceClass
elif uid in _VERIFICATION_CLASSES.values():
return VerificationServiceClass
# No SCP implemented
LOGGER.debug('')
LOGGER.debug('# DICOM Dataset')
for elem in rsp_identifier.iterall():
LOGGER.debug(elem)
LOGGER.debug('')
# Send pending response
self.dimse.send_msg(rsp, context.context_id)
# Send final success response
rsp.Status = 0x0000
LOGGER.info('Find SCP Response: (Success)')
self.dimse.send_msg(rsp, context.context_id)
class SubstanceAdministrationQueryServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Substance Administration Query Service"""
statuses = SUBSTANCE_ADMINISTRATION_SERVICE_CLASS_STATUS
def SCP(self, req, context):
"""The SCP implementation for the Relevant Patient Information Query
Service Class.
Parameters
----------
req : dimse_primitives.C_FIND
The C-FIND request primitive sent by the peer.
context : presentation.PresentationContext
The presentation context that the SCP is operating under.
"""
self._find_scp(req, context)
class HangingProtocolQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Hanging Protocol QR Service."""
pass
class ImplantTemplateQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Implant Template QR Service."""
pass
class NonPatientObjectStorageServiceClass(StorageServiceClass):
"""Implementation of the Non-Patient Object Storage Service"""
statuses = NON_PATIENT_SERVICE_CLASS_STATUS
class ProtocolApprovalQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Protocol Approval QR Service."""
pass
class RelevantPatientInformationQueryServiceClass(ServiceClass):
"""Implementation of the Relevant Patient Information Query"""
statuses = RELEVANT_PATIENT_SERVICE_CLASS_STATUS
def SCP(self, req, context):
"""The SCP implementation for the Relevant Patient Information Query
Service Class.
Parameters
----------
req : dimse_primitives.C_FIND
The C-FIND request primitive sent by the peer.
----------
req : dimse_primitives.C_FIND
The C-FIND request primitive received from the peer.
context : presentation.PresentationContext
The presentation context that the SCP is operating under.
"""
if context.abstract_syntax == '1.2.840.10008.5.1.4.31':
self._find_scp(req, context)
else:
raise ValueError(
'The supplied abstract syntax is not valid for use with the '
'Basic Worklist Management Service Class'
)
class ColorPaletteQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Color Palette QR Service."""
pass
class DefinedProcedureProtocolQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Defined Procedure Protocol QR Service."""
pass
class HangingProtocolQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Hanging Protocol QR Service."""
pass
class ImplantTemplateQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Implant Template QR Service."""
class ColorPaletteQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Color Palette QR Service."""
pass
class DefinedProcedureProtocolQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Defined Procedure Protocol QR Service."""
pass
class HangingProtocolQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Hanging Protocol QR Service."""
pass
class ImplantTemplateQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Implant Template QR Service."""
pass
class NonPatientObjectStorageServiceClass(StorageServiceClass):
"""Implementation of the Non-Patient Object Storage Service"""
statuses = NON_PATIENT_SERVICE_CLASS_STATUS
class ProtocolApprovalQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Protocol Approval QR Service."""
pass
class RelevantPatientInformationQueryServiceClass(ServiceClass):
"""Implementation of the Relevant Patient Information Query"""
ds = Dataset()
ds.FailedSOPInstanceUIDList = failed_instances
bytestream = encode(ds,
transfer_syntax.is_implicit_VR,
transfer_syntax.is_little_endian)
rsp.Identifier = BytesIO(bytestream)
rsp.NumberOfRemainingSuboperations = None
rsp.NumberOfFailedSuboperations = store_results[1]
rsp.NumberOfWarningSuboperations = store_results[2]
rsp.NumberOfCompletedSuboperations = store_results[3]
self.dimse.send_msg(rsp, context.context_id)
class BasicWorklistManagementServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Basic Worklist Management Service Class."""
statuses = QR_FIND_SERVICE_CLASS_STATUS
def SCP(self, req, context):
"""The SCP implementation for Basic Worklist Management.
Parameters
----------
req : dimse_primitives.C_FIND
The C-FIND request primitive received from the peer.
context : presentation.PresentationContext
The presentation context that the SCP is operating under.
"""
if context.abstract_syntax == '1.2.840.10008.5.1.4.31':
self._find_scp(req, context)
else:
'The supplied abstract syntax is not valid for use with the '
'Basic Worklist Management Service Class'
)
class ColorPaletteQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Color Palette QR Service."""
pass
class DefinedProcedureProtocolQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Defined Procedure Protocol QR Service."""
pass
class HangingProtocolQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Hanging Protocol QR Service."""
pass
class ImplantTemplateQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Implant Template QR Service."""
pass
class NonPatientObjectStorageServiceClass(StorageServiceClass):
"""Implementation of the Non-Patient Object Storage Service"""
statuses = NON_PATIENT_SERVICE_CLASS_STATUS
class ProtocolApprovalQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Protocol Approval QR Service."""
"""
if context.abstract_syntax == '1.2.840.10008.5.1.4.31':
self._find_scp(req, context)
else:
raise ValueError(
'The supplied abstract syntax is not valid for use with the '
'Basic Worklist Management Service Class'
)
class ColorPaletteQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Color Palette QR Service."""
pass
class DefinedProcedureProtocolQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Defined Procedure Protocol QR Service."""
pass
class HangingProtocolQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Hanging Protocol QR Service."""
pass
class ImplantTemplateQueryRetrieveServiceClass(QueryRetrieveServiceClass):
"""Implementation of the Implant Template QR Service."""
pass
class NonPatientObjectStorageServiceClass(StorageServiceClass):
"""Implementation of the Non-Patient Object Storage Service"""