=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2012-05-24 09:45:14 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2012-08-06 09:34:34 +0000
@@ -83,6 +83,8 @@
private Integer type;
private Boolean displayProvidedOtherFacility;
+
+ private Boolean displayIncidentDate;
// -------------------------------------------------------------------------
// Constructors
@@ -300,6 +302,16 @@
}
}
+ public Boolean getDisplayIncidentDate()
+ {
+ return displayIncidentDate;
+ }
+
+ public void setDisplayIncidentDate( Boolean displayIncidentDate )
+ {
+ this.displayIncidentDate = displayIncidentDate;
+ }
+
private Object getValueFromPatient( String property, Patient patient )
throws Exception
{
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2012-07-30 11:53:35 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2012-08-06 09:34:34 +0000
@@ -121,6 +121,8 @@
moveStoredByFormStageInstanceToDataValue();
executeSql( "ALTER TABLE patientattribute DROP COLUMN inheritable" );
+
+ executeSql( "ALTER TABLE patientattribute DROP COLUMN inheritable" );
}
// -------------------------------------------------------------------------
@@ -272,7 +274,8 @@
+ resultSet.getInt( 4 ) + ")" );
}
executeSql( "ALTER TABLE patienttabularreport DROP COLUMN programstageid" );
- executeSql( "DROP TABLE patienttabularreport_dataelements" );
+ executeSql( "UPDATE program SET displayIncidentDate=true WHERE displayIncidentDate is null and type!=3" );
+ executeSql( "UPDATE program SET displayIncidentDate=false WHERE displayIncidentDate is null and type==3" );
}
catch ( Exception e )
{
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2012-08-06 09:34:34 +0000
@@ -42,6 +42,8 @@
+
+
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm 2012-08-02 14:50:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm 2012-08-06 09:34:34 +0000
@@ -8,7 +8,7 @@
#foreach( $patient in $patientListByOrgUnit )
#set( $programInstance = $programInstanceMap.get( $patient ) )
-
+ |
|
#set($programStageInstances = $programStageInstanceMap.get($programInstance) )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-08-02 13:10:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-08-06 09:34:34 +0000
@@ -391,6 +391,13 @@
}
}
+ var displayIncidentDate = jQuery('#enrollmentDiv [name=programId] option:selected').attr('displayIncidentDate');
+ if(displayIncidentDate=='true'){
+ showIncidentDateField();
+ }else{
+ hideIncidentDateField();
+ }
+
jQuery('#loaderDiv').hide();
});
}
@@ -722,9 +729,22 @@
{
showById('enrollmentDateTR');
showById('dateOfIncidentTR');
+ enable('dateOfIncident');
showById('enrollBtn');
}
+function hideIncidentDateField()
+{
+ setFieldValue( 'dateOfIncident', '' );
+ disable('dateOfIncident');
+ hideById('dateOfIncidentTR');
+}
+
+function showIncidentDateField()
+{
+ showById('dateOfIncidentTR');
+}
+
function saveIdentifierAndAttribute()
{
$.ajax({
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm 2012-08-02 09:58:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm 2012-08-06 09:34:34 +0000
@@ -56,7 +56,7 @@
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-08-02 14:50:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-08-06 09:34:34 +0000
@@ -10,6 +10,7 @@
input.small-button[type="button"]
{
width: 30px;
+ height: 30px;
}
input.large-button[type="button"]
@@ -166,7 +167,7 @@
input.patient-object[type="button"]
{
- width: 140px;
+ width: 130px;
height: 60px;
white-space: normal;
border-color: #bbbbbb;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java 2012-05-23 16:19:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java 2012-08-06 09:34:34 +0000
@@ -125,6 +125,13 @@
this.displayProvidedOtherFacility = displayProvidedOtherFacility;
}
+ private Boolean displayIncidentDate;
+
+ public void setDisplayIncidentDate( Boolean displayIncidentDate )
+ {
+ this.displayIncidentDate = displayIncidentDate;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -133,7 +140,8 @@
throws Exception
{
displayProvidedOtherFacility = (displayProvidedOtherFacility == null) ? false : displayProvidedOtherFacility;
-
+ displayIncidentDate = (displayIncidentDate == null) ? false : displayIncidentDate;
+
Program program = new Program();
program.setName( name );
@@ -144,11 +152,12 @@
program.setMaxDaysAllowedInputData( maxDaysAllowedInputData );
program.setType( type );
program.setDisplayProvidedOtherFacility( displayProvidedOtherFacility );
+ program.setDisplayIncidentDate(displayIncidentDate);
programService.saveProgram( program );
- if ( program.getType().equals( Program.SINGLE_EVENT_WITH_REGISTRATION ) ||
- program.getType().equals( Program.SINGLE_EVENT_WITHOUT_REGISTRATION ))
+ if ( program.getType().equals( Program.SINGLE_EVENT_WITH_REGISTRATION )
+ || program.getType().equals( Program.SINGLE_EVENT_WITHOUT_REGISTRATION ) )
{
ProgramStage programStage = new ProgramStage();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2012-05-23 16:19:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2012-08-06 09:34:34 +0000
@@ -122,6 +122,13 @@
this.displayProvidedOtherFacility = displayProvidedOtherFacility;
}
+ private Boolean displayIncidentDate;
+
+ public void setDisplayIncidentDate( Boolean displayIncidentDate )
+ {
+ this.displayIncidentDate = displayIncidentDate;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -130,7 +137,8 @@
throws Exception
{
displayProvidedOtherFacility = (displayProvidedOtherFacility == null) ? false : displayProvidedOtherFacility;
-
+ displayIncidentDate = (displayIncidentDate == null) ? false : displayIncidentDate;
+
Program program = programService.getProgram( id );
program.setName( name );
program.setDescription( description );
@@ -140,6 +148,7 @@
program.setMaxDaysAllowedInputData( maxDaysAllowedInputData );
program.setType( type );
program.setDisplayProvidedOtherFacility( displayProvidedOtherFacility );
+ program.setDisplayIncidentDate(displayIncidentDate);
programService.updateProgram( program );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2012-08-01 14:38:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2012-08-06 09:34:34 +0000
@@ -251,4 +251,5 @@
number_of_visits = Number of visits
insert = Insert
visit_selected_program_stage = Visited selected program stage
-intro_patient_aggregation_query_builder = Define formulas, expressions, rules for aggregation data from name-based to aggregation system
\ No newline at end of file
+intro_patient_aggregation_query_builder = Define formulas, expressions, rules for aggregation data from name-based to aggregation system
+show_incident_date = Show incident date
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2012-07-26 06:38:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2012-08-06 09:34:34 +0000
@@ -27,7 +27,7 @@
|
- |
+ |
+ |
+ |
+
+
+
|
|
|
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2012-07-31 08:38:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2012-08-06 09:34:34 +0000
@@ -38,7 +38,7 @@
removeItem( programId, name, i18n_confirm_delete, 'removeProgram.action' );
}
-function programTypeOnChange()
+function programOnChange()
{
var type = getFieldValue('type');
@@ -46,17 +46,17 @@
if(type == "3")
{
disable('dateOfEnrollmentDescription');
- disable('dateOfIncidentDescription');
- }
- // single-event
- else if( type=='2')
- {
- enable('dateOfEnrollmentDescription');
- disable('dateOfIncidentDescription');
- }
- else
- {
- enable('dateOfEnrollmentDescription');
- enable('dateOfIncidentDescription');
+ disable("displayIncidentDate");
+ disable("dateOfIncidentDescription");
+ }
+ else{
+ enable('dateOfEnrollmentDescription');
+ enable("displayIncidentDate");
+ if(byId('displayIncidentDate').checked){
+ enable("dateOfIncidentDescription");
+ }
+ else {
+ disable("dateOfIncidentDescription");
+ }
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2012-07-11 04:24:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2012-08-06 09:34:34 +0000
@@ -26,7 +26,7 @@
|
-
+
@@ -41,6 +41,12 @@
|
|
|
+
+
+ |
+ |
+ |
+
|