dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19566
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8584: Impl proper export to excel and pdf for custom forms in data set report
------------------------------------------------------------
revno: 8584
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-10-18 21:13:26 +0200
message:
Impl proper export to excel and pdf for custom forms in data set report
added:
dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/grid/GridUtilsTest.java
dhis-2/dhis-support/dhis-support-system/src/test/resources/customform.html
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Grid.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/impl/DefaultDataSetReportService.java
dhis-2/dhis-support/dhis-support-system/pom.xml
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateDataSetReportAction.java
dhis-2/pom.xml
--
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/common/Grid.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Grid.java 2012-05-26 12:39:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Grid.java 2012-10-18 19:13:26 +0000
@@ -82,6 +82,13 @@
* Adds a header value.
*/
Grid addHeader( GridHeader header );
+
+ /**
+ * Adds a number of empty values to the Grid.
+ *
+ * @param number the number of columns to add.
+ */
+ Grid addEmptyHeaders( int number );
/**
* Returns the current height / number of rows in the grid.
@@ -109,6 +116,13 @@
* @param value the value to add.
*/
Grid addValue( Object value );
+
+ /**
+ * Adds a number of empty values to the Grid at the current row.
+ *
+ * @param number the number of values to add.
+ */
+ Grid addEmptyValues( int number );
/**
* Returns the row with the given index.
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportService.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datasetreport/DataSetReportService.java 2012-10-18 19:13:26 +0000
@@ -54,6 +54,9 @@
*/
String getCustomDataSetReport( DataSet dataSet, OrganisationUnit unit, Period period, boolean selectedUnitOnly, I18nFormat format );
+ List<Grid> getCustomDataSetReportAsGrid( DataSet dataSet, OrganisationUnit unit, Period period,
+ boolean selectedUnitOnly, I18nFormat format );
+
/**
* Generates a Grid representing a data set report with all data elements
* in the data set. The data elements are grouped by their category combo.
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/impl/DefaultDataSetReportService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/impl/DefaultDataSetReportService.java 2012-10-01 13:09:49 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/impl/DefaultDataSetReportService.java 2012-10-18 19:13:26 +0000
@@ -62,6 +62,7 @@
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.period.Period;
import org.hisp.dhis.system.filter.AggregatableDataElementFilter;
+import org.hisp.dhis.system.grid.GridUtils;
import org.hisp.dhis.system.grid.ListGrid;
import org.hisp.dhis.system.util.FilterUtils;
@@ -71,7 +72,7 @@
*/
public class DefaultDataSetReportService
implements DataSetReportService
-{
+{
private static final String NULL_REPLACEMENT = "";
private static final String DEFAULT_HEADER = "Value";
private static final String TOTAL_HEADER = "Total";
@@ -109,6 +110,21 @@
return prepareReportContent( dataSet.getDataEntryForm(), valueMap, indicatorValueMap, format );
}
+
+ public List<Grid> getCustomDataSetReportAsGrid( DataSet dataSet, OrganisationUnit unit, Period period,
+ boolean selectedUnitOnly, I18nFormat format )
+ {
+ String html = getCustomDataSetReport( dataSet, unit, period, selectedUnitOnly, format );
+
+ try
+ {
+ return GridUtils.fromHtml( html );
+ }
+ catch ( Exception ex )
+ {
+ throw new RuntimeException( "Failed to render custom data set report as grid", ex );
+ }
+ }
public List<Grid> getSectionDataSetReport( DataSet dataSet, Period period, OrganisationUnit unit,
boolean selectedUnitOnly, I18nFormat format, I18n i18n )
=== modified file 'dhis-2/dhis-support/dhis-support-system/pom.xml'
--- dhis-2/dhis-support/dhis-support-system/pom.xml 2012-08-03 11:05:49 +0000
+++ dhis-2/dhis-support/dhis-support-system/pom.xml 2012-10-18 19:13:26 +0000
@@ -144,6 +144,10 @@
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.htmlparser</groupId>
+ <artifactId>htmlparser</artifactId>
+ </dependency>
</dependencies>
<properties>
<rootDir>../../</rootDir>
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java 2012-05-26 12:39:39 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java 2012-10-18 19:13:26 +0000
@@ -43,6 +43,7 @@
import java.io.OutputStream;
import java.io.StringWriter;
import java.io.Writer;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -62,6 +63,8 @@
import org.amplecode.staxwax.factory.XMLFactory;
import org.amplecode.staxwax.writer.XMLWriter;
import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.velocity.VelocityContext;
import org.hisp.dhis.common.Grid;
import org.hisp.dhis.common.GridHeader;
@@ -71,6 +74,14 @@
import org.hisp.dhis.system.util.MathUtils;
import org.hisp.dhis.system.util.StreamUtils;
import org.hisp.dhis.system.velocity.VelocityManager;
+import org.htmlparser.Node;
+import org.htmlparser.NodeFilter;
+import org.htmlparser.Parser;
+import org.htmlparser.filters.OrFilter;
+import org.htmlparser.filters.TagNameFilter;
+import org.htmlparser.nodes.TagNode;
+import org.htmlparser.tags.TableRow;
+import org.htmlparser.tags.TableTag;
import org.springframework.jdbc.support.rowset.SqlRowSet;
import com.lowagie.text.Document;
@@ -81,10 +92,14 @@
*/
public class GridUtils
{
+ private static final Log log = LogFactory.getLog( GridUtils.class );
+
private static final String EMPTY = "";
private static final String XLS_SHEET_PREFIX = "Sheet ";
+ private static final NodeFilter HTML_ROW_FILTER = new OrFilter( new TagNameFilter( "td" ), new TagNameFilter( "th" ) );
+
private static final WritableCellFormat XLS_FORMAT_TTTLE = new WritableCellFormat( new WritableFont(
WritableFont.TAHOMA, 13, WritableFont.NO_BOLD, false ) );
@@ -428,6 +443,126 @@
}
}
+ /**
+ * Creates a list of Grids based on the given HTML string. This works only
+ * for table-based HTML documents.
+ *
+ * @param html the HTML string.
+ * @return a list of Grids.
+ */
+ public static List<Grid> fromHtml( String html )
+ throws Exception
+ {
+ if ( html == null || html.trim().isEmpty() )
+ {
+ return null;
+ }
+
+ List<Grid> grids = new ArrayList<Grid>();
+
+ Parser parser = Parser.createParser( html, "UTF-8" );
+
+ Node[] tables = parser.extractAllNodesThatMatch( new TagNameFilter( "table" ) ).toNodeArray();
+
+ for ( Node t : tables )
+ {
+ Grid grid = new ListGrid();
+
+ TableTag table = (TableTag) t;
+
+ TableRow[] rows = table.getRows();
+
+ Integer firstColumnCount = null;
+
+ for ( TableRow row : rows )
+ {
+ if ( getColumnCount( row ) == 0 ) // Ignore if no cells
+ {
+ log.warn( "Ignoring row with no columns" );
+ continue;
+ }
+
+ Node[] cells = row.getChildren().extractAllNodesThatMatch( HTML_ROW_FILTER ).toNodeArray();
+
+ if ( firstColumnCount == null ) // First row becomes header
+ {
+ firstColumnCount = getColumnCount( row );
+
+ for ( Node c : cells )
+ {
+ TagNode cell = (TagNode) c;
+
+ grid.addHeader( new GridHeader( getValue( cell ), false, false ) );
+
+ Integer colSpan = MathUtils.parseInt( cell.getAttribute( "colspan" ) );
+
+ if ( colSpan != null && colSpan > 1 )
+ {
+ grid.addEmptyHeaders( ( colSpan - 1 ) );
+ }
+ }
+ }
+ else // Rest becomes rows
+ {
+ if ( firstColumnCount != getColumnCount( row ) ) // Ignore
+ {
+ log.warn( "Ignoring row which has " + row.getColumnCount() + " columns since table has " + firstColumnCount + " columns" );
+ continue;
+ }
+
+ grid.addRow();
+
+ for ( Node c : cells )
+ {
+ // TODO row span
+
+ TagNode cell = (TagNode) c;
+
+ grid.addValue( getValue( cell ) );
+
+ Integer colSpan = MathUtils.parseInt( cell.getAttribute( "colspan" ) );
+
+ if ( colSpan != null && colSpan > 1 )
+ {
+ grid.addEmptyValues( ( colSpan - 1 ) );
+ }
+ }
+ }
+ }
+
+ grids.add( grid );
+ }
+
+ return grids;
+ }
+
+ /**
+ * Returns the number of columns/cells in the given row, including cell spacing.
+ */
+ private static int getColumnCount( TableRow row )
+ {
+ Node[] cells = row.getChildren().extractAllNodesThatMatch( HTML_ROW_FILTER ).toNodeArray();
+
+ int cols = 0;
+
+ for ( Node cell : cells )
+ {
+ Integer colSpan = MathUtils.parseInt( ((TagNode) cell).getAttribute( "colspan" ) );
+
+ cols += colSpan != null ? colSpan : 1;
+ }
+
+ return cols;
+ }
+
+ /**
+ * Retrieves the value of a table cell.
+ */
+ public static String getValue( TagNode cell )
+ {
+ return cell.getFirstChild() != null ? cell.getFirstChild().getText().trim().replaceAll( " ", "" ) : "";
+ }
+
// -------------------------------------------------------------------------
// Supportive methods
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java 2012-09-27 09:28:54 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/ListGrid.java 2012-10-18 19:13:26 +0000
@@ -160,6 +160,18 @@
return this;
}
+
+ public Grid addEmptyHeaders( int number )
+ {
+ for ( int i = 0; i < number; i++ )
+ {
+ headers.add( new GridHeader( "", false, false ) );
+ }
+
+ updateColumnIndexMap();
+
+ return this;
+ }
@JsonProperty
@JsonView( { DetailedView.class } )
@@ -221,6 +233,16 @@
return this;
}
+
+ public Grid addEmptyValues( int number )
+ {
+ for ( int i = 0; i < number; i++ )
+ {
+ addValue( "" );
+ }
+
+ return this;
+ }
public List<Object> getRow( int rowIndex )
{
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2012-09-22 21:59:39 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2012-10-18 19:13:26 +0000
@@ -347,7 +347,7 @@
*/
public static Double parseDouble( String value )
{
- if ( value == null )
+ if ( value == null || value.trim().isEmpty() )
{
return null;
}
@@ -363,6 +363,30 @@
}
/**
+ * Parses an integer silently. Returns the Integer value of the given string.
+ * Returns null if the input string is null, empty or if it cannot be parsed.
+ *
+ * @param string the string.
+ * @return an Integer.
+ */
+ public static Integer parseInt( String string )
+ {
+ if ( string == null || string.trim().isEmpty() )
+ {
+ return null;
+ }
+
+ try
+ {
+ return Integer.parseInt( string );
+ }
+ catch ( NumberFormatException ex )
+ {
+ return null;
+ }
+ }
+
+ /**
* Returns the lower bound for the given standard deviation, number of standard
* deviations and average.
*
=== added file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/grid/GridUtilsTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/grid/GridUtilsTest.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/grid/GridUtilsTest.java 2012-10-18 19:13:26 +0000
@@ -0,0 +1,55 @@
+package org.hisp.dhis.system.grid;
+
+/*
+ * Copyright (c) 2004-2012, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.List;
+
+import org.apache.commons.io.IOUtils;
+import org.hisp.dhis.common.Grid;
+import org.junit.Test;
+import org.springframework.core.io.ClassPathResource;
+
+import static junit.framework.Assert.*;
+
+/**
+ * @author Lars Helge Overland
+ */
+public class GridUtilsTest
+{
+ @Test
+ public void testFromHtml()
+ throws Exception
+ {
+ String html = IOUtils.toString( new ClassPathResource( "customform.html" ).getInputStream() );
+
+ List<Grid> grids = GridUtils.fromHtml( html );
+
+ assertNotNull( grids );
+ assertEquals( 6, grids.size() );
+ }
+}
=== added file 'dhis-2/dhis-support/dhis-support-system/src/test/resources/customform.html'
--- dhis-2/dhis-support/dhis-support-system/src/test/resources/customform.html 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/resources/customform.html 2012-10-18 19:13:26 +0000
@@ -0,0 +1,1839 @@
+<h3>MOH - Uganda - January 2012</h3>
+
+<input type="hidden" id="currentDataSetId" value="d6aRUaXo0B6">
+<input type="hidden" id="currentPeriodId" value="201201">
+<input type="hidden" id="currentSelectedUnitOnly" value="false">
+<div id="userInfo" class="page"></div>
+
+<div id="download_buttons" style="margin-bottom:15px">
+<input type="button" value="Download as Excel" onclick="exportDataSetReport( 'xls' )" style="width:140px">
+<input type="button" value="Download as PDF" onclick="exportDataSetReport( 'pdf' )" style="width:140px">
+<input type="button" value="Share" onclick="viewShareForm()" style="width:140px">
+</div>
+
+<div class="cde cde-regular">
+ <p>
+ <!-- ARV PAGE 1 --></p>
+<table class="formSection" style="margin-bottom:20px">
+ <colgroup>
+ <col width="35px" />
+ <col width="300px" />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ </colgroup>
+ <tbody>
+ <tr>
+ <td colspan="15">
+ <div class="cent">
+ <h3>
+ Joint Medical Store (Global Fund)</h3>
+ </div>
+ <div class="bold" style="padding-bottom:15px; padding-top:10px; color:#de2c2c; font-size:14px;">
+ Please adhere to these instructions</div>
+ <div style="padding-bottom:15px; color:#101010; font-size:14px;">
+ i. Please ensure to report in <span class="bold">pack sizes</span>. For example, instead of recording 60 tablets for AZT/3TC/NVP, record 1 pack.</div>
+ <div style="padding-bottom:15px; color:#101010; font-size:14px;">
+ ii. Please note that the ARV order and report form is a bi-monthly report. Therefore combine and enter data for two months into a single report when filling the form. Selecting a month in the period field above implies that you are entering data for the selected month and the month before. For example, selecting February 2012 means you are entering aggregated data for January 2012 and February 2012.</div>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ </th>
+ <th>
+ Drug Formulation and Strength</th>
+ <th>
+ Pack Size</th>
+ <th>
+ OPENING BALANCE at start of 2 Month Cycle</th>
+ <th>
+ QUANTITY RECEIVED during 2 Month Cycle</th>
+ <th>
+ PMTCT CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ ART<br />
+ CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ LOSSES / ADJUSTMENTS ( + / - )</th>
+ <th>
+ CLOSING BALANCE (Physical Count Stores + Pharmacy)</th>
+ <th>
+ MONTHS OF STOCK ON-HAND = F / ((C+D) / 2)</th>
+ <th>
+ QUANTITY REQUIRED FOR CURRENT PATIENTS = (2 x (C+D) - F</th>
+ <th>
+ ESTIMATED NO OF NEW ART PATIENTS for the Next Cycle</th>
+ <th>
+ ESTIMATED<br />
+ NO OF NEW HIV+ PREGNANT WOMEN for the Next Cycle</th>
+ <th>
+ TOTAL QUANTITY TO BE ORDERED = G + (H * p * 4)</th>
+ <th>
+ Notes</th>
+ </tr>
+ <tr>
+ <th colspan="3">
+ ADULT - RECOMMENDED FORMULATIONS</th>
+ <th>
+ A</th>
+ <th>
+ B</th>
+ <th>
+ C</th>
+ <th>
+ D</th>
+ <th>
+ E</th>
+ <th>
+ F</th>
+ <th>
+ G</th>
+ <th>
+ H</th>
+ <th>
+ I</th>
+ <th>
+ J</th>
+ <th>
+ K</th>
+ <th>
+ </th>
+ </tr>
+ <tr>
+ <td class="alt">
+ 1</td>
+ <td class="alt">
+ Tenofovir/Lamivudine/Efavirenz (TDF/3TC/EFV) 300mg/300mg/600mg</td>
+ <td class="alt">
+ Pack of 30</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 2</td>
+ <td>
+ 960</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 3520</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 2</td>
+ <td>
+ Tenofovir/Lamivudine (TDF/3TC) 300mg/300mg</td>
+ <td>
+ Pack of 30</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 2</td>
+ <td>
+ 960</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 3520</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 3</td>
+ <td class="alt">
+ Zidovudine/Lamivudine/Nevirapine (AZT/3TC/NVP) 300mg/150mg/200mg</td>
+ <td class="alt">
+ Pack of 60</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 2</td>
+ <td>
+ 960</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 3520</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 4</td>
+ <td>
+ Zidovudine/Lamivudine (AZT/3TC) 300mg/150mg</td>
+ <td>
+ Pack of 60</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 2</td>
+ <td>
+ 960</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 3520</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 5</td>
+ <td class="alt">
+ Efavirenz (EFV) 600mg</td>
+ <td class="alt">
+ Pack of 30</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 4</td>
+ <td>
+ 320</td>
+ <td>
+ 160</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 1600</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 6</td>
+ <td>
+ Nevirapine (NVP) 200mg</td>
+ <td>
+ Pack of 60</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 2</td>
+ <td>
+ 960</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 3520</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 7</td>
+ <td class="alt">
+ Atazanavir/Ritonavir (ATV/r) 300mg/100mg</td>
+ <td class="alt">
+ Pack of 30</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 4</td>
+ <td>
+ 320</td>
+ <td>
+ 160</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 1600</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 8</td>
+ <td>
+ Lopinavir/Ritonavir (LPV/r) 200mg/50mg</td>
+ <td>
+ Pack of 120</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 4</td>
+ <td>
+ 320</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 320</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ </th>
+ <th>
+ Drug Formulation and Strength</th>
+ <th>
+ Pack Size</th>
+ <th>
+ OPENING BALANCE at start of 2 Month Cycle</th>
+ <th>
+ QUANTITY RECEIVED during 2 Month Cycle</th>
+ <th>
+ PMTCT CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ ART<br />
+ CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ LOSSES / ADJUSTMENTS ( + / - )</th>
+ <th>
+ CLOSING BALANCE (Physical Count Stores + Pharmacy)</th>
+ <th>
+ MONTHS OF STOCK ON-HAND = F / ((C+D) / 2)</th>
+ <th>
+ QUANTITY REQUIRED FOR CURRENT PATIENTS = (2 x (C+D) - F</th>
+ <th>
+ ESTIMATED NO OF NEW ART PATIENTS for the Next Cycle</th>
+ <th>
+ ESTIMATED<br />
+ NO OF NEW HIV+ PREGNANT WOMEN for the Next Cycle</th>
+ <th>
+ TOTAL QUANTITY TO BE ORDERED = G + (H * p * 4)</th>
+ <th>
+ Notes</th>
+ </tr>
+ <tr>
+ <th colspan="3">
+ ADULT - FORMULATIONS</th>
+ <th>
+ A</th>
+ <th>
+ B</th>
+ <th>
+ C</th>
+ <th>
+ D</th>
+ <th>
+ E</th>
+ <th>
+ F</th>
+ <th>
+ G</th>
+ <th>
+ H</th>
+ <th>
+ I</th>
+ <th>
+ J</th>
+ <th>
+ K</th>
+ <th>
+ </th>
+ </tr>
+ <tr>
+ <td class="alt">
+ 9</td>
+ <td class="alt">
+ Zidovudine (AZT) 300mg</td>
+ <td class="alt">
+ Pack of 60</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 160</td>
+ <td>
+ 130</td>
+ <td>
+ 3.2</td>
+ <td>
+ 380</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 70</td>
+ <td>
+ 940</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 10</td>
+ <td>
+ Lamivudine (3TC) 150mg</td>
+ <td>
+ Pack of 60</td>
+ <td>
+ 130</td>
+ <td>
+ 130</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 130</td>
+ <td>
+ 130</td>
+ <td>
+ 130</td>
+ <td>
+ 4</td>
+ <td>
+ 260</td>
+ <td>
+ 70</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 820</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 11</td>
+ <td class="alt">
+ Abacavir (ABC) 300mg</td>
+ <td class="alt">
+ Pack of 60</td>
+ <td>
+ 60</td>
+ <td>
+ 60</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 60</td>
+ <td>
+ 60</td>
+ <td>
+ 60</td>
+ <td>
+ 4</td>
+ <td>
+ 120</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 120</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 12</td>
+ <td>
+ Abacavir/Lamivudine (ABC/3TC) 600mg/300mg</td>
+ <td>
+ Pack of 30</td>
+ <td>
+ 60</td>
+ <td>
+ 60</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 60</td>
+ <td>
+ 60</td>
+ <td>
+ 60</td>
+ <td>
+ 4</td>
+ <td>
+ 120</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 120</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ </th>
+ <th>
+ Drug Formulation and Strength</th>
+ <th>
+ Pack Size</th>
+ <th>
+ OPENING BALANCE at start of 2 Month Cycle</th>
+ <th>
+ QUANTITY RECEIVED during 2 Month Cycle</th>
+ <th>
+ PMTCT CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ ART CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ LOSSES / ADJUSTMENTS ( + / - )</th>
+ <th>
+ CLOSING BALANCE (Physical Count Stores + Pharmacy)</th>
+ <th>
+ MONTHS OF STOCK ON-HAND = F / ((C+D) / 2)</th>
+ <th>
+ QUANTITY REQUIRED FOR CURRENT PATIENTS = (2 x (C+D) - F</th>
+ <th>
+ ESTIMATED NO OF NEW ART PATIENTS for the Next Cycle</th>
+ <th>
+ ESTIMATED<br />
+ NO OF NEW HIV+ PREGNANT WOMEN for the Next Cycle</th>
+ <th>
+ TOTAL QUANTITY TO BE ORDERED = G + (H * p * 4)</th>
+ <th>
+ Notes</th>
+ </tr>
+ <tr>
+ <th colspan="3">
+ PAEDIATRIC - RECOMMENDED FORMULATIONS</th>
+ <th>
+ A</th>
+ <th>
+ B</th>
+ <th>
+ C</th>
+ <th>
+ D</th>
+ <th>
+ E</th>
+ <th>
+ F</th>
+ <th>
+ G</th>
+ <th>
+ H</th>
+ <th>
+ I</th>
+ <th>
+ J</th>
+ <th>
+ K</th>
+ <th>
+ </th>
+ </tr>
+ <tr>
+ <td>
+ 1</td>
+ <td>
+ Zidovudine/Lamivudine/Nevirapine (AZT/3TC/NVP) 60mg/30mg/50mg</td>
+ <td>
+ Pack of 60</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 2</td>
+ <td class="alt">
+ Zidovudine/Lamivudine (AZT/3TC) 60mg/30mg</td>
+ <td class="alt">
+ Pack of 60</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 3</td>
+ <td>
+ Abacavir/Lamivudine (ABC/3TC) 60mg/30mg</td>
+ <td>
+ Pack of 60</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 4</td>
+ <td class="alt">
+ Abacavir (ABC) 60mg</td>
+ <td class="alt">
+ Pack of 60</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 5</td>
+ <td>
+ Efavirenz (EFV) 200mg</td>
+ <td>
+ Pack of 90</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 6</td>
+ <td class="alt">
+ Nevirapine (NVP) 50mg</td>
+ <td class="alt">
+ Pack of 60</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 7</td>
+ <td>
+ Lopinavir/Ritonavir (LVP/r) 80mg/20ml oral susp.</td>
+ <td>
+ Bottle 60 ml</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 8</td>
+ <td class="alt">
+ Lopinavir/Ritonavir (LVP/r) 100mg/25mg</td>
+ <td class="alt">
+ Pack of 60</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 9</td>
+ <td>
+ Efavirenz (EFV) 50mg</td>
+ <td>
+ Pack of 30</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<!-- ARV PAGE 2 -->
+<table class="formSection" style="margin-bottom:20px">
+ <colgroup>
+ <col width="35px" />
+ <col width="300px" />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ <col />
+ </colgroup>
+ <tbody>
+ <tr>
+ <td colspan="15">
+ <div class="cent">
+ <h3>
+ Joint Medical Store (Global Fund)</h3>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ </th>
+ <th>
+ Drug Formulation and Strength</th>
+ <th>
+ Pack Size</th>
+ <th>
+ OPENING BALANCE at start of 2 Month Cycle</th>
+ <th>
+ QUANTITY RECEIVED during 2 Month Cycle</th>
+ <th>
+ PMTCT CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ ART CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ LOSSES / ADJUSTMENTS ( + / - )</th>
+ <th>
+ CLOSING BALANCE (Physical Count in Stores + Pharmacy)</th>
+ <th>
+ MONTHS OF STOCK ON-HAND = F / ((C+D) / 2)</th>
+ <th>
+ QUANTITY REQUIRED FOR CURRENT PATIENTS<br />
+ = (2 x (C+D) - F</th>
+ <th>
+ ESTIMATED NUMBER OF ART NEW ART PATIENTS for the Next Cycle</th>
+ <th>
+ ESTIMATED<br />
+ NO OF NEW HIV+ PREGNANT WOMEN for the Next Cycle</th>
+ <th>
+ TOTAL QUANTITY TO BE ORDERED = G + (H * p * 4)</th>
+ <th>
+ Notes</th>
+ </tr>
+ <tr>
+ <th colspan="3">
+ PAEDIATRIC - FORMULATIONS</th>
+ <th>
+ A</th>
+ <th>
+ B</th>
+ <th>
+ C</th>
+ <th>
+ D</th>
+ <th>
+ E</th>
+ <th>
+ F</th>
+ <th>
+ G</th>
+ <th>
+ H</th>
+ <th>
+ I</th>
+ <th>
+ J</th>
+ <th>
+ K</th>
+ <th>
+ </th>
+ </tr>
+ <tr>
+ <td class="alt">
+ 10</td>
+ <td class="alt">
+ Stavudine/Lamivudine/Nevirapine (D4T/3TC/NVP) 6mg/30mg/50mg</td>
+ <td class="alt">
+ Pack of 60</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 11</td>
+ <td>
+ Stavudine/Lamivudine (D4T/3TC) 6mg/30mg</td>
+ <td>
+ Pack of 60</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 12</td>
+ <td class="alt">
+ Stavudine/Lamivudine/Nevirapine (D4T/3TC/NVP) 12mg/30mg/100mg</td>
+ <td class="alt">
+ Pack of 60</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <th colspan="3">
+ PMTCT ONLY FORMULATIONS</th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ <th>
+ </th>
+ </tr>
+ <tr>
+ <td class="alt">
+ 1</td>
+ <td class="alt">
+ Nevirapine (NVP) 10mg/ml oral susp.</td>
+ <td class="alt">
+ Bottle 100 ml</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ </th>
+ <th>
+ Drug Formulation and Strength</th>
+ <th>
+ Pack Size</th>
+ <th>
+ OPENING BALANCE at start of 2 Month Cycle</th>
+ <th>
+ QUANTITY RECEIVED during 2 Month Cycle</th>
+ <th>
+ PMTCT CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ ART CONSUMPTION during 2 Month Cycle</th>
+ <th>
+ LOSSES / ADJUSTMENTS ( + / - )</th>
+ <th>
+ CLOSING BALANCE (Physical Count Stores + Pharmacy)</th>
+ <th>
+ MONTHS OF STOCK ON-HAND = F / ((C+D) / 2)</th>
+ <th>
+ QUANTITY REQUIRED FOR CURRENT PATIENTS <br />
+ = (2 x (C+D) - F</th>
+ <th>
+ ESTIMATED NO OF NEW ART PATIENTS for the Next Cycle</th>
+ <th>
+ ESTIMATED<br />
+ NO OF NEW HIV+ PREGNANT WOMEN for the Next Cycle</th>
+ <th>
+ TOTAL QUANTITY TO BE ORDERED = G + (H * p * 4)</th>
+ <th>
+ Notes</th>
+ </tr>
+ <tr>
+ <th colspan="3">
+ OTHER FORMULATIONS</th>
+ <th>
+ A</th>
+ <th>
+ B</th>
+ <th>
+ C</th>
+ <th>
+ D</th>
+ <th>
+ E</th>
+ <th>
+ F</th>
+ <th>
+ G</th>
+ <th>
+ H</th>
+ <th>
+ I</th>
+ <th>
+ J</th>
+ <th>
+ K</th>
+ <th>
+ </th>
+ </tr>
+ <tr>
+ <td>
+ 1</td>
+ <td>
+ Sulfamethoxazole/Trimethoprim (Cotrimoxazole) 800mg/160mg</td>
+ <td>
+ Pack of 1000</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 2</td>
+ <td class="alt">
+ Sulfamethoxazole/Trimethoprim (Cotrimoxazole) 100mg/20mg</td>
+ <td class="alt">
+ Pack of 1000</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 3</td>
+ <td>
+ Fluconazole (FL) 200mg</td>
+ <td>
+ Pack of 28</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 4</td>
+ <td class="alt">
+ Fluconazole (FL) oral solution</td>
+ <td class="alt">
+ Bottle 35 ml</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 5</td>
+ <td>
+ Fluconazole (FL) IV</td>
+ <td>
+ IV 100 ml</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 6</td>
+ <td class="alt">
+ Dapsone 100mg</td>
+ <td class="alt">
+ Pack of 1000</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ <td>
+ </td>
+ <td>
+ 0</td>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p>
+ <!-- FLUCONAZOLE PATIENTS --></p>
+<table class="formSection" style="margin-bottom:20px">
+ <colgroup>
+ <col width="35px" />
+ <col width="300px" />
+ <col width="120px" />
+ <col width="120px" />
+ </colgroup>
+ <tbody>
+ <tr>
+ <td colspan="4">
+ <div class="cent">
+ <h3>
+ Patients Treated With Fluconazole</h3>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="tabHead">
+ </td>
+ <td class="tabHead">
+ Patients treated for the following:</td>
+ <td class="tabHead">
+ Adults</td>
+ <td class="tabHead">
+ Children</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 1</td>
+ <td class="alt">
+ Acute cryptococcal meningitis</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ </tr>
+ <tr>
+ <td>
+ 2</td>
+ <td>
+ Cryptococcal meningitis patients treated on maintenance therapy</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 3</td>
+ <td class="alt">
+ Esophageal candidiasis</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ </tr>
+ </tbody>
+</table>
+<p>
+ <!-- PMTCT PATIENTS --></p>
+<table class="formSection" style="margin-bottom:20px">
+ <colgroup>
+ <col width="35px" />
+ <col width="300px" />
+ <col width="120px" />
+ <col width="120px" />
+ </colgroup>
+ <tbody>
+ <tr>
+ <td colspan="4">
+ <div class="cent">
+ <h3>
+ PMTCT Patients</h3>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="tabHead">
+ </td>
+ <td class="tabHead">
+ PMTCT Patients by Regimen</td>
+ <td class="tabHead">
+ Existing</td>
+ <td class="tabHead">
+ New</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 1</td>
+ <td class="alt">
+ TDF/3TC/EFV</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ </tr>
+ <tr>
+ <td>
+ 2</td>
+ <td>
+ TDF/3TC/NVP</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 3</td>
+ <td class="alt">
+ AZT/3TC/NVP</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ </tr>
+ </tbody>
+</table>
+<p>
+ <!-- ADULT ART PATIENTS --></p>
+<table class="formSection" style="margin-bottom:20px">
+ <colgroup>
+ <col width="35px" />
+ <col width="300px" />
+ <col width="120px" />
+ <col width="120px" />
+ </colgroup>
+ <tbody>
+ <tr>
+ <td colspan="4">
+ <div class="cent">
+ <h3>
+ Adult ART Patients</h3>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="tabHead">
+ </td>
+ <td class="tabHead">
+ 1st Line Regiments</td>
+ <td class="tabHead">
+ Existing</td>
+ <td class="tabHead">
+ New</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 1</td>
+ <td class="alt">
+ TDF/3TC/NVP</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ </tr>
+ <tr>
+ <td>
+ 2</td>
+ <td>
+ TDF/3TC/EFV</td>
+ <td>
+ 100</td>
+ <td>
+ 100</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 3</td>
+ <td class="alt">
+ AZT/3TC/NVP</td>
+ <td>
+ 100</td>
+ <td>
+ 110</td>
+ </tr>
+ <tr>
+ <td>
+ 4</td>
+ <td>
+ AZT/3TC/EFV</td>
+ <td>
+ 110</td>
+ <td>
+ 100</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 5</td>
+ <td class="alt">
+ ABC/3TC/NVP</td>
+ <td>
+ 91</td>
+ <td>
+ 91</td>
+ </tr>
+ <tr>
+ <td>
+ 6</td>
+ <td>
+ ABC/3TC/EFV</td>
+ <td>
+ 91</td>
+ <td>
+ 91</td>
+ </tr>
+ <tr>
+ <td class="tabHead">
+ </td>
+ <td class="tabHead">
+ 2nd Line Regiments</td>
+ <td class="tabHead">
+ Existing</td>
+ <td class="tabHead">
+ New</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 1</td>
+ <td class="alt">
+ TDF/3TC/ATV/r</td>
+ <td>
+ 91</td>
+ <td>
+ 91</td>
+ </tr>
+ <tr>
+ <td>
+ 2</td>
+ <td>
+ TDF/3TC/LPV/r</td>
+ <td>
+ 91</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 3</td>
+ <td class="alt">
+ AZT/3TC/ATV/r</td>
+ <td>
+ 91</td>
+ <td>
+ 90</td>
+ </tr>
+ <tr>
+ <td>
+ 4</td>
+ <td>
+ AZT/3TC/LPV/r</td>
+ <td>
+ 91</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ </tr>
+ <tr>
+ <td class="tabHead">
+ </td>
+ <td class="tabHead">
+ Summary</td>
+ <td class="tabHead">
+ Existing</td>
+ <td class="tabHead">
+ New</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ </td>
+ <td class="alt">
+ TOTAL ADULT PATIENTS</td>
+ <td>
+ 2032</td>
+ <td>
+ 1666</td>
+ </tr>
+ </tbody>
+</table>
+<p>
+ <!-- PEADIATRIC ART PATIENTS --></p>
+<table class="formSection" style="margin-bottom:20px">
+ <colgroup>
+ <col width="35px" />
+ <col width="300px" />
+ <col width="120px" />
+ <col width="120px" />
+ </colgroup>
+ <tbody>
+ <tr>
+ <td colspan="4">
+ <div class="cent">
+ <h3>
+ Paediatric ART Patients (14 years and below)</h3>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="tabHead">
+ </td>
+ <td class="tabHead">
+ 1st Line Regiments</td>
+ <td class="tabHead">
+ Existing</td>
+ <td class="tabHead">
+ New</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 1</td>
+ <td class="alt">
+ AZT/3TC/NVP</td>
+ <td>
+ 92</td>
+ <td>
+ 92</td>
+ </tr>
+ <tr>
+ <td>
+ 2</td>
+ <td>
+ AZT/3TC/EFV</td>
+ <td>
+ 91</td>
+ <td>
+ 91</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 3</td>
+ <td class="alt">
+ ABC/3TC/NVP</td>
+ <td>
+ 100</td>
+ <td>
+ 100</td>
+ </tr>
+ <tr>
+ <td>
+ 4</td>
+ <td>
+ ABC/3TC/EFV</td>
+ <td>
+ 110</td>
+ <td>
+ 110</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 5</td>
+ <td class="alt">
+ D4T/3TC/NVP</td>
+ <td>
+ 140</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ 6</td>
+ <td>
+ D4T/3TC/EFV</td>
+ <td>
+ 140</td>
+ <td style="background-color: rgb(224, 224, 224); ">
+ </td>
+ </tr>
+ <tr>
+ <td class="tabHead">
+ </td>
+ <td class="tabHead">
+ 2nd Line Regiments</td>
+ <td class="tabHead">
+ Existing</td>
+ <td class="tabHead">
+ New</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 1</td>
+ <td class="alt">
+ AZT/3TC/LPV/r</td>
+ <td>
+ 160</td>
+ <td>
+ 160</td>
+ </tr>
+ <tr>
+ <td>
+ 2</td>
+ <td>
+ ABC/3TC/LPV/r</td>
+ <td>
+ 190</td>
+ <td>
+ 190</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ 3</td>
+ <td class="alt">
+ D4T/3TC/LPV/r</td>
+ <td>
+ 91</td>
+ <td>
+ 91</td>
+ </tr>
+ <tr>
+ <td class="tabHead">
+ </td>
+ <td class="tabHead">
+ Summary</td>
+ <td class="tabHead">
+ Existing</td>
+ <td class="tabHead">
+ New</td>
+ </tr>
+ <tr>
+ <td class="alt">
+ </td>
+ <td class="alt">
+ TOTAL PAEDIATRIC PATIENTS</td>
+ <td>
+ 2228</td>
+ <td>
+ 1668</td>
+ </tr>
+ </tbody>
+</table>
+<p style="font-size:14px">
+ P is defined as the number of packs per patient per month</p>
+
+</div>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateDataSetReportAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateDataSetReportAction.java 2012-10-01 15:58:02 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateDataSetReportAction.java 2012-10-18 19:13:26 +0000
@@ -253,7 +253,7 @@
{
if ( type != null )
{
- grid = dataSetReportService.getDefaultDataSetReport( selectedDataSet, selectedPeriod, selectedOrgunit, selectedUnitOnly, format, i18n );
+ grids = dataSetReportService.getCustomDataSetReportAsGrid( selectedDataSet, selectedOrgunit, selectedPeriod, selectedUnitOnly, format );
}
else
{
=== modified file 'dhis-2/pom.xml'
--- dhis-2/pom.xml 2012-09-23 15:49:44 +0000
+++ dhis-2/pom.xml 2012-10-18 19:13:26 +0000
@@ -735,6 +735,11 @@
<version>1.1.3.4.O</version>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.htmlparser</groupId>
+ <artifactId>htmlparser</artifactId>
+ <version>2.1</version>
+ </dependency>
<!-- GIS -->
<dependency>