Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Diabetic retinopathy #1483

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b40900e
initial changes for diabetic retinopathy module, not yet SME reviewed
dehall Apr 2, 2024
fd7bae2
cleanup
dehall Apr 2, 2024
ca38ebe
review improvements
dehall Apr 12, 2024
e0f9697
model enhancements
dehall Apr 24, 2024
1a25872
wrap logmar unit in braces {}
dehall Apr 24, 2024
7adb4e9
enhancements
dehall May 31, 2024
7780c73
add doc and stage observation codes
dehall Jun 24, 2024
1560b92
Update diabetic_retinopathy_module_guide.md
dehall Jun 24, 2024
76fd12d
Update diabetic_retinopathy_module_guide.md
dehall Jun 24, 2024
d701e41
add sample records to repo so they can be loaded in the record viewer
dehall Jun 26, 2024
37af0dd
quick fixes
dehall Jul 8, 2024
72e3a7f
make sure the associate_images script is actually in the repo
dehall Jul 15, 2024
7fac366
dicom fundus photos
dehall Jul 17, 2024
8f50d89
improvements based on review feedback
dehall Aug 8, 2024
f2c5d38
additional updates
dehall Aug 30, 2024
9ca7890
add module remarks
dehall Sep 3, 2024
2a50a30
update docs
dehall Sep 5, 2024
b087b0b
latest updates before rebase
dehall Sep 6, 2024
7eec102
latest version of the run script
dehall Sep 10, 2024
222e325
updated dicom script
dehall Sep 12, 2024
fb7d08c
add all python scripts just for reproducibility
dehall Sep 12, 2024
540269d
script fixes
dehall Sep 13, 2024
77e3aad
complete run through of run_coherent_eyes
dehall Sep 13, 2024
bb31e2c
one last change
dehall Sep 13, 2024
1efac55
cleanup for merge to master
dehall Jul 8, 2024
854afe5
little more cleanup, delete files and pluck some more from master
dehall Nov 12, 2024
145eac7
Merge master into diabetic_retinopathy_for_merge
dehall Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions keep_diabetes_no_dr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "keep_diabetes_no_dr",
"remarks": [
"A blank module"
],
"states": {
"Initial": {
"type": "Initial",
"conditional_transition": [
{
"transition": "Keep",
"condition": {
"condition_type": "And",
"conditions": [
{
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": 44054006,
"display": "Diabetes mellitus type 2 (disorder)"
}
]
},
{
"condition_type": "Not",
"condition": {
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": "1551000119108",
"display": "Nonproliferative diabetic retinopathy due to type 2 diabetes mellitus (disorder)"
}
]
}
}
]
}
},
{
"transition": "Terminal"
}
]
},
"Terminal": {
"type": "Terminal"
},
"Keep": {
"type": "Terminal"
}
},
"gmf_version": 2
}
36 changes: 36 additions & 0 deletions keep_npdr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "Generated Keep Module",
"states": {
"Initial": {
"type": "Initial",
"name": "Initial",
"conditional_transition": [
{
"transition": "Keep",
"condition": {
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": "1551000119108",
"display": "Nonproliferative diabetic retinopathy due to type 2 diabetes mellitus (disorder)"
}
]
}
},
{
"transition": "Terminal"
}
]
},
"Terminal": {
"type": "Terminal",
"name": "Terminal"
},
"Keep": {
"type": "Terminal",
"name": "Keep"
}
},
"gmf_version": 2
}
54 changes: 54 additions & 0 deletions keep_npdr_no_pdr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "keep_npdr_no_pdr",
"remarks": [
"A blank module"
],
"states": {
"Initial": {
"type": "Initial",
"conditional_transition": [
{
"transition": "Keep",
"condition": {
"condition_type": "And",
"conditions": [
{
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": "1551000119108",
"display": "Nonproliferative diabetic retinopathy due to type 2 diabetes mellitus (disorder)"
}
]
},
{
"condition_type": "Not",
"condition": {
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": "1501000119109",
"display": "Proliferative diabetic retinopathy due to type II diabetes mellitus (disorder)"
}
]
}
}
]
}
},
{
"transition": "Terminal"
}
]
},
"Terminal": {
"type": "Terminal"
},
"Keep": {
"type": "Terminal"
}
},
"gmf_version": 2
}
36 changes: 36 additions & 0 deletions keep_pdr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "Generated Keep Module",
"states": {
"Initial": {
"type": "Initial",
"name": "Initial",
"conditional_transition": [
{
"transition": "Keep",
"condition": {
"condition_type": "Active Condition",
"codes": [
{
"system": "SNOMED-CT",
"code": "1501000119109",
"display": "Proliferative diabetic retinopathy due to type II diabetes mellitus (disorder)"
}
]
}
},
{
"transition": "Terminal"
}
]
},
"Terminal": {
"type": "Terminal",
"name": "Terminal"
},
"Keep": {
"type": "Terminal",
"name": "Keep"
}
},
"gmf_version": 2
}
2 changes: 1 addition & 1 deletion src/main/java/org/mitre/synthea/engine/State.java
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ private void duplicateInstances(RandomNumberGenerator random, long time,

// Create the new instances
for (int j = 0; j < s.instances.size(); j++) {
instanceClones.add(s.instances.get(i).clone());
instanceClones.add(s.instances.get(j).clone());
}
s.instances = instanceClones;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ public static String export(Person person, Encounter encounter) {
person.attributes.put("ehr_medications", encounter.medications);
person.attributes.put("ehr_careplans", encounter.careplans);
person.attributes.put("ehr_imaging_studies", encounter.imagingStudies);
if (encounter.note == null) {
person.attributes.remove("ehr_note");
} else {
person.attributes.put("ehr_note", encounter.note);
}
person.attributes.put("time", encounter.start);
if (person.attributes.containsKey(LifecycleModule.QUIT_SMOKING_AGE)) {
person.attributes.put("quit_smoking_age",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public default double rand(double[] range) {
* @param choices The options to be returned.
* @return One of the options randomly selected.
*/
public default String rand(String[] choices) {
public default String rand(String... choices) {
int value = randInt(choices.length);
return choices[value];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public class Entry implements Serializable {
public String type;
public List<Code> codes;
private BigDecimal cost;
public String note;

/**
* Constructor for Entry.
Expand Down
Loading
Loading