Skip to content

Commit 53ef4b8

Browse files
committed
Add labs/reports to clinical notes.
1 parent c807432 commit 53ef4b8

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public static String export(Person person, Encounter encounter) {
126126
person.attributes.put("ehr_conditions", encounter.conditions);
127127
person.attributes.put("ehr_allergies", encounter.allergies);
128128
person.attributes.put("ehr_procedures", encounter.procedures);
129+
person.attributes.put("ehr_reports", encounter.reports);
129130
person.attributes.put("ehr_immunizations", encounter.immunizations);
130131
person.attributes.put("ehr_medications", encounter.medications);
131132
person.attributes.put("ehr_careplans", encounter.careplans);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import java.awt.geom.Point2D;
1212
import java.io.IOException;
13-
import java.util.AbstractMap;
1413
import java.util.ArrayList;
1514
import java.util.Arrays;
1615
import java.util.Calendar;
@@ -143,7 +142,6 @@
143142
import org.mitre.synthea.export.rif.CodeMapper;
144143
import org.mitre.synthea.helpers.Config;
145144
import org.mitre.synthea.helpers.RandomNumberGenerator;
146-
import org.mitre.synthea.helpers.RandomValueGenerator;
147145
import org.mitre.synthea.helpers.SimpleCSV;
148146
import org.mitre.synthea.helpers.Utilities;
149147
import org.mitre.synthea.identity.Entity;

src/main/resources/templates/notes/note.ftl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ ${time?number_to_date?string["yyyy-MM-dd"]}
99
</#list><#else>No complaints.</#if>
1010

1111
# History of Present Illness
12-
<#if name??>${name?keep_before_last(" ")}<#else><#if gender=='F'>Jane<#else>John</#if> Doe</#if>
13-
is a <#if ehr_ageInYears gt 0>${ehr_ageInYears} year-old<#elseif ehr_ageInMonths gt 0>${ehr_ageInMonths} month-old<#else>newborn</#if> ${ethnicity} ${race} <#if gender=='F'>female<#else>male</#if>.<#if ehr_activeConditions?has_content> Patient has a history of <#list ehr_activeConditions as display>${display?lower_case}<#sep>, </#list>.</#if>
12+
<#if name??>${name?keep_before_last(" ")}<#else><#if gender=='F'>Jane<#else>John</#if> Doe</#if> is a <#if ehr_ageInYears gt 0>${ehr_ageInYears} year-old<#elseif ehr_ageInMonths gt 0>${ehr_ageInMonths} month-old<#else>newborn</#if> ${ethnicity} ${race} <#if gender=='F'>female<#else>male</#if>.<#if ehr_activeConditions?has_content> Patient has a history of <#list ehr_activeConditions as display>${display?lower_case}<#sep>, </#list>.</#if>
1413

1514
# Social History
1615
<#if ehr_ageInYears gt 18 && marital_status??><#if marital_status=='M'>Patient is married.<#else>Patient is single.</#if></#if><#if ehr_ageInYears gt 18 && homeless?? && homeless> <#if homelessness_category=='chronic'>Patient is chronically homeless.<#else>Patient is temporarily homeless.</#if></#if><#if opioid_addiction_careplan??> Patient has a documented history of opioid addiction.</#if><#if ehr_ageInYears gt 16 && smoker?? && smoker> Patient is an active smoker<#elseif quit_smoking_age??> Patient quit smoking at age ${quit_smoking_age}<#else> Patient has never smoked</#if><#if alcoholic?? && alcoholic> and is an alcoholic.<#else>.</#if>
@@ -37,6 +36,10 @@ Patient currently has ${ehr_insurance?replace("_", " ")}.
3736
- ${entry.codes[0].display?lower_case}<#if entry.note??>
3837
- ${entry.note} </#if>
3938
</#list></#if>
39+
<#if ehr_reports?has_content>The following lab reports were completed:
40+
<#list ehr_reports as entry>
41+
- ${entry.codes[0].display?lower_case}
42+
</#list></#if>
4043
<#if ehr_medications?has_content>The patient was prescribed the following medications:
4144
<#list ehr_medications as entry>
4245
- ${entry.codes[0].display?lower_case}<#if entry.note??>

0 commit comments

Comments
 (0)