Skip to content

Commit

Permalink
resolves #76, resolves #77
Browse files Browse the repository at this point in the history
  • Loading branch information
ismael-sarmento-jr committed Sep 1, 2015
1 parent 32c9dcb commit 03eacc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public class VisitOccurrence extends BaseResourceEntity {

@ManyToOne
@JoinColumn(name="place_of_service_concept_id", nullable=false)
@Audited(targetAuditMode=RelationTargetAuditMode.NOT_AUDITED)
@NotNull
private Concept placeOfServiceConcept;

Expand Down Expand Up @@ -187,8 +186,7 @@ public IResourceEntity constructEntityFromResource(IResource resource) {
this.id = encounter.getId().getIdPartAsLong();
Long patientRef = encounter.getPatient().getReference().getIdPartAsLong();
if(patientRef != null){
if(this.person == null)
this.person = new Person();
this.person = new Person();
this.person.setId(patientRef);
}
/* Set Period */
Expand All @@ -202,8 +200,7 @@ public IResourceEntity constructEntityFromResource(IResource resource) {
if(careSite != null){
this.careSite = careSite;
/* Set place of service concept */
if(this.placeOfServiceConcept == null)
this.placeOfServiceConcept = new Concept();
this.placeOfServiceConcept = new Concept();
this.placeOfServiceConcept.setId(this.careSite.getPlaceOfServiceConcept().getId()); //TODO add test case, to avoid optionallity of care site
}

Expand Down
1 change: 1 addition & 0 deletions gt-fhir-webapp/src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<property name="hibernate.cache.use_query_cache" value="false" />
<property name="hibernate.cache.use_second_level_cache" value="false" />
<property name="hibernate.cache.use_structured_entries" value="false" />
<!-- <property name="org.hibernate.envers.audit_strategy" value="org.hibernate.envers.strategy.ValidityAuditStrategy"/> -->
</properties>
</persistence-unit>
</persistence>

0 comments on commit 03eacc2

Please sign in to comment.