=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddRelationshipPatientAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddRelationshipPatientAction.java 2012-09-20 11:02:49 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddRelationshipPatientAction.java 2012-09-21 10:27:45 +0000 @@ -30,9 +30,10 @@ import java.util.Collection; import java.util.HashMap; import java.util.HashSet; -import java.util.List; import java.util.Map; +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager; import org.hisp.dhis.patient.Patient; import org.hisp.dhis.patient.PatientAttribute; import org.hisp.dhis.patient.PatientAttributeGroup; @@ -47,6 +48,7 @@ import org.hisp.dhis.program.ProgramService; import org.hisp.dhis.relationship.RelationshipType; import org.hisp.dhis.relationship.RelationshipTypeService; +import org.hisp.dhis.user.User; import com.opensymphony.xwork2.Action; @@ -74,6 +76,8 @@ private ProgramService programService; + private OrganisationUnitSelectionManager selectionManager; + // ------------------------------------------------------------------------- // Input/Output // ------------------------------------------------------------------------- @@ -94,6 +98,8 @@ private Map> attributeGroupsMap = new HashMap>(); + private Collection healthWorkers; + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -166,6 +172,9 @@ } } + OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit(); + healthWorkers = organisationUnit.getUsers(); + return SUCCESS; } @@ -173,11 +182,21 @@ // Getter/Setter // ------------------------------------------------------------------------- + public void setSelectionManager( OrganisationUnitSelectionManager selectionManager ) + { + this.selectionManager = selectionManager; + } + public void setProgramService( ProgramService programService ) { this.programService = programService; } + public Collection getHealthWorkers() + { + return healthWorkers; + } + public Map> getAttributeGroupsMap() { return attributeGroupsMap; @@ -192,7 +211,7 @@ { return identifierTypes; } - + public Collection getNoGroupAttributes() { return noGroupAttributes; === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-09-20 13:04:02 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-09-21 10:27:45 +0000 @@ -778,6 +778,8 @@ +