@@ -107,6 +107,16 @@ def test_call_with_multiple_results(self, handler, mock_storage, mock_event):
107107 status , ds = results [3 ]
108108 assert status == SUCCESS
109109
110+ def test_call_with_accession_number_filter (self , handler , mock_storage , mock_event ):
111+ mock_event .identifier .AccessionNumber = "ACC12345"
112+ mock_storage .find_worklist_items .return_value = []
113+
114+ list (handler .call (mock_event ))
115+
116+ mock_storage .find_worklist_items .assert_called_once_with (
117+ accession_number = "ACC12345" , modality = None , scheduled_date = None , patient_id = None
118+ )
119+
110120 def test_call_with_modality_filter (self , handler , mock_storage , mock_event ):
111121 # Add modality to query
112122 sps_item = Dataset ()
@@ -116,7 +126,9 @@ def test_call_with_modality_filter(self, handler, mock_storage, mock_event):
116126
117127 list (handler .call (mock_event ))
118128
119- mock_storage .find_worklist_items .assert_called_once_with (modality = "MG" , scheduled_date = None , patient_id = None )
129+ mock_storage .find_worklist_items .assert_called_once_with (
130+ accession_number = None , modality = "MG" , scheduled_date = None , patient_id = None
131+ )
120132
121133 def test_call_with_date_filter (self , handler , mock_storage , mock_event ):
122134 sps_item = Dataset ()
@@ -127,7 +139,7 @@ def test_call_with_date_filter(self, handler, mock_storage, mock_event):
127139 list (handler .call (mock_event ))
128140
129141 mock_storage .find_worklist_items .assert_called_once_with (
130- modality = None , scheduled_date = "20260107" , patient_id = None
142+ accession_number = None , modality = None , scheduled_date = "20260107" , patient_id = None
131143 )
132144
133145 def test_call_with_patient_id_filter (self , handler , mock_storage , mock_event ):
@@ -137,7 +149,7 @@ def test_call_with_patient_id_filter(self, handler, mock_storage, mock_event):
137149 list (handler .call (mock_event ))
138150
139151 mock_storage .find_worklist_items .assert_called_once_with (
140- modality = None , scheduled_date = None , patient_id = "9876543210"
152+ accession_number = None , modality = None , scheduled_date = None , patient_id = "9876543210"
141153 )
142154
143155 def test_call_handles_storage_exception (self , handler , mock_storage , mock_event ):
0 commit comments