dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19036
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8147: Allow delete/change status of scheduled visits in Dashboard.
------------------------------------------------------------
revno: 8147
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-09-20 11:13:44 +0700
message:
Allow delete/change status of scheduled visits in Dashboard.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/SetEventStatusAction.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/activityPlanRecords.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/javascript/entry.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/patientProgramTracking.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.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/selectPatient.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-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2012-09-11 13:35:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2012-09-20 04:13:44 +0000
@@ -56,9 +56,7 @@
public static final int LATE_VISIT_STATUS = 4;
- public static final int UNKNOWN_STATUS = 5;
-
- public static final int SKIPPED_STATUS = 6;
+ public static final int SKIPPED_STATUS = 5;
private int id;
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/SetEventStatusAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/SetEventStatusAction.java 2012-09-15 04:18:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/SetEventStatusAction.java 2012-09-20 04:13:44 +0000
@@ -82,24 +82,24 @@
ProgramStageInstance programStageInstance = programStageInstanceService
.getProgramStageInstance( programStageInstanceId );
- if ( ProgramStageInstance.COMPLETED_STATUS == status.intValue() )
+ switch ( status.intValue() )
{
- programStageInstance.setExecutionDate( new Date() );
+ case ProgramStageInstance.COMPLETED_STATUS:
programStageInstance.setCompleted( true );
programStageInstance.setStatus( null );
- }
- else if ( ProgramStageInstance.VISITED_STATUS == status.intValue() )
- {
+ break;
+ case ProgramStageInstance.VISITED_STATUS:
programStageInstance.setCompleted( false );
programStageInstance.setStatus( null );
- }
- else if ( ProgramStageInstance.UNKNOWN_STATUS == status.intValue() )
- {
- programStageInstance.setStatus( null );
- }
- else if ( ProgramStageInstance.SKIPPED_STATUS == status.intValue() )
- {
- programStageInstance.setStatus( status );
+ break;
+ case ProgramStageInstance.LATE_VISIT_STATUS:
+ programStageInstance.setStatus( status );
+ break;
+ case ProgramStageInstance.SKIPPED_STATUS:
+ programStageInstance.setStatus( status );
+ break;
+ default:
+ break;
}
programStageInstanceService.updateProgramStageInstance( programStageInstance );
=== 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-09-20 03:00:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-09-20 04:13:44 +0000
@@ -454,4 +454,5 @@
overdue_scheduled = Overdue/Scheduled
scheduled_overdue_incomplete = Scheduled/Overdue/Incomplete
relationships = Relationships
-no_program_available_for_enrollment = No program is available for enrollment
\ No newline at end of file
+no_program_available_for_enrollment = No program is available for enrollment
+reschedule = Re-schedule
\ No newline at end of file
=== 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 2012-09-19 13:39:07 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanRecords.vm 2012-09-20 04:13:44 +0000
@@ -98,7 +98,7 @@
onclick="javascript:loadDataEntry( $programStageInstance.id );">
<script>
var status = $statusMap.get( $programStageInstance.id );
- setEventColorStatus( 'ps_' + $programStageInstance.id ,status);
+ setEventColorStatus( $programStageInstance.id ,status);
</script>
</td>
#end
=== 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-09-20 03:00:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-09-20 04:13:44 +0000
@@ -3,10 +3,12 @@
var COLOR_GREEN = "#8ffe8f";
var COLOR_YELLOW = "#f9f95a";
var COLOR_LIGHTRED = "#fb6bfb";
+var COLOR_GREY = "#bbbbbb";
var COLOR_LIGHT_RED = "#ff7676";
var COLOR_LIGHT_YELLOW = "#ffff99";
var COLOR_LIGHT_GREEN = "#ccffcc";
var COLOR_LIGHT_LIGHTRED = "#ff99ff";
+var COLOR_LIGHT_GREY = "#ddd";
var MARKED_VISIT_COLOR = '#000000';
var SUCCESS_COLOR = '#ccffcc';
var ERROR_COLOR = '#ccccff';
@@ -404,26 +406,43 @@
window.location.href = url;
}
-function setEventColorStatus( elementId, status )
+function setEventColorStatus( programStageInstanceId, status )
{
- status = eval(status);
+ var boxElement = jQuery('#ps_' + programStageInstanceId );
+ var dueDateElementId = 'value_' + programStageInstanceId + '_date';
+ var status = eval(status);
+
switch(status)
{
case 1:
- jQuery('#' + elementId ).css('border-color', COLOR_GREEN);
- jQuery('#' + elementId ).css('background-color', COLOR_LIGHT_GREEN);
+ boxElement.css('border-color', COLOR_GREEN);
+ boxElement.css('background-color', COLOR_LIGHT_GREEN);
+ jQuery("#" + dueDateElementId ).datepicker("destroy");
+ disable( dueDateElementId );
return;
case 2:
- jQuery('#' + elementId ).css('border-color', COLOR_LIGHTRED);
- jQuery('#' + elementId ).css('background-color', COLOR_LIGHT_LIGHTRED);
+ boxElement.css('border-color', COLOR_LIGHTRED);
+ boxElement.css('background-color', COLOR_LIGHT_LIGHTRED);
+ datePicker( dueDateElementId );
+ enable( dueDateElementId );
return;
case 3:
- jQuery('#' + elementId ).css('border-color', COLOR_YELLOW);
- jQuery('#' + elementId ).css('background-color', COLOR_LIGHT_YELLOW);
+ boxElement.css('border-color', COLOR_YELLOW);
+ boxElement.css('background-color', COLOR_LIGHT_YELLOW);
+ datePicker( dueDateElementId );
+ enable( dueDateElementId );
return;
case 4:
- jQuery('#' + elementId ).css('border-color', COLOR_RED);
- jQuery('#' + elementId ).css('background-color', COLOR_LIGHT_RED);
+ boxElement.css('border-color', COLOR_RED);
+ boxElement.css('background-color', COLOR_LIGHT_RED);
+ datePicker( dueDateElementId );
+ enable( dueDateElementId );
+ return;
+ case 5:
+ boxElement.css('border-color', COLOR_GREY);
+ boxElement.css('background-color', COLOR_LIGHT_GREY);
+ jQuery("#" + dueDateElementId ).datepicker("destroy");
+ disable( dueDateElementId );
return;
default:
return;
@@ -605,7 +624,6 @@
+ '></td>'
+ '<td><img src="images/rightarrow.png"></td>')
.insertBefore(element.parent());
- setEventColorStatus( elementId, 3 );
flag = true;
}
});
@@ -623,12 +641,12 @@
+ 'onclick="javascript:loadDataEntry(' + programStageInstanceId + ')" '
+ 'type="button" class="stage-object" '
+ '></td>');
- setEventColorStatus( elementId, 3 );
}
if( jQuery('#tb_' + programInstanceId + " :input" ).length > 4 ){
jQuery('#tb_' + programInstanceId + ' .arrow-left').removeClass("hidden");
jQuery('#tb_' + programInstanceId + ' .arrow-right').removeClass("hidden");
}
+ setEventColorStatus( programStageInstanceId, 3 );
jQuery('#ps_' + programStageInstanceId ).focus();
jQuery('#createNewEncounterDiv_' + programInstanceId).dialog("close");
loadDataEntry( programStageInstanceId );
@@ -875,3 +893,62 @@
jQuery(this).find('td:last').removeAttr("width");
});
}
+
+function setEventStatus( field, programStageInstanceId )
+{
+ field.style.backgroundColor = SAVING_COLOR;
+ jQuery.postUTF8( 'setEventStatus.action',
+ {
+ programStageInstanceId:programStageInstanceId,
+ status:field.value
+ }, function ( json )
+ {
+ jQuery('#ps_' + programStageInstanceId).attr('status',field.value);
+ setEventColorStatus( programStageInstanceId, field.value );
+ field.style.backgroundColor = SUCCESS_COLOR;
+ } );
+}
+
+
+function removeEvent( programStageInstanceId, isEvent )
+{
+ var result = window.confirm( i18n_comfirm_delete_event );
+
+ if ( result )
+ {
+ $.postJSON(
+ "removeCurrentEncounter.action",
+ {
+ "id": programStageInstanceId
+ },
+ function( json )
+ {
+ if ( json.response == "success" )
+ {
+ jQuery( "tr#tr" + programStageInstanceId ).remove();
+
+ jQuery( "table.listTable tbody tr" ).removeClass( "listRow listAlternateRow" );
+ jQuery( "table.listTable tbody tr:odd" ).addClass( "listAlternateRow" );
+ jQuery( "table.listTable tbody tr:even" ).addClass( "listRow" );
+ jQuery( "table.listTable tbody" ).trigger("update");
+
+ hideById('smsManagementDiv');
+ if(isEvent)
+ {
+ showById('searchDiv');
+ showById('listPatientDiv');
+ }
+ var programInstanceId = jQuery('#ps_' + programStageInstanceId).attr('programInstanceId');
+ jQuery('#ps_' + programStageInstanceId).remove();
+ jQuery('#arrow_' + programStageInstanceId).remove();
+ reloadOneRecord( programInstanceId );
+ showSuccessMessage( i18n_delete_success );
+ }
+ else if ( json.response == "error" )
+ {
+ showWarningMessage( json.message );
+ }
+ }
+ );
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-09-20 03:00:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-09-20 04:13:44 +0000
@@ -58,7 +58,7 @@
+ 'dueDate="' + json.programStageInstances[i].dueDate + '"'
+ 'value="'+ programStageName + ' ' + json.programStageInstances[i].dueDate + '" '
+ 'onclick="javascript:loadDataEntry(' + programStageInstanceId + ')"></td>');
- setEventColorStatus( elementId, status );
+ setEventColorStatus( programStageInstanceId, status );
}
disableCompletedButton(true);
=== 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-09-15 04:18:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-09-20 04:13:44 +0000
@@ -813,3 +813,5 @@
showSuccessMessage( i18n_save_success );
} );
}
+
+function reloadOneRecord(){}
=== 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 2012-09-18 01:55:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2012-09-20 04:13:44 +0000
@@ -231,7 +231,7 @@
commentText: commentText
}, function ( json )
{
- var programStageName = jQuery("#box_" + programStageInstanceId).attr('programStageName');
+ var programStageName = jQuery("#ps_" + programStageInstanceId).attr('programStageName');
var date = new Date();
var currentTime = date.getHours() + ":" + date.getMinutes();
jQuery('#commentTB').prepend("<tr><td>" + getFieldValue("currentDate") + " " + currentTime + "</td>"
@@ -270,7 +270,7 @@
jQuery("#tb_" + programInstanceId + " .stage-object").each( function(){
var programStageInstance = this.id.split('_')[1];
jQuery('#arrow_' + programStageInstance ).toggle();
- jQuery('#box_' + programStageInstance ).toggle();
+ jQuery('#ps_' + programStageInstance ).toggle();
jQuery(this).removeClass("stage-object-selected");
});
@@ -278,7 +278,7 @@
{
var id = jQuery("#tb_" + programInstanceId + " .searched").attr('id').split('_')[1];
showById("arrow_" + id);
- showById("box_" + id );
+ showById("ps_" + id );
}
resize();
}
@@ -303,62 +303,6 @@
});
}
-function setEventStatus( field, programStageInstanceId )
-{
- field.style.backgroundColor = SAVING_COLOR;
- jQuery.postUTF8( 'setEventStatus.action',
- {
- programStageInstanceId:programStageInstanceId,
- status:field.value
- }, function ( json )
- {
- field.style.backgroundColor = SUCCESS_COLOR;
- } );
-}
-
-function removeEvent( programStageInstanceId, isEvent )
-{
- var result = window.confirm( i18n_comfirm_delete_event );
-
- if ( result )
- {
- $.postJSON(
- "removeCurrentEncounter.action",
- {
- "id": programStageInstanceId
- },
- function( json )
- {
- if ( json.response == "success" )
- {
- jQuery( "tr#tr" + programStageInstanceId ).remove();
-
- jQuery( "table.listTable tbody tr" ).removeClass( "listRow listAlternateRow" );
- jQuery( "table.listTable tbody tr:odd" ).addClass( "listAlternateRow" );
- jQuery( "table.listTable tbody tr:even" ).addClass( "listRow" );
- jQuery( "table.listTable tbody" ).trigger("update");
-
- hideById('smsManagementDiv');
- if(isEvent)
- {
- showById('searchDiv');
- showById('listPatientDiv');
- }
- var programInstanceId = jQuery('#box_' + programStageInstanceId).attr('programInstanceId');
- jQuery('#box_' + programStageInstanceId).remove();
- jQuery('#arrow_' + programStageInstanceId).remove();
- reloadOneRecord( programInstanceId );
- showSuccessMessage( i18n_delete_success );
- }
- else if ( json.response == "error" )
- {
- showWarningMessage( json.message );
- }
- }
- );
- }
-}
-
function commentDivToggle(isHide)
{
var index = 1;
@@ -418,16 +362,16 @@
if( dueDate >= startDate && dueDate <= endDate && statusEvent == status )
{
if( jQuery("#tb_" + programInstanceId + " .searched").length > 0 ){
- jQuery("#box_" + id ).addClass("stage-object-selected searched");
- hideById("box_" + id )
+ jQuery("#ps_" + id ).addClass("stage-object-selected searched");
+ hideById("ps_" + id )
hideById('arrow_' + id );
}
- jQuery("#box_" + id ).addClass("stage-object-selected searched");
+ jQuery("#ps_" + id ).addClass("stage-object-selected searched");
}
else
{
hideById('arrow_' + id );
- hideById('box_' + id );
+ hideById('ps_' + id );
}
});
jQuery(".arrow-left").hide();
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientProgramTracking.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientProgramTracking.vm 2012-09-15 04:18:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientProgramTracking.vm 2012-09-20 04:13:44 +0000
@@ -127,21 +127,25 @@
$encoder.htmlEncode( $programStageInstance.programStage.name )
</td>
#set( $duedateId = "value_" + $programStageInstance.id + "_date" )
+ #set($status = $statusMap.get( $programStageInstance.id ))
<td>
<input type="text" id="$duedateId" style='width:150px;' value="$!format.formatDate( $programStageInstance.dueDate )" onchange="saveDueDate( $programStageInstance.id, '$encoder.jsEncode( $programStageInstance.programStage.name )' )" />
<script type="text/javascript">
- datePicker( '$duedateId' );
+ #if($status==1 || $status==5 )
+ disable('$duedateId');
+ #else
+ datePicker( '$duedateId' );
+ #end
</script>
</td>
<td>
- #set($status = $statusMap.get( $programStageInstance.id ))
<select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" style='width:150px;' onchange="setEventStatus(this, $programStageInstance.id)">
#if($status==4)
<option value='4' selected>$i18n.getString("overdue")</option>
- <option value='6'>$i18n.getString("skipped")</option>
+ <option value='5'>$i18n.getString("skipped")</option>
#elseif($status==3)
<option value='3' selected>$i18n.getString("scheduled_in_future")</option>
- <option value='6'>$i18n.getString("skipped")</option>
+ <option value='5'>$i18n.getString("skipped")</option>
#else
<option value='1'>$i18n.getString("completed")</option>
<option value='2'>$i18n.getString("incompleted")</option>
@@ -157,7 +161,7 @@
</td>
<td>
<a href="javascript:setFieldValue('sendToList', false);showSendSmsForm('$programStageInstance.programStage.name',$programStageInstance.id)" title='$i18n.getString( "send_sms" )'><img src="images/sms.png" alt='$i18n.getString( "send_sms" )'></a>
- #if($programStageInstance.programStage.irregular=='true' && ($status==3 || $status==4))
+ #if($programStageInstance.programStage.irregular=='true' && ($status==3 || $status==4 $status==5 ))
<a href="javascript:removeEvent($programStageInstance.id, false)" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
#end
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2012-09-19 13:30:52 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2012-09-20 04:13:44 +0000
@@ -7,7 +7,7 @@
<ul>
<li><a href="#tab-1">$i18n.getString("data_entry_screen")</a></li>
<li><a href="#tab-2">$i18n.getString("identifier_and_attribute")</a></li>
- <li><a href="#tab-3">$i18n.getString("modify_due_date_or_visit_date")</a></li>
+ <li><a href="#tab-3">$i18n.getString("reschedule_and_set_status")</a></li>
<li><a href="#tab-4">$i18n.getString("comments_and_sms_message")</a></li>
<li><a href="#tab-5">$i18n.getString("program_reports")</a></li>
</ul>
@@ -142,14 +142,16 @@
<tr>
<th>$i18n.getString( "nr" )</th>
<th>$i18n.getString( "program_stage" )</th>
- <th>$i18n.getString( "due_date" )</th>
+ <th>$i18n.getString( "reschedule" )</th>
+ <th>$i18n.getString( "status" )</th>
+ <th>$i18n.getString( "delete" )</th>
</tr>
#set( $rowCount = 0 )
#set( $mark = false )
#foreach( $programStageInstance in $programStageInstances )
#set( $rowCount = $rowCount + 1 )
- <tr #alternate( $mark ) >
+ <tr id="tr${programStageInstance.id}" #alternate( $mark ) >
##rowCount
<td>$rowCount</td>
##stage name
@@ -161,12 +163,41 @@
##entry
#set( $duedateId = "value_" + $programStageInstance.id + "_date" )
+ #set($status = $statusMap.get( $programStageInstance.id ))
<td class='input-column '>
<input type="text" id="$duedateId" name="entryfield" value="$!format.formatDate( $programStageInstance.dueDate )" onchange="saveDueDate( $programStageInstance.id, '$encoder.jsEncode( $programStageInstance.programStage.name )' )" />
<script type="text/javascript">
- datePicker( '$duedateId' );
+ #if($status==1 || $status==5 )
+ disable('$duedateId');
+ #else
+ datePicker( '$duedateId' );
+ #end
</script>
- </td>
+ </td>
+
+ <td>
+ <select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" style='width:150px;' onchange="setEventStatus(this, $programStageInstance.id)">
+ #if($status==4)
+ <option value='4' selected>$i18n.getString("overdue")</option>
+ <option value='5'>$i18n.getString("skipped")</option>
+ #elseif($status==3)
+ <option value='3' selected>$i18n.getString("scheduled_in_future")</option>
+ <option value='5'>$i18n.getString("skipped")</option>
+ #else
+ <option value='1'>$i18n.getString("completed")</option>
+ <option value='2'>$i18n.getString("incompleted")</option>
+ #end
+ </select>
+ <script>
+ setFieldValue("stat_$programStageInstance.id", $status);
+ </script>
+ </td>
+
+ <td>
+ #if($programStageInstance.programStage.irregular=='true' && ($status==3 || $status==4 || $status==5 ))
+ <a href="javascript:removeEvent($programStageInstance.id, false)" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
+ #end
+ </td>
</tr>
#set( $mark = !$mark )
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2012-09-19 13:39:07 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2012-09-20 04:13:44 +0000
@@ -27,8 +27,8 @@
value="$programStageInstance.programStage.name $valueDate"
onclick="javascript:loadDataEntry( $programStageInstance.id );">
<script>
- var status = $statusMap.get( $programStageInstance.id );
- setEventColorStatus( 'ps_' + $programStageInstance.id ,status);
+ var status = $programStageInstance.getEventStatus();
+ setEventColorStatus( $programStageInstance.id ,status);
</script>
</td>
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm 2012-09-15 04:18:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm 2012-09-20 04:13:44 +0000
@@ -55,7 +55,7 @@
<input type='button' value='$i18n.getString("back")' onclick='onClickBackBtn();'>
<input type='button' value='$i18n.getString("patient_dashboard")' onclick='javascript:showPatientProgramTracking( "$programStageInstance.programInstance.id" );'>
#set($status = $programStageInstance.getEventStatus())
- #if( $programStageInstance.irregular!='true' && ($status==3 || $status==4) )
+ #if( $programStageInstance.irregular!='true' && ($status==3 || $status==4 || $status==5 ) )
<input type="button" value="$i18n.getString('remove_this_event')" onclick="javascript:removeEvent($programStageInstance.id, true)" title='$i18n.getString( "remove_this_event" )'></a>
#end
</td>
@@ -79,7 +79,11 @@
<input type="hidden" name="enrollmentDate" id="enrollmentDate" value="$!format.formatDate( $programInstance.enrollmentDate )">
<input type="hidden" name="dateOfIncident" id="dateOfIncident" value="$!format.formatDate( $programInstance.dateOfIncident )">
<script type="text/javascript">
- datePicker( '$duedateId' );
+ #if($status==1 || $status==5 )
+ disable('$duedateId');
+ #else
+ datePicker( '$duedateId' );
+ #end
</script>
</td>
</tr>
@@ -89,18 +93,18 @@
<select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" onchange="setEventStatus(this, $programStageInstance.id)">
#if($status==4)
<option value='4' selected>$i18n.getString("overdue")</option>
- <option value='6'>$i18n.getString("skipped")</option>
+ <option value='5'>$i18n.getString("skipped")</option>
#elseif($status==3)
<option value='3' selected>$i18n.getString("scheduled_in_future")</option>
- <option value='6'>$i18n.getString("skipped")</option>
+ <option value='5'>$i18n.getString("skipped")</option>
#else
<option value='1'>$i18n.getString("completed")</option>
<option value='2'>$i18n.getString("incompleted")</option>
#end
</select>
- <script>
- setFieldValue("stat_$programStageInstance.id", $status);
- </script>
+ <script>
+ setFieldValue("stat_$programStageInstance.id", $status);
+ </script>
</td>
</tr>
<tr>
=== 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 2012-09-19 13:39:07 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm 2012-09-20 04:13:44 +0000
@@ -82,7 +82,7 @@
#if($!programStageInstance.executionDate)
#set($valueDate=$format.formatDate( $programStageInstance.executionDate ))
#end
- <input type='button' id='box_$programStageInstance.id' name='programStageBtn'
+ <input type='button' id='ps_$programStageInstance.id' name='programStageBtn'
programStageInstanceId='$programStageInstance.id'
programStageName='$programStageInstance.programStage.name'
programStageId='$programStageInstance.programStage.id'
@@ -95,7 +95,7 @@
<script>
var status = $statusMap.get( $programStageInstance.id );
var dueDate = "$format.formatDate($programStageInstance.dueDate)";
- setEventColorStatus( 'box_' + $programStageInstance.id ,status, dueDate );
+ setEventColorStatus( $programStageInstance.id ,status, dueDate );
</script>
</td>
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2012-08-28 05:48:46 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2012-09-20 04:13:44 +0000
@@ -103,6 +103,8 @@
var i18n_show_all_items = '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'")';
var i18n_create_new_event = '$encoder.jsEscape( $i18n.getString( "create_new_event" ) , "'")';
var i18n_enroll_program = '$encoder.jsEscape( $i18n.getString( "enroll_program" ) , "'")';
+ var i18n_comfirm_delete_event = '$encoder.jsEscape( $i18n.getString( "comfirm_delete_event" ) , "'")';
+
var checkedDuplicate = false;
// -1: no search anything
// 0: show list all patient