From 0fd41fa6e60215a278337dc1202b72751da47e70 Mon Sep 17 00:00:00 2001 From: MikeRileyGTRI Date: Wed, 8 Sep 2021 17:53:16 -0400 Subject: [PATCH] Fixed better YNUnk valueset and fixed jurisdictionID system value. --- .../VRDR/model/DecedentMilitaryService.java | 1 + .../chai/VRDR/model/util/CommonUtil.java | 122 +++++++++--------- 2 files changed, 65 insertions(+), 58 deletions(-) diff --git a/src/main/java/edu/gatech/chai/VRDR/model/DecedentMilitaryService.java b/src/main/java/edu/gatech/chai/VRDR/model/DecedentMilitaryService.java index 602f1bc..d972ba8 100644 --- a/src/main/java/edu/gatech/chai/VRDR/model/DecedentMilitaryService.java +++ b/src/main/java/edu/gatech/chai/VRDR/model/DecedentMilitaryService.java @@ -19,6 +19,7 @@ public DecedentMilitaryService() { setStatus(DecedentMilitaryServiceUtil.status); setCode(DecedentMilitaryServiceUtil.code); } + public DecedentMilitaryService(CodeableConcept yesNoUnknownCode) { this(); this.setValue(yesNoUnknownCode); diff --git a/src/main/java/edu/gatech/chai/VRDR/model/util/CommonUtil.java b/src/main/java/edu/gatech/chai/VRDR/model/util/CommonUtil.java index 222a4b4..e0fc7a1 100644 --- a/src/main/java/edu/gatech/chai/VRDR/model/util/CommonUtil.java +++ b/src/main/java/edu/gatech/chai/VRDR/model/util/CommonUtil.java @@ -24,6 +24,8 @@ public class CommonUtil { public static String basicBooleanHL7System = "http://hl7.org/CodeSystem/v2-0136"; + public static String yesNoNASystemOID = "2.16.840.1.113883.12.136"; + public static String nullFlavorSystemOID = "2.16.840.1.113883.5.1008"; public static String nullFlavorHL7System = "http://hl7.org/fhir/v3/NullFlavor"; public static String snomedSystemUrl = "http://snomed.info/sct"; public static String loincSystemUrl = "http://loinc.org"; @@ -37,9 +39,9 @@ public class CommonUtil { public static final String partialDateDateMonthAbsentReasonURL = "month-absent-reason"; public static final String partialDateDateDayURL = "date-day"; public static final String partialDateDateDayAbsentReasonURL = "day-absent-reason"; - public static CodeableConcept noCode = new CodeableConcept().addCoding(new Coding(basicBooleanHL7System,"N","No")); - public static CodeableConcept yesCode = new CodeableConcept().addCoding(new Coding(basicBooleanHL7System,"Y","Yes")); - public static CodeableConcept unknownCode = new CodeableConcept().addCoding(new Coding(nullFlavorHL7System,"UNK","unknown")); + public static CodeableConcept noCode = new CodeableConcept().addCoding(new Coding(yesNoNASystemOID,"N","No")); + public static CodeableConcept yesCode = new CodeableConcept().addCoding(new Coding(yesNoNASystemOID,"Y","Yes")); + public static CodeableConcept unknownCode = new CodeableConcept().addCoding(new Coding(nullFlavorSystemOID,"UNK","unknown")); public static CodeableConcept otherCode = new CodeableConcept().addCoding(new Coding(nullFlavorHL7System,"OTH","other")); public static CodeableConcept notApplicableCode = new CodeableConcept().addCoding(new Coding(nullFlavorHL7System,"NA","not applicable")); public static CodeableConcept notAskedCode = new CodeableConcept().addCoding(new Coding(nullFlavorHL7System,"NASK","not asked")); @@ -89,62 +91,66 @@ public class CommonUtil { new CodeableConcept().addCoding(new Coding(CommonUtil.dataAbsentReasonUrl,"not-performed", "Not Performed")), new CodeableConcept().addCoding(new Coding(CommonUtil.dataAbsentReasonUrl,"not-permitted", "Not Permitted")))); public static final HashSet locationJurisdictionalConceptSet = new HashSet<>(Arrays.asList( - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"AL","Alabama")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"AK","Alaska")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"AR", "Arkansas")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"AS", "American Samoa")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl, "AZ", "Arizona")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"CA", "California")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"CO", "Colorado")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"CT", "Connecticut")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"DC", "District of Columbia")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"DE", "Delaware")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"FL", "Florida")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"GA", "Georgia")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"GU", "Guam")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"HI", "Hawaii")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"IA", "Iowa")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"ID", "Idaho")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"IL", "Illinois")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"IN", "Indiana")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"KS", "Kansas")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"LA", "Louisiana")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"MA", "Massachusetts")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"MD", "Maryland")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"ME", "Maine")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"MI", "Michigan")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"MN", "Minnesota")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"MO", "Missouri")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"01","Alabama")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"02","Alaska")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"05", "Arkansas")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"60", "American Samoa")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl, "04", "Arizona")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"06", "California")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"08", "Colorado")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"09", "Connecticut")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"10", "Delaware")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"11", "District of Columbia")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"64", "Federated States of Micronesia")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"12", "Florida")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"13", "Georgia")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"66", "Guam")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"15", "Hawaii")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"84", "Howland Island")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"16", "Idaho")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"17", "Illinois")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"18", "Indiana")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"19", "Iowa")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"20", "Kansas")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"21", "Kentucky")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"22", "Louisiana")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"23", "Maine")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"24", "Maryland")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"25", "Massachusetts")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"26", "Michigan")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"27", "Minnesota")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"28", "Mississippi")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"29", "Missouri")), new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"MP", "Northern Mariana Islands")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"MS", "Mississippi")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"MT", "Montana")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"NC", "North Carolina")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"ND", "North Dekota")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"NE", "Nebraska")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"NH", "New Hampshire")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"NJ", "New Jersey")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"NM", "New Mexico")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"NV", "Nevada")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"NY", "New York")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"OH", "Ohio")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"OK", "Oklahoma")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"OR", "Oregon")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"PA", "Pennsylvania")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"PR", "Puerto Rico")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"RI", "Rhode Island")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"SC", "South Carolina")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"SD", "South Dakota")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"TN", "Tennessee")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"TX", "Texas")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"UT", "Utah")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"VA", "Virginia")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"VI", "U.S. Virgin Islands")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"VT", "Vermont")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"WA", "Washington")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"WI", "Wisconsin")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"WV", "West Virginia")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"WY", "Wyoming")), - new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"YC", "New York City")))); + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"30", "Montana")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"31", "Nebraska")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"32", "Nevada")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"33", "New Hampshire")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"34", "New Jersey")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"35", "New Mexico")), + new CodeableConcept().addCoding(new Coding("2.16.840.1.113883.6.245","9755772", "New York City")), //Unique codesystem just for New York City + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"36", "New York")), //Unique codesystem just for New York City + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"37", "North Carolina")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"38", "North Dekota")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"69", "Northern Mariana Islands")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"39", "Ohio")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"40", "Oklahoma")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"41", "Oregon")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"42", "Pennsylvania")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"72", "Puerto Rico")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"44", "Rhode Island")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"45", "South Carolina")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"46", "South Dakota")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"47", "Tennessee")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"48", "Texas")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"78", "U.S. Virgin Islands")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"49", "Utah")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"50", "Vermont")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"51", "Virginia")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"53", "Washington")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"54", "West Virginia")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"55", "Wisconsin")), + new CodeableConcept().addCoding(new Coding(CommonUtil.locationJurisdictionUrl,"56", "Wyoming")))); public static Extension getExtension(DomainResource resource, String url) { for (Extension extension : resource.getExtension()) { if (extension.getUrl().equals(url)) {