-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from MortalityReporting/ig1.3
Ig1.3
- Loading branch information
Showing
26 changed files
with
807 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
target/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 62 additions & 5 deletions
67
src/main/java/edu/gatech/chai/VRDR/model/ConditionContributingToDeath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,84 @@ | ||
package edu.gatech.chai.VRDR.model; | ||
|
||
import java.util.List; | ||
|
||
import org.hl7.fhir.r4.model.Condition; | ||
import org.hl7.fhir.r4.model.Observation; | ||
import org.hl7.fhir.r4.model.Quantity; | ||
import org.hl7.fhir.r4.model.Reference; | ||
import org.hl7.fhir.r4.model.StringType; | ||
import org.hl7.fhir.r4.model.Observation.ObservationComponentComponent; | ||
|
||
import ca.uhn.fhir.model.api.annotation.ResourceDef; | ||
import edu.gatech.chai.VRDR.model.util.CauseOfDeathConditionUtil; | ||
import edu.gatech.chai.VRDR.model.util.CommonUtil; | ||
import edu.gatech.chai.VRDR.model.util.ConditionContributingToDeathUtil; | ||
|
||
@ResourceDef(name = "Condition", profile = "http://hl7.org/fhir/us/vrdr/StructureDefinition/VRDR-Condition-Contributing-To-Death") | ||
public class ConditionContributingToDeath extends Condition { | ||
@ResourceDef(name = "Observation", profile = "http://hl7.org/fhir/us/vrdr/StructureDefinition/VRDR-Condition-Contributing-To-Death") | ||
public class ConditionContributingToDeath extends Observation { | ||
public ConditionContributingToDeath() { | ||
super(); | ||
CommonUtil.initResource(this); | ||
this.setCode(ConditionContributingToDeathUtil.code); | ||
} | ||
|
||
public ConditionContributingToDeath(Decedent decedent, Certifier certifier, String value) { | ||
super(); | ||
CommonUtil.initResource(this); | ||
this.setCode(ConditionContributingToDeathUtil.code); | ||
setDecedent(decedent); | ||
setPerformer(certifier); | ||
setValue(value); | ||
} | ||
|
||
public void setDecedent(Decedent decedent) { | ||
Reference reference = new Reference(decedent.getId()); | ||
this.subject = reference; | ||
} | ||
|
||
public void setSubject(Decedent decedent) { | ||
setDecedent(decedent); | ||
} | ||
|
||
public Reference getDecedent() { | ||
return subject; | ||
} | ||
|
||
public void setCertifier(Certifier certifier) { | ||
Reference reference = new Reference(certifier.getId()); | ||
this.asserter = reference; | ||
this.performer.add(reference); | ||
} | ||
public void setAsserter(Certifier certifier) { | ||
setCertifier(certifier); | ||
} | ||
public void setPerformer(Certifier certifier) { | ||
setCertifier(certifier); | ||
} | ||
|
||
public List<Reference> getCertifiers(int index) { | ||
return performer; | ||
} | ||
|
||
public List<Reference> getAsserters(int index) { | ||
return performer; | ||
} | ||
|
||
public List<Reference> getPerformers(int index) { | ||
return performer; | ||
} | ||
|
||
public Reference getCertifier(int index) { | ||
return performer.get(index); | ||
} | ||
|
||
public void setValue(StringType value) { | ||
if((value.getValue().length() > 240)) { | ||
throw new IllegalArgumentException("CauseOfDeathCondition value "+value.getValue()+" is too long, must be 240 characters or less."); | ||
} | ||
this.setValue(value); | ||
} | ||
|
||
public Reference getCertifier() { | ||
return asserter; | ||
public void setValue(String value) { | ||
setValue(new StringType(value)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.