← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12323: local/in CCEM work in progress

 

------------------------------------------------------------
revno: 12323
committer: Mithilesh Kumar Thakur <mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-30 13:03:10 +0100
message:
  local/in CCEM work in progress
modified:
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentAttributeValue.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentService.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentStore.java
  local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/Model.java
  local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/DefaultEquipmentService.java
  local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentStore.java
  local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/manager/action/GetOrganisationUnitDetailsAction.java
  local/in/dhis-web-coldchain/src/main/resources/org/hisp/dhis/coldchain/i18n_module.properties
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/clinicEquipmentsAndOrgUnitDetails.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/fullOrganisationUnitDetail.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/clinicEquipments.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentAttributeValue.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentAttributeValue.java	2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentAttributeValue.java	2013-09-30 12:03:10 +0000
@@ -13,6 +13,8 @@
     
     public static String PREFIX_ORGANISATIONUNIT_NAME = "orgunitname";
     
+    public static String PREFIX_ORGANISATIONUNIT_CODE = "code";
+    
     public static final String HEALTHFACILITY = "Health Facility";
     
     private Equipment equipment;

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentService.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentService.java	2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentService.java	2013-09-30 12:03:10 +0000
@@ -47,6 +47,8 @@
     
     Collection<OrganisationUnit> searchOrgUnitListByName( String searchText );
     
+    Collection<OrganisationUnit> searchOrgUnitListByCode( String searchText );
+    
     // for orgUnit list according to orGUnit Attribute values for paging purpose
     int countOrgUnitByAttributeValue( Collection<Integer> orgunitIds, Attribute attribute, String searchText );
     Collection<OrganisationUnit> searchOrgUnitByAttributeValue( Collection<Integer> orgunitIds, Attribute attribute, String searchText, Integer min, Integer max );

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentStore.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentStore.java	2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/equipment/EquipmentStore.java	2013-09-30 12:03:10 +0000
@@ -42,6 +42,8 @@
     
     Collection<OrganisationUnit> searchOrgUnitListByName( String searchText );
     
+    Collection<OrganisationUnit> searchOrgUnitListByCode( String searchText );
+    
     
     // for orgUnit list according to orGUnit Attribute values for paging purpose
     int countOrgUnitByAttributeValue( Collection<Integer> orgunitIds, Attribute attribute, String searchText );

=== modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/Model.java'
--- local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/Model.java	2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/coldchain/model/Model.java	2013-09-30 12:03:10 +0000
@@ -12,7 +12,9 @@
     public static final String DEFAULT_CCEMFOLDER = "CCEMIMAGES";
     public static String PREFIX_MODEL_NAME = "modelname";
     
+    public static final String NAME_OWNERSHIP_GROUP_SET = "Ownership";
     public static final String NAME_FACILITY_TYPE = "Facility Type";
+    //public static final String NAME_FACILITY_TYPE = "Type";
     
     
     private int id;

=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/DefaultEquipmentService.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/DefaultEquipmentService.java	2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/DefaultEquipmentService.java	2013-09-30 12:03:10 +0000
@@ -168,6 +168,12 @@
         return equipmentStore.searchOrgUnitListByName( searchText );
     }
     
+    public Collection<OrganisationUnit> searchOrgUnitListByCode( String searchText )
+    {
+        return equipmentStore.searchOrgUnitListByCode( searchText );
+    }
+    
+    
     // for orgUnit list according to orGUnit Attribute values for paging purpose
     public int countOrgUnitByAttributeValue( Collection<Integer> orgunitIds, Attribute attribute, String searchText )
     {

=== modified file 'local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentStore.java'
--- local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentStore.java	2013-09-05 11:11:36 +0000
+++ local/in/dhis-in-services/dhis-in-service-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/hibernate/HibernateEquipmentStore.java	2013-09-30 12:03:10 +0000
@@ -288,6 +288,29 @@
         
     }
     
