Skip to content

Commit

Permalink
Merge pull request #8 from rileyhazard/child.prediction.changes
Browse files Browse the repository at this point in the history
Child prediction changes
  • Loading branch information
rileyhazard authored Nov 30, 2020
2 parents d2b4b79 + b920e62 commit 38595f4
Show file tree
Hide file tree
Showing 12 changed files with 165 additions and 189 deletions.
6 changes: 6 additions & 0 deletions docs/changelog_v2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog 2.1

* Reduce the threshold for child undetermined causes of death (PR8)
* Remove the majority of child sepsis spurious symptoms (PR8)
* Amend the child homicide rule (PR8)

2 changes: 1 addition & 1 deletion pkg/smartva.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project>
<shortName>SmartVA</shortName>
<fullName>SmartVA-Analyze</fullName>
<version>2.0.0</version>
<version>2.1.0</version>
<componentList>
<component>
<name>default</name>
Expand Down
2 changes: 1 addition & 1 deletion smartva/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
prog_name = 'SmartVA-Analyze'
version = '2.0.0'
version = '2.1.0'
21 changes: 1 addition & 20 deletions smartva/data/child_tariff_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

CUTOFF_POS = 0.95

UNIFORM_LIST_POS = 0.24
UNIFORM_LIST_POS = 0.30

MIN_CAUSE_SCORE = defaultdict(lambda: 3.7)

Expand Down Expand Up @@ -161,28 +161,9 @@
's99992', # word_accid
],
20: [ # Sepsis
's999924', # word_icu
's2991', # quintile 1 of age
's999923', # word_heart
's999911', # word_cold
's999929', # word_lung
's13991', # decedent was small or very small
's999947', # word_swell
's999933', # word_pneumonia
's2992', # quintile 2 of age
's164', # Decedent did not suffer accident
's14', # What was the weight of the deceased at birth?
's188', # Has the deceased's (biological) mother ever been tested for HIV?
's99998', # word_breath
's125', # During the illness that led to death, did [name] have difficult breathing?
's117', # How many days before death did the frequent loose or liquid stools start? [days]
's28', # How old was the baby/child when the fatal illness started? [days]
's31', # How old was the deceased at the time of death? [days]
's2994', # quintile 4 of age
's2995', # quintile 5 of age
's17', # Did the baby ever cry?
's18', # Did the baby ever move?
's19', # Did the baby ever breathe?
],
21: [ # Homicide
's153',
Expand Down
1 change: 1 addition & 0 deletions smartva/data/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class Child(object):
POISONING = 'c4_47_4'
BITE = 'c4_47_5'
BURN = 'c4_47_6'
VIOLENCE = 'c4_47_7'
NO_INJURY = 'c4_47_11'
OTHER_INJURY = 'c4_47_8a'
INFLICTED_BY_OTHER = 'c4_48'
Expand Down
2 changes: 1 addition & 1 deletion smartva/res/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<b>Version</b>
</p>
<p>
Smart VA 2.0.0
Smart VA 2.1.0
</p>
</body>
</html>
Binary file modified smartva/res/documentation.docx
Binary file not shown.
Binary file modified smartva/res/documentation.fld/image001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion smartva/res/documentation.fld/props002.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ds:datastoreItem ds:itemID="{806B25D1-F386-8948-990F-B5D5661F0C46}" xmlns:ds="http://schemas.openxmlformats.org/officeDocument/2006/customXml"><ds:schemaRefs><ds:schemaRef ds:uri="http://schemas.openxmlformats.org/officeDocument/2006/bibliography"/></ds:schemaRefs></ds:datastoreItem>
<ds:datastoreItem ds:itemID="{5D289D1F-7A34-7548-B6F4-B4959FB4C47F}" xmlns:ds="http://schemas.openxmlformats.org/officeDocument/2006/customXml"><ds:schemaRefs><ds:schemaRef ds:uri="http://schemas.openxmlformats.org/officeDocument/2006/bibliography"/></ds:schemaRefs></ds:datastoreItem>
308 changes: 147 additions & 161 deletions smartva/res/documentation.html

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions smartva/rules/homicide_child.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
def logic_rule(row):
value_of = value_from_row(row, int_or_float)

injury_by_other = value_of(Child.INFLICTED_BY_OTHER) == YES

injury_by_other = any([
value_of(Child.INFLICTED_BY_OTHER) == YES,
value_of(Child.VIOLENCE) == YES,
])
recent = value_of(Child.INJURY_DAYS) < INJURY_DURATION_CUTTOFF

no_unintentional_injury = all([
Expand Down
4 changes: 2 additions & 2 deletions test/tariff_prep/child-predictions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ sid,cause,cause34,age,sex
124,,Undetermined,1,1
125,,Undetermined,1,1
126,,Undetermined,1,1
127,,Undetermined,1,1
127,1,AIDS,1,1
128,,Undetermined,1,1
129,,Undetermined,1,1
130,,Undetermined,1,1
Expand Down Expand Up @@ -183,7 +183,7 @@ sid,cause,cause34,age,sex
182,,Undetermined,1,1
183,3,Diarrhea/Dysentery,1,1
184,8,Hemorrhagic fever,1,1
185,,Undetermined,1,1
185,3,Diarrhea/Dysentery,1,1
186,,Undetermined,1,1
187,,Undetermined,1,1
188,,Undetermined,1,1
Expand Down

0 comments on commit 38595f4

Please sign in to comment.