Skip to content

Commit

Permalink
add new keep module for 'must have any cardiac surgery'
Browse files Browse the repository at this point in the history
  • Loading branch information
dehall committed May 13, 2022
1 parent 4d38bff commit 2794a10
Showing 1 changed file with 92 additions and 0 deletions.
92 changes: 92 additions & 0 deletions must_have_cardiac_surgery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"name": "must_have_cardiac_surgery",
"remarks": [
"A Keep Module for keeping patients that had one of the major cardiac surgeries:",
" - CABG",
" - AVRr",
" - TAVR"
],
"states": {
"Initial": {
"type": "Initial",
"conditional_transition": [
{
"transition": "Keep",
"condition": {
"condition_type": "Or",
"conditions": [
{
"condition_type": "Attribute",
"attribute": "cardiac_surgery",
"operator": "is not nil"
},
{
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": 232717009,
"display": "Coronary artery bypass grafting (procedure)"
}
]
},
{
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": 418824004,
"display": "Off-pump coronary artery bypass (procedure)"
}
]
},
{
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": "725351001",
"display": "Transcatheter aortic valve replacement (procedure)"
}
]
},
{
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": "26212005",
"display": "Replacement of aortic valve (procedure)"
}
]
},
{
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": "1155885007",
"display": "Repair of aortic valve (procedure)"
}
]
}
]
}
},
{
"transition": "Terminal"
}
],
"remarks": [
"This approach uses a trick of how Synthea health records and logic work. When a patient has an active condition, the code and HealthRecord.entry are added to a map called \"present\". When the condition ends, they are removed from the map. The \"Active Condition\" logic checks for the existence of the given code in that map. The trick here is that procedures are also added to that \"present\" map, and are never removed, so we can use an \"Active Condition\" to check if the procedure code is in that map, and get around the fact that there's no \"Procedure Performed\" logic."
]
},
"Terminal": {
"type": "Terminal"
},
"Keep": {
"type": "Terminal"
}
},
"gmf_version": 2
}

0 comments on commit 2794a10

Please sign in to comment.