------------------------------------------------------------
revno: 13685
committer: Lars Helge Ă˜verland <[email protected]>
branch nick: dhis2
timestamp: Thu 2014-01-09 19:28:38 +0100
message:
  Tracker, make sure attributes marked as in list for no program search also 
appear in edit screen
modified:
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientAction.java


--
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 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientAction.java	2014-01-09 16:45:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientAction.java	2014-01-09 18:28:38 +0000
@@ -238,8 +238,21 @@
                 Collection<Program> programs = programService.getAllPrograms();
                 for ( Program p : programs )
                 {
-                    identifierTypes.removeAll( p.getIdentifierTypes() );
-                    attributes.removeAll( p.getAttributes() );
+                    for ( PatientIdentifierType identifierType : p.getIdentifierTypes() )
+                    {
+                        if ( !identifierType.getDisplayInListNoProgram() )
+                        {
+                            identifierTypes.remove( identifierType ); //TODO bad
+                        }
+                    }
+                    
+                    for ( PatientAttribute attribute : p.getAttributes() )
+                    {
+                        if ( !attribute.getDisplayInListNoProgram() )
+                        {
+                            attributes.remove( attribute );
+                        }
+                    }
                 }
             }
             else

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to