=== modified file 'local/in/dhis-web-alert/pom.xml'
--- local/in/dhis-web-alert/pom.xml 2012-06-02 08:49:58 +0000
+++ local/in/dhis-web-alert/pom.xml 2012-06-22 05:36:42 +0000
@@ -21,66 +21,80 @@
+
org.hisp.dhis
dhis-api
+
org.hisp.dhis
dhis-service-core
+
org.hisp.dhis
dhis-service-patient
${project.version}
+
org.hisp.dhis
dhis-web-commons
+
org.hisp.dhis
dhis-web-commons-resources
war
+
org.hisp.dhis
dhis-support-external
+
org.hisp.dhis
dhis-support-system
+
org.hisp.dhis
dhis-in-api
${project.version}
+
org.hisp.dhis
dhis-in-service-configuration
${project.version}
+
org.hisp.dhis
dhis-in-service-dataentrystatus
${project.version}
+
org.hisp.dhis
dhis-in-service-survey
${project.version}
+
org.hisp.dhis
dhis-in-service-reports
${project.version}
+
org.springframework
spring-context-support
${spring.version}
+
opensymphony
quartz
@@ -91,28 +105,35 @@
jfree
jfreechart
+
jfree
jfreechart-experimental
1.0.3
+
jfree
jcommon
+
com.lowagie
itext
+
javax.servlet
servlet-api
+
net.sourceforge.jexcelapi
jxl
+
+
../../
=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/benificiaryinfo/action/GetPatientReportResultAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/benificiaryinfo/action/GetPatientReportResultAction.java 2012-04-04 11:58:27 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/benificiaryinfo/action/GetPatientReportResultAction.java 2012-06-22 05:36:42 +0000
@@ -37,6 +37,7 @@
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientIdentifier;
import org.hisp.dhis.patient.PatientIdentifierService;
+import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.patient.PatientService;
import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
@@ -197,6 +198,10 @@
private Date executionDate;
+
+ private String systemIdentifier;
+
+ private Map identiferMap;
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -229,6 +234,27 @@
newdir.mkdirs();
}
outputReportPath += File.separator + UUID.randomUUID().toString() + ".xls";
+
+ PatientIdentifierType idType = null;
+
+
+
+ for ( PatientIdentifier identifier : patient.getIdentifiers() )
+ {
+ idType = identifier.getIdentifierType();
+
+ if ( idType != null )
+ {
+ //identiferMap.put( identifier.getIdentifierType().getId(), identifier.getIdentifier() );
+ }
+ else
+ {
+ systemIdentifier = identifier.getIdentifier();
+ }
+ }
+
+
+
/*
select identifier from patientidentifier where patientid = 122748 and patientidentifiertypeid = 1;
@@ -430,6 +456,7 @@
else
{
tempStr = patient.getAge();
+
}
}
@@ -451,13 +478,33 @@
else if( deCodeString.equalsIgnoreCase("FACILITY") )
{
tempStr = patient.getOrganisationUnit().getName();
+ //System.out.println( "FACILITY ----" + tempStr);
}
+ else if( deCodeString.equalsIgnoreCase( "FACILITYP" ) )
+ {
+ tempStr = patient.getOrganisationUnit().getParent().getName();
+ //System.out.println( "FACILITY - P---" + tempStr);
+ }
+ else if( deCodeString.equalsIgnoreCase( "FACILITYPP" ) )
+ {
+ tempStr = patient.getOrganisationUnit().getParent().getParent().getName();
+ //System.out.println( "FACILITY - PP---" + tempStr);
+ }
+
else if( deCodeString.equalsIgnoreCase("PATIENTNAME") )
{
tempStr = patient.getFullName();
}
-
+
+ else if( deCodeString.equalsIgnoreCase("SYSTEMIDENTIFIER") )
+ {
+ tempStr = systemIdentifier;
+ }
+ else if( deCodeString.equalsIgnoreCase("NA") )
+ {
+ tempStr = "";
+ }
else if( sType.equalsIgnoreCase("identifier") )
@@ -562,6 +609,47 @@
}
}
+ else if( sType.equalsIgnoreCase("after1stday") )
+ {
+ tempStr = programStageDataElementValueMap.get( deCodeString );
+
+ if ( tempStr != null )
+ {
+ Date tempDate = format.parseDate( tempStr );
+ Calendar tempSDate = Calendar.getInstance();
+ tempSDate.setTime( tempDate );
+ tempSDate.add(Calendar.DATE, 1);
+ //tempStr = "" + tempSDate.get(Calendar.YEAR) + "-" + ( tempSDate.get(Calendar.MONTH) + 1) + "-" +tempSDate.get(Calendar.DATE);
+ tempStr = simpleDateFormat.format( tempSDate.getTime() );
+
+ }
+ else
+ {
+ tempStr = " ";
+ }
+
+ }
+ else if( sType.equalsIgnoreCase("after3rdday") )
+ {
+ tempStr = programStageDataElementValueMap.get( deCodeString );
+
+ if ( tempStr != null )
+ {
+ Date tempDate = format.parseDate( tempStr );
+ Calendar tempSDate = Calendar.getInstance();
+ tempSDate.setTime( tempDate );
+ tempSDate.add(Calendar.DATE, 3);
+ //tempStr = "" + tempSDate.get(Calendar.YEAR) + "-" + ( tempSDate.get(Calendar.MONTH) + 1) + "-" +tempSDate.get(Calendar.DATE);
+ tempStr = simpleDateFormat.format( tempSDate.getTime() );
+
+ }
+ else
+ {
+ tempStr = " ";
+ }
+
+ }
+
else if( sType.equalsIgnoreCase("after7thday") )
{
tempStr = programStageDataElementValueMap.get( deCodeString );
@@ -582,7 +670,26 @@
}
}
-
+ else if( sType.equalsIgnoreCase("after14thday") )
+ {
+ tempStr = programStageDataElementValueMap.get( deCodeString );
+
+ if ( tempStr != null )
+ {
+ Date tempDate = format.parseDate( tempStr );
+ Calendar tempSDate = Calendar.getInstance();
+ tempSDate.setTime( tempDate );
+ tempSDate.add(Calendar.DATE, 14);
+ //tempStr = "" + tempSDate.get(Calendar.YEAR) + "-" + ( tempSDate.get(Calendar.MONTH) + 1) + "-" +tempSDate.get(Calendar.DATE);
+ tempStr = simpleDateFormat.format( tempSDate.getTime() );
+
+ }
+ else
+ {
+ tempStr = " ";
+ }
+
+ }
else if( sType.equalsIgnoreCase("after15thday") )
{
tempStr = programStageDataElementValueMap.get( deCodeString );
@@ -747,7 +854,7 @@
else
{
- if ( deCodeString.equalsIgnoreCase( "FACILITYP" ) || deCodeString.equalsIgnoreCase( "FACILITYPP" ) || deCodeString.equalsIgnoreCase( "FACILITYPPP" ) || deCodeString.equalsIgnoreCase( "FACILITYPPPP" ) )
+ if ( deCodeString.equalsIgnoreCase( "PERIOD-FROM" ) || deCodeString.equalsIgnoreCase( "PERIOD-TO" ) || deCodeString.equalsIgnoreCase( "FACILITYPPP" ) || deCodeString.equalsIgnoreCase( "FACILITYPPP" ) )
{
}
=== modified file 'local/in/dhis-web-reports-national/src/main/resources/org/hisp/dhis/reports/i18n_module.properties'
--- local/in/dhis-web-reports-national/src/main/resources/org/hisp/dhis/reports/i18n_module.properties 2012-04-16 08:47:07 +0000
+++ local/in/dhis-web-reports-national/src/main/resources/org/hisp/dhis/reports/i18n_module.properties 2012-06-22 05:36:42 +0000
@@ -333,4 +333,6 @@
no_xls_xml = There is no xml and xls template for selected program
in_selected_orgU = In Selected Organisation Unit
available_delist = Available dataelements
-selected_delist = Selected dataelements
\ No newline at end of file
+selected_delist = Selected dataelements
+discharge = Discharge
+followup = Followup
\ No newline at end of file
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/patient.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/patient.js 2012-04-04 11:58:27 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/patient.js 2012-06-22 05:36:42 +0000
@@ -218,3 +218,37 @@
//alert( event.target.href );
}
+
+
+function generatePatientFollowUpReport( event, patientId )
+{
+
+ var tempPatientId = "";
+ var tempProgramId = "";
+
+ var programDropDown = document.getElementById("programId_"+patientId);
+ var selProgramId = programDropDown.options[ programDropDown.selectedIndex ].value;
+
+ var excelTemplateName = "SNCUFollowUpSheet.xls";
+ var xmlTemplateName = "SNCUFollowUpSheet.xml";
+
+ tempPatientId = patientId;
+ tempProgramId = selProgramId;
+
+
+
+ //event.target.href = "generatePatientReport.action?patientId=" + patientId + "&selProgramId=" + selProgramId + "&excelTemplateName=" + excelTemplateName + "&xmlTemplateName=" + xmlTemplateName;
+
+ //alert( tempPatientId + "----" + tempProgramId + "----" + excelTemplateName + "----" + xmlTemplateName );
+
+ document.getElementById("patientId").value = tempPatientId;
+ document.getElementById("selProgramId").value = tempProgramId;
+ document.getElementById("excelTemplateName").value = excelTemplateName;
+ document.getElementById("xmlTemplateName").value = xmlTemplateName;
+
+ document.patientForm.action = "generatePatientReport.action";
+ document.patientForm.submit();
+
+
+
+}
=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/patientRegistrationList.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/patientRegistrationList.vm 2012-04-30 11:56:21 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/patientRegistrationList.vm 2012-06-22 05:36:42 +0000
@@ -90,8 +90,9 @@
##if($mapPatientPrograms.size()!=0)
$i18n.getString( "enrolled_in_program" ) |
##end
- |
- $i18n.getString( "operations" ) |
+ $i18n.getString( "operations" ) |
+
@@ -148,13 +149,15 @@
#if( $patient.getPrograms().size() !=0 )
-
+ |
+
|
#else
-
+ |
+
|