Skip to content

Commit

Permalink
[DC-3856] Allow State info for AIAN participants (#1872)
Browse files Browse the repository at this point in the history
* [DC-3856] Un-generalize state info

* [DC-3856] Update test
  • Loading branch information
nishanthpp93 authored Dec 23, 2024
1 parent 73b47c1 commit 5f81b2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
and value_as_string to null.
Original Issues: DC-2706
DC-3856 indicated that state info does not need to be generalized
"""

# Python imports
Expand Down Expand Up @@ -43,13 +45,6 @@
WHEN observation_source_concept_id = 1585249 THEN CAST(NULL AS string)
ELSE
value_as_string
END
,
value_as_concept_id =
CASE
WHEN observation_source_concept_id = 1585249 THEN 2000000011
ELSE
value_as_concept_id
END
WHERE
person_id IN (
Expand All @@ -76,7 +71,7 @@ def __init__(self,
DO NOT REMOVE ORIGINAL JIRA ISSUE NUMBERS!
"""
desc = "Alters fields to generalize zipcode, and state observations for AI/AN participants"
super().__init__(issue_numbers=['DC2706'],
super().__init__(issue_numbers=['DC2706', 'DC3856'],
description=desc,
affected_datasets=[cdr_consts.CONTROLLED_TIER_DEID],
affected_tables=[OBSERVATION],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ def test_deidentify_aian_zip3_values(self):
'cleaned_values': [(1, 1, '', 0, 1586140, 1586141),
(2, 2, '', 0, 0, 0),
(3, 1, '000**', 0, 1585250, 0),
(4, 1, None, 2000000011, 1585249, 0),
(4, 1, None, 1234234, 1585249, 0),
(5, 2, '', 1234567, 1585249, 0),
(6, 2, '123**', 0, 1585250, 0),
(7, 3, '', 0, 1586140, 1586141),
(8, 3, '000**', 0, 1585250, 0),
(9, 3, None, 2000000011, 1585249, 0)]
(9, 3, None, 1234234, 1585249, 0)]
}]

self.default_test(tables_and_counts)

0 comments on commit 5f81b2c

Please sign in to comment.