Skip to content

Commit

Permalink
v0.1.6 added partial setting of decedent race and ethnicity.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRileyGTRI committed Aug 24, 2020
1 parent d3fd4c8 commit f545a15
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 18 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>v0.1.5-R4</version>
<version>v0.1.6-R4</version>
<packaging>jar</packaging>

<name>VRDR</name>
Expand Down
44 changes: 28 additions & 16 deletions src/main/java/edu/gatech/VRDR/model/Decedent.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,20 @@ public Extension setRace(String ombCategory, String detailed, String text) {

public Extension addRace(String ombCategory, String detailed, String text) {
Extension extension = new Extension(DecedentUtil.raceExtensionURL);
Extension ombCategoryExt = new Extension("ombCategory",
new Coding().setCode(ombCategory).setSystem(DecedentUtil.raceSystem));
Extension detailedExt = new Extension("detailed",
new Coding().setCode(ombCategory).setSystem(DecedentUtil.raceSystem));
Extension textExt = new Extension("text", new StringType(text));
extension.addExtension(ombCategoryExt);
extension.addExtension(detailedExt);
extension.addExtension(textExt);
if(!ombCategory.isEmpty()) {
Extension ombCategoryExt = new Extension("ombCategory",
new Coding().setCode(ombCategory).setSystem(DecedentUtil.raceSystem));
extension.addExtension(ombCategoryExt);
}
if(!detailed.isEmpty()) {
Extension detailedExt = new Extension("detailed",
new Coding().setCode(ombCategory).setSystem(DecedentUtil.raceSystem));
extension.addExtension(detailedExt);
}
if(!text.isEmpty()) {
Extension textExt = new Extension("text", new StringType(text));
extension.addExtension(textExt);
}
this.addExtension(extension);
return extension;
}
Expand Down Expand Up @@ -81,14 +87,20 @@ public Extension setEthnicity(String ombCategory, String detailed, String text)

public Extension addEthnicity(String ombCategory, String detailed, String text) {
Extension extension = new Extension(DecedentUtil.ethnicityExtensionURL);
Extension ombCategoryExt = new Extension("ombCategory",
new Coding().setCode(ombCategory).setSystem(DecedentUtil.ethnicitySystem));
Extension detailedExt = new Extension("detailed",
new Coding().setCode(ombCategory).setSystem(DecedentUtil.ethnicitySystem));
Extension textExt = new Extension("text", new StringType(text));
extension.addExtension(ombCategoryExt);
extension.addExtension(detailedExt);
extension.addExtension(textExt);
if(!ombCategory.isEmpty()) {
Extension ombCategoryExt = new Extension("ombCategory",
new Coding().setCode(ombCategory).setSystem(DecedentUtil.ethnicitySystem));
extension.addExtension(ombCategoryExt);
}
if(!detailed.isEmpty()) {
Extension detailedExt = new Extension("detailed",
new Coding().setCode(ombCategory).setSystem(DecedentUtil.ethnicitySystem));
extension.addExtension(detailedExt);
}
if(!text.isEmpty()) {
Extension textExt = new Extension("text", new StringType(text));
extension.addExtension(textExt);
}
this.addExtension(extension);
return extension;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/gatech/VRDR/model/DecedentAge.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import edu.gatech.VRDR.model.util.CommonUtil;
import edu.gatech.VRDR.model.util.DecedentAgeUtil;

@ResourceDef(name = "Observation", profile = "http://hl7.org/fhir/us/vrdr/decedentAge")
@ResourceDef(name = "Observation", profile = "http://hl7.org/fhir/us/vrdr/StructureDefinition/VRDR-DECEDENT-AGE")
public class DecedentAge extends Observation {
public DecedentAge() {
CommonUtil.initResource(this);
Expand Down

0 comments on commit f545a15

Please sign in to comment.