dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12136
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3654: Fix bug: Cannot load case-data-entry form.
------------------------------------------------------------
revno: 3654
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-05-19 08:11:43 +0700
message:
Fix bug: Cannot load case-data-entry form.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.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 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java 2011-05-10 07:25:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java 2011-05-19 01:11:43 +0000
@@ -35,6 +35,7 @@
import org.hisp.dhis.caseentry.screen.DataEntryScreenManager;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataentryform.DataEntryForm;
+import org.hisp.dhis.dataentryform.DataEntryFormService;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.minmax.MinMaxDataElement;
import org.hisp.dhis.minmax.MinMaxDataElementService;
@@ -85,6 +86,8 @@
private ProgramStageDataElementService programStageDataElementService;
+ private DataEntryFormService dataEntryFormService;
+
// -------------------------------------------------------------------------
// Input && Output
// -------------------------------------------------------------------------
@@ -159,6 +162,11 @@
this.programStageDataElementService = programStageDataElementService;
}
+ public void setDataEntryFormService( DataEntryFormService dataEntryFormService )
+ {
+ this.dataEntryFormService = dataEntryFormService;
+ }
+
public void setPatientId( Integer patientId )
{
this.patientId = patientId;
@@ -215,7 +223,7 @@
OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
programStageDataElements = programStage.getProgramStageDataElements();
-
+
Collection<DataElement> dataElements = programStageDataElementService.getListDataElement( programStage );
programStageInstance = programStageInstanceService.getProgramStageInstance( programInstance, programStage );
@@ -262,6 +270,8 @@
customDataEntryFormCode = dataEntryScreenManager.populateCustomDataEntryScreenForMultiDimensional(
dataEntryForm.getHtmlCode(), patientDataValues, minMaxMap, "", i18n, programStage,
programStageInstance, organisationUnit );
+
+ customDataEntryFormCode = dataEntryFormService.prepareDataEntryFormForEdit( customDataEntryFormCode );
}
return SUCCESS;
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java 2011-05-01 09:07:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java 2011-05-19 01:11:43 +0000
@@ -94,11 +94,6 @@
return statusCode;
}
- public void setStatusCode( int statusCode )
- {
- this.statusCode = statusCode;
- }
-
// -------------------------------------------------------------------------
// Implementation Action
// -------------------------------------------------------------------------
@@ -115,7 +110,7 @@
if ( dateValue != null )
{
- programStageInstance.setExecutionDate( format.parseDate( executionDate ) );
+ programStageInstance.setExecutionDate( dateValue );
programStageInstanceService.updateProgramStageInstance( programStageInstance );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java 2011-05-10 07:25:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java 2011-05-19 01:11:43 +0000
@@ -289,7 +289,6 @@
if ( patientDataValue == null )
{
-
LOG.debug( "Adding PatientDataValue, value added" );
if ( programStageInstance.getExecutionDate() == null )
=== 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 2011-05-12 08:32:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2011-05-19 01:11:43 +0000
@@ -169,6 +169,8 @@
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
<property name="programStageDataElementService"
ref="org.hisp.dhis.program.ProgramStageDataElementService" />
+ <property name="dataEntryFormService"
+ ref="org.hisp.dhis.dataentryform.DataEntryFormService" />
</bean>
<bean
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js 2011-05-10 07:25:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js 2011-05-19 01:11:43 +0000
@@ -133,6 +133,7 @@
return;
}
+ enable('executionDate');
showLoader();
jQuery('#dataEntryFormDiv').load("dataentryform.action",
{
@@ -140,15 +141,8 @@
patientId: getFieldValue('patientId'),
useDefaultForm: jQuery('#useDefaultForm').find("checked").value
},
- function( data )
+ function( )
{
- enable('listPatientBtn');
- enable('searchingAttributeId');
- jQuery('#searchText').removeAttr( 'readonly' );
- enable('searchBtn');
-
- hideById('searchPatientDiv');
-
showById('dataRecordingSelectDiv');
if ( getFieldValue('executionDate') =='' )
{