diff --git a/pom.xml b/pom.xml
index d2085cd..4bdcf76 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
edu.gatech
VRDR
- v0.1.5-R4
+ v0.1.6-R4
jar
VRDR
diff --git a/src/main/java/edu/gatech/VRDR/model/Decedent.java b/src/main/java/edu/gatech/VRDR/model/Decedent.java
index b824bad..44e245a 100644
--- a/src/main/java/edu/gatech/VRDR/model/Decedent.java
+++ b/src/main/java/edu/gatech/VRDR/model/Decedent.java
@@ -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;
}
@@ -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;
}
diff --git a/src/main/java/edu/gatech/VRDR/model/DecedentAge.java b/src/main/java/edu/gatech/VRDR/model/DecedentAge.java
index b344255..f7ea1e0 100644
--- a/src/main/java/edu/gatech/VRDR/model/DecedentAge.java
+++ b/src/main/java/edu/gatech/VRDR/model/DecedentAge.java
@@ -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);