Search in sources :

Example 1 with RelationshipItem

use of org.hisp.dhis.tracker.domain.RelationshipItem in project dhis2-core by dhis2.

the class RelationshipTrackerConverterService method convertRelationshipType.

private RelationshipItem convertRelationshipType(org.hisp.dhis.relationship.RelationshipItem from) {
    RelationshipItem relationshipItem = new RelationshipItem();
    relationshipItem.setEnrollment(from.getProgramInstance() != null ? from.getProgramInstance().getUid() : null);
    relationshipItem.setEvent(from.getProgramStageInstance() != null ? from.getProgramStageInstance().getUid() : null);
    relationshipItem.setTrackedEntity(from.getTrackedEntityInstance() != null ? from.getTrackedEntityInstance().getUid() : null);
    return relationshipItem;
}
Also used : RelationshipItem(org.hisp.dhis.tracker.domain.RelationshipItem)

Aggregations

RelationshipItem (org.hisp.dhis.tracker.domain.RelationshipItem)1