@@ -198,7 +198,6 @@ def test_that_get_derived_variable_file_gets_file_correctly(mock_syn):
198198 [
199199 (pd .DataFrame (
200200 {
201- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
202201 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
203202 "CPT_SEQ_DATE" : ["2014" , "2015" ],
204203 }
@@ -212,14 +211,12 @@ def test_that_get_derived_variable_file_gets_file_correctly(mock_syn):
212211 ),
213212 pd .DataFrame (
214213 {
215- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
216214 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
217215 "CPT_SEQ_DATE" : [None , None ],
218216 }
219217 )),
220218 (pd .DataFrame (
221219 {
222- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
223220 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
224221 "CPT_SEQ_DATE" : ["2014" , "2015" ],
225222 }
@@ -233,14 +230,12 @@ def test_that_get_derived_variable_file_gets_file_correctly(mock_syn):
233230 ),
234231 pd .DataFrame (
235232 {
236- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
237233 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
238234 "CPT_SEQ_DATE" : ["2017" , None ],
239235 }
240236 )),
241237 (pd .DataFrame (
242238 {
243- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
244239 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
245240 "CPT_SEQ_DATE" : ["2014" , "2015" ],
246241 }
@@ -254,14 +249,12 @@ def test_that_get_derived_variable_file_gets_file_correctly(mock_syn):
254249 ),
255250 pd .DataFrame (
256251 {
257- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
258252 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
259253 "CPT_SEQ_DATE" : ["2017" , "2018" ],
260254 }
261255 )),
262256 (pd .DataFrame (
263257 {
264- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
265258 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
266259 "CPT_SEQ_DATE" : ["2014" , "2015" ],
267260 }
@@ -275,14 +268,12 @@ def test_that_get_derived_variable_file_gets_file_correctly(mock_syn):
275268 ),
276269 pd .DataFrame (
277270 {
278- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
279271 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
280272 "CPT_SEQ_DATE" : ["2014" , "2015" ],
281273 }
282274 )),
283275 (pd .DataFrame (
284276 {
285- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
286277 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
287278 "CPT_SEQ_DATE" : ["2012" , "2013" ],
288279 }
@@ -296,7 +287,6 @@ def test_that_get_derived_variable_file_gets_file_correctly(mock_syn):
296287 ),
297288 pd .DataFrame (
298289 {
299- "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
300290 "SAMPLE_ID" : ["GENIE-1-1" , "GENIE-1-2" ],
301291 "CPT_SEQ_DATE" : ["2014" , "2015" ],
302292 }
@@ -330,6 +320,7 @@ def test_that_replace_cpt_seq_date_replaces_correctly_with_derived_variable_repl
330320 ),
331321 pd .DataFrame (
332322 {
323+ "PATIENT_ID" : ["GENIE-1" , "GENIE-1" ],
333324 "SAMPLE_ID" : ["GENIE-1-3" , "GENIE-1-4" ],
334325 "SEQ_YEAR" : ["2017" , "2018" ],
335326 }
@@ -395,7 +386,7 @@ def test_that_replace_cpt_seq_date_replaces_correctly_with_derived_variable_repl
395386 }
396387 ))
397388 ],
398- ids = ["none_replaced " , "some_replaced" , "all_replaced" , "the_same" ]
389+ ids = ["none_replaced_with_extra_cols " , "some_replaced" , "all_replaced" , "the_same" ]
399390)
400391def test_that_replace_cpt_seq_date_replaces_correctly_with_main_genie_replacement_type (input , clinical , expected ):
401392 output = bpc_export .replace_cpt_seq_date (
0 commit comments