Skip to content

Commit 8d6e352

Browse files
authored
Merge branch 'synthetichealth:master' into master
2 parents 26a462b + 7187764 commit 8d6e352

File tree

180 files changed

+915
-548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+915
-548
lines changed

src/main/java/org/mitre/synthea/export/FhirR4.java

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,10 @@ public class FhirR4 {
198198
private static final Table<String, String, String> US_CORE_4_MAPPING;
199199
private static final Table<String, String, String> US_CORE_5_MAPPING;
200200
private static final Table<String, String, String> US_CORE_6_MAPPING;
201+
private static final Table<String, String, String> US_CORE_7_MAPPING;
201202

202203
public static enum USCoreVersion {
203-
v311, v400, v501, v610
204+
v311, v400, v501, v610, v700
204205
}
205206

206207
protected static boolean useUSCore3() {
@@ -235,6 +236,14 @@ protected static boolean useUSCore6() {
235236
return useUSCore6;
236237
}
237238

239+
protected static boolean useUSCore7() {
240+
boolean useUSCore7 = USE_US_CORE_IG && US_CORE_VERSION.startsWith("7");
241+
if (useUSCore7) {
242+
US_CORE_MAPPING = US_CORE_7_MAPPING;
243+
}
244+
return useUSCore7;
245+
}
246+
238247
private static final String COUNTRY_CODE = Config.get("generate.geography.country_code");
239248
private static final String PASSPORT_URI = Config.get("generate.geography.passport_uri", "http://hl7.org/fhir/sid/passport-USA");
240249

@@ -245,12 +254,13 @@ protected static boolean useUSCore6() {
245254
reloadIncludeExclude();
246255

247256
Map<String, Table<String, String, String>> usCoreMappings =
248-
loadMappingWithVersions("us_core_mapping.csv", "3", "4", "5", "6");
257+
loadMappingWithVersions("us_core_mapping.csv", "3", "4", "5", "6", "7");
249258

250259
US_CORE_3_MAPPING = usCoreMappings.get("3");
251260
US_CORE_4_MAPPING = usCoreMappings.get("4");
252261
US_CORE_5_MAPPING = usCoreMappings.get("5");
253262
US_CORE_6_MAPPING = usCoreMappings.get("6");
263+
US_CORE_7_MAPPING = usCoreMappings.get("7");
254264

255265
if (US_CORE_VERSION.startsWith("3")) {
256266
US_CORE_MAPPING = US_CORE_3_MAPPING;
@@ -260,6 +270,8 @@ protected static boolean useUSCore6() {
260270
US_CORE_MAPPING = US_CORE_5_MAPPING;
261271
} else if (US_CORE_VERSION.startsWith("6")) {
262272
US_CORE_MAPPING = US_CORE_6_MAPPING;
273+
} else if (US_CORE_VERSION.startsWith("7")) {
274+
US_CORE_MAPPING = US_CORE_7_MAPPING;
263275
}
264276
}
265277

@@ -370,7 +382,7 @@ private static Map loadLanguageLookup() {
370382

371383
if (StringUtils.isBlank(version) || version.contains(versionKey)) {
372384
// blank means applies to ALL versions
373-
// version.contains allows for things like "4,5,6"
385+
// version.contains allows for things like "4+5+6"
374386
mappingTable.put(system, code, url);
375387
}
376388
}
@@ -1404,6 +1416,7 @@ private static BundleEntryComponent explanationOfBenefit(BundleEntryComponent pe
14041416
eob.addContained(referral);
14051417
eob.setReferral(new Reference().setReference("#referral"));
14061418

1419+
// TODO: Make Coverage separate resources for US Core 6 & 7?
14071420
// Get the insurance info at the time that the encounter occurred.
14081421
Payer payer = claim.getPayer();
14091422
Coverage coverage = new Coverage();
@@ -1639,7 +1652,7 @@ private static BundleEntryComponent condition(
16391652

16401653
if (USE_US_CORE_IG) {
16411654
Meta meta = new Meta();
1642-
if (useUSCore5() || useUSCore6()) {
1655+
if (useUSCore5() || useUSCore6() || useUSCore7()) {
16431656
meta.addProfile(
16441657
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-encounter-diagnosis");
16451658
} else {
@@ -1867,14 +1880,20 @@ private static BundleEntryComponent observation(
18671880
meta.addProfile("http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab");
18681881
}
18691882

1883+
18701884
if (observation.category != null) {
1871-
if (useUSCore6()) {
1885+
if (useUSCore6() || useUSCore7()) {
18721886
switch (observation.category) {
18731887
case "imaging":
18741888
meta.addProfile("http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-clinical-result");
18751889
break;
18761890
case "social-history":
1877-
meta.addProfile("http://hl7.org/fhir/us/core/StructureDefinition/us-core-simple-observation");
1891+
if (code.code.equals("82810-3")) {
1892+
meta.addProfile("http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancystatus");
1893+
} else {
1894+
meta.addProfile("http://hl7.org/fhir/us/core/StructureDefinition/us-core-simple-observation");
1895+
}
1896+
18781897
break;
18791898
case "survey":
18801899
meta.addProfile("http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-screening-assessment");
@@ -3476,4 +3495,4 @@ protected static String getUrlPrefix(String resourceType) {
34763495
return "urn:uuid:";
34773496
}
34783497
}
3479-
}
3498+
}

src/main/javascript/update_code_display.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const codeDictionary = {};
3131
// codeDictionary[system][code] = "display to use"
3232

3333
// systems to skip because tx.fhir.org doesn't know about them
34-
const SYSTEMS_TO_SKIP = ['NUBC', 'DICOM-DCM', 'DICOM-SOP'];
34+
const SYSTEMS_TO_SKIP = ['NUBC', 'DICOM-DCM', 'DICOM-SOP', 'NullFlavor'];
3535

3636
// codes used in Synthea as placeholders that we know aren't real
3737
const PLACEHOLDER_CODES = ['999999',

src/main/resources/costs/medications.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ CODE,MIN,MODE,MAX,COMMENTS
187187
966222,0.25,0.28,0.43,Levothyroxine Sodium 0.075 MG Oral Tablet - https://data.medicaid.gov/Drug-Pricing-and-Payment/NADAC-National-Average-Drug-Acquisition-Cost-/a4y5-998d
188188
979092,0.1,0.28,2.62,Hydroxychloroquine Sulfate 200 MG Oral Tablet - https://data.medicaid.gov/Drug-Pricing-and-Payment/NADAC-National-Average-Drug-Acquisition-Cost-/a4y5-998d
189189
979485,0.03,0.08,0.09,Losartan Potassium 25 MG Oral Tablet - https://data.medicaid.gov/Drug-Pricing-and-Payment/NADAC-National-Average-Drug-Acquisition-Cost-/a4y5-998d
190-
993452,816.12,1014.45,1237.68,1 ML denosumab 60 MG/ML Prefilled Syringe (Prolia) - https://data.medicaid.gov/d/a4y5-998d/visualization
190+
993452,816.12,1014.45,1237.68,1 ML denosumab 60 MG/ML Prefilled Syringe (Prolia) - https://data.medicaid.gov/d/a4y5-998d/visualization

src/main/resources/immunization_schedule.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"code": {
103103
"system": "http://hl7.org/fhir/sid/cvx",
104104
"code": "140",
105-
"display": "Influenza, seasonal, injectable, preservative free"
105+
"display": "Influenza, split virus, trivalent, PF"
106106
},
107107
"remark": "This should really only happen Aug - Feb (preferring earlier). That may take some trickery. Since this is annual administration just populate the array with every 12 months, starting at 6 months.",
108108
"at_months": [

src/main/resources/keep_modules/keep_diabetes_no_dr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{
3131
"system": "SNOMED-CT",
3232
"code": "1551000119108",
33-
"display": "Nonproliferative diabetic retinopathy due to type 2 diabetes mellitus (disorder)"
33+
"display": "Nonproliferative diabetic retinopathy due to type II diabetes mellitus"
3434
}
3535
]
3636
}

src/main/resources/keep_modules/keep_npdr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{
1414
"system": "SNOMED-CT",
1515
"code": "1551000119108",
16-
"display": "Nonproliferative diabetic retinopathy due to type 2 diabetes mellitus (disorder)"
16+
"display": "Nonproliferative diabetic retinopathy due to type II diabetes mellitus"
1717
}
1818
]
1919
}

src/main/resources/keep_modules/keep_npdr_no_pdr.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{
1919
"system": "SNOMED-CT",
2020
"code": "1551000119108",
21-
"display": "Nonproliferative diabetic retinopathy due to type 2 diabetes mellitus (disorder)"
21+
"display": "Nonproliferative diabetic retinopathy due to type II diabetes mellitus"
2222
}
2323
]
2424
},
@@ -30,7 +30,7 @@
3030
{
3131
"system": "SNOMED-CT",
3232
"code": "1501000119109",
33-
"display": "Proliferative diabetic retinopathy due to type II diabetes mellitus (disorder)"
33+
"display": "Proliferative diabetic retinopathy due to type II diabetes mellitus"
3434
}
3535
]
3636
}

src/main/resources/keep_modules/keep_pdr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{
1414
"system": "SNOMED-CT",
1515
"code": "1501000119109",
16-
"display": "Proliferative diabetic retinopathy due to type II diabetes mellitus (disorder)"
16+
"display": "Proliferative diabetic retinopathy due to type II diabetes mellitus"
1717
}
1818
]
1919
}

src/main/resources/language_lookup.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"russian": {
4848
"code": "ru-RU",
4949
"system": "urn:ietf:bcp:47",
50-
"display": "Russian (Russia)"
50+
"display": "Russian (Region=Russian Federation)"
5151
},
5252
"vietnamese": {
5353
"code": "vi",

src/main/resources/modules/acute_myeloid_leukemia.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@
720720
{
721721
"system": "RxNorm",
722722
"code": 199885,
723-
"display": "levofloxacin 500MG Oral tablet"
723+
"display": "levofloxacin 500 MG Oral Tablet"
724724
}
725725
]
726726
},

0 commit comments

Comments
 (0)