Skip to content

Commit e4c096b

Browse files
committed
Merge
2 parents 740a134 + 271aa6e commit e4c096b

244 files changed

Lines changed: 238104 additions & 1235 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Bug Report
2+
description: File a bug report
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
10+
Please note that this template is for bugs only. This is a case where Synthea crashes,
11+
behaves in an unexpected way or outputs incorrect information.
12+
13+
If you have a question about how Synthea works, please visit Synthea Discussions.
14+
- type: textarea
15+
id: what-happened
16+
attributes:
17+
label: What happened?
18+
description: Also tell us, what did you expect to happen?
19+
placeholder: Tell us what you see!
20+
value: "A bug happened!"
21+
validations:
22+
required: true
23+
- type: textarea
24+
attributes:
25+
label: Environment
26+
description: |
27+
examples:
28+
- **OS**: macOS 12.2.1
29+
- **Java**: openjdk version 17.0.1
30+
value: |
31+
- OS:
32+
- Java:
33+
render: markdown
34+
validations:
35+
required: false
36+
- type: textarea
37+
id: logs
38+
attributes:
39+
label: Relevant log output
40+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
41+
render: shell

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Feature Request
2+
description: Request a new feature in Synthea
3+
labels: ["feature"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this feature request!
9+
10+
Prior to filling out a feature request, it is recommended to open a Synthea Discussion
11+
to ensure that the desired functionality is something that can't be currently achieved
12+
with Synthea and that the idea is something that the Synthea team would be willing to
13+
incorporate.
14+
15+
Also, please check the [Contributions to Avoid](https://github.com/synthetichealth/synthea/wiki/Contributing#contributions-to-avoid)
16+
section of the Synthea wiki to ensure your idea is something that fits Synthea's scope.
17+
- type: textarea
18+
id: feature
19+
attributes:
20+
label: Requested Feature
21+
description: New behavior, simulated information or other item you would like in Synthea
22+
placeholder: Synthea should add a feature to...
23+
validations:
24+
required: true

.github/workflows/ci-build-test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ on: [push, pull_request]
33
jobs:
44
check_java_latest:
55
runs-on: ubuntu-latest
6-
name: Java 16
6+
name: Java 17
77

88
steps:
99
- uses: actions/checkout@v2
1010
- name: Set up JDK
1111
uses: actions/setup-java@v1
1212
with:
13-
java-version: 16
13+
java-version: 17
1414

1515
- name: Gradle cache
1616
uses: actions/cache@v2
1717
with:
1818
path: |
1919
~/.gradle/caches
2020
~/.gradle/wrapper
21-
key: ${{ runner.os }}-gradle-jdk16-${{ hashFiles('**/*.gradle*') }}
21+
key: ${{ runner.os }}-gradle-jdk17-${{ hashFiles('**/*.gradle*') }}
2222
restore-keys: |
23-
${{ runner.os }}-gradle-jdk16
23+
${{ runner.os }}-gradle-jdk17
2424
2525
- name: Compile with Gradle
2626
run: ./gradlew assemble
@@ -30,8 +30,8 @@ jobs:
3030
if: env.SLACK_WEBHOOK_URL
3131
with:
3232
status: custom
33-
job_name: Java 16
34-
author_name: Java 16 Build
33+
job_name: Java 17
34+
author_name: Java 17 Build
3535
fields: workflow,commit,repo,author,took
3636
# see https://action-slack.netlify.app/usecase/02-custom for custom payload info
3737
custom_payload: |

.gitignore

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,20 @@ bin/**
1313
/output/
1414
/out/
1515

16+
**/*.log
17+
1618
# don't commit the autobuilt version file
1719
src/main/resources/version.txt
1820

21+
# don't commit the code maps
22+
src/main/resources/export/condition_code_map.json
23+
src/main/resources/export/medication_code_map.json
24+
src/main/resources/export/drg_code_map.json
25+
src/main/resources/export/dme_code_map.json
26+
src/main/resources/export/hcpcs_code_map.json
27+
src/main/resources/export/betos_code_map.json
28+
src/main/resources/export/external_codes.csv
29+
1930
# H2 database files
2031
**/*.mv.db
2132
**/*.trace.db
@@ -26,5 +37,5 @@ src/main/resources/version.txt
2637
.vscode/settings.json
2738
/build/
2839

29-
src/main/resources/map.json
30-
40+
# VS Code plugin files
41+
.history

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Synthea
2-
Copyright 2017-2020 The MITRE Corporation
2+
Copyright 2017-2022 The MITRE Corporation
33

44
This material contains prescribable drug codes from RxNorm that are released by
55
the National Library of Medicine and is in the public domain.

README.md

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ cd synthea
3636
./gradlew build check test
3737
```
3838

39-
### Changing the default properties
39+
### Changing the default properties
4040

4141

4242
The default properties file values can be found at `src/main/resources/synthea.properties`.
@@ -53,19 +53,46 @@ Generating the population one at a time...
5353
```
5454

5555
Command-line arguments may be provided to specify a state, city, population size, or seed for randomization.
56-
57-
Usage is
5856
```
59-
run_synthea [-s seed] [-p populationSize] [-m moduleFilter] [state [city]]
57+
run_synthea [-s seed] [-p populationSize] [state [city]]
6058
```
61-
For example:
6259

63-
- `run_synthea Massachusetts`
64-
- `run_synthea Alaska Juneau`
65-
- `run_synthea -s 12345`
66-
- `run_synthea -p 1000`
67-
- `run_synthea -s 987 Washington Seattle`
68-
- `run_synthea -s 21 -p 100 Utah "Salt Lake City"`
60+
Full usage info can be printed by passing the `-h` option.
61+
```
62+
$ ./run_synthea -h
63+
64+
> Task :run
65+
Usage: run_synthea [options] [state [city]]
66+
Options: [-s seed]
67+
[-cs clinicianSeed]
68+
[-p populationSize]
69+
[-r referenceDate as YYYYMMDD]
70+
[-g gender]
71+
[-a minAge-maxAge]
72+
[-o overflowPopulation]
73+
[-m moduleFileWildcardList]
74+
[-c localConfigFilePath]
75+
[-d localModulesDirPath]
76+
[-i initialPopulationSnapshotPath]
77+
[-u updatedPopulationSnapshotPath]
78+
[-t updateTimePeriodInDays]
79+
[-f fixedRecordPath]
80+
[-k keepMatchingPatientsPath]
81+
[--config* value]
82+
* any setting from src/main/resources/synthea.properties
83+
84+
Examples:
85+
run_synthea Massachusetts
86+
run_synthea Alaska Juneau
87+
run_synthea -s 12345
88+
run_synthea -p 1000
89+
run_synthea -s 987 Washington Seattle
90+
run_synthea -s 21 -p 100 Utah "Salt Lake City"
91+
run_synthea -g M -a 60-65
92+
run_synthea -p 10 --exporter.fhir.export true
93+
run_synthea -m moduleFilename:anotherModule:module*
94+
run_synthea --exporter.baseDirectory "./output_tx/" Texas
95+
```
6996

7097
Some settings can be changed in `./src/main/resources/synthea.properties`.
7198

@@ -86,7 +113,7 @@ Generate a list of concepts (used in the records) or attributes (variables on ea
86113

87114
# License
88115

89-
Copyright 2017-2021 The MITRE Corporation
116+
Copyright 2017-2022 The MITRE Corporation
90117

91118
Licensed under the Apache License, Version 2.0 (the "License");
92119
you may not use this file except in compliance with the License.

build.gradle

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,29 @@ repositories {
2525
}
2626
}
2727

28+
// Uncomment to see deprecation warnings
29+
// tasks.withType(JavaCompile) {
30+
// options.compilerArgs << "-Xlint:deprecation"
31+
// }
32+
2833
checkstyle {
2934
toolVersion '8.4'
3035
//showViolations = true
3136
}
3237

3338
jacoco {
34-
toolVersion '0.8.6'
39+
toolVersion '0.8.7'
3540
}
3641

3742
dependencies {
3843
// This dependency is found on compile classpath of this component and consumers.
3944
implementation 'com.google.code.gson:gson:2.8.7'
4045
implementation 'com.jayway.jsonpath:json-path:2.4.0'
41-
implementation 'ca.uhn.hapi.fhir:hapi-fhir-base:5.2.0'
42-
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:5.2.0'
43-
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:5.2.0'
44-
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-r4:5.2.0'
45-
implementation 'ca.uhn.hapi.fhir:hapi-fhir-client:5.2.0'
46+
implementation 'ca.uhn.hapi.fhir:hapi-fhir-base:5.7.0'
47+
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:5.7.0'
48+
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:5.7.0'
49+
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-r4:5.7.0'
50+
implementation 'ca.uhn.hapi.fhir:hapi-fhir-client:5.7.0'
4651
// C-CDA export uses Apache FreeMarker templates
4752
implementation 'org.freemarker:freemarker:2.3.26-incubating'
4853

@@ -72,7 +77,14 @@ dependencies {
7277
// get rid of SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
7378
// if we switch to a real logging framework we may want to switch this
7479
implementation "org.slf4j:slf4j-api:1.7.9"
75-
// compile "org.slf4j:slf4j-nop:1.6.1" // SLF4J seems to already be provided by org.apache.logging.log4j
80+
//implementation "org.slf4j:slf4j-nop:1.7.9" // SLF4J seems to already be provided by org.apache.logging.log4j
81+
82+
// ensure transitive dependencies do not use vulnerable log4j
83+
implementation "org.apache.logging.log4j:log4j-core", {
84+
version {
85+
strictly '2.17.0'
86+
}
87+
}
7688

7789
// Physiology simulation dependencies
7890
implementation files('lib/sbscl/SimulationCoreLibrary_v1.5_slim.jar')
@@ -92,12 +104,12 @@ dependencies {
92104
testImplementation 'org.powermock:powermock-module-junit4:1.7.1'
93105
testImplementation 'org.powermock:powermock-api-mockito2:1.7.1'
94106
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.26.3'
95-
testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-validation:5.2.0'
96-
testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-validation-resources-r4:5.2.0'
97-
testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-validation-resources-dstu3:5.2.0'
98-
testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-validation-resources-dstu2:5.2.0'
99-
testImplementation 'com.helger:ph-schematron:5.0.4'
100-
testImplementation 'com.helger:ph-commons:9.1.1'
107+
testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-validation:5.7.0'
108+
testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-validation-resources-r4:5.7.0'
109+
testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-validation-resources-dstu3:5.7.0'
110+
testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-validation-resources-dstu2:5.7.0'
111+
testImplementation 'com.helger:ph-schematron:5.6.5'
112+
testImplementation 'com.helger:ph-commons:9.5.4'
101113
}
102114

103115
// Provide more descriptive test failure output
@@ -110,11 +122,17 @@ test {
110122
// showStandardStreams = true
111123
}
112124
maxHeapSize = "6144m"
125+
jacoco {
126+
excludes = ["org.hl7.*", "com.google.*"]
127+
}
113128
}
114129

115130
buildscript {
116131
repositories {
117-
jcenter()
132+
mavenCentral()
133+
maven {
134+
url "https://oss.sonatype.org/content/repositories/snapshots"
135+
}
118136
}
119137
dependencies {
120138
// commons-io used in getting the version id below
@@ -126,8 +144,8 @@ buildscript {
126144

127145
jacocoTestReport {
128146
reports {
129-
xml.enabled true
130-
html.enabled true
147+
xml.required = true
148+
html.required = true
131149
}
132150
}
133151

@@ -137,7 +155,7 @@ task graphviz(type: JavaExec) {
137155
group 'Application'
138156
description 'Generate rule visualization'
139157
classpath sourceSets.main.runtimeClasspath
140-
main = "Graphviz"
158+
mainClass = "Graphviz"
141159
}
142160

143161
task uberJar(type: Jar) {
@@ -166,30 +184,30 @@ task concepts(type: JavaExec) {
166184
group 'Application'
167185
description 'Create a list of simulated concepts'
168186
classpath sourceSets.main.runtimeClasspath
169-
main = "org.mitre.synthea.helpers.Concepts"
187+
mainClass = "org.mitre.synthea.helpers.Concepts"
170188
args 'false'
171189
}
172190

173191
task conceptswithoutcosts(type: JavaExec) {
174192
group 'Application'
175193
description 'Create a list of simulated concepts without costs'
176194
classpath sourceSets.main.runtimeClasspath
177-
main = "org.mitre.synthea.helpers.Concepts"
195+
mainClass = "org.mitre.synthea.helpers.Concepts"
178196
args 'true'
179197
}
180198

181199
task attributes(type: JavaExec) {
182200
group 'Application'
183201
description 'Create a list of patient attributes'
184202
classpath sourceSets.main.runtimeClasspath
185-
main = "org.mitre.synthea.helpers.Attributes"
203+
mainClass = "org.mitre.synthea.helpers.Attributes"
186204
}
187205

188206
task overrides(type: JavaExec) {
189207
group 'Application'
190208
description 'Create a list of modules parameters in module override format'
191209
classpath sourceSets.main.runtimeClasspath
192-
main = "org.mitre.synthea.helpers.ModuleOverrides"
210+
mainClass = "org.mitre.synthea.helpers.ModuleOverrides"
193211
doFirst {
194212
// TODO: is there a way to make this cleaner?
195213
String includeFields = project.hasProperty('includeFields') ? project.getProperty('includeFields') : ""
@@ -205,7 +223,7 @@ task physiology(type: JavaExec) {
205223
group 'Application'
206224
description 'Test a physiology simulation'
207225
classpath sourceSets.main.runtimeClasspath
208-
main = "org.mitre.synthea.engine.PhysiologySimulator"
226+
mainClass = "org.mitre.synthea.engine.PhysiologySimulator"
209227
}
210228

211229
task versionTxt() {
@@ -273,7 +291,7 @@ artifacts {
273291
}
274292

275293
def mavenGroup = 'org.mitre.synthea'
276-
def mavenVersion = '3.0.0-SNAPSHOT'
294+
def mavenVersion = '3.1.0-SNAPSHOT'
277295

278296
publishing {
279297
publications {

config/checkstyle/checkstyle.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
<property name="eachLine" value="true"/>
3434
</module>
3535

36+
<module name="SuppressWarningsFilter" />
3637
<module name="TreeWalker">
3738
<module name="OuterTypeFilename"/>
39+
<module name="SuppressWarningsHolder" />
3840
<module name="IllegalTokenText">
3941
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
4042
<property name="format" value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>

0 commit comments

Comments
 (0)