+    
+    @SuppressWarnings( "unchecked" )
+    public Collection<OrganisationUnit> searchOrgUnitListByCode( String searchText )
+    {
+        String hql = "SELECT orgUnit FROM OrganisationUnit AS orgUnit WHERE orgUnit.code like '%" + searchText + "%'";
+        
+        Query query = getQuery( hql );
+        
+        return query.list();
+
+        /*
+        Criteria criteria = getCriteria();
+        
+        criteria.add(Restrictions.like( "OrganisationUnit.name", "%" + searchText + "%"));
+        
+        return criteria.list();
+        */
+        
+    }
+    
+    
+    
+    
     // for orgUnit list according to orGUnit Attribute values for paging purpose
     public int countOrgUnitByAttributeValue( Collection<Integer> orgunitIds, Attribute attribute, String searchText )
     {

=== modified file 'local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/manager/action/GetOrganisationUnitDetailsAction.java'
--- local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/manager/action/GetOrganisationUnitDetailsAction.java	2013-09-05 11:11:36 +0000
+++ local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/manager/action/GetOrganisationUnitDetailsAction.java	2013-09-30 12:03:10 +0000
@@ -266,11 +266,37 @@
         return total;
     }
     
+    private OrganisationUnitGroupSet organisationUnitOwnershipGroupSet;
+    
+    public OrganisationUnitGroupSet getOrganisationUnitOwnershipGroupSet()
+    {
+        return organisationUnitOwnershipGroupSet;
+    }
+    
+    private List<OrganisationUnitGroup> orgUnitOwnershipGroupSetMember;
+    
+    public List<OrganisationUnitGroup> getOrgUnitOwnershipGroupSetMember()
+    {
+        return orgUnitOwnershipGroupSetMember;
+    }
+    
+    private Map<Integer, String> orgUnitGroupSetOwnerShipNameMap = new HashMap<Integer, String>();
+    
+    public Map<Integer, String> getOrgUnitGroupSetOwnerShipNameMap()
+    {
+        return orgUnitGroupSetOwnerShipNameMap;
+    }
+    
     // -------------------------------------------------------------------------
     // Implementation Action
     // -------------------------------------------------------------------------
 
 
+
+
+
+
+
     public String execute()
         throws Exception
     {
@@ -302,28 +328,67 @@
             orgUnitList.retainAll( ouGroup.getMembers() );
         }
         
+        
         List<OrganisationUnitGroupSet> organisationUnitGroupSets = new ArrayList<OrganisationUnitGroupSet>( organisationUnitGroupService.getOrganisationUnitGroupSetByName( Model.NAME_FACILITY_TYPE ) );
         organisationUnitGroupSet = organisationUnitGroupSets.get(0);
         orgUnitGroups = new ArrayList<OrganisationUnitGroup>( organisationUnitGroupSet.getOrganisationUnitGroups() );
         
+        
+        
+        List<OrganisationUnitGroupSet> orgUnitOwnerShipGroupSets = new ArrayList<OrganisationUnitGroupSet>( organisationUnitGroupService.getOrganisationUnitGroupSetByName( Model.NAME_OWNERSHIP_GROUP_SET ) );
+        organisationUnitOwnershipGroupSet = orgUnitOwnerShipGroupSets.get(0);
+        orgUnitOwnershipGroupSetMember = new ArrayList<OrganisationUnitGroup>( organisationUnitOwnershipGroupSet.getOrganisationUnitGroups() );
+        
+        /*
+        if ( organisationUnitOwnershipGroupSet != null )
+        {
+            orgUnitGroups.addAll( orgUnitOwnershipGroupSetMember );
+        }
+        
+        orgUnitGroups.addAll( orgUnitOwnershipGroupSetMember );
+        */
+        
+        Collections.sort( orgUnitOwnershipGroupSetMember, new IdentifiableObjectNameComparator() );
+        
         Collections.sort( orgUnitGroups, new IdentifiableObjectNameComparator() );
         
