dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21226
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9979: Improve Multiple Individual Records Data entry form UI.
------------------------------------------------------------
revno: 9979
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-03-05 15:35:37 +0700
message:
Improve Multiple Individual Records Data entry form UI.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.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/multiDataEntry.js
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/smsReminder.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.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-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2013-03-05 07:29:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2013-03-05 08:35:37 +0000
@@ -243,7 +243,13 @@
<param name="page">/dhis-web-caseentry/multiDataEntrySelect.vm</param>
<param name="menu">/dhis-web-caseentry/dataEntryMenu.vm</param>
<param name="stylesheets">style/style.css</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/commons.js,javascript/multiDataEntry.js</param>
+ <param name="javascripts">
+ ../dhis-web-commons/ouwt/ouwt.js,
+ javascript/commons.js,
+ javascript/patient.js,
+ javascript/entry.js,
+ javascript/relationshipPatient.js,
+ javascript/multiDataEntry.js</param>
<param name="requiredAuthorities">F_NAME_BASED_DATA_ENTRY</param>
</action>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm 2013-03-05 07:29:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm 2013-03-05 08:35:37 +0000
@@ -11,9 +11,6 @@
#if( $programStageInstances && $programStageInstances.size()>0 )
<table class='listTable gridTable'>
- <col/>
- <col/>
- <col width='30%'/>
<thead>
<tr>
<th>#</th>
@@ -22,6 +19,7 @@
<th>$i18n.getString('full_name')</th>
<th>$i18n.getString('phone_number')</th>
<th>$i18n.getString( "program_stage" )</th>
+ <th>$i18n.getString( "operations" )</th>
</tr>
</thead>
<tbody id="list">
@@ -70,6 +68,12 @@
<td><a href="javascript:loadDataEntryDialog( $programStageInstance.id );">$programStageInstance.programStage.displayName</a></td>
+ <td>
+ <a href="javascript:isDashboard=false;showPatientDashboardForm( '$patient.id' )"><img src="../images/enroll.png" alt='$i18n.getString( "edit_profile" )'></a>
+ <a href="javascript:loadDataEntryDialog( $programStageInstance.id );" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></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>
#end
</tbody>
=== 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-12-10 12:54:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm 2013-03-05 08:35:37 +0000
@@ -1,9 +1,10 @@
+<script src="javascript/tooltip.js" type="text/javascript"></script>
<table>
<tr>
<td class='text-column' >$i18n.getString( "search_result_matching_the_search_criteria" ):</td>
<td> </td>
<td> </td>
- <td>
+ <td id='searchInforLbl'>
#if($!listAll)
$i18n.getString( "list_all_patients" )
#else
@@ -13,59 +14,79 @@
</tr>
<tr>
- <td class='text-column' >$i18n.getString( "total_result" ):</td>
- <td> </td>
- <td> </td>
- <td>$!total</td>
+ <td class='text-column'>$i18n.getString( "total_result" ):</td>
+ <td> </td>
+ <td> </td>
+ <td id='totalTd'>$!total</td>
</tr>
</table>
-#if( $patients && $patients.size()>0 )
- <p>#parse( "/dhis-web-caseentry/colorHelp.vm" )</p>
-
- <table class="listTable mainPageTable" id="patientList">
- #set( $mark = false )
- #foreach( $patient in $patients )
- #set( $programInstance = '')
- #set( $programInstance = $programInstanceMap.get( $patient ) )
- <tr #alternate( $mark )>
- <td>
- #set( $value="")
- #foreach( $identifierType in $program.patientIdentifierTypes )
- #foreach( $pIdentifier in $patient.identifiers )
- #if($identifierType.personDisplayName=="true" && $identifierType.id==$pIdentifier.identifierType.id)
- #set($value=$value + $pIdentifier.identifier + " " )
- #end
- #end
- #end
- #if($value=="")
- #set($value=$patient.getFullName())
- #end
- <input type='button' class='patient-object' value="$encoder.htmlEncode($value)"
- onclick='javascript:showPatientHistory( "$patient.id" );' title='$i18n.getString( "patient_details_and_history" )'>
- </td>
- #set( $programStageInstances = $programInstance.programStageInstances )
- <td>
- #parse( "/dhis-web-caseentry/programStageInstanceFlow.vm" )
- </td>
- </tr>
- #if( $mark )
- #set( $mark = false )
- #else
- #set( $mark = true )
- #end
- #end
- </table>
- <div class="paging-container">
- #parse( "/dhis-web-commons/paging/paging.vm" )
- </div>
-
- <div id="detailsInfo"></div>
+#if( $programStageInstances && $programStageInstances.size()>0 )
+
+<table class='listTable gridTable'>
+ <thead>
+ <tr>
+ <th>#</th>
+ <th>$i18n.getString('date_scheduled')</th>
+ <th>$i18n.getString('full_name')</th>
+ <th>$i18n.getString('phone_number')</th>
+ <th>$i18n.getString( "program_stage" )</th>
+ <th>$i18n.getString( "operations" )</th>
+ </tr>
+ </thead>
+ <tbody id="list">
+ #set( $mark = false )
+ #foreach( $programStageInstance in $programStageInstances )
+ #set($patient = $programStageInstance.programInstance.patient)
+ <tr id='tr$programStageInstance.id'>
+ <td>
+ #set( $nr = ( ( $paging.getCurrentPage() - 1 ) * $paging.pageSize ) + $velocityCount )
+ $nr
+ </td>
+
+ <td>
+ #if($!programStageInstance.executionDate)
+ $format.formatDate($!programStageInstance.executionDate)
+ #else
+ $format.formatDate($!programStageInstance.dueDate)
+ #end
+ </td>
+
+ <td><a href="javascript:isDashboard=false;showPatientDashboardForm( '$patient.id' )">
+ #set($value="")
+ #foreach( $identifierType in $identifierTypes)
+ #foreach( $identifier in $patient.identifiers)
+ #if($identifier.identifierType.id==$identifierType.id)
+ #set($value=$identifier.identifier)
+ #end
+ #end
+ #end
+ #if($value=="")
+ #set($value=$patient.getFullName())
+ #end
+
+ $value
+ </a></td>
+
+ <td>$!patient.phoneNumber</td>
+
+ <td><a href="javascript:loadDataEntryDialog( $programStageInstance.id );">$programStageInstance.programStage.displayName</a></td>
+
+ <td>
+ <a href="javascript:isDashboard=false;showPatientDashboardForm( '$patient.id' )"><img src="../images/enroll.png" alt='$i18n.getString( "edit_profile" )'></a>
+ <a href="javascript:loadDataEntryDialog( $programStageInstance.id );" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></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>
+ #end
+ </tbody>
+</table>
+
+<div class="paging-container">
+ #parse( "/dhis-web-commons/paging/paging.vm" )
+</div>
+
+<div id="detailsInfo"></div>
+
#end
-
-<script>
- jQuery(document).ready(function(){
- tableSorter( 'patientList' );
- });
- 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/multiDataEntry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js 2012-12-18 06:17:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js 2013-03-05 08:35:37 +0000
@@ -24,27 +24,59 @@
{
hideById('listPatientDiv');
hideById('advanced-search');
-
+ hideById('contentDataRecord');
contentDiv = 'listPatientDiv';
- $('#contentDataRecord').html('');
+ setFieldValue('statusEvent', "4");
+ var startDate = jQuery.datepicker.formatDate( dateFormat, new Date() );
+ var endDate = jQuery.datepicker.formatDate( dateFormat, new Date() );
+ var programId = getFieldValue('programIdAddPatient');
+ var searchTexts = "stat_" + programId + "_"
+ + startDate + "_" + endDate + "_"
+ + getFieldValue('orgunitId') + "_false_4_3";
+
showLoader();
jQuery('#listPatientDiv').load('getDataRecords.action',
{
- programId:getFieldValue('programIdAddPatient'),
- listAll:true
+ programId:programId,
+ listAll:false,
+ searchBySelectedOrgunit: false,
+ searchTexts: searchTexts
},
function()
{
- showById('colorHelpLink');
+ setInnerHTML('searchInforLbl',i18n_list_all_patients);
showById('listPatientDiv');
- resize();
+ setTableStyles();
hideLoader();
});
}
-function advancedSearch( params )
-{
- $('#contentDataRecord').html('');
+// --------------------------------------------------------------------
+// Search events
+// --------------------------------------------------------------------
+
+function advancedSearch( params )
+{
+ hideById('contentDataRecord');
+ hideById('listPatientDiv');
+ showLoader();
+ params += "&programId=" + getFieldValue('programIdAddPatient');
+ $.ajax({
+ url: 'getDataRecords.action',
+ type:"POST",
+ data: params,
+ success: function( html ){
+ setTableStyles();
+ jQuery('#listPatientDiv').html(html);
+ showById('listPatientDiv');
+ hideLoader();
+ }
+ });
+}
+
+
+function advancedSearch( params )
+{
params += "&searchTexts=prg_" + getFieldValue('programIdAddPatient');
params += "&programId=" + getFieldValue('programIdAddPatient');
$.ajax({
@@ -60,7 +92,7 @@
});
}
-function loadDataEntry( programStageInstanceId )
+function loadDataEntryDialog( programStageInstanceId )
{
jQuery("#patientList input[name='programStageBtn']").each(function(i,item){
jQuery(item).removeClass('stage-object-selected');
=== 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 2013-03-05 04:09:58 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2013-03-05 08:35:37 +0000
@@ -253,6 +253,10 @@
{
validateAdvancedSearch();
}
+ else if( statusSearching == 3 )
+ {
+ showById('listPatientDiv');
+ }
}
//------------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2013-03-05 07:29:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2013-03-05 08:35:37 +0000
@@ -40,7 +40,6 @@
function listAllPatient()
{
- setFieldValue('listAll', "true");
hideById('listEventDiv');
hideById('advanced-search');
setFieldValue('statusEvent', "4");
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2013-03-02 15:09:06 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2013-03-05 08:35:37 +0000
@@ -6,18 +6,18 @@
item.remove();
}
});
-
+ hideById('searchBySelectedUnitTD');
+ showById('dueDateTR');
+ showById('programStageAddPatientTR');
jQuery("#searchObjectId [value=prg]").remove();
registration = false;
- hideById('addPatientBtn');
- disable('advancedSearchBtn');
});
</script>
-<h3>$i18n.getString( "multiple_individual_records_management" ) #openHelp('multiple_individual_records')</h3>
+<h3 id='mainLinkLbl'>$i18n.getString( "multiple_individual_records_management" ) #openHelp('multiple_individual_records')</h3>
<form>
<input type='hidden' id='isRegistration' name= 'isRegistration' value='false'>
- <input type='hidden' id='listAll' name='listAll'>
+ <input type='hidden' id='searchByProgramStage' name= 'searchByProgramStage' value='true'>
<div id='searchDiv'>
#parse( "dhis-web-caseentry/searchPatientCriteria.vm" )
</div>
@@ -26,10 +26,20 @@
#parse( "dhis-web-commons/loader/loader.vm" )
<div id='listPatientDiv'></div>
+<div id='patientDashboard'></div> <!-- Patient dashboard -->
+<div id='smsManagementDiv'></div>
+<div id='sendSmsFormDiv'></div>
+<div id='editPatientDiv'></div> <!-- Add Patient Form -->
+<div id='resultSearchDiv' style='font-size:13px'></div> <!-- List searching patients -->
+<div id='enrollmentDiv'></div> <!-- Program Enrollment Form -->
+<div id='listRelationshipDiv'></div> <!-- List relationship -->
+<div id='addRelationshipDiv'></div> <!-- Add relationship -->
+<div id='migrationPatientDiv'></div> <!-- Migration Patient -->
<div id='contentDataRecord'></div>
<script>
unSave = false;
+ statusSearching = 3;
var i18n_please_select = '[' + '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'")' + ']';
var i18n_please_select_program_stage = '[' + '$encoder.jsEscape( $i18n.getString( "please_select_program_stage" ) , "'")' + ']';
var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
@@ -58,4 +68,7 @@
var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
var i18n_color_quick_help = '$encoder.jsEscape( $i18n.getString( "color_quick_help" ) , "'")';
var i18n_comment_added = '$encoder.jsEscape( $i18n.getString( "comment_added" ) , "'")';
+ var i18n_list_all_patients = '$encoder.jsEscape( $i18n.getString( "list_all_patients" ), "'")';
+ var i18n_main_form_link = '$encoder.jsEscape( $i18n.getString( "multiple_individual_records_management" ), "'")';
+ 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/programTrackingRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm 2013-03-05 07:29:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm 2013-03-05 08:35:37 +0000
@@ -34,6 +34,7 @@
<th>$i18n.getString('full_name')</th>
<th>$i18n.getString('phone_number')</th>
<th>$i18n.getString( "program_stage" )</th>
+ <th>$i18n.getString( "operations" )</th>
</tr>
</thead>
<tbody id="list">
@@ -74,6 +75,12 @@
<td><a href="javascript:programTrackingList( $programStageInstance.id, false );">$programStageInstance.programStage.displayName</a></td>
+ <td>
+ <a href="javascript:isDashboard=false;showPatientDashboardForm( '$patient.id' )"><img src="../images/enroll.png" alt='$i18n.getString( "edit_profile" )'></a>
+ <a href="javascript:programTrackingList( $programStageInstance.id, false );" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></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>
#end
</tbody>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm 2013-03-02 15:09:06 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm 2013-03-05 08:35:37 +0000
@@ -153,6 +153,7 @@
var i18n_overdue = '$encoder.jsEscape( $i18n.getString( "overdue" ) , "'")';
var i18n_scheduled_in_futurei18n_scheduled_in_future = '$encoder.jsEscape( $i18n.getString( "scheduled_in_future" ) , "'")';
var i18n_send_message = '$encoder.jsEscape( $i18n.getString( "send_message" ) , "'")';
+ var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ), "'")';
var checkedDuplicate = false;
var registration = false;
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-03-05 07:29:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-03-05 08:35:37 +0000
@@ -32,6 +32,16 @@
<div id='advanced-search' class='hidden advanced-search'>
<table>
+ #if( $auth.hasAccess( "dhis-web-caseentry", "searchAllFacilities" ) )
+ <tr id='searchBySelectedUnitTD'>
+ <td>
+ $i18n.getString('search_in_all_facilities')
+ <input type='checkbox' id='searchInAllFacility' name='searchInAllFacility' />
+ </td>
+ </tr>
+ #else
+ <input type='checkbox' class='hidden' id='searchInAllFacility' name='searchInAllFacility' />
+ #end
<tr id='programStageAddPatientTR' class='hidden'>
<td>$i18n.getString('status')</td>
<td>
@@ -51,16 +61,6 @@
<input type='text' id='endDueDate' name='endDueDate' style='width:105px;'>
</td>
</tr>
- #if( $auth.hasAccess( "dhis-web-caseentry", "searchAllFacilities" ) )
- <tr id='searchBySelectedUnitTD'>
- <td>
- $i18n.getString('search_in_all_facilities')
- <input type='checkbox' id='searchInAllFacility' name='searchInAllFacility' />
- </td>
- </tr>
- #else
- <input type='checkbox' class='hidden' id='searchInAllFacility' name='searchInAllFacility' />
- #end
<tr>
<td id='searchingAttributeIdTD' class="hidden">
<select class='search-field' id="searchObjectId" name="searchObjectId" #if( $patientAttributes.size() == 0 ) disabled="disabled" #end onchange="searchObjectOnChange(this)">