=== 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-28 09:27:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-08-29 06:02:27 +0000
@@ -361,7 +361,7 @@
hideById('dateOfIncidentTR');
}
else{
- var type = jQuery('#enrollmentDiv [name=programId] option:selected').attr('type');
+ var type = jQuery('#enrollmentDiv [name=programId] option:selected').attr('programType')
if(type=='2'){
hideById('enrollmentDateTR');
hideById('dateOfIncidentTR');
@@ -410,20 +410,20 @@
var programStageInstanceId = json.activeProgramStageInstanceId;
var programStageName = json.activeProgramStageName;
var dueDate = json.dueDate;
- var type = jQuery('#enrollmentDiv [id=programId] option:selected').attr('type');
+ var type = jQuery('#enrollmentDiv [id=programId] option:selected').attr('programType');
var activedRow = "
"
+ " "
- + " "
+ + " "
+ programName + "(" + enrollmentDate + ")"
+ " | "
+ " | "
+ "
";
activedRow += ""
+ + " onclick='javascript:loadActiveProgramStageRecords(" + programInstanceId + "," + programStageInstanceId + ")' style='cursor:pointer;'>"
+ "• " + programStageName + "(" + dueDate + ") |
";
jQuery('#activeTB' ).prepend(activedRow);
@@ -443,7 +443,7 @@
}, function()
{
showById('programEnrollmentDiv');
- var type = jQuery('#tr_'+programInstanceId).attr('type');
+ var type = jQuery('#tr_'+programInstanceId).attr('programType');
if(type=='2'){
hideById('programInstanceDiv');
var programStageInstanceId = jQuery('#tr_'+programInstanceId).attr('programStageInstanceId');
@@ -944,6 +944,30 @@
});
}
+function loadActiveProgramStageRecords(programInstanceId, activeProgramStageInstanceId)
+{
+ jQuery('#loaderDiv').show();
+ jQuery('#programEnrollmentDiv').load('enrollmentform.action',
+ {
+ programInstanceId:programInstanceId
+ }, function()
+ {
+ showById('programEnrollmentDiv');
+ var type = jQuery('#tr_'+programInstanceId).attr('programType');
+ if(type=='2'){
+ hideById('programInstanceDiv');
+ var programStageInstanceId = jQuery('#tr_'+programInstanceId).attr('programStageInstanceId');
+ loadDataEntry( programStageInstanceId );
+ }
+ else{
+ showById('programInstanceDiv');
+ }
+ activeProgramInstanceDiv( programInstanceId );
+ loadDataEntry( activeProgramStageInstanceId );
+ jQuery('#loaderDiv').hide();
+ });
+}
+
function loadProgramStageRecords( programStageInstanceId, completed )
{
showLoader();
@@ -958,14 +982,5 @@
}
showById('dataEntryFormDiv');
hideLoader();
- }).dialog(
- {
- title:i18n_program_stage,
- maximize:true,
- closable:true,
- modal:false,
- overlay:{background:'#000000', opacity:0.1},
- width:1000,
- height:500
});
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm 2012-08-28 05:48:46 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm 2012-08-29 06:02:27 +0000
@@ -35,6 +35,10 @@
$i18n.getString("date_of_birth") |
$format.formatDate( $!patient.birthDate) $!patient.getAge() |
+
+ $i18n.getString("phone_number") |
+ $!patient.phoneNumber |
+
#foreach( $identifier in $identifiers )
#if($!identifier.identifierType)
@@ -83,21 +87,22 @@
#set($programStageInstanceId = $programStageInstance.id)
#end
#end
-
-
- $programInstance.program.name ($format.formatDate($programInstance.enrollmentDate))
-
- |
-
-
- |
-
+
#set($flag = 'false')
#foreach( $programStageInstance in $programInstance.programStageInstances )
#set( $status = $statusMap.get( $programStageInstance.id ) )
#if( $status!=1 && $flag=='false')
-
+
+
+ $programInstance.program.name ($format.formatDate($programInstance.enrollmentDate))
+
+ |
+
+
+ |
+
+
• $programStageInstance.programStage.name ($format.formatDate($programStageInstance.dueDate))
|
@@ -105,6 +110,18 @@
#set($flag = 'true')
#end
#end
+ #if($flag=='false')
+
+
+ $programInstance.program.name ($format.formatDate($programInstance.enrollmentDate))
+
+ |
+
+
+ |
+
+ #end
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2012-08-02 09:58:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2012-08-29 06:02:27 +0000
@@ -31,9 +31,8 @@
|
|