Skip to content

Commit

Permalink
fix: display values for various codable concepts (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
whichwit authored Sep 30, 2024
1 parent 65948bd commit 9b91198
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 36 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>edu.gatech</groupId>
<artifactId>vrdr</artifactId>
<version>4.0.6</version>
<version>4.0.7</version>
<packaging>jar</packaging>

<name>VRDR</name>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/edu/gatech/chai/VRDR/model/util/CommonUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public class CommonUtil {
public static List<CodeableConcept> deathReportingIdentifierTypeCodes = new ArrayList<CodeableConcept>(Arrays.asList(deathCertificateIdCode,deathCertificateFileNumberCode,deathCertificateLicenseNumberCode,
nationalProviderIdentifierCode,stateRegistryIdCode,SocialSecurityNumberCode));
public static final HashSet<CodeableConcept> certifierTypeSet = new HashSet<>(Arrays.asList(
new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"455381000124109","Medical Examiner/Coroner")),
new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"455381000124109","Death certification by medical examiner or coroner (procedure)")),
new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"434641000124105","Death certification and verification by physician (procedure)")),
new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"434651000124107","Physician certified death certificate")),
new CodeableConcept().addCoding(new Coding(CommonUtil.nullFlavorHL7System,"OTH","Other"))
new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"434651000124107","Death certification by physician (procedure)")),
new CodeableConcept().addCoding(new Coding(CommonUtil.nullFlavorHL7System,"OTH","Other (Specify)"))
));
public static final HashSet<CodeableConcept> yesNoUnknownSet = new HashSet<>(Arrays.asList(yesCode,noCode,unknownCode));
public static final HashSet<CodeableConcept> yesNoNASet = new HashSet<>(Arrays.asList(yesCode,noCode,notApplicableCode));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import org.hl7.fhir.r4.model.CodeableConcept;
import org.hl7.fhir.r4.model.Coding;
import org.hl7.fhir.r4.model.Composition;
import org.hl7.fhir.r4.model.Extension;
import org.hl7.fhir.r4.model.StringType;
import org.hl7.fhir.r4.model.Extension;
import org.hl7.fhir.r4.model.StringType;
import org.hl7.fhir.r4.model.Composition.CompositionStatus;

import edu.gatech.chai.VRDR.model.ActivityAtTimeOfDeath;
Expand Down Expand Up @@ -44,25 +44,25 @@
import edu.gatech.chai.VRDR.model.TobaccoUseContributedToDeath;

