dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21207
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9967: Add attributes/identifier of selected program into person registration form; minor fix in visit s...
------------------------------------------------------------
revno: 9967
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-04 22:35:48 +0700
message:
Add attributes/identifier of selected program into person registration form; minor fix in visit schedule.
modified:
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/ShowAddPatientFormAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
--
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 2013-02-18 08:23:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientAction.java 2013-03-04 15:35:48 +0000
@@ -153,11 +153,10 @@
throws Exception
{
relationshipTypes = relationshipTypeService.getAllRelationshipTypes();
-
patient = patientService.getPatient( id );
-
healthWorkers = patient.getOrganisationUnit().getUsers();
-
+ Program program = null;
+
if ( programId == null )
{
PatientRegistrationForm patientRegistrationForm = patientRegistrationFormService
@@ -172,7 +171,7 @@
}
else
{
- Program program = programService.getProgram( programId );
+ program = programService.getProgram( programId );
Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( patient,
program, false );
@@ -211,10 +210,11 @@
Collection<PatientAttribute> patientAttributesInProgram = new HashSet<PatientAttribute>();
Collection<Program> programs = programService.getAllPrograms();
- for ( Program program : programs )
+ programs.remove(program);
+ for ( Program _program : programs )
{
- identifierTypes.removeAll( program.getPatientIdentifierTypes() );
- patientAttributesInProgram.removeAll( program.getPatientAttributes() );
+ identifierTypes.removeAll( _program.getPatientIdentifierTypes() );
+ patientAttributesInProgram.removeAll( _program.getPatientAttributes() );
}
attributeGroups = new ArrayList<PatientAttributeGroup>(
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2013-02-18 08:23:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2013-03-04 15:35:48 +0000
@@ -196,6 +196,7 @@
{
organisationUnit = selectionManager.getSelectedOrganisationUnit();
healthWorkers = organisationUnit.getUsers();
+ Program program = null;
if ( programId == null )
{
@@ -227,10 +228,12 @@
Collection<PatientAttribute> patientAttributesInProgram = new HashSet<PatientAttribute>();
Collection<Program> programs = programService.getAllPrograms();
- for ( Program program : programs )
+ programs.remove(program);
+
+ for ( Program _program : programs )
{
- identifierTypes.removeAll( program.getPatientIdentifierTypes() );
- patientAttributesInProgram.addAll( program.getPatientAttributes() );
+ identifierTypes.removeAll( _program.getPatientIdentifierTypes() );
+ patientAttributesInProgram.addAll( _program.getPatientAttributes() );
}
attributeGroups = new ArrayList<PatientAttributeGroup>(
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2013-03-04 14:05:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2013-03-04 15:35:48 +0000
@@ -1060,6 +1060,9 @@
<param name="javascripts">
../dhis-web-commons/ouwt/ouwt.js,
javascript/commons.js,
+ javascript/patient.js,
+ javascript/entry.js,
+ javascript/relationshipPatient.js,
javascript/activityPlan.js
</param>
<param name="requiredAuthorities">F_ACTIVITY_PLAN</param>