Skip to content

Commit

Permalink
Merge pull request #105 from gt-health/develop
Browse files Browse the repository at this point in the history
Develop branch merged to master.
  • Loading branch information
myungchoi authored Apr 20, 2017
2 parents 1f33a21 + b76e2f0 commit cd6d5c5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ public IResource getRelatedResource() {
Concept myUnitConcept = this.getDoseUnitConcept();
SimpleQuantityDt dose;
if (myUnitConcept != null) {
dose = new SimpleQuantityDt(doseValue, "http://unitsofmeasure.org", myUnitConcept.getConceptCode());
dose = new SimpleQuantityDt(doseValue, "http://unitsofmeasure.org", myUnitConcept.getName());
dose.setCode(myUnitConcept.getConceptCode());
} else {
dose = new SimpleQuantityDt(doseValue);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ public class Observation extends BaseResourceEntity {
@Column(name = "source_value")
private String sourceValue;

@Column(name = "value_source_value")
private String valueSourceValue;

@ManyToOne(cascade = { CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinColumn(name = "unit_concept_id")
private Concept unit;
Expand Down Expand Up @@ -293,6 +296,14 @@ public String getUnitSourceValue() {
public void setUnitSourceValue(String unitSourceValue) {
this.unitSourceValue = unitSourceValue;
}

public String getValueSourceValue() {
return valueSourceValue;
}

public void setValueSourceValue(String valueSourceValue) {
this.valueSourceValue = valueSourceValue;
}

@Override
public IResourceEntity constructEntityFromResource(IResource resource) {
Expand Down Expand Up @@ -401,7 +412,12 @@ public IResource getRelatedResource() {

String systemUriString = this.observationConcept.getVocabulary().getSystemUri();
String codeString = this.observationConcept.getConceptCode();
String displayString = this.observationConcept.getName();
String displayString;
if (this.observationConcept.getId() == 0L) {
displayString = this.getSourceValue();
} else {
displayString = this.observationConcept.getName();
}

// OMOP database maintains Systolic and Diastolic Blood Pressures separately.
// FHIR however keeps them together. Observation DAO filters out Diastolic values.
Expand Down Expand Up @@ -491,11 +507,13 @@ public IResource getRelatedResource() {
value = quantity;
} else if (this.valueAsString != null) {
value = new StringDt(this.valueAsString);
} else if (this.valueAsConcept != null) {
} else if (this.valueAsConcept != null && this.valueAsConcept.getId() != 0L) {
// vocabulary is a required attribute for concept, then it's expected to not be null
CodeableConceptDt valueAsConcept = new CodeableConceptDt(this.valueAsConcept.getVocabulary().getSystemUri(),
this.valueAsConcept.getConceptCode());
value = valueAsConcept;
} else {
value = new StringDt(this.getValueSourceValue());
}
observation.setValue(value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public Patient getRelatedResource() {
calendar.set(yob, mob-1, dob);
patient.setBirthDate(new DateDt(calendar.getTime()));

if(this.location != null){
if(this.location != null && this.location.getId() != 0L){
// PeriodDt period = new PeriodDt();
// period.setStart(new DateTimeDt(this.location.getStartDate()));
// period.setEnd(new DateTimeDt(this.location.getEndDate()));
Expand All @@ -352,7 +352,7 @@ public Patient getRelatedResource() {
patient.setGender(admGender);
}

if (this.provider != null) {
if (this.provider != null && this.provider.getId() != 0L) {
ResourceReferenceDt practitionerResourceRef = new ResourceReferenceDt(this.provider.getIdDt());
practitionerResourceRef.setDisplay(this.provider.getProviderName());
List<ResourceReferenceDt> pracResourceRefs = new ArrayList<ResourceReferenceDt>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<bean id="myOAuthInterceptor" class="edu.gatech.i3l.fhir.security.OIDCInterceptor">
<property name="introspectUrl" value="http://localhost:9085/introspect" />
<property name="enableOAuth" value="True" />
<property name="enableOAuth" value="False" />
<!-- <property name="introspectUrl" value="http://smart-st.i3l.gatech.edu:9085/introspect" /> -->
<property name="clientId" value="client" />
<property name="clientSecret" value="secret" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
and other properties supported by BasicDataSource.
-->
<bean id="myPersistenceDataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
<!-- <property name="url" value="jdbc:postgresql://dhppoc.i3l.gatech.edu:5432/postgres?currentSchema=omop_v5" />
-->
<property name="url" value="jdbc:postgresql://localtest:5432/postgres?currentSchema=omop_v5" />
<property name="url" value="jdbc:postgresql://localhost:5432/postgres?currentSchema=omop_v5" />
<property name="driverClassName" value="org.postgresql.Driver"></property>
<property name="username" value="omop_v5"/>
<property name="password" value="i3lworks"/>
Expand Down

0 comments on commit cd6d5c5

Please sign in to comment.