public class DeathCertificateUtil {
public static final CompositionStatus status = CompositionStatus.FINAL;
public static final String title = "Death Certificate";
public static final CompositionStatus status = CompositionStatus.FINAL;
public static final String title = "Death Certificate";
public static final CodeableConcept typeFixedValue = new CodeableConcept()
.addCoding(new Coding(CommonUtil.loincSystemUrl,"64297-5","Death certificate"));
public static final Composition.CompositionAttestationMode attesterMode = Composition.CompositionAttestationMode.LEGAL;
public static final CodeableConcept eventCodeFixedValue = new CodeableConcept()
.addCoding(new Coding(CommonUtil.snomedSystemUrl,"103693007","Diagnostic procedure (procedure)"));
.addCoding(new Coding(CommonUtil.snomedSystemUrl,"103693007",null));
public static final String vrdrDocumentSectionUrl = "http://hl7.org/fhir/us/vrdr/CodeSystem/vrdr-document-section-cs";
public static final CodeableConcept decendentDemographicsSectionCode = new CodeableConcept()
.addCoding(new Coding(vrdrDocumentSectionUrl,"DecedentDemographics",""));
public static final CodeableConcept deathInvestigationSectionCode = new CodeableConcept()
.addCoding(new Coding(vrdrDocumentSectionUrl,"DeathInvestigation",""));
public static final CodeableConcept deathCertificationSectionCode = new CodeableConcept()
.addCoding(new Coding(vrdrDocumentSectionUrl,"DeathCertification",""));
.addCoding(new Coding(vrdrDocumentSectionUrl,"DeathCertification",""));
public static final CodeableConcept decedentDispositionSectionCode = new CodeableConcept()
.addCoding(new Coding(vrdrDocumentSectionUrl,"DecedentDisposition",""));
public static final CodeableConcept codedContentSectionCode = new CodeableConcept()
.addCoding(new Coding(vrdrDocumentSectionUrl,"CodedContent",""));

public static final Class[] decedentDemographicResources = {Decedent.class, DecedentFather.class, DecedentMother.class,
DecedentSpouse.class, DecedentAge.class, BirthRecordIdentifier.class, DecedentEducationLevel.class,
DecedentMilitaryService.class, DecedentUsualWork.class, EmergingIssues.class, InputRaceAndEthnicity.class};
Expand All @@ -76,13 +76,13 @@ public class DeathCertificateUtil {
public static final Class[] codedContentResources = {ActivityAtTimeOfDeath.class, AutomatedUnderlyingCauseOfDeath.class,
CodedRaceAndEthnicity.class,EntityAxisCauseOfDeath.class,RecordAxisCauseOfDeath.class,PlaceOfInjury.class,
CodingStatusValues.class};
public static final String filingFormatExtensionUrl = "http://hl7.org/fhir/us/vrdr/StructureDefinition/FilingFormat";
public static final String filingFormatExtensionCodeSystem = "http://hl7.org/fhir/us/vrdr/CodeSystem/vrdr-filing-format-cs";
public static final CodeableConcept electronicFilingFormat = new CodeableConcept()
.addCoding(new Coding().setSystem(filingFormatExtensionCodeSystem).setCode("electronic").setDisplay("Electronic"));
public static final CodeableConcept mixedFilingFormat = new CodeableConcept()
.addCoding(new Coding().setSystem(filingFormatExtensionCodeSystem).setCode("mixed").setDisplay("Mixed"));
public static final CodeableConcept paperFilingFormat = new CodeableConcept()
.addCoding(new Coding().setSystem(filingFormatExtensionCodeSystem).setCode("paper").setDisplay("Paper"));

public static final String filingFormatExtensionUrl = "http://hl7.org/fhir/us/vrdr/StructureDefinition/FilingFormat";
public static final String filingFormatExtensionCodeSystem = "http://hl7.org/fhir/us/vrdr/CodeSystem/vrdr-filing-format-cs";
public static final CodeableConcept electronicFilingFormat = new CodeableConcept()
.addCoding(new Coding().setSystem(filingFormatExtensionCodeSystem).setCode("electronic").setDisplay("Electronic"));
public static final CodeableConcept mixedFilingFormat = new CodeableConcept()
.addCoding(new Coding().setSystem(filingFormatExtensionCodeSystem).setCode("mixed").setDisplay("Mixed"));
public static final CodeableConcept paperFilingFormat = new CodeableConcept()
.addCoding(new Coding().setSystem(filingFormatExtensionCodeSystem).setCode("paper").setDisplay("Paper"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class DeathCertificationProcedureUtil {
public static final CodeableConcept categoryFixedValue = new CodeableConcept()
.addCoding(new Coding(CommonUtil.snomedSystemUrl,"103693007","Diagnostic procedure"));
.addCoding(new Coding(CommonUtil.snomedSystemUrl,"103693007",null));
public static final CodeableConcept codeFixedValue = new CodeableConcept()
.addCoding(new Coding(CommonUtil.snomedSystemUrl,"308646001","Death certification"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

public class DeathLocationUtil {
public static final CodeableConcept VALUE_HOSPITAL = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"16983000","Death in hospital"));
public static final CodeableConcept VALUE_EMERGENCY_OUTPATIENT = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"450391000124102","Death in hospital-based emergency department or outpatient department (event)"));
public static final CodeableConcept VALUE_EMERGENCY_OUTPATIENT = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"450391000124102","Death in hospital-based emergency department or outpatient department"));
public static final CodeableConcept VALUE_HOME = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"440081000124100","Death in home"));
public static final CodeableConcept VALUE_HOSPICE = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"440071000124103","Death in hospice"));
public static final CodeableConcept VALUE_ARRIVAL = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"63238001","Dead on arrival at hospital"));
public static final CodeableConcept VALUE_NURSINGHOME = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"450381000124100","Death in nursing home or long term care facility (event)"));
public static final CodeableConcept VALUE_UNKNOWN = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"UNK","Unknown"));
public static final CodeableConcept VALUE_OTHER = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"OTH","Other"));
public static final CodeableConcept VALUE_NURSINGHOME = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"450381000124100","Death in nursing home or long term care facility"));
public static final CodeableConcept VALUE_UNKNOWN = new CodeableConcept().addCoding(new Coding(CommonUtil.nullFlavorHL7System,"UNK","UNK"));
public static final CodeableConcept VALUE_OTHER = new CodeableConcept().addCoding(new Coding(CommonUtil.nullFlavorHL7System,"OTH","Other"));
public static final HashSet<CodeableConcept> placeOfDeathTypeSet = new HashSet<>(Arrays.asList(
VALUE_HOSPITAL,
VALUE_EMERGENCY_OUTPATIENT,
VALUE_HOME,
VALUE_HOSPICE,
VALUE_ARRIVAL,
VALUE_NURSINGHOME,
VALUE_OTHER,
VALUE_UNKNOWN
VALUE_UNKNOWN,
VALUE_OTHER
));
public static CodeableConcept typeCode = new CodeableConcept(new Coding().setSystem("http://hl7.org/fhir/us/vrdr/CodeSystem/vrdr-location-type-cs").setCode("death").setDisplay("death location"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ public class DecedentDispositionMethodUtil {
public static final CodeableConcept VALUE_CREMATIONCODE = new CodeableConcept().addCoding(new Coding().setCode("449961000124104").setSystem(CommonUtil.snomedSystemUrl).setDisplay("Cremation"));
public static final CodeableConcept VALUE_ENTOMBEDCODE = new CodeableConcept().addCoding(new Coding().setCode("449931000124108").setSystem(CommonUtil.snomedSystemUrl).setDisplay("Entombment"));
public static final CodeableConcept VALUE_REMOVALFROMSTATECODE = new CodeableConcept().addCoding(new Coding().setCode("449941000124103").setSystem(CommonUtil.snomedSystemUrl).setDisplay("Removal from state"));
public static final CodeableConcept VALUE_HOSPITALDISPOSITIONCODE = new CodeableConcept().addCoding(new Coding().setCode("373066001").setSystem(CommonUtil.snomedSystemUrl).setDisplay("Hospital Disposition"));
public static List<CodeableConcept> valueCodesetList = new ArrayList<CodeableConcept>(Arrays.asList(VALUE_DONATEDCODE,VALUE_BURIALCODE,VALUE_CREMATIONCODE,VALUE_ENTOMBEDCODE,VALUE_REMOVALFROMSTATECODE,VALUE_HOSPITALDISPOSITIONCODE));
public static List<CodeableConcept> valueCodesetList = new ArrayList<CodeableConcept>(Arrays.asList(VALUE_DONATEDCODE,VALUE_BURIALCODE,VALUE_CREMATIONCODE,VALUE_ENTOMBEDCODE,VALUE_REMOVALFROMSTATECODE));
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class DecedentTransportationRoleUtil {
public static final CodeableConcept code = new CodeableConcept()
.addCoding(new Coding().setSystem(CommonUtil.loincSystemUrl).setCode("69451-3")
.setDisplay("Transportation role of decedent"));
public static final CodeableConcept VALUE_DRIVER = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"236320001","Driver/Operator"));
public static final CodeableConcept VALUE_DRIVER = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"236320001","Vehicle driver"));
public static final CodeableConcept VALUE_PASSENGER = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"25750003","Passenger"));
public static final CodeableConcept VALUE_PEDESTRIAN = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl,"25751800","Pedestrian"));
public static Set<CodeableConcept> valueCodesetList = new HashSet<CodeableConcept>(Arrays.asList(VALUE_DRIVER,VALUE_PASSENGER,VALUE_PEDESTRIAN));
public static Set<CodeableConcept> valueCodesetList = new HashSet<CodeableConcept>(Arrays.asList(VALUE_DRIVER,VALUE_PASSENGER,VALUE_PEDESTRIAN,CommonUtil.otherCode,CommonUtil.unknownCode,CommonUtil.notApplicableCode));
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ public class InjuryIncidentUtil {
public static final CodeableConcept passengerRoleCode = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl, "257500003", "Passenger"));
public static final CodeableConcept pedestrianRoleCode = new CodeableConcept().addCoding(new Coding(CommonUtil.snomedSystemUrl, "257518000", "Pedestrian"));
public static Set<CodeableConcept> transportationRoleValueSet = new HashSet<CodeableConcept>(Arrays.asList(
driverRoleCode,passengerRoleCode,pedestrianRoleCode,CommonUtil.otherCode, CommonUtil.unknownCode));
driverRoleCode,passengerRoleCode,pedestrianRoleCode,CommonUtil.otherCode, CommonUtil.unknownCode, CommonUtil.notApplicableCode));
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public class TobaccoUseContributedToDeathUtil {
public static final String codeValueSystem = "urn:oid:2.16.840.1.114222.4.5.274";
public static final CodeableConcept VALUE_YESCODE = new CodeableConcept().addCoding(new Coding().setCode("373066001").setSystem(CommonUtil.snomedSystemUrl).setDisplay("Yes"));
public static final CodeableConcept VALUE_NOCODE = new CodeableConcept().addCoding(new Coding().setCode("373067005").setSystem(CommonUtil.snomedSystemUrl).setDisplay("No"));
public static final CodeableConcept VALUE_PROBABLECODE = new CodeableConcept().addCoding(new Coding().setCode("2931005").setSystem(CommonUtil.snomedSystemUrl).setDisplay("Probable diagnosis"));
public static final CodeableConcept VALUE_PROBABLECODE = new CodeableConcept().addCoding(new Coding().setCode("2931005").setSystem(CommonUtil.snomedSystemUrl).setDisplay("Probably"));
public static List<CodeableConcept> valueCodesetList = new ArrayList<CodeableConcept>(Arrays.asList(VALUE_YESCODE,VALUE_NOCODE,VALUE_PROBABLECODE,CommonUtil.unknownCode,CommonUtil.notAskedCode));
}
8 changes: 5 additions & 3 deletions src/test/java/edu/gatech/VRDR/MessagingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1065,20 +1065,22 @@ public void testCreateBulkUploadPayload() {
public void testCodeableConceptPlaceOfDeath() {
CodeableConcept codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Death in hospital", DeathDateUtil.placeOfDeathTypeSet);
assertEquals("16983000", codeableConceptPlaceofDeath.getCoding().get(0).getCode());
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Death in hospital-based emergency department or outpatient department (event)", DeathDateUtil.placeOfDeathTypeSet);
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Death in hospital-based emergency department or outpatient department", DeathDateUtil.placeOfDeathTypeSet);
assertEquals("450391000124102", codeableConceptPlaceofDeath.getCoding().get(0).getCode());
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Death in home", DeathDateUtil.placeOfDeathTypeSet);
assertEquals("440081000124100", codeableConceptPlaceofDeath.getCoding().get(0).getCode());
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Death in hospice", DeathDateUtil.placeOfDeathTypeSet);
assertEquals("440071000124103", codeableConceptPlaceofDeath.getCoding().get(0).getCode());
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Dead on arrival at hospital", DeathDateUtil.placeOfDeathTypeSet);
assertEquals("63238001", codeableConceptPlaceofDeath.getCoding().get(0).getCode());
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Death in nursing home or long term care facility (event)", DeathDateUtil.placeOfDeathTypeSet);
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Death in nursing home or long term care facility", DeathDateUtil.placeOfDeathTypeSet);
assertEquals("450381000124100", codeableConceptPlaceofDeath.getCoding().get(0).getCode());
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Unknown", DeathDateUtil.placeOfDeathTypeSet);
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("UNK", DeathDateUtil.placeOfDeathTypeSet);
assertEquals("UNK", codeableConceptPlaceofDeath.getCoding().get(0).getCode());
assertEquals(CommonUtil.nullFlavorHL7System, codeableConceptPlaceofDeath.getCoding().get(0).getSystem());
codeableConceptPlaceofDeath = CommonUtil.findConceptFromCollectionUsingSimpleString("Other", DeathDateUtil.placeOfDeathTypeSet);
assertEquals("OTH", codeableConceptPlaceofDeath.getCoding().get(0).getCode());
assertEquals(CommonUtil.nullFlavorHL7System, codeableConceptPlaceofDeath.getCoding().get(0).getSystem());
}

}

0 comments on commit 9b91198

Please sign in to comment.