diff --git a/src/main/java/org/mitre/synthea/export/FhirR4.java b/src/main/java/org/mitre/synthea/export/FhirR4.java index b334afbb2b..1fece2057f 100644 --- a/src/main/java/org/mitre/synthea/export/FhirR4.java +++ b/src/main/java/org/mitre/synthea/export/FhirR4.java @@ -172,7 +172,6 @@ public class FhirR4 { private static final String RXNORM_URI = "http://www.nlm.nih.gov/research/umls/rxnorm"; private static final String CVX_URI = "http://hl7.org/fhir/sid/cvx"; private static final String DISCHARGE_URI = "http://www.nubc.org/patient-discharge"; - private static final String SHR_EXT = "http://standardhealthrecord.org/fhir/StructureDefinition/"; private static final String SYNTHEA_EXT = "http://synthetichealth.github.io/synthea/"; private static final String UNITSOFMEASURE_URI = "http://unitsofmeasure.org"; private static final String DICOM_DCM_URI = "http://dicom.nema.org/resources/ontology/DCM"; @@ -184,8 +183,6 @@ public class FhirR4 { @SuppressWarnings("rawtypes") private static final Map languageLookup = loadLanguageLookup(); - protected static boolean USE_SHR_EXTENSIONS = - Config.getAsBoolean("exporter.fhir.use_shr_extensions"); protected static boolean TRANSACTION_BUNDLE = Config.getAsBoolean("exporter.fhir.transaction_bundle"); @@ -237,9 +234,7 @@ protected static boolean useUSCore6() { } private static final String COUNTRY_CODE = Config.get("generate.geography.country_code"); - - private static final Table SHR_MAPPING = - loadMapping("shr_mapping.csv"); + private static final String PASSPORT_URI = Config.get("generate.geography.passport_uri", "http://hl7.org/fhir/sid/passport-USA"); private static final HashSet> includedResources = new HashSet<>(); private static final HashSet> excludedResources = new HashSet<>(); @@ -345,28 +340,6 @@ private static Map loadLanguageLookup() { } - private static Table loadMapping(String filename) { - Table mappingTable = HashBasedTable.create(); - - List> csvData; - try { - csvData = SimpleCSV.parse(Utilities.readResource(filename)); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - - for (LinkedHashMap line : csvData) { - String system = line.get("SYSTEM"); - String code = line.get("CODE"); - String url = line.get("URL"); - - mappingTable.put(system, code, url); - } - - return mappingTable; - } - private static Map> loadMappingWithVersions(String filename, String... supportedVersions) { Map> versions = new HashMap<>(); @@ -601,7 +574,7 @@ private static BundleEntryComponent basicInfo(Person person, Bundle bundle, long Code passportCode = new Code("http://terminology.hl7.org/CodeSystem/v2-0203", "PPN", "Passport Number"); patientResource.addIdentifier() .setType(mapCodeToCodeableConcept(passportCode, "http://terminology.hl7.org/CodeSystem/v2-0203")) - .setSystem(SHR_EXT + "passportNumber") + .setSystem(PASSPORT_URI) .setValue((String) person.attributes.get(Person.IDENTIFIER_PASSPORT)); } @@ -857,29 +830,6 @@ private static BundleEntryComponent basicInfo(Person person, Bundle bundle, long patientResource.setText(new Narrative().setStatus(NarrativeStatus.GENERATED) .setDiv(new XhtmlNode(NodeType.Element).setValue(generatedBySynthea))); - if (USE_SHR_EXTENSIONS) { - - patientResource.setMeta(new Meta().addProfile(SHR_EXT + "shr-entity-Patient")); - - // Patient profile requires race, ethnicity, birthsex, - // MothersMaidenName, FathersName, Person-extension - - patientResource.addExtension() - .setUrl(SHR_EXT + "shr-actor-FictionalPerson-extension") - .setValue(new BooleanType(true)); - - String fathersName = (String) person.attributes.get(Person.NAME_FATHER); - Extension fathersNameExtension = new Extension( - SHR_EXT + "shr-entity-FathersName-extension", new HumanName().setText(fathersName)); - patientResource.addExtension(fathersNameExtension); - - String ssn = (String) person.attributes.get(Person.IDENTIFIER_SSN); - Extension ssnExtension = new Extension( - SHR_EXT + "shr-demographics-SocialSecurityNumber-extension", - new StringType(ssn)); - patientResource.addExtension(ssnExtension); - } - // DALY and QALY values // we only write the last(current) one to the patient record Double dalyValue = (Double) person.attributes.get("most-recent-daly"); @@ -915,15 +865,6 @@ private static BundleEntryComponent encounter(Person person, BundleEntryComponen meta.addProfile( "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"); encounterResource.setMeta(meta); - } else if (USE_SHR_EXTENSIONS) { - encounterResource.setMeta( - new Meta().addProfile(SHR_EXT + "shr-encounter-EncounterPerformed")); - Extension performedContext = new Extension(); - performedContext.setUrl(SHR_EXT + "shr-action-PerformedContext-extension"); - performedContext.addExtension( - SHR_EXT + "shr-action-Status-extension", - new CodeType("finished")); - encounterResource.addExtension(performedContext); } Patient patient = (Patient) personEntry.getResource(); @@ -1683,11 +1624,6 @@ private static BundleEntryComponent condition( conditionResource.addCategory(new CodeableConcept().addCoding(new Coding( "http://terminology.hl7.org/CodeSystem/condition-category", "encounter-diagnosis", "Encounter Diagnosis"))); - } else if (USE_SHR_EXTENSIONS) { - conditionResource.setMeta(new Meta().addProfile(SHR_EXT + "shr-condition-Condition")); - conditionResource.addCategory(new CodeableConcept().addCoding(new Coding( - "http://standardhealthrecord.org/shr/condition/vs/ConditionCategoryVS", "disease", - "Disease"))); } conditionResource.setSubject(new Reference(personEntry.getFullUrl())); @@ -1955,19 +1891,6 @@ private static BundleEntryComponent observation( observationResource.setMeta(meta); } } - if (USE_SHR_EXTENSIONS) { - Meta meta = new Meta(); - meta.addProfile(SHR_EXT + "shr-finding-Observation"); // all Observations are Observations - if ("vital-signs".equals(observation.category)) { - meta.addProfile(SHR_EXT + "shr-vital-VitalSign"); - } - // add the specific profile based on code - String codeMappingUri = SHR_MAPPING.get(LOINC_URI, code.code); - if (codeMappingUri != null) { - meta.addProfile(codeMappingUri); - } - observationResource.setMeta(meta); - } BundleEntryComponent entry = newEntry(bundle, observationResource, observation.uuid.toString()); observation.fullUrl = entry.getFullUrl(); @@ -2093,21 +2016,6 @@ private static BundleEntryComponent procedure( } } - if (USE_SHR_EXTENSIONS) { - procedureResource.setMeta( - new Meta().addProfile(SHR_EXT + "shr-procedure-ProcedurePerformed")); - // required fields for this profile are action-PerformedContext-extension, - // status, code, subject, performed[x] - - Extension performedContext = new Extension(); - performedContext.setUrl(SHR_EXT + "shr-action-PerformedContext-extension"); - performedContext.addExtension( - SHR_EXT + "shr-action-Status-extension", - new CodeType("completed")); - - procedureResource.addExtension(performedContext); - } - BundleEntryComponent procedureEntry = newEntry(bundle, procedureResource, procedure.uuid.toString()); procedure.fullUrl = procedureEntry.getFullUrl(); @@ -2296,15 +2204,8 @@ private static BundleEntryComponent immunization( meta.addProfile( "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization"); immResource.setMeta(meta); - } else if (USE_SHR_EXTENSIONS) { - immResource.setMeta(new Meta().addProfile(SHR_EXT + "shr-immunization-ImmunizationGiven")); - Extension performedContext = new Extension(); - performedContext.setUrl(SHR_EXT + "shr-action-PerformedContext-extension"); - performedContext.addExtension( - SHR_EXT + "shr-action-Status-extension", - new CodeType("completed")); - immResource.addExtension(performedContext); } + immResource.setStatus(ImmunizationStatus.COMPLETED); immResource.setOccurrence(convertFhirDateTime(immunization.start, true)); immResource.setVaccineCode(mapCodeToCodeableConcept(immunization.codes.get(0), CVX_URI)); @@ -2348,24 +2249,8 @@ private static BundleEntryComponent medicationRequest( Code category = new Code("http://terminology.hl7.org/CodeSystem/medicationrequest-category", "community", "Community"); medicationResource.addCategory(mapCodeToCodeableConcept(category, null)); - } else if (USE_SHR_EXTENSIONS) { - medicationResource.addExtension() - .setUrl(SHR_EXT + "shr-base-ActionCode-extension") - .setValue(PRESCRIPTION_OF_DRUG_CC); - - medicationResource.setMeta(new Meta() - .addProfile(SHR_EXT + "shr-medication-MedicationRequested")); - - Extension requestedContext = new Extension(); - requestedContext.setUrl(SHR_EXT + "shr-action-RequestedContext-extension"); - requestedContext.addExtension( - SHR_EXT + "shr-action-Status-extension", - new CodeType("completed")); - requestedContext.addExtension( - SHR_EXT + "shr-action-RequestIntent-extension", - new CodeType("original-order")); - medicationResource.addExtension(requestedContext); } + medicationResource.setSubject(new Reference(personEntry.getFullUrl())); medicationResource.setEncounter(new Reference(encounterEntry.getFullUrl())); @@ -2597,11 +2482,6 @@ private static BundleEntryComponent medicationAdministration( return medicationAdminEntry; } - private static final Code PRESCRIPTION_OF_DRUG_CODE = - new Code("SNOMED-CT", "33633005", "Prescription of drug (procedure)"); - private static final CodeableConcept PRESCRIPTION_OF_DRUG_CC = - mapCodeToCodeableConcept(PRESCRIPTION_OF_DRUG_CODE, SNOMED_URI); - /** * Map the given Report to a FHIR DiagnosticReport resource, and add it to the given Bundle. * @@ -3195,13 +3075,8 @@ protected static BundleEntryComponent provider(Bundle bundle, meta.addProfile( "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization"); organizationResource.setMeta(meta); - } else if (USE_SHR_EXTENSIONS) { - organizationResource.setMeta(new Meta().addProfile(SHR_EXT + "shr-entity-Organization")); - organizationResource.addIdentifier() - .setSystem("urn:ietf:rfc:3986") - .setValue("urn:uuid" + provider.getResourceID()); - organizationResource.addContact().setName(new HumanName().setText("Synthetic Provider")); } + List organizationType = new ArrayList(); organizationType.add( mapCodeToCodeableConcept( diff --git a/src/main/java/org/mitre/synthea/export/FhirStu3.java b/src/main/java/org/mitre/synthea/export/FhirStu3.java index da23e2dc2a..6928051a9f 100644 --- a/src/main/java/org/mitre/synthea/export/FhirStu3.java +++ b/src/main/java/org/mitre/synthea/export/FhirStu3.java @@ -2,20 +2,16 @@ import ca.uhn.fhir.context.FhirContext; -import com.google.common.collect.HashBasedTable; -import com.google.common.collect.Table; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import java.awt.geom.Point2D; -import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -27,7 +23,6 @@ import org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceCriticality; import org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceType; import org.hl7.fhir.dstu3.model.AllergyIntolerance.AllergyIntoleranceVerificationStatus; -import org.hl7.fhir.dstu3.model.Basic; import org.hl7.fhir.dstu3.model.BooleanType; import org.hl7.fhir.dstu3.model.Bundle; import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent; @@ -83,7 +78,6 @@ import org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestIntent; import org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestRequesterComponent; import org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestStatus; -import org.hl7.fhir.dstu3.model.Meta; import org.hl7.fhir.dstu3.model.Money; import org.hl7.fhir.dstu3.model.Narrative; import org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus; @@ -117,7 +111,6 @@ import org.mitre.synthea.engine.Components.Attachment; import org.mitre.synthea.helpers.Config; import org.mitre.synthea.helpers.RandomNumberGenerator; -import org.mitre.synthea.helpers.SimpleCSV; import org.mitre.synthea.helpers.Utilities; import org.mitre.synthea.world.agents.Clinician; import org.mitre.synthea.world.agents.Payer; @@ -146,7 +139,6 @@ public class FhirStu3 { private static final String RXNORM_URI = "http://www.nlm.nih.gov/research/umls/rxnorm"; private static final String CVX_URI = "http://hl7.org/fhir/sid/cvx"; private static final String DISCHARGE_URI = "http://www.nubc.org/patient-discharge"; - private static final String SHR_EXT = "http://standardhealthrecord.org/fhir/StructureDefinition/"; private static final String SYNTHEA_EXT = "http://synthetichealth.github.io/synthea/"; private static final String UNITSOFMEASURE_URI = "http://unitsofmeasure.org"; private static final String DICOM_DCM_URI = "http://dicom.nema.org/resources/ontology/DCM"; @@ -156,14 +148,11 @@ public class FhirStu3 { @SuppressWarnings("rawtypes") private static final Map languageLookup = loadLanguageLookup(); - private static final boolean USE_SHR_EXTENSIONS = - Config.getAsBoolean("exporter.fhir.use_shr_extensions"); protected static boolean TRANSACTION_BUNDLE = Config.getAsBoolean("exporter.fhir.transaction_bundle"); private static final String COUNTRY_CODE = Config.get("generate.geography.country_code"); - - private static final Table SHR_MAPPING = loadSHRMapping(); + private static final String PASSPORT_URI = Config.get("generate.geography.passport_uri", "http://hl7.org/fhir/sid/passport-USA"); @SuppressWarnings("rawtypes") private static Map loadRaceEthnicityCodes() { @@ -193,33 +182,6 @@ private static Map loadLanguageLookup() { } } - - private static Table loadSHRMapping() { - if (!USE_SHR_EXTENSIONS) { - // don't bother creating the table unless we need it - return null; - } - Table mappingTable = HashBasedTable.create(); - - List> csvData; - try { - csvData = SimpleCSV.parse(Utilities.readResource("shr_mapping.csv")); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - - for (LinkedHashMap line : csvData) { - String system = line.get("SYSTEM"); - String code = line.get("CODE"); - String url = line.get("URL"); - - mappingTable.put(system, code, url); - } - - return mappingTable; - } - public static FhirContext getContext() { return FHIR_CTX; } @@ -361,7 +323,7 @@ private static BundleEntryComponent basicInfo(Person person, Bundle bundle, long Code passportCode = new Code("http://hl7.org/fhir/v2/0203", "PPN", "Passport Number"); patientResource.addIdentifier() .setType(mapCodeToCodeableConcept(passportCode, "http://hl7.org/fhir/v2/0203")) - .setSystem(SHR_EXT + "passportNumber") + .setSystem(PASSPORT_URI) .setValue((String) person.attributes.get(Person.IDENTIFIER_PASSPORT)); } @@ -585,49 +547,6 @@ private static BundleEntryComponent basicInfo(Person person, Bundle bundle, long patientResource.setText(new Narrative().setStatus(NarrativeStatus.GENERATED) .setDiv(new XhtmlNode(NodeType.Element).setValue(generatedBySynthea))); - if (USE_SHR_EXTENSIONS) { - - patientResource.setMeta(new Meta().addProfile(SHR_EXT + "shr-entity-Patient")); - - // Patient profile requires race, ethnicity, birthsex, - // MothersMaidenName, FathersName, Person-extension - - patientResource.addExtension() - .setUrl(SHR_EXT + "shr-actor-FictionalPerson-extension") - .setValue(new BooleanType(true)); - - String fathersName = (String) person.attributes.get(Person.NAME_FATHER); - Extension fathersNameExtension = new Extension( - SHR_EXT + "shr-entity-FathersName-extension", new HumanName().setText(fathersName)); - patientResource.addExtension(fathersNameExtension); - - String ssn = (String) person.attributes.get(Person.IDENTIFIER_SSN); - Extension ssnExtension = new Extension( - SHR_EXT + "shr-demographics-SocialSecurityNumber-extension", - new StringType(ssn)); - patientResource.addExtension(ssnExtension); - - Basic personResource = new Basic(); - // the only required field on this patient resource is code - - Coding fixedCode = new Coding( - "http://standardhealthrecord.org/fhir/basic-resource-type", - "shr-entity-Person", "shr-entity-Person"); - personResource.setCode(new CodeableConcept().addCoding(fixedCode)); - - Meta personMeta = new Meta(); - personMeta.addProfile(SHR_EXT + "shr-entity-Person"); - personResource.setMeta(personMeta); - - String basicID = ExportHelper.buildUUID(person, - (long)person.attributes.get(Person.BIRTHDATE), "shr-entity-Person"); - - BundleEntryComponent personEntry = newEntry(bundle, personResource, basicID); - patientResource.addExtension() - .setUrl(SHR_EXT + "shr-entity-Person-extension") - .setValue(new Reference(personEntry.getFullUrl())); - } - // DALY and QALY values // we only write the last(current) one to the patient record Double dalyValue = (Double) person.attributes.get("most-recent-daly"); @@ -733,20 +652,6 @@ private static BundleEntryComponent encounter(Person person, BundleEntryComponen encounterResource.setHospitalization(hospitalization); } - if (USE_SHR_EXTENSIONS) { - encounterResource.setMeta( - new Meta().addProfile(SHR_EXT + "shr-encounter-EncounterPerformed")); - // required fields for this profile are status & action-PerformedContext-extension - - Extension performedContext = new Extension(); - performedContext.setUrl(SHR_EXT + "shr-action-PerformedContext-extension"); - performedContext.addExtension( - SHR_EXT + "shr-action-Status-extension", - new CodeType("finished")); - - encounterResource.addExtension(performedContext); - } - return newEntry(bundle, encounterResource, encounter.uuid.toString()); } @@ -1580,18 +1485,6 @@ private static BundleEntryComponent condition(RandomNumberGenerator rand, conditionResource.setClinicalStatus(ConditionClinicalStatus.RESOLVED); } - if (USE_SHR_EXTENSIONS) { - // TODO: use different categories. would need to add a "category" to GMF Condition state - // also potentially use Injury profile here, - // once different codes map to different categories - - conditionResource.addCategory(new CodeableConcept().addCoding(new Coding( - "http://standardhealthrecord.org/shr/condition/vs/ConditionCategoryVS", "disease", - "Disease"))); - conditionResource.setMeta(new Meta().addProfile(SHR_EXT + "shr-condition-Condition")); - // required fields for this profile are clinicalStatus, assertedDate, category - } - BundleEntryComponent conditionEntry = newEntry(bundle, conditionResource, condition.uuid.toString()); @@ -1633,13 +1526,6 @@ private static BundleEntryComponent allergy(RandomNumberGenerator rand, Code code = allergy.codes.get(0); allergyResource.setCode(mapCodeToCodeableConcept(code, SNOMED_URI)); - if (USE_SHR_EXTENSIONS) { - Meta meta = new Meta(); - meta.addProfile(SHR_EXT + "shr-allergy-AllergyIntolerance"); - // required fields for AllergyIntolerance profile are: - // verificationStatus, code, patient, assertedDate - allergyResource.setMeta(meta); - } BundleEntryComponent allergyEntry = newEntry(bundle, allergyResource, allergy.uuid.toString()); allergy.fullUrl = allergyEntry.getFullUrl(); return allergyEntry; @@ -1690,20 +1576,6 @@ private static BundleEntryComponent observation(RandomNumberGenerator rand, observationResource.setEffective(convertFhirDateTime(observation.start, true)); observationResource.setIssued(new Date(observation.start)); - if (USE_SHR_EXTENSIONS) { - Meta meta = new Meta(); - meta.addProfile(SHR_EXT + "shr-finding-Observation"); // all Observations are Observations - if ("vital-signs".equals(observation.category)) { - meta.addProfile(SHR_EXT + "shr-vital-VitalSign"); - } - // add the specific profile based on code - String codeMappingUri = SHR_MAPPING.get(LOINC_URI, code.code); - if (codeMappingUri != null) { - meta.addProfile(codeMappingUri); - } - observationResource.setMeta(meta); - } - BundleEntryComponent entry = newEntry(bundle, observationResource, observation.uuid.toString()); observation.fullUrl = entry.getFullUrl(); @@ -1827,21 +1699,6 @@ private static BundleEntryComponent procedure(RandomNumberGenerator rand, } } - if (USE_SHR_EXTENSIONS) { - procedureResource.setMeta( - new Meta().addProfile(SHR_EXT + "shr-procedure-ProcedurePerformed")); - // required fields for this profile are action-PerformedContext-extension, - // status, code, subject, performed[x] - - Extension performedContext = new Extension(); - performedContext.setUrl(SHR_EXT + "shr-action-PerformedContext-extension"); - performedContext.addExtension( - SHR_EXT + "shr-action-Status-extension", - new CodeType("completed")); - - procedureResource.addExtension(performedContext); - } - BundleEntryComponent procedureEntry = newEntry(bundle, procedureResource, procedure.uuid.toString()); procedure.fullUrl = procedureEntry.getFullUrl(); @@ -1861,20 +1718,6 @@ private static BundleEntryComponent immunization(RandomNumberGenerator rand, immResource.setPatient(new Reference(personEntry.getFullUrl())); immResource.setEncounter(new Reference(encounterEntry.getFullUrl())); - if (USE_SHR_EXTENSIONS) { - immResource.setMeta(new Meta().addProfile(SHR_EXT + "shr-immunization-ImmunizationGiven")); - // profile requires action-PerformedContext-extension, status, notGiven, vaccineCode, patient, - // date, primarySource - - Extension performedContext = new Extension(); - performedContext.setUrl(SHR_EXT + "shr-action-PerformedContext-extension"); - performedContext.addExtension( - SHR_EXT + "shr-action-Status-extension", - new CodeType("completed")); - - immResource.addExtension(performedContext); - } - BundleEntryComponent immunizationEntry = newEntry(bundle, immResource, immunization.uuid.toString()); immunization.fullUrl = immunizationEntry.getFullUrl(); @@ -1981,29 +1824,6 @@ private static BundleEntryComponent medication(Person person, medicationResource.setDosageInstruction(dosageInstruction); } - if (USE_SHR_EXTENSIONS) { - - medicationResource.addExtension() - .setUrl(SHR_EXT + "shr-base-ActionCode-extension") - .setValue(PRESCRIPTION_OF_DRUG_CC); - - medicationResource.setMeta(new Meta() - .addProfile(SHR_EXT + "shr-medication-MedicationRequested")); - // required fields for this profile are status, action-RequestedContext-extension, - // medication[x]subject, authoredOn, requester - - Extension requestedContext = new Extension(); - requestedContext.setUrl(SHR_EXT + "shr-action-RequestedContext-extension"); - requestedContext.addExtension( - SHR_EXT + "shr-action-Status-extension", - new CodeType("completed")); - requestedContext.addExtension( - SHR_EXT + "shr-action-RequestIntent-extension", - new CodeType("original-order")); - - medicationResource.addExtension(requestedContext); - } - BundleEntryComponent medicationEntry = newEntry(bundle, medicationResource, medication.uuid.toString()); // create new claim for medication @@ -2093,12 +1913,6 @@ private static BundleEntryComponent medicationAdministration( return medicationAdminEntry; } - private static final Code PRESCRIPTION_OF_DRUG_CODE = - new Code("SNOMED-CT","33633005","Prescription of drug (procedure)"); - private static final CodeableConcept PRESCRIPTION_OF_DRUG_CC = - mapCodeToCodeableConcept(PRESCRIPTION_OF_DRUG_CODE, SNOMED_URI); - - /** * Map the given Report to a FHIR DiagnosticReport resource, and add it to the given Bundle. * @@ -2458,16 +2272,6 @@ protected static BundleEntryComponent provider(Bundle bundle, Provider provider) organizationResource.addTelecom(contactPoint); } - if (USE_SHR_EXTENSIONS) { - organizationResource.setMeta(new Meta().addProfile(SHR_EXT + "shr-entity-Organization")); - // required fields for this profile are identifier, type, address, and contact - - organizationResource.addIdentifier() - .setSystem("urn:ietf:rfc:3986") - .setValue("urn:uuid:" + provider.getResourceID()); - organizationResource.addContact().setName(new HumanName().setText("Synthetic Provider")); - } - return newEntry(bundle, organizationResource, provider.getResourceID()); } diff --git a/src/main/resources/shr_mapping.csv b/src/main/resources/shr_mapping.csv deleted file mode 100644 index 6b2f6b4500..0000000000 --- a/src/main/resources/shr_mapping.csv +++ /dev/null @@ -1,34 +0,0 @@ -SYSTEM,CODE,URL -"http://ncimeta.nci.nih.gov","C0001948","http://standardhealthrecord.org/fhir/StructureDefinition/shr-behavior-AlcoholUse" -"http://ncimeta.nci.nih.gov","C0012155","http://standardhealthrecord.org/fhir/StructureDefinition/shr-behavior-DietAndNutrition" -"http://ncimeta.nci.nih.gov","C0242566","http://standardhealthrecord.org/fhir/StructureDefinition/shr-behavior-IntravenousDrugUse" -"http://ncimeta.nci.nih.gov","C0238646","http://standardhealthrecord.org/fhir/StructureDefinition/shr-environment-AnimalExposure" -"http://ncimeta.nci.nih.gov","C0557163","http://standardhealthrecord.org/fhir/StructureDefinition/shr-environment-AnnualIncome" -"http://ncimeta.nci.nih.gov","C0206073","http://standardhealthrecord.org/fhir/StructureDefinition/shr-environment-DomesticViolence" -"http://ncimeta.nci.nih.gov","C0000768","http://standardhealthrecord.org/fhir/StructureDefinition/shr-lifehistory-CongenitalAbnormalities" -"http://ncimeta.nci.nih.gov","C0557162","http://standardhealthrecord.org/fhir/StructureDefinition/shr-environment-IncomeSource" -"http://ncimeta.nci.nih.gov","C1820459","http://standardhealthrecord.org/fhir/StructureDefinition/shr-environment-IncomeStability" -"http://ncimeta.nci.nih.gov","C0557509","http://standardhealthrecord.org/fhir/StructureDefinition/shr-environment-NumberOfDependents" -"http://ncimeta.nci.nih.gov","C0871747","http://standardhealthrecord.org/fhir/StructureDefinition/shr-lifehistory-PrenatalExposure" -"http://ncimeta.nci.nih.gov","C0040802","http://standardhealthrecord.org/fhir/StructureDefinition/shr-lifehistory-Travel" -"http://ncimeta.nci.nih.gov","C0700589","http://standardhealthrecord.org/fhir/StructureDefinition/shr-sex-ContraceptiveMethodsUsed" -"http://loinc.org","11367-0","http://standardhealthrecord.org/fhir/StructureDefinition/shr-behavior-ONCSmokingStatus" -"http://loinc.org","28323-4","http://standardhealthrecord.org/fhir/StructureDefinition/shr-behavior-SleepQuality" -"http://loinc.org","81364-2","http://standardhealthrecord.org/fhir/StructureDefinition/shr-behavior-ReligiousPractice" -"http://loinc.org","63504-5","http://standardhealthrecord.org/fhir/StructureDefinition/shr-lifehistory-EducationalAttainment" -"http://loinc.org","74165-2","http://standardhealthrecord.org/fhir/StructureDefinition/shr-lifehistory-Employment" -"http://loinc.org","74287-4","http://standardhealthrecord.org/fhir/StructureDefinition/shr-lifehistory-Occupation" -"http://loinc.org","64631-5","http://standardhealthrecord.org/fhir/StructureDefinition/shr-sex-PregnancyIntention" -"http://loinc.org","54574-9","http://standardhealthrecord.org/fhir/StructureDefinition/shr-skin-PressureUlcerManifestation" -"http://loinc.org","55284-4","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BloodPressure" -"http://loinc.org","8302-2","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BodyHeight" -"http://loinc.org","8306-3","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BodyLength" -"http://loinc.org","39156-5","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BodyMassIndex" -"http://loinc.org","8310-5","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BodyTemperature" -"http://loinc.org","29463-7","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-BodyWeight" -"http://loinc.org","8462-4","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-DiastolicPressure" -"http://loinc.org","8287-5","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-HeadCircumference" -"http://loinc.org","8867-4","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-HeartRate" -"http://loinc.org","59408-5","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-OxygenSaturation" -"http://loinc.org","9279-1","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-RespiratoryRate" -"http://loinc.org","8480-6","http://standardhealthrecord.org/fhir/StructureDefinition/shr-vital-SystolicPressure" diff --git a/src/main/resources/synthea.properties b/src/main/resources/synthea.properties index d4d599b9a8..008c2d3893 100644 --- a/src/main/resources/synthea.properties +++ b/src/main/resources/synthea.properties @@ -124,6 +124,8 @@ generate.geography.country_code = US generate.geography.timezones.default_file = geography/timezones.csv generate.geography.foreign.birthplace.default_file = geography/foreign_birthplace.json generate.geography.sdoh.default_file = geography/sdoh.csv +# https://terminology.hl7.org/identifiers.html +generate.geography.passport_uri = http://hl7.org/fhir/sid/passport-USA # Lookup Table Folder location generate.lookup_tables = modules/lookup_tables/ diff --git a/src/test/java/org/mitre/synthea/export/FHIRR4ExporterTest.java b/src/test/java/org/mitre/synthea/export/FHIRR4ExporterTest.java index 4474161041..675870b216 100644 --- a/src/test/java/org/mitre/synthea/export/FHIRR4ExporterTest.java +++ b/src/test/java/org/mitre/synthea/export/FHIRR4ExporterTest.java @@ -115,7 +115,6 @@ private void setupTestFhirExport() throws Exception { FhirR4.reloadIncludeExclude(); FhirR4.TRANSACTION_BUNDLE = true; FhirR4.USE_US_CORE_IG = false; - FhirR4.USE_SHR_EXTENSIONS = false; FhirR4.US_CORE_VERSION = "4"; }