Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 665de81

Browse files
committedOct 25, 2024·
Updates from review.
1 parent 567cbf5 commit 665de81

File tree

4 files changed

+669
-395
lines changed

4 files changed

+669
-395
lines changed
 

‎src/main/java/org/mitre/synthea/engine/Logic.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ public static class Attribute extends Logic {
283283
@Override
284284
public boolean test(Person person, long time) {
285285
try {
286+
if (value instanceof String) {
287+
value = person.attributes.getOrDefault(value, value);
288+
}
286289
return Utilities.compare(person.attributes.get(attribute), value, operator);
287290
} catch (Exception e) {
288291
String message = "Attribute Logic error: " + attribute + " " + operator + " " + value;
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"name": "anti_amyloid_beta_monoclonal_antibody_infusions",
3+
"remarks": [
4+
"This module depends on the Dementia and Anti-Amyloid-Beta Monoclonal Antibody Treatment modules, and uses the shared medications/anti_ab_mabs_selection submodule."
5+
],
6+
"states": {
7+
"Initial": {
8+
"type": "Initial",
9+
"direct_transition": "Wait Until Study is Active"
10+
},
11+
"Wait Until Study is Active": {
12+
"type": "Guard",
13+
"allow": {
14+
"condition_type": "And",
15+
"conditions": [
16+
{
17+
"condition_type": "Attribute",
18+
"attribute": "anti-ab-mab-ced-study",
19+
"operator": "is not nil"
20+
},
21+
{
22+
"condition_type": "Attribute",
23+
"attribute": "anti-ab-mab-ced-study",
24+
"operator": "==",
25+
"value": true
26+
}
27+
]
28+
},
29+
"direct_transition": "Wait for Infusion Appointment"
30+
},
31+
"Wait for Infusion Appointment": {
32+
"type": "Delay",
33+
"distribution": {
34+
"kind": "EXACT",
35+
"parameters": {
36+
"value": 2
37+
}
38+
},
39+
"unit": "weeks",
40+
"conditional_transition": [
41+
{
42+
"transition": "Infusion Encounter",
43+
"condition": {
44+
"condition_type": "Attribute",
45+
"attribute": "anti-ab-mab-ced-study",
46+
"operator": "==",
47+
"value": true
48+
}
49+
},
50+
{
51+
"transition": "Wait for Infusion Appointment"
52+
}
53+
]
54+
},
55+
"Infusion Encounter": {
56+
"type": "Encounter",
57+
"encounter_class": "ambulatory",
58+
"reason": "Type of Alzheimer's",
59+
"telemedicine_possibility": "none",
60+
"codes": [
61+
{
62+
"system": "SNOMED-CT",
63+
"code": "387760006",
64+
"display": "Infusion care (regime/therapy)"
65+
}
66+
],
67+
"direct_transition": "Receive_mAbs"
68+
},
69+
"End Encounter": {
70+
"type": "EncounterEnd",
71+
"direct_transition": "Wait for Infusion Appointment"
72+
},
73+
"Receive_mAbs": {
74+
"type": "CallSubmodule",
75+
"submodule": "medications/anti_ab_mabs_selection",
76+
"direct_transition": "End Encounter"
77+
}
78+
},
79+
"gmf_version": 2
80+
}

‎src/main/resources/modules/anti_amyloid_beta_monoclonal_antibody_treatment.json

Lines changed: 244 additions & 395 deletions
Large diffs are not rendered by default.
Lines changed: 342 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,342 @@
1+
{
2+
"name": "anti-ab-mabs-selection",
3+
"remarks": [
4+
"Select an anti-amyloid-beta monoclonal antibody based on availability or current infusion plan."
5+
],
6+
"states": {
7+
"Initial": {
8+
"type": "Initial",
9+
"direct_transition": "Check for prior infusions"
10+
},
11+
"Terminal": {
12+
"type": "Terminal"
13+
},
14+
"Aducanumab_Low_Dose": {
15+
"type": "MedicationOrder",
16+
"codes": [
17+
{
18+
"system": "RxNorm",
19+
"code": "2557232",
20+
"display": "1.7 ML aducanumab-avwa 100 MG/ML Injection"
21+
}
22+
],
23+
"direct_transition": "Terminal",
24+
"administration": true,
25+
"reason": "Type of Alzheimer's",
26+
"assign_to_attribute": "anti-amyloid-beta-mabs",
27+
"remarks": [
28+
"Removed January 2024"
29+
]
30+
},
31+
"Lecanemab_Increased_Dose": {
32+
"type": "MedicationOrder",
33+
"codes": [
34+
{
35+
"system": "RxNorm",
36+
"code": "2626155",
37+
"display": "5 ML lecanemab-irmb 100 MG/ML Injection"
38+
}
39+
],
40+
"administration": true,
41+
"reason": "Type of Alzheimer's",
42+
"assign_to_attribute": "anti-amyloid-beta-mabs",
43+
"direct_transition": "Terminal"
44+
},
45+
"Aducanumab_Increased_Dose": {
46+
"type": "MedicationOrder",
47+
"codes": [
48+
{
49+
"system": "RxNorm",
50+
"code": "2557224",
51+
"display": "3 ML aducanumab-avwa 100 MG/ML Injection"
52+
}
53+
],
54+
"administration": true,
55+
"reason": "Type of Alzheimer's",
56+
"direct_transition": "Terminal",
57+
"assign_to_attribute": "anti-amyloid-beta-mabs",
58+
"remarks": [
59+
"Removed January 2024"
60+
]
61+
},
62+
"Donanemab": {
63+
"type": "MedicationOrder",
64+
"codes": [
65+
{
66+
"system": "RxNorm",
67+
"code": "2687972",
68+
"display": "20 ML donanemab-azbt 17.5 MG/ML Injection"
69+
}
70+
],
71+
"administration": true,
72+
"reason": "Type of Alzheimer's",
73+
"assign_to_attribute": "anti-amyloid-beta-mabs",
74+
"direct_transition": "Terminal",
75+
"remarks": [
76+
"Approved July 2, 2024"
77+
]
78+
},
79+
"Lecanemab_Low_Dose": {
80+
"type": "MedicationOrder",
81+
"codes": [
82+
{
83+
"system": "RxNorm",
84+
"code": "2626147",
85+
"display": "2 ML lecanemab-irmb 100 MG/ML Injection"
86+
}
87+
],
88+
"administration": true,
89+
"reason": "Type of Alzheimer's",
90+
"assign_to_attribute": "anti-amyloid-beta-mabs",
91+
"direct_transition": "Terminal"
92+
},
93+
"After April 2022": {
94+
"type": "Simple",
95+
"distributed_transition": [
96+
{
97+
"transition": "Set_Lecanemab_Low",
98+
"distribution": 0.3
99+
},
100+
{
101+
"transition": "Set_Lecanemab_Increased",
102+
"distribution": 0.3
103+
},
104+
{
105+
"transition": "Set_Aducanumab_Low",
106+
"distribution": 0.2
107+
},
108+
{
109+
"transition": "Set_Aducanumab_Increased",
110+
"distribution": 0.2
111+
}
112+
]
113+
},
114+
"After January 2024": {
115+
"type": "Simple",
116+
"distributed_transition": [
117+
{
118+
"transition": "Set_Lecanemab_Low",
119+
"distribution": 0.5
120+
},
121+
{
122+
"transition": "Set_Lecanemab_Increased",
123+
"distribution": 0.5
124+
}
125+
]
126+
},
127+
"After July 2024": {
128+
"type": "Simple",
129+
"distributed_transition": [
130+
{
131+
"transition": "Set_Lecanemab_Low",
132+
"distribution": 0.3
133+
},
134+
{
135+
"transition": "Set_Lecanemab_Increased",
136+
"distribution": 0.3
137+
},
138+
{
139+
"transition": "Set_Donanemab",
140+
"distribution": 0.4
141+
}
142+
]
143+
},
144+
"Check Date": {
145+
"type": "Simple",
146+
"conditional_transition": [
147+
{
148+
"transition": "After April 2022",
149+
"condition": {
150+
"condition_type": "And",
151+
"conditions": [
152+
{
153+
"condition_type": "Date",
154+
"operator": ">=",
155+
"date": {
156+
"year": 2022,
157+
"month": 4,
158+
"day": 7,
159+
"hour": 0,
160+
"minute": 0,
161+
"second": 0,
162+
"millisecond": 0
163+
},
164+
"value": 0
165+
},
166+
{
167+
"condition_type": "Date",
168+
"operator": "<",
169+
"value": 0,
170+
"date": {
171+
"year": 2024,
172+
"month": 1,
173+
"day": 1,
174+
"hour": 0,
175+
"minute": 0,
176+
"second": 0,
177+
"millisecond": 0
178+
}
179+
}
180+
]
181+
}
182+
},
183+
{
184+
"transition": "After January 2024",
185+
"condition": {
186+
"condition_type": "And",
187+
"conditions": [
188+
{
189+
"condition_type": "Date",
190+
"operator": ">=",
191+
"date": {
192+
"year": 2024,
193+
"month": 1,
194+
"day": 1,
195+
"hour": 0,
196+
"minute": 0,
197+
"second": 0,
198+
"millisecond": 0
199+
},
200+
"value": 0
201+
},
202+
{
203+
"condition_type": "Date",
204+
"operator": "<",
205+
"value": 0,
206+
"date": {
207+
"year": 2024,
208+
"month": 7,
209+
"day": 1,
210+
"hour": 0,
211+
"minute": 0,
212+
"second": 0,
213+
"millisecond": 0
214+
}
215+
}
216+
]
217+
}
218+
},
219+
{
220+
"transition": "After July 2024",
221+
"condition": {
222+
"condition_type": "Date",
223+
"operator": ">=",
224+
"value": 0,
225+
"date": {
226+
"year": 2024,
227+
"month": 7,
228+
"day": 1,
229+
"hour": 0,
230+
"minute": 0,
231+
"second": 0,
232+
"millisecond": 0
233+
}
234+
}
235+
},
236+
{
237+
"transition": "Terminal"
238+
}
239+
]
240+
},
241+
"Check for prior infusions": {
242+
"type": "Simple",
243+
"conditional_transition": [
244+
{
245+
"transition": "Administer Proper Infusion",
246+
"condition": {
247+
"condition_type": "Attribute",
248+
"attribute": "anti-ab-mab-ced-study-med",
249+
"operator": "is not nil"
250+
}
251+
},
252+
{
253+
"transition": "Check Date"
254+
}
255+
]
256+
},
257+
"Administer Proper Infusion": {
258+
"type": "Simple",
259+
"conditional_transition": [
260+
{
261+
"transition": "Aducanumab_Low_Dose",
262+
"condition": {
263+
"condition_type": "Attribute",
264+
"attribute": "anti-ab-mab-ced-study-med",
265+
"operator": "==",
266+
"value": "Aducanumab_Low_Dose"
267+
}
268+
},
269+
{
270+
"transition": "Aducanumab_Increased_Dose",
271+
"condition": {
272+
"condition_type": "Attribute",
273+
"attribute": "anti-ab-mab-ced-study-med",
274+
"operator": "==",
275+
"value": "Aducanumab_Increased_Dose"
276+
}
277+
},
278+
{
279+
"transition": "Lecanemab_Low_Dose",
280+
"condition": {
281+
"condition_type": "Attribute",
282+
"attribute": "anti-ab-mab-ced-study-med",
283+
"operator": "==",
284+
"value": "Lecanemab_Low_Dose"
285+
}
286+
},
287+
{
288+
"transition": "Lecanemab_Increased_Dose",
289+
"condition": {
290+
"condition_type": "Attribute",
291+
"attribute": "anti-ab-mab-ced-study-med",
292+
"operator": "==",
293+
"value": "Lecanemab_Increased_Dose"
294+
}
295+
},
296+
{
297+
"transition": "Donanemab",
298+
"condition": {
299+
"condition_type": "Attribute",
300+
"attribute": "anti-ab-mab-ced-study-med",
301+
"operator": "==",
302+
"value": "Donanemab"
303+
}
304+
},
305+
{
306+
"transition": "Terminal"
307+
}
308+
]
309+
},
310+
"Set_Lecanemab_Low": {
311+
"type": "SetAttribute",
312+
"attribute": "anti-ab-mab-ced-study-med",
313+
"direct_transition": "Administer Proper Infusion",
314+
"value": "Lecanemab_Low_Dose"
315+
},
316+
"Set_Aducanumab_Low": {
317+
"type": "SetAttribute",
318+
"attribute": "anti-ab-mab-ced-study-med",
319+
"direct_transition": "Administer Proper Infusion",
320+
"value": "Aducanumab_Low_Dose"
321+
},
322+
"Set_Donanemab": {
323+
"type": "SetAttribute",
324+
"attribute": "anti-ab-mab-ced-study-med",
325+
"direct_transition": "Administer Proper Infusion",
326+
"value": "Donanemab"
327+
},
328+
"Set_Aducanumab_Increased": {
329+
"type": "SetAttribute",
330+
"attribute": "anti-ab-mab-ced-study-med",
331+
"direct_transition": "Administer Proper Infusion",
332+
"value": "Aducanumab_Increased_Dose"
333+
},
334+
"Set_Lecanemab_Increased": {
335+
"type": "SetAttribute",
336+
"attribute": "anti-ab-mab-ced-study-med",
337+
"direct_transition": "Administer Proper Infusion",
338+
"value": "Lecanemab_Increased_Dose"
339+
}
340+
},
341+
"gmf_version": 2
342+
}

0 commit comments

Comments
 (0)
Please sign in to comment.