+        /*
+        for ( OrganisationUnitGroup organisationUnitGroup : orgUnitGroups )
+        {
+            System.out.println( organisationUnitGroup.getName() );
+        }
+        */
+        
         //for ( OrganisationUnitGroup organisationUnitGroup : orgUnitGroups )
         //{
             for( OrganisationUnit orgUnit : orgUnitList )
             {
-                for ( OrganisationUnitGroup organisationUnitGroup : orgUnitGroups )
+                for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitGroupSet.getOrganisationUnitGroups() )
                 {
                     if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
                     {
                         if( orgUnit.getGroups().contains( organisationUnitGroup ) )
                         {
+                            
                             orgUnitGroupNameMap.put( orgUnit.getId(), organisationUnitGroup.getName() );
                             break;
                         }
                     }
                 }
                 
+                for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitOwnershipGroupSet.getOrganisationUnitGroups() )
+                {
+                    if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
+                    {
+                        if( orgUnit.getGroups().contains( organisationUnitGroup ) )
+                        {
+                            
+                            orgUnitGroupSetOwnerShipNameMap.put( orgUnit.getId(), organisationUnitGroup.getName() );
+                            break;
+                        }
+                    }
+                }
+                
                 /*
                 if( organisationUnitGroup.getMembers().contains( orgUnit ) );
                 {
@@ -358,7 +423,7 @@
         if ( listFilterOrgUnit != null && listFilterOrgUnit )
         {
             
-            if( searchingOrgUnitFilterOptionId.equalsIgnoreCase(  Model.NAME_FACILITY_TYPE ) )
+            if( searchingOrgUnitFilterOptionId.equalsIgnoreCase(  Model.NAME_FACILITY_TYPE ) || searchingOrgUnitFilterOptionId.equalsIgnoreCase(  Model.NAME_OWNERSHIP_GROUP_SET ) )
             {
                 OrganisationUnitGroup filterOrgUnitGroup = organisationUnitGroupService.getOrganisationUnitGroup( searchingOrgUnitGroupId );
                 
@@ -368,7 +433,7 @@
                 
                 for( OrganisationUnit orgUnit : orgUnitList )
                 {
-                    for ( OrganisationUnitGroup organisationUnitGroup : orgUnitGroups )
+                    for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitGroupSet.getOrganisationUnitGroups() )
                     {
                         if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
                         {
@@ -379,6 +444,20 @@
                             }
                         }
                     }
+                    
+                    for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitOwnershipGroupSet.getOrganisationUnitGroups() )
+                    {
+                        if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
+                        {
+                            if( orgUnit.getGroups().contains( organisationUnitGroup ) )
+                            {
+                                
+                                orgUnitGroupSetOwnerShipNameMap.put( orgUnit.getId(), organisationUnitGroup.getName() );
+                                break;
+                            }
+                        }
+                    }
+                    
                     orgunitHierarchyMap.put( orgUnit.getId(), getHierarchyOrgunit( orgUnit ) );
                 }
                 
@@ -400,17 +479,77 @@
                 
                 for( OrganisationUnit orgUnit : orgUnitList )
                 {
-                    for ( OrganisationUnitGroup organisationUnitGroup : orgUnitGroups )
-                    {
-                        if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
-                        {
-                            if( orgUnit.getGroups().contains( organisationUnitGroup ) )
-                            {
-                                orgUnitGroupNameMap.put( orgUnit.getId(), organisationUnitGroup.getName() );
-                                break;
-                            }
-                        }
-                    }
+                    for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitGroupSet.getOrganisationUnitGroups() )
+                    {
+                        if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
+                        {
+                            if( orgUnit.getGroups().contains( organisationUnitGroup ) )
+                            {
+                                orgUnitGroupNameMap.put( orgUnit.getId(), organisationUnitGroup.getName() );
+                                break;
+                            }
+                        }
+                    }
+                    
+                    for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitOwnershipGroupSet.getOrganisationUnitGroups() )
+                    {
+                        if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
+                        {
+                            if( orgUnit.getGroups().contains( organisationUnitGroup ) )
+                            {
+                                
+                                orgUnitGroupSetOwnerShipNameMap.put( orgUnit.getId(), organisationUnitGroup.getName() );
+                                break;
+                            }
+                        }
+                    }
+                    
+                    orgunitHierarchyMap.put( orgUnit.getId(), getHierarchyOrgunit( orgUnit ) );
+                }
+                
+                getOrganisationUnitAttributeData( );
+                
+                return SUCCESS;
+            }
+            
+            else if( searchingOrgUnitFilterOptionId.equalsIgnoreCase(  EquipmentAttributeValue.PREFIX_ORGANISATIONUNIT_CODE ) )
+            {
+                //orgUnitList = new ArrayList<OrganisationUnit>();
+                
+                //orgUnitList = new ArrayList<OrganisationUnit>( equipmentService.searchOrgUnitListByName( searchOrgText ));
+                
+                orgUnitList.retainAll( equipmentService.searchOrgUnitListByCode( searchOrgText ) );
+                
+                filteredOrgUnitList.addAll( orgUnitList ); 
+                
+                for( OrganisationUnit orgUnit : orgUnitList )
+                {
+                    for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitGroupSet.getOrganisationUnitGroups() )
+                    {
+                        if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
+                        {
+                            if( orgUnit.getGroups().contains( organisationUnitGroup ) )
+                            {
+                                orgUnitGroupNameMap.put( orgUnit.getId(), organisationUnitGroup.getName() );
+                                break;
+                            }
+                        }
+                    }
+                    
+                    
+                    for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitOwnershipGroupSet.getOrganisationUnitGroups() )
+                    {
+                        if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
+                        {
+                            if( orgUnit.getGroups().contains( organisationUnitGroup ) )
+                            {
+                                
+                                orgUnitGroupSetOwnerShipNameMap.put( orgUnit.getId(), organisationUnitGroup.getName() );
+                                break;
+                            }
+                        }
+                    }
+                    
                     orgunitHierarchyMap.put( orgUnit.getId(), getHierarchyOrgunit( orgUnit ) );
                 }
                 
@@ -437,7 +576,7 @@
                    
                    orgunitHierarchyMap.put( orgUnit.getId(), getHierarchyOrgunit( orgUnit ) );
                    
-                   for ( OrganisationUnitGroup organisationUnitGroup : orgUnitGroups )
+                   for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitGroupSet.getOrganisationUnitGroups() )
                    {
                        if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
                        {
@@ -448,6 +587,20 @@
                            }
                        }
                    }
+                   
+                   for ( OrganisationUnitGroup organisationUnitGroup : organisationUnitOwnershipGroupSet.getOrganisationUnitGroups() )
+                   {
+                       if( orgUnit.getGroups() != null && orgUnit.getGroups().size() > 0 )
+                       {
+                           if( orgUnit.getGroups().contains( organisationUnitGroup ) )
+                           {
+                               
+                               orgUnitGroupSetOwnerShipNameMap.put( orgUnit.getId(), organisationUnitGroup.getName() );
+                               break;
+                           }
+                       }
+                   }
+                   
                 }
                 
                 listOrganisationUnitByFilter( orgUnitIdsByComma, attribute, searchOrgText );
@@ -554,21 +707,6 @@
     
     }
      
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
     private String getHierarchyOrgunit( OrganisationUnit orgunit )
     {
         //String hierarchyOrgunit = orgunit.getName();
@@ -588,7 +726,7 @@
             orgunit = orgunit.getParent();
         }
         
-        hierarchyOrgunit = hierarchyOrgunit.substring( hierarchyOrgunit.indexOf( "/" ) +1 );
+        hierarchyOrgunit = hierarchyOrgunit.substring( hierarchyOrgunit.indexOf( "/" ) + 1 );
         
         return hierarchyOrgunit;
     }

=== modified file 'local/in/dhis-web-coldchain/src/main/resources/org/hisp/dhis/coldchain/i18n_module.properties'
--- local/in/dhis-web-coldchain/src/main/resources/org/hisp/dhis/coldchain/i18n_module.properties	2013-09-05 11:11:36 +0000
+++ local/in/dhis-web-coldchain/src/main/resources/org/hisp/dhis/coldchain/i18n_module.properties	2013-09-30 12:03:10 +0000
@@ -158,7 +158,7 @@
 <!--orgunit_hierarchy = Orgunit Hierarchy-->
 
 orgunit_hierarchy = Administrative region
-health_facility_name = Health facility name
+health_facility_name = Name
 facilities = Facilities
 equipment_in = Equipment in
 equipment_manager = Equipment Manager
@@ -177,4 +177,7 @@
 equipment_count = Equipment Count
 vaccines = Vaccines
 orunit_name = OrgUnit Name
-code_in_use=The code is already in use. Please choose a different code.
\ No newline at end of file
+code_in_use=The code is already in use. Please choose a different code.
+type = Type
+code = Code
+ownership = Ownership
\ No newline at end of file

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/clinicEquipmentsAndOrgUnitDetails.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/clinicEquipmentsAndOrgUnitDetails.vm	2013-09-05 11:11:36 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/clinicEquipmentsAndOrgUnitDetails.vm	2013-09-30 12:03:10 +0000
@@ -43,14 +43,29 @@
 			<td id='searchingOrgUnitAttributeTD' style='display:none'>
                 	<select id="searchingOrgUnitFilterOptionId" name="searchingOrgUnitFilterOptionId" onchange="searchingOrgUnitFilterOptionOnChange()">
                   		<!--<option value="">[$i18n.getString( "please_select" )]</option>-->
-                  		<option value="$organisationUnitGroupSet.name">$organisationUnitGroupSet.name</option>
-                  		<option value="orgunitname">$i18n.getString( "orunit_name" )</option>
-                  		#foreach( $orgUniAttribute in $attributes )
+                  		<!--<option value="$organisationUnitGroupSet.name">$organisationUnitGroupSet.name</option>-->
+                  		<option value="$organisationUnitOwnershipGroupSet.name">$i18n.getString( "ownership" )</option>
+						<option value="$organisationUnitGroupSet.name">$i18n.getString( "type" )</option>
+						<option value="orgunitname">$i18n.getString( "orunit_name" )</option>
+						<option value="code">$i18n.getString( "code" )</option>
+                  		<!--
+						#foreach( $orgUniAttribute in $attributes )
                   			<option value="$orgUniAttribute.id">$orgUniAttribute.name</option>
+		                #end
+						-->
+                  	</select>
+			</td>
+			
+			<td id='searchingOrgUnitOwnerShipGroupSetMemberTD' style='display:none'>
+                	<select id="searchingOrgUnitGroupSetOwnerShipId" name="searchingOrgUnitGroupSetOwnerShipId" #if( $orgUnitOwnershipGroupSetMember.size() == 0 ) disabled="disabled" #end onchange="loadOrgUnitsByFilter()">
+                  		<option value="">[$i18n.getString( "please_select" )]</option>
+                  		#foreach( $orgUniGroupOwnerShip in $orgUnitOwnershipGroupSetMember )
+                  			<option value="$orgUniGroupOwnerShip.id">$orgUniGroupOwnerShip.name</option>
 		                  #end
                   	</select>
 			</td>
 			
+			
 			<td id='searchingOrgUnitGroupSetMemberTD' style='display:none'>
                 	<select id="searchingOrgUnitGroupId" name="searchingOrgUnitGroupId" #if( $orgUnitGroups.size() == 0 ) disabled="disabled" #end onchange="loadOrgUnitsByFilter()">
                   		<option value="">[$i18n.getString( "please_select" )]</option>
@@ -60,7 +75,6 @@
                   	</select>
 			</td>			
 			
-			
 			<td id='searchingOrgTextTD' style='display:none'>
             	<input type="text" id="searchOrgText" name="searchOrgText" maxlength="30" style="width:12.5em" value="$!searchOrgText" onkeypress="isOrgUnitEnter( event )">
             </td>
@@ -87,10 +101,16 @@
 		<tr bgcolor="#285C91">
 			<td><font color="#FFFFFF"><strong>$i18n.getString( "orgunit_hierarchy" )</strong></font></td>
 			<td><font color="#FFFFFF"><strong>$i18n.getString( "health_facility_name" )</strong></font></td>
+			<td><font color="#FFFFFF"><strong>$i18n.getString( "code" )</strong></font></td> 
+			 <!--
 			 #foreach( $attribute in $attributes )
 			 	<td><font color="#FFFFFF"><strong>$attribute.name</strong></font></td>
- 			#end
- 			<td><font color="#FFFFFF"><strong>$organisationUnitGroupSet.name</strong></font></td>
+			 #end
+			-->	
+			<td><font color="#FFFFFF"><strong>$i18n.getString( "ownership" )</strong></font></td> 
+ 			<td><font color="#FFFFFF"><strong>$i18n.getString( "type" )</strong></font></td>
+			<!--<td><font color="#FFFFFF"><strong>$organisationUnitGroupSet.name</strong></font></td>-->
+			
  			<td>&nbsp;&nbsp;</td>
 		</tr>
 		
@@ -100,11 +120,15 @@
 			 	<tr #alternate($mark)>
 			 		<td>$!orgunitHierarchyMap.get( $orgUnit.id )</td>
 			 		<td>$encoder.htmlEncode( $orgUnit.name )</td>
-			 		 #foreach( $attribute in $attributes )
+					<td>$!orgUnit.code</td>
+			 		 <!--
+					 #foreach( $attribute in $attributes )
 			 		 	#set( $valueMapId = $orgUnit.id + ':' + $attribute.id )
 			 		 	<td>$!orgUnitAttribDataValueMap.get( $valueMapId )</td>
- 		 			#end
- 		 			<td>$!orgUnitGroupNameMap.get( $orgUnit.id )</td>
+					 #end
+					-->
+ 		 			<td>$!orgUnitGroupSetOwnerShipNameMap.get( $orgUnit.id )</td>
+					<td>$!orgUnitGroupNameMap.get( $orgUnit.id )</td>
 			 		<td><a href="javascript:showFullOrgUnitDetails( '$orgUnit.id','$orgUnit.name'); " title='$i18n.getString( "Clinic Detail" )'>Details</a></td>
  			 	</tr>
 			#set( $mark = !$mark)
@@ -129,7 +153,7 @@
 							</select>
 						</td>
 						<td id='filterDiv'><a href="javascript:hideFilter()" >Filter</a></td>
-						<td id='searchingAttributeIdTD'>
+						<td id='searchingAttributeIdTD'></td>
                		 	<td id='searchingAttributeTD' style='display:none'>
                 			<select id="searchingAttributeId" name="searchingAttributeId" #if( $equipmentTypeAttributes.size() == 0 ) disabled="disabled" #end onchange="searchingAttributeOnChange( this.value )">
                   			<!--<option value="modelname">$i18n.getString( "Model Name" )</option>-->

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/fullOrganisationUnitDetail.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/fullOrganisationUnitDetail.vm	2013-09-05 11:11:36 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/fullOrganisationUnitDetail.vm	2013-09-30 12:03:10 +0000
@@ -31,7 +31,7 @@
 				#set( $mark = !$mark)	
 				#end
 				<tr bgcolor="#285C91">
-					<td colspan="2"><font color="#FFFFFF"><strong>Contact</strong></font>
+					<td colspan="2"><font color="#FFFFFF"><strong>Contact</strong></font></td>
 				</tr>				
 				<tr>
 					<td>Contact Person</td>
@@ -52,7 +52,7 @@
 				</tr>
 				
 				<tr bgcolor="#285C91">$i18n.getString( "equipment_manager" )
-					<td><font color="#FFFFFF"><strong>$i18n.getString( "equipmentAttributeValue" )</strong></font>
+					<td><font color="#FFFFFF"><strong>$i18n.getString( "equipmentAttributeValue" )</strong></font></td>
 					<!--<td align="left"><a href="javascript:closeFullOrgDetailsWindow(); " title='$i18n.getString( "EquipmentAttributeValue Detail" )'><font color="#FFFFFF"><u>equipmentAttributeValue details</u></font></a></td>-->
 					<td align="left"><font color="#FFFFFF">$i18n.getString( "equipment_count" )</font></td>
 				</tr>				

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/clinicEquipments.js'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/clinicEquipments.js	2013-09-05 11:11:36 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/clinicEquipments.js	2013-09-30 12:03:10 +0000
@@ -331,7 +331,7 @@
 	hideById('searchingOrgUnitAttributeTD');
 	
 	hideById('searchingOrgUnitGroupSetMemberTD');
-	
+	hideById('searchingOrgUnitOwnerShipGroupSetMemberTD');
 	hideById('selectOrgUnitDiv');
 	//hideById('orgUnitDetailsDiv');
 	
@@ -361,21 +361,35 @@
 	
 	var orgUnitFilterOption = document.getElementById('searchingOrgUnitFilterOptionId');
 	
-	var orgUnitFilterOptionName = orgUnitFilterOption.options[ orgUnitFilterOption.selectedIndex ].text;
+	var orgUnitFilterOptionName = orgUnitFilterOption.options[ orgUnitFilterOption.selectedIndex ].value;
 	
+	//alert( orgUnitFilterOptionName );
 	
 	if( orgUnitFilterOptionName ==  "Facility Type" )
 	{
 		hideById('filterOrgDiv');
 		showById('searchingOrgUnitGroupSetMemberTD');
-		hideById('searchingOrgTextTD');
-		hideById('searchOrgDiv');
-		showById('clearOrgDiv');
-	}
+		hideById('searchingOrgUnitOwnerShipGroupSetMemberTD');
+		hideById('searchingOrgTextTD');
+		hideById('searchOrgDiv');
+		showById('clearOrgDiv');
+	}
+	
+	else if( orgUnitFilterOptionName ==  "Ownership" )
+	{
+		hideById('filterOrgDiv');
+		showById('searchingOrgUnitOwnerShipGroupSetMemberTD');
+		hideById('searchingOrgUnitGroupSetMemberTD');
+		hideById('searchingOrgTextTD');
+		hideById('searchOrgDiv');
+		showById('clearOrgDiv');
+	}
+	
 	else
 	{
 		hideById('filterOrgDiv');
 		hideById('searchingOrgUnitGroupSetMemberTD');
+		hideById('searchingOrgUnitOwnerShipGroupSetMemberTD');
 		showById('searchingOrgTextTD');
 		showById('searchOrgDiv');
 		showById('clearOrgDiv');
@@ -491,10 +505,25 @@
 	var searchingOrgUnitFilterOptionId = orgUnitAttribute.options[ orgUnitAttribute.selectedIndex ].value;
 	
 	
+	if( searchingOrgUnitFilterOptionId ==  "Facility Type" )
+	{
+		var orgUnitGroup = document.getElementById('searchingOrgUnitGroupId');
+		var searchingOrgUnitGroupId = orgUnitGroup.options[ orgUnitGroup.selectedIndex ].value;
+		
+	}
+	
+	else if( searchingOrgUnitFilterOptionId ==  "Ownership" )
+	{
+		var orgUnitGroup = document.getElementById('searchingOrgUnitGroupSetOwnerShipId');
+		var searchingOrgUnitGroupId = orgUnitGroup.options[ orgUnitGroup.selectedIndex ].value;
+	}
+	
+	/*
 	var orgUnitGroup = document.getElementById('searchingOrgUnitGroupId');
 	var searchingOrgUnitGroupId = orgUnitGroup.options[ orgUnitGroup.selectedIndex ].value;
+	*/
 	
-	//alert( searchingOrgUnitFilterOptionId );
+	//alert( searchingOrgUnitFilterOptionId + " -- "  + searchingOrgUnitGroupId );
 	
 	
 	hideById('selectOrgUnitDiv');
@@ -523,7 +552,8 @@
 		hideById('filterOrgDiv');
 		
 		showById('searchingOrgUnitAttributeTD');
-		showById('searchingOrgUnitGroupSetMemberTD');
+		showById('searchingOrgUnitOwnerShipGroupSetMemberTD');
+		//showById('searchingOrgUnitGroupSetMemberTD');
 		//showById('searchingOrgTextTD');
 		//showById('searchOrgDiv');
 		showById('clearOrgDiv');