dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16389
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6225: (patient) Add patient history function for entry form and program summary.
------------------------------------------------------------
revno: 6225
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-09 08:56:35 +0700
message:
(patient) Add patient history function for entry form and program summary.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm
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/javascript/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm
--
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-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2012-03-08 04:56:36 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java 2012-03-09 01:56:35 +0000
@@ -245,8 +245,9 @@
// ---------------------------------------------------------------------
grid.setTitle( programInstance.getProgram().getName() );
- grid.setSubtitle( i18n.getString( "date_of_enrollment" ) + ": " + programInstance.getEnrollmentDate() + " - "
- + i18n.getString( "date_of_incident" ) + ": " + programInstance.getDateOfIncident() );
+ grid.setSubtitle( i18n.getString( "date_of_enrollment" ) + ": "
+ + format.formatDate( programInstance.getEnrollmentDate() ) + " - " + i18n.getString( "date_of_incident" )
+ + ": " + format.formatDate( programInstance.getDateOfIncident() ) );
// ---------------------------------------------------------------------
// Headers && Get dataelements belongs to programs
@@ -265,7 +266,7 @@
// ---------------------------------------------------------------------
// First Column
// ---------------------------------------------------------------------
-
+
List<Object> deValues = new ArrayList<Object>();
Map<Integer, Integer> mapDataElements = new HashMap<Integer, Integer>();
@@ -278,7 +279,7 @@
mapDataElements.put( dataElement.getId(), columnIndex );
columnIndex++;
}
-
+
grid.addColumn( deValues );
// ---------------------------------------------------------------------
@@ -290,7 +291,7 @@
for ( ProgramStageInstance programStageInstance : programStageInstances )
{
Object[] columnValues = new Object[dataElements.size()];
-
+
Collection<PatientDataValue> patientDataValues = patientDataValueService
.getPatientDataValues( programStageInstance );
@@ -307,7 +308,7 @@
columnValues[mapDataElements.get( dataElement.getId() )] = value;
}
-
+
grid.addColumn( Arrays.asList( columnValues ) );
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-03-08 08:56:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-03-09 01:56:35 +0000
@@ -271,4 +271,4 @@
program_enrollment = Program enrollment
date_of_enrollment=Date of enrollment
date_of_incident=Date of incident
-patient_history = Beneficiary history
\ No newline at end of file
+patient_details_and_history = Beneficiary details and history
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2012-02-17 16:39:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2012-03-09 01:56:35 +0000
@@ -95,6 +95,4 @@
loadProgramStages();
}
});
-
- selection.setListenerFunction( organisationUnitSelected );
</script>
=== 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-01-31 05:11:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm 2012-03-09 01:56:35 +0000
@@ -34,7 +34,7 @@
#if( $sortPatientAttribute )
<td>$!patientAttributeValueMap.get( $patient.id ).value</td>
#end
- <td><a href="javascript:showPatientDetails( '$patient.id' )" title="$i18n.getString( 'show_details' )">$patient.getFullName()</a></td>
+ <td><a href="javascript:showPatientHistory( '$patient.id' )" title="$i18n.getString( 'patient_details_and_history' )">$patient.getFullName()</a></td>
#foreach( $programStageInstance in $programStageInstanceMap.get( $programInstance ) )
#if( $programStageInstance.executionDate )
<td class="cent" bgcolor="$colorMap.get( $programStageInstance.id )">
@@ -76,5 +76,5 @@
jQuery(document).ready(function(){
tableSorter( 'patientList' );
});
- var i18n_patient_details = '$encoder.jsEscape( $i18n.getString( "patient_details" ) , "'" )';
+ var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'" )';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-03-08 08:39:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-03-09 01:56:35 +0000
@@ -118,14 +118,14 @@
function showPatientHistory( patientId )
{
- $('#detailsHistory').load("getPatientHistory.action",
+ $('#detailsInfo').load("getPatientHistory.action",
{
patientId:patientId
}
, function( ){
}).dialog({
- title: i18n_patient_history,
+ title: i18n_patient_details_and_history,
maximize: true,
closable: true,
modal:false,
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2012-03-08 08:56:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2012-03-09 01:56:35 +0000
@@ -58,12 +58,10 @@
#if($mapPatientOrgunit.size()!=0)
<td>$!mapPatientOrgunit.get($patient.id)</td>
#end
-
<td>
<a href="javascript:showSelectedDataRecoding('$patient.id');" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></a>
<a href="javascript:patientChartList( '$patient.id' )" title="$i18n.getString( 'view_patient_chart' )"><img src="../images/add_to_dashboard.png" alt="$i18n.getString( 'view_patient_chart' )"></a>
- <a href="javascript:showPatientHistory( '$patient.id' )" title='$i18n.getString( "show_details" )'><img src="../images/edit_sections.png" alt='$i18n.getString( "show_details" )'></a>
- <a href="javascript:showPatientDetails( $patient.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
+ <a href="javascript:showPatientHistory( '$patient.id' )" title='$i18n.getString( "patient_details_and_history" )'><img src="../images/information.png" alt='$i18n.getString( "patient_details_and_history" )'></a>
</td>
</tr>
#if( $mark )
@@ -74,10 +72,10 @@
#end
</tbody>
<tr>
- <td colspan="8">
+ <td colspan="6">
<p></p>
<div class="paging-container">
- #parse( "/dhis-web-commons/paging/paging.vm" )
+ #parse( "/dhis-web-commons/paging/paging.vm" )
</div>
</td>
<td></td>
@@ -88,7 +86,6 @@
</table>
<div id="detailsInfo"></div>
-<div id="detailsHistory"></div>
<div id="patientChartListDiv"></div>
<div id="chartView" class="hidden">
<img id="chartImage" src="" class="padding-chart"></img>
@@ -96,6 +93,5 @@
<span id="message"></span>
<script>
- var i18n_patient_details = '$encoder.jsEscape( $i18n.getString( "patient_details" ) , "'" )';
- var i18n_patient_history = '$encoder.jsEscape( $i18n.getString( "patient_history" ) , "'" )';
+ var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'" )';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2012-03-08 04:56:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2012-03-09 01:56:35 +0000
@@ -36,7 +36,7 @@
#if($mapPatientOrgunit.size()!=0)
<col/>
#end
- <col width="220"/>
+ <col width="200"/>
<thead>
<tr>
@@ -97,8 +97,7 @@
<a href="javascript:setFieldValue( 'isShowPatientList', false ); showRelationshipList('$patient.id')" title='$i18n.getString( "manage_relationship" )'><img src="../images/relationship.png" alt='$i18n.getString( "manage_relationship" )'></a>
<a href="javascript:showAddRelationshipPatient( '$patient.id', true )" title='$i18n.getString( "add_dependent" )'><img src="../images/add.png" alt='$i18n.getString( "add_dependent" )'></a>
<a href="javascript:removePatient( '$patient.id', '$encoder.jsEncode( $patient.getFullName() )' )" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
- <a href="javascript:showPatientHistory( '$patient.id' )" title='$i18n.getString( "show_details" )'><img src="../images/edit_sections.png" alt='$i18n.getString( "show_details" )'></a>
- <a href="javascript:showPatientDetails( '$patient.id' )" title='$i18n.getString( "show_details" )'><img src="../images/information.png" alt='$i18n.getString( "show_details" )'></a>
+ <a href="javascript:showPatientHistory( '$patient.id' )" title='$i18n.getString( "patient_details_and_history" )'><img src="../images/information.png" alt='$i18n.getString( "patient_details_and_history" )'></a>
</td>
</tr>
@@ -121,13 +120,11 @@
</table>
<div id="detailsInfo"></div>
-<div id="detailsHistory"></div>
#end
<script type="text/javascript">
jQuery(document).ready(function(){
tableSorter( 'patientList' );
});
- var i18n_patient_details = '$encoder.jsEscape( $i18n.getString( "patient_details" ) , "'" )';
- var i18n_patient_history = '$encoder.jsEscape( $i18n.getString( "patient_history" ) , "'" )';
+ var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'" )';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm 2012-02-25 03:16:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/report.vm 2012-03-09 01:56:35 +0000
@@ -25,7 +25,7 @@
#set( $nr = ( ( $paging.getCurrentPage() - 1 ) * $paging.pageSize ) + $velocityCount )
$nr
</td>
- <td><a href="javascript:showPatientDetails( $programInstance.patient.id )" title='$i18n.getString( "show_details" )'>$programInstance.patient.getFullName()</a></td>
+ <td><a href="javascript:showPatientHistory( $programInstance.patient.id )" title='$i18n.getString( "patient_details_and_history" )'>$programInstance.patient.getFullName()</a></td>
#foreach( $programStageInstance in $programInstance.programStageInstances )
#if( $programStageInstance.executionDate )
<td style="text-align:center" bgcolor="$colorMap.get( $programStageInstance.id )">
@@ -61,5 +61,5 @@
<div id="viewRecordsDiv"></div>
#end
<script>
- var i18n_patient_details = '$encoder.jsEscape( $i18n.getString( "patient_details" ) , "'" )';
+ var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'" )';
</script>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2012-02-17 16:39:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2012-03-09 01:56:35 +0000
@@ -68,4 +68,6 @@
var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
var i18n_scheduled_for = '$encoder.jsEscape( $i18n.getString( "scheduled_for" ) , "'")';
var i18n_show_all_items = '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'")';
+
+ selection.setListenerFunction( organisationUnitSelected );
</script>
\ No newline at end of file