dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16620
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6364: (patient) Remove patient chart.
------------------------------------------------------------
revno: 6364
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-23 12:58:50 +0700
message:
(patient) Remove patient chart.
removed:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChart.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChartService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChartStore.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/DefaultPatientChartService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/hibernate/
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/hibernate/HibernatePatientChartStore.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientchart/
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientchart/hibernate/
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientchart/hibernate/patientchart.hbm.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart/
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart/GeneratePatientChartAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart/GetPatientChartListAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patientChart.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientChartList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/AddPatientChartAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/DeletePatientChartAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/GetPatientChartAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/GetPatientChartListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/ShowAddPatientChartFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/UpdatePatientChartAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/ValidatePatientChartAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientChartForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientChartForm.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientChart.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientChartForm.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientChartList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientChart.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientChartForm.vm
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
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/javascript/form.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/dataEntry.css
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.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
=== removed directory 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart'
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChart.java 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChart.java 1970-01-01 00:00:00 +0000
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2004-2011, 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.
- */
-
-package org.hisp.dhis.patientchart;
-
-import java.io.Serializable;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.program.Program;
-
-/**
- * @author Chau Thu Tran
- * @version $ PatientChart.java Sep 5, 2011 7:45:02 AM $
- *
- */
-public class PatientChart
- implements Serializable
-{
- private static final long serialVersionUID = 8363053813064346240L;
-
- public static final String TYPE_BAR = "bar";
-
- public static final String TYPE_BAR3D = "bar3d";
-
- public static final String TYPE_LINE = "line";
-
- public static final String TYPE_LINE3D = "line3d";
-
- public static final String SIZE_NORMAL = "normal";
-
- public static final String SIZE_WIDE = "wide";
-
- public static final String SIZE_TALL = "tall";
-
- private Integer id;
-
- private String title;
-
- private String type;
-
- private String size;
-
- private boolean regression;
-
- private Program program;
-
- private DataElement dataElement;
-
- private transient I18nFormat format;
-
- // -------------------------------------------------------------------------
- // Constructors
- // -------------------------------------------------------------------------
-
- public PatientChart()
- {
-
- }
-
- // -------------------------------------------------------------------------
- // equals && hashcode
- // -------------------------------------------------------------------------
-
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((title == null) ? 0 : title.hashCode());
- return result;
- }
-
- @Override
- public boolean equals( Object obj )
- {
- if ( this == obj )
- return true;
- if ( obj == null )
- return false;
- if ( getClass() != obj.getClass() )
- return false;
- PatientChart other = (PatientChart) obj;
- if ( title == null )
- {
- if ( other.title != null )
- return false;
- }
- else if ( !title.equals( other.title ) )
- return false;
- return true;
- }
-
- // -------------------------------------------------------------------------
- // Getters && Setters
- // -------------------------------------------------------------------------
-
- public boolean isType( String type )
- {
- return this.type != null && this.type.equals( type );
- }
-
- public boolean isSize( String size )
- {
- return this.size != null && this.size.equals( size );
- }
-
- public String getTitle()
- {
- return title;
- }
-
- public void setTitle( String title )
- {
- this.title = title;
- }
-
- public String getType()
- {
- return type;
- }
-
- public void setType( String type )
- {
- this.type = type;
- }
-
- public String getSize()
- {
- return size;
- }
-
- public void setSize( String size )
- {
- this.size = size;
- }
-
- public Program getProgram()
- {
- return program;
- }
-
- public void setProgram( Program program )
- {
- this.program = program;
- }
-
- public DataElement getDataElement()
- {
- return dataElement;
- }
-
- public void setDataElement( DataElement dataElement )
- {
- this.dataElement = dataElement;
- }
-
- public I18nFormat getFormat()
- {
- return format;
- }
-
- public void setFormat( I18nFormat format )
- {
- this.format = format;
- }
-
- public boolean isRegression()
- {
- return regression;
- }
-
- public void setRegression( boolean regression )
- {
- this.regression = regression;
- }
-
- public Integer getId()
- {
- return id;
- }
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChartService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChartService.java 2011-10-03 09:40:38 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChartService.java 1970-01-01 00:00:00 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2004-2011, 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.
- */
-
-package org.hisp.dhis.patientchart;
-
-import java.util.Collection;
-
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.program.Program;
-import org.jfree.chart.JFreeChart;
-
-/**
- * @author Chau Thu Tran
- * @version $ PatientChartService.java Sep 5, 2011 8:59:04 AM $
- *
- */
-public interface PatientChartService
-{
- String ID = PatientChartService.class.getName();
-
- int savePientChart( PatientChart patientChart );
-
- void deletePatientChart( PatientChart patientChart );
-
- void updatePatientChart( PatientChart patientChart );
-
- PatientChart getPatientChart( int id );
-
- PatientChart getPatientChartByTitle( String title );
-
- Collection<PatientChart> getPatientCharts( Collection<Program> programs );
-
- Collection<PatientChart> getAllPatientCharts();
-
- JFreeChart getJFreeChart( int id, I18nFormat format );
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChartStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChartStore.java 2011-11-03 01:02:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientchart/PatientChartStore.java 1970-01-01 00:00:00 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2004-2011, 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.
- */
-
-package org.hisp.dhis.patientchart;
-
-import java.util.Collection;
-
-import org.hisp.dhis.common.GenericNameableObjectStore;
-import org.hisp.dhis.program.Program;
-
-/**
- * @author Chau Thu Tran
- * @version $ PatientChartStore.java Sep 5, 2011 8:06:43 AM $
- *
- */
-public interface PatientChartStore
- extends GenericNameableObjectStore<PatientChart>
-{
- String ID = PatientChartStore.class.getName();
-
- Collection<PatientChart> getPatientCharts( Collection<Program> programs );
-
- PatientChart getByTitle( String title );
-}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2012-03-22 14:17:16 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2012-03-23 05:58:50 +0000
@@ -79,7 +79,9 @@
executeSql( "ALTER TABLE patientdatavaluearchive DROP COLUMN providedbyanotherfacility" );
executeSql( "ALTER TABLE patientdatavaluearchive DROP COLUMN organisationunitid" );
- executeSql( "ALTER TABLE patientdatavaluearchive DROP COLUMN storedby" );
+ executeSql( "ALTER TABLE patientdatavaluearchive DROP COLUMN storedby" );
+ executeSql( "DROP TABLE patientchart" );
+ executeSql( "DROP TABLE patientchart" );
}
// -------------------------------------------------------------------------
=== removed directory 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart'
=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/DefaultPatientChartService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/DefaultPatientChartService.java 2012-02-01 09:10:08 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/DefaultPatientChartService.java 1970-01-01 00:00:00 +0000
@@ -1,282 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.patientchart;
-
-import static org.hisp.dhis.chart.Chart.TYPE_BAR;
-
-import java.awt.Color;
-import java.awt.Font;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.apache.commons.math.stat.regression.SimpleRegression;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.patientdatavalue.PatientDataValue;
-import org.hisp.dhis.patientdatavalue.PatientDataValueService;
-import org.hisp.dhis.program.Program;
-import org.jfree.chart.JFreeChart;
-import org.jfree.chart.axis.CategoryAxis;
-import org.jfree.chart.axis.CategoryLabelPositions;
-import org.jfree.chart.axis.NumberAxis;
-import org.jfree.chart.plot.CategoryPlot;
-import org.jfree.chart.plot.DatasetRenderingOrder;
-import org.jfree.chart.plot.PlotOrientation;
-import org.jfree.chart.renderer.category.BarRenderer;
-import org.jfree.chart.renderer.category.LineAndShapeRenderer;
-import org.jfree.data.category.CategoryDataset;
-import org.jfree.data.category.DefaultCategoryDataset;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * @author Chau Thu Tran
- * @version $ DefaultPatientChartService.java Sep 4, 2011 7:13:19 PM $
- *
- */
-@Transactional
-public class DefaultPatientChartService
- implements PatientChartService
-{
- private static final Font titleFont = new Font( "Tahoma", Font.BOLD, 14 );
-
- private static final Color[] colors = { Color.decode( "#d54a4a" ), Color.decode( "#2e4e83" ),
- Color.decode( "#75e077" ), Color.decode( "#e3e274" ), Color.decode( "#e58c6d" ), Color.decode( "#df6ff3" ),
- Color.decode( "#88878e" ), Color.decode( "#6ff3e8" ), Color.decode( "#6fc3f3" ), Color.decode( "#aaf36f" ),
- Color.decode( "#9d6ff3" ), Color.decode( "#474747" ) };
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PatientChartStore patientChartStore;
-
- public void setPatientChartStore( PatientChartStore patientChartStore )
- {
- this.patientChartStore = patientChartStore;
- }
-
- private PatientDataValueService patientDataValueService;
-
- public void setPatientDataValueService( PatientDataValueService patientDataValueService )
- {
- this.patientDataValueService = patientDataValueService;
- }
-
- // -------------------------------------------------------------------------
- // ChartService implementation
- // -------------------------------------------------------------------------
-
- @Override
- public void deletePatientChart( PatientChart patientChart )
- {
- patientChartStore.delete( patientChart );
- }
-
- @Override
- public Collection<PatientChart> getAllPatientCharts()
- {
- return patientChartStore.getAll();
- }
-
- @Override
- public PatientChart getPatientChart( int id )
- {
- return patientChartStore.get( id );
- }
-
- @Override
- public PatientChart getPatientChartByTitle( String title )
- {
- return patientChartStore.getByTitle( title );
- }
-
- @Override
- public Collection<PatientChart> getPatientCharts( Collection<Program> programs )
- {
- return patientChartStore.getPatientCharts( programs );
- }
-
- @Override
- public int savePientChart( PatientChart patientChart )
- {
- return patientChartStore.save( patientChart );
- }
-
- @Override
- public void updatePatientChart( PatientChart patientChart )
- {
- patientChartStore.update( patientChart );
- }
-
- @Override
- public JFreeChart getJFreeChart( int id, I18nFormat format )
- {
- PatientChart patientChart = getPatientChart( id );
-
- patientChart.setFormat( format );
-
- return getJFreeChart( patientChart );
- }
-
- // -------------------------------------------------------------------------
- // Supportive methods
- // -------------------------------------------------------------------------
-
- private JFreeChart getJFreeChart( PatientChart patientChart )
- {
- final BarRenderer barRenderer = getBarRenderer();
- final LineAndShapeRenderer lineRenderer = getLineRenderer();
-
- // ---------------------------------------------------------------------
- // Plot
- // ---------------------------------------------------------------------
-
- CategoryPlot plot = null;
-
- CategoryDataset[] dataSets = getCategoryDataSet( patientChart );
-
- if ( patientChart.isType( TYPE_BAR ) )
- {
- plot = new CategoryPlot( dataSets[0], new CategoryAxis(), new NumberAxis(), barRenderer );
- }
- else
- {
- plot = new CategoryPlot( dataSets[0], new CategoryAxis(), new NumberAxis(), lineRenderer );
- }
-
- if ( patientChart.isRegression() )
- {
- plot.setDataset( 1, dataSets[1] );
- plot.setRenderer( 1, lineRenderer );
- }
-
- JFreeChart jFreeChart = new JFreeChart( patientChart.getTitle(), titleFont, plot, true );
-
- // ---------------------------------------------------------------------
- // Plot orientation
- // ---------------------------------------------------------------------
-
- plot.setOrientation( PlotOrientation.VERTICAL );
- plot.setDatasetRenderingOrder( DatasetRenderingOrder.FORWARD );
-
- // ---------------------------------------------------------------------
- // Category label positions
- // ---------------------------------------------------------------------
-
- CategoryAxis xAxis = plot.getDomainAxis();
- xAxis.setCategoryLabelPositions( CategoryLabelPositions.UP_45 );
-
- // ---------------------------------------------------------------------
- // Color & antialias
- // ---------------------------------------------------------------------
-
- jFreeChart.setBackgroundPaint( Color.WHITE );
- jFreeChart.setAntiAlias( true );
-
- return jFreeChart;
- }
-
- /**
- * Returns a bar renderer.
- */
- private BarRenderer getBarRenderer()
- {
- BarRenderer renderer = new BarRenderer();
-
- renderer.setMaximumBarWidth( 0.07 );
-
- for ( int i = 0; i < colors.length; i++ )
- {
- renderer.setSeriesPaint( i, colors[i] );
- renderer.setShadowVisible( false );
- }
-
- return renderer;
- }
-
- /**
- * Returns a line and shape renderer.
- */
- private LineAndShapeRenderer getLineRenderer()
- {
- LineAndShapeRenderer renderer = new LineAndShapeRenderer();
-
- for ( int i = 0; i < colors.length; i++ )
- {
- renderer.setSeriesPaint( i, colors[i] );
- }
-
- return renderer;
- }
-
- /**
- * Returns a DefaultCategoryDataSet based on patient-data-values for the
- * patient-chart.
- */
- private CategoryDataset[] getCategoryDataSet( PatientChart patientChart )
- {
- final DefaultCategoryDataset regularDataSet = new DefaultCategoryDataset();
- final DefaultCategoryDataset regressionDataSet = new DefaultCategoryDataset();
-
- if ( patientChart != null )
- {
- Collection<PatientDataValue> patientDataValues = patientDataValueService.getPatientDataValues( patientChart
- .getDataElement() );
-
- Iterator<PatientDataValue> iter = patientDataValues.iterator();
-
- while ( iter.hasNext() )
- {
- if ( !iter.next().getProgramStageInstance().getProgramInstance().getProgram().equals(
- patientChart.getProgram() ) )
- {
- iter.remove();
- }
- }
-
- // ---------------------------------------------------------
- // Regular dataset
- // ---------------------------------------------------------
-
- int columnIndex = 0;
-
- for ( PatientDataValue patientDataValue : patientDataValues )
- {
- final SimpleRegression regression = new SimpleRegression();
-
- regularDataSet.addValue( Double.parseDouble( patientDataValue.getValue() ), patientChart.getDataElement().getName(), patientChart.getFormat()
- .formatDate( patientDataValue.getProgramStageInstance().getExecutionDate() ) );
-
- columnIndex++;
-
- regression.addData( columnIndex, Double.parseDouble( patientDataValue.getValue() ) );
- }
- }
-
- return new CategoryDataset[] { regularDataSet, regressionDataSet };
- }
-}
=== removed directory 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/hibernate/HibernatePatientChartStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/hibernate/HibernatePatientChartStore.java 2011-10-03 09:40:38 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientchart/hibernate/HibernatePatientChartStore.java 1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.patientchart.hibernate;
-
-import java.util.Collection;
-
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Restrictions;
-import org.hisp.dhis.hibernate.HibernateGenericStore;
-import org.hisp.dhis.patientchart.PatientChart;
-import org.hisp.dhis.patientchart.PatientChartStore;
-import org.hisp.dhis.program.Program;
-
-/**
- * @author Chau Thu Tran
- * @version $ HibernatePatientChartStore.java Sep 5, 2011 8:32:56 AM $
- *
- */
-public class HibernatePatientChartStore
- extends HibernateGenericStore<PatientChart>
- implements PatientChartStore
-
-{
- @SuppressWarnings( "unchecked" )
- @Override
- public Collection<PatientChart> getPatientCharts ( Collection<Program> programs )
- {
- Criteria criteria = getCriteria();
- criteria.add( Restrictions.in( "program", programs ) );
- return criteria.list();
- }
-
- @Override
- public PatientChart getByTitle( String title )
- {
- return getObject( Restrictions.eq( "title", title ) );
- }
-}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2012-03-23 03:46:08 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2012-03-23 05:58:50 +0000
@@ -137,11 +137,6 @@
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
- <bean id="org.hisp.dhis.patientchart.PatientChartStore" class="org.hisp.dhis.patientchart.hibernate.HibernatePatientChartStore">
- <property name="clazz" value="org.hisp.dhis.patientchart.PatientChart"/>
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
-
<!-- Service definitions -->
<bean id="org.hisp.dhis.program.ProgramDataEntryService"
@@ -317,11 +312,6 @@
<property name="programAttributeOptionStore"
ref="org.hisp.dhis.program.ProgramAttributeOptionStore"/>
</bean>
-
- <bean id="org.hisp.dhis.patientchart.PatientChartService" class="org.hisp.dhis.patientchart.DefaultPatientChartService">
- <property name="patientChartStore" ref="org.hisp.dhis.patientchart.PatientChartStore"/>
- <property name="patientDataValueService" ref="org.hisp.dhis.patientdatavalue.PatientDataValueService"/>
- </bean>
<!-- Aggregation engine -->
=== removed directory 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientchart'
=== removed directory 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientchart/hibernate'
=== removed file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientchart/hibernate/patientchart.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientchart/hibernate/patientchart.hbm.xml 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientchart/hibernate/patientchart.hbm.xml 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping>
- <class name="org.hisp.dhis.patientchart.PatientChart" table="patientchart">
-
- <id name="id" column="patientchartid">
- <generator class="native" />
- </id>
-
- <property name="title" not-null="true" unique="true" />
-
- <property name="type" />
-
- <property name="size" />
-
- <property name="regression" />
-
- <many-to-one name="program" class="org.hisp.dhis.program.Program" column="programid"
- foreign-key="fk_patientchart_programid" />
-
- <many-to-one name="dataElement" class="org.hisp.dhis.dataelement.DataElement" column="dataelementid"
- foreign-key="fk_patientchart_dataElementid" />
-
- </class>
-</hibernate-mapping>
=== removed directory 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart'
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart/GeneratePatientChartAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart/GeneratePatientChartAction.java 2011-12-14 11:15:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart/GeneratePatientChartAction.java 1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.caseentry.action.patientchart;
-
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.patientchart.PatientChartService;
-import org.jfree.chart.JFreeChart;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ ViewPatientChartAction.java Sep 5, 2011 2:55:44 PM $
- *
- */
-public class GeneratePatientChartAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PatientChartService patientChartService;
-
- public void setPatientChartService( PatientChartService patientChartService )
- {
- this.patientChartService = patientChartService;
- }
-
- private I18nFormat format;
-
- public void setFormat( I18nFormat format )
- {
- this.format = format;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- private int width;
-
- public int getWidth()
- {
- return width;
- }
-
- private int height;
-
- public int getHeight()
- {
- return height;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private JFreeChart chart;
-
- public JFreeChart getChart()
- {
- return chart;
- }
-
- @Override
- public String execute()
- throws Exception
- {
- width = 500;
-
- height = 400;
-
- chart = patientChartService.getJFreeChart( id, format );
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart/GetPatientChartListAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart/GetPatientChartListAction.java 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patientchart/GetPatientChartListAction.java 1970-01-01 00:00:00 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.caseentry.action.patientchart;
-
-import java.util.Collection;
-
-import org.hisp.dhis.patient.Patient;
-import org.hisp.dhis.patient.PatientService;
-import org.hisp.dhis.patientchart.PatientChart;
-import org.hisp.dhis.patientchart.PatientChartService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ GetPatientChartListAction.java Sep 5, 2011 9:11:31 AM $
- *
- */
-public class GetPatientChartListAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PatientChartService patientChartService;
-
- public void setPatientChartService( PatientChartService patientChartService )
- {
- this.patientChartService = patientChartService;
- }
-
- private PatientService patientService;
-
- public void setPatientService( PatientService patientService )
- {
- this.patientService = patientService;
- }
-
- // -------------------------------------------------------------------------
- // Input/output
- // -------------------------------------------------------------------------
-
- private Integer patientId;
-
- public void setPatientId( Integer patientId )
- {
- this.patientId = patientId;
- }
-
- private Collection<PatientChart> patientCharts;
-
- public Collection<PatientChart> getPatientCharts()
- {
- return patientCharts;
- }
-
- // -------------------------------------------------------------------------
- // Implementation Action
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- Patient patient = patientService.getPatient( patientId );
-
- patientCharts = patientChartService.getPatientCharts( patient.getPrograms() );
-
- return SUCCESS;
- }
-
-}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-03-23 03:46:08 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-03-23 05:58:50 +0000
@@ -423,25 +423,6 @@
ref="org.hisp.dhis.program.ProgramStageInstanceService" />
</bean>
- <!-- Patient chart -->
-
- <bean
- id="org.hisp.dhis.caseentry.action.patientchart.GetPatientChartListAction"
- class="org.hisp.dhis.caseentry.action.patientchart.GetPatientChartListAction"
- scope="prototype">
- <property name="patientChartService"
- ref="org.hisp.dhis.patientchart.PatientChartService" />
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.caseentry.action.patientchart.GeneratePatientChartAction"
- class="org.hisp.dhis.caseentry.action.patientchart.GeneratePatientChartAction"
- scope="prototype">
- <property name="patientChartService"
- ref="org.hisp.dhis.patientchart.PatientChartService" />
- </bean>
-
<!-- Patient -->
<bean id="org.hisp.dhis.caseentry.action.patient.SearchPersonAction"
=== 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 2012-03-23 03:46:08 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-03-23 05:58:50 +0000
@@ -370,21 +370,6 @@
/dhis-web-commons/ajax/jsonPeriods.vm</result>
</action>
- <!-- Patient chart -->
-
- <action name="patientChartList"
- class="org.hisp.dhis.caseentry.action.patientchart.GetPatientChartListAction">
- <result name="success" type="velocity">/content.vm</result>
- <param name="page">/dhis-web-caseentry/patientChartList.vm</param>
- <param name="javascripts">javascript/patientChart.js</param>
- </action>
-
- <action name="generatePatientChart"
- class="org.hisp.dhis.caseentry.action.patientchart.GeneratePatientChartAction">
- <result name="success" type="chart"></result>
- <param name="requiredAuthorities">F_GENERATE_PATIENT_CHART</param>
- </action>
-
<!-- Patient -->
<action name="patient"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js 2012-03-05 07:32:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js 2012-03-23 05:58:50 +0000
@@ -144,18 +144,3 @@
showWarningMessage( message );
}
}
-// -------------------------------------------------------------------------
-// Show Patient chart list
-// -------------------------------------------------------------------------
-
-function patientChartList( patientId )
-{
- $( '#patientChartListDiv' ).load('patientChartList.action?patientId=' + patientId ).dialog( {
- autoOpen : true,
- modal : true,
- height : 400,
- width : 500,
- resizable : false,
- title : 'Viewing Chart'
- } );
-}
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patientChart.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patientChart.js 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patientChart.js 1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-
-// -----------------------------------------------------------------------------
-// View chart
-// -----------------------------------------------------------------------------
-
-function viewChart( url, size )
-{
- var width = size === 'wide' ? 1000 : 700;
- var height = size === 'tall' ? 800 : 500;
-
- $( '#chartImage' ).attr( 'src', url );
- $( '#chartView' ).dialog( {
- autoOpen : true,
- modal : true,
- height : 450,
- width : 600,
- resizable : false,
- title : 'Viewing Chart'
- } );
-}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2012-03-09 01:56:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2012-03-23 05:58:50 +0000
@@ -21,7 +21,7 @@
#if($mapPatientOrgunit.size()!=0)
<col>
#end
- <col width="120">
+ <col width="80">
<tr>
<th>#</th>
<th>$i18n.getString( "full_name" )</th>
@@ -60,7 +60,6 @@
#end
<td>
<a href="javascript:showSelectedDataRecoding('$patient.id');" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></a>
- <a href="javascript:patientChartList( '$patient.id' )" title="$i18n.getString( 'view_patient_chart' )"><img src="../images/add_to_dashboard.png" alt="$i18n.getString( 'view_patient_chart' )"></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>
@@ -86,10 +85,6 @@
</table>
<div id="detailsInfo"></div>
-<div id="patientChartListDiv"></div>
-<div id="chartView" class="hidden">
- <img id="chartImage" src="" class="padding-chart"></img>
-</div>
<span id="message"></span>
<script>
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientChartList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientChartList.vm 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientChartList.vm 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
-<h3>$i18n.getString( "patient_chart_management" )</h3>
-
-<table class="mainPageTable">
-
- <tr>
- <th>$i18n.getString( "name" )</th>
- <th class="{sorter: false}" style="width:60px">$i18n.getString( "operations" )</th>
- </tr>
-
- <tbody id="list">
- #foreach( $patientChart in $patientCharts )
- <tr id="tr${patientChart.id}">
- <td>
- $patientChart.title
- </td>
- <td>
- <a href="javascript:viewChart( 'generatePatientChart.action?id=$patientChart.id', '$patientChart.size' )" title="$i18n.getString( 'generate_patient_chart' )"><img src="../images/add_to_dashboard.png" alt="$i18n.getString( 'generate_patient_chart' )"></a>
- </td>
- </tr>
- #end
-
- </tbody>
-</table>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/dataEntry.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/dataEntry.css 2012-03-05 05:12:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/dataEntry.css 2012-03-23 05:58:50 +0000
@@ -81,11 +81,6 @@
padding-right:5px;
}
-.padding-chart
-{
- padding: 10px;
-}
-
.criteria
{
width:350px;
=== removed directory 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart'
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/AddPatientChartAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/AddPatientChartAction.java 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/AddPatientChartAction.java 1970-01-01 00:00:00 +0000
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.patient.action.patientchart;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.patientchart.PatientChart;
-import org.hisp.dhis.patientchart.PatientChartService;
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ AddPatientChartAction.java Sep 5, 2011 9:11:29 AM $
- *
- */
-public class AddPatientChartAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PatientChartService patientChartService;
-
- public void setPatientChartService( PatientChartService patientChartService )
- {
- this.patientChartService = patientChartService;
- }
-
- private ProgramService programService;
-
- public void setProgramService( ProgramService programService )
- {
- this.programService = programService;
- }
-
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private String title;
-
- private String type;
-
- private String size;
-
- private boolean regression;
-
- private Integer programId;
-
- private Integer dataElementId;
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- public void setTitle( String title )
- {
- this.title = title;
- }
-
- public void setType( String type )
- {
- this.type = type;
- }
-
- public void setSize( String size )
- {
- this.size = size;
- }
-
- public void setRegression( boolean regression )
- {
- this.regression = regression;
- }
-
- public void setProgramId( Integer programId )
- {
- this.programId = programId;
- }
-
- public Integer getProgramId()
- {
- return programId;
- }
-
- public void setDataElementId( Integer dataElementId )
- {
- this.dataElementId = dataElementId;
- }
-
-
- // -------------------------------------------------------------------------
- // Implementation Action
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- PatientChart patientChart = new PatientChart();
-
- patientChart.setTitle( title );
- patientChart.setType( type );
- patientChart.setSize( size );
- patientChart.setRegression( regression );
-
- DataElement dataElement = dataElementService.getDataElement( dataElementId );
- patientChart.setDataElement( dataElement );
-
- Program program = programService.getProgram( programId );
- patientChart.setProgram( program );
-
- patientChartService.savePientChart( patientChart );
-
- return SUCCESS;
- }
-
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/DeletePatientChartAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/DeletePatientChartAction.java 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/DeletePatientChartAction.java 1970-01-01 00:00:00 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.patient.action.patientchart;
-
-import org.hisp.dhis.patientchart.PatientChart;
-import org.hisp.dhis.patientchart.PatientChartService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ DeletePatientChartAction.java Sep 5, 2011 9:14:20 AM $
- *
- */
-public class DeletePatientChartAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PatientChartService patientChartService;
-
- public void setPatientChartService( PatientChartService patientChartService )
- {
- this.patientChartService = patientChartService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- // -------------------------------------------------------------------------
- // Implementation Action
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- PatientChart patientChart = patientChartService.getPatientChart( id );
-
- patientChartService.deletePatientChart( patientChart );
-
- return SUCCESS;
- }
-
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/GetPatientChartAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/GetPatientChartAction.java 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/GetPatientChartAction.java 1970-01-01 00:00:00 +0000
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.patient.action.patientchart;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.patientchart.PatientChart;
-import org.hisp.dhis.patientchart.PatientChartService;
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramStage;
-import org.hisp.dhis.program.ProgramStageDataElementService;
-import org.hisp.dhis.system.filter.AggregatableDataElementFilter;
-import org.hisp.dhis.system.util.FilterUtils;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ DeletePatientChartAction.java Sep 5, 2011 9:18:20 AM $
- *
- */
-public class GetPatientChartAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PatientChartService patientChartService;
-
- public void setPatientChartService( PatientChartService patientChartService )
- {
- this.patientChartService = patientChartService;
- }
-
- private ProgramStageDataElementService programStageDataElementService;
-
- public void setProgramStageDataElementService( ProgramStageDataElementService programStageDataElementService )
- {
- this.programStageDataElementService = programStageDataElementService;
- }
-
- // -------------------------------------------------------------------------
- // Input/Output
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- private PatientChart patientChart;
-
- private Collection<DataElement> dataElements = new HashSet<DataElement>();
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- public PatientChart getPatientChart()
- {
- return patientChart;
- }
-
- public Collection<DataElement> getDataElements()
- {
- return dataElements;
- }
-
- // -------------------------------------------------------------------------
- // Implementation Action
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- patientChart = patientChartService.getPatientChart( id );
-
- Program program = patientChart.getProgram();
-
- Set<ProgramStage> programStages = program.getProgramStages();
-
- for ( ProgramStage programStage : programStages )
- {
- dataElements.addAll( programStageDataElementService.getListDataElement( programStage ) );
- }
-
- FilterUtils.filter( dataElements, new AggregatableDataElementFilter() );
-
- return SUCCESS;
- }
-
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/GetPatientChartListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/GetPatientChartListAction.java 2012-02-15 07:24:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/GetPatientChartListAction.java 1970-01-01 00:00:00 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.patient.action.patientchart;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.hisp.dhis.patientchart.PatientChart;
-import org.hisp.dhis.patientchart.PatientChartService;
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ GetPatientChartListAction.java Sep 5, 2011 9:08:23 AM $
- *
- */
-public class GetPatientChartListAction
- implements Action
-{
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PatientChartService patientChartService;
-
- public void setPatientChartService( PatientChartService patientChartService )
- {
- this.patientChartService = patientChartService;
- }
-
- private ProgramService programService;
-
- public void setProgramService( ProgramService programService )
- {
- this.programService = programService;
- }
-
- // -------------------------------------------------------------------------
- // Input/output
- // -------------------------------------------------------------------------
-
- private Integer programId;
-
- public void setProgramId( Integer programId )
- {
- this.programId = programId;
- }
-
- private Collection<PatientChart> patientCharts;
-
- public Collection<PatientChart> getPatientCharts()
- {
- return patientCharts;
- }
-
- private Program program;
-
- public Program getProgram()
- {
- return program;
- }
-
- // -------------------------------------------------------------------------
- // Implementation Action
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- program = programService.getProgram( programId );
- Collection<Program> programs = new ArrayList<Program>();
- programs.add( program );
-
- patientCharts = patientChartService.getPatientCharts( programs );
-
- return SUCCESS;
- }
-
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/ShowAddPatientChartFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/ShowAddPatientChartFormAction.java 2012-01-31 07:59:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/ShowAddPatientChartFormAction.java 1970-01-01 00:00:00 +0000
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.patient.action.patientchart;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramService;
-import org.hisp.dhis.program.ProgramStage;
-import org.hisp.dhis.program.ProgramStageDataElementService;
-import org.hisp.dhis.system.filter.AggregatableDataElementFilter;
-import org.hisp.dhis.system.util.FilterUtils;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ ShowAddPatientChartFormAction.java Sep 5, 2011 9:24:10 AM $
- *
- */
-public class ShowAddPatientChartFormAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private ProgramService programService;
-
- public void setProgramService( ProgramService programService )
- {
- this.programService = programService;
- }
-
- private ProgramStageDataElementService programStageDataElementService;
-
- public void setProgramStageDataElementService( ProgramStageDataElementService programStageDataElementService )
- {
- this.programStageDataElementService = programStageDataElementService;
- }
-
- // -------------------------------------------------------------------------
- // Input/Output
- // -------------------------------------------------------------------------
-
- private Integer programId;
-
- public void setProgramId( Integer programId )
- {
- this.programId = programId;
- }
-
- public Integer getProgramId()
- {
- return programId;
- }
-
- private Collection<DataElement> dataElements = new HashSet<DataElement>();
-
- public Collection<DataElement> getDataElements()
- {
- return dataElements;
- }
-
- // -------------------------------------------------------------------------
- // Implementation Action
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- Program program = programService.getProgram( programId );
-
- Set<ProgramStage> programStages = program.getProgramStages();
-
- for( ProgramStage programStage : programStages)
- {
- dataElements.addAll( programStageDataElementService.getListDataElement( programStage ) );
- }
-
- FilterUtils.filter( dataElements, new AggregatableDataElementFilter() );
-
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/UpdatePatientChartAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/UpdatePatientChartAction.java 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/UpdatePatientChartAction.java 1970-01-01 00:00:00 +0000
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.
- */
-
-package org.hisp.dhis.patient.action.patientchart;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.patientchart.PatientChart;
-import org.hisp.dhis.patientchart.PatientChartService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ UpdatePatientChartAction.java Sep 5, 2011 9:13:29 AM $
- *
- */
-public class UpdatePatientChartAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PatientChartService patientChartService;
-
- public void setPatientChartService( PatientChartService patientChartService )
- {
- this.patientChartService = patientChartService;
- }
-
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- private String title;
-
- private String type;
-
- private String size;
-
- private boolean regression;
-
- private Integer programId;
-
- private Integer dataElementId;
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- public void setTitle( String title )
- {
- this.title = title;
- }
-
- public void setType( String type )
- {
- this.type = type;
- }
-
- public void setSize( String size )
- {
- this.size = size;
- }
-
- public void setRegression( boolean regression )
- {
- this.regression = regression;
- }
-
- public Integer getProgramId()
- {
- return programId;
- }
-
- public void setDataElementId( Integer dataElementId )
- {
- this.dataElementId = dataElementId;
- }
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- // -------------------------------------------------------------------------
- // Implementation Action
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- PatientChart patientChart = patientChartService.getPatientChart( id );
-
- patientChart.setTitle( title );
- patientChart.setType( type );
- patientChart.setSize( size );
- patientChart.setRegression( regression );
-
- DataElement dataElement = dataElementService.getDataElement( dataElementId );
- patientChart.setDataElement( dataElement );
-
- programId = patientChart.getProgram().getId();
-
- patientChartService.updatePatientChart( patientChart );
-
- return SUCCESS;
- }
-
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/ValidatePatientChartAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/ValidatePatientChartAction.java 2012-01-11 05:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientchart/ValidatePatientChartAction.java 1970-01-01 00:00:00 +0000
@@ -1,111 +0,0 @@
-/*
- * 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.
- */
-
-package org.hisp.dhis.patient.action.patientchart;
-
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.patientchart.PatientChart;
-import org.hisp.dhis.patientchart.PatientChartService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- *
- * @version $Id: ValidatePatientChartAction.java Oct 3, 2011 2:52:13 PM $
- */
-public class ValidatePatientChartAction
- implements Action
-{
-
- // -------------------------------------------------------------------------
- // Dependency
- // -------------------------------------------------------------------------
-
- private PatientChartService patientChartService;
-
- public void setPatientChartService( PatientChartService patientChartService )
- {
- this.patientChartService = patientChartService;
- }
-
- // -------------------------------------------------------------------------
- // Input/Output
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- private String title;
-
- public void setTitle( String title )
- {
- this.title = title;
- }
-
- private String message;
-
- public String getMessage()
- {
- return message;
- }
-
- private I18n i18n;
-
- public void setI18n( I18n i18n )
- {
- this.i18n = i18n;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- title = title.trim();
-
- PatientChart match = patientChartService.getPatientChartByTitle( title );
-
- if ( match != null && (id == null || match.getId() != id.intValue()) )
- {
- message = i18n.getString( "name_in_use" );
-
- return INPUT;
- }
-
- message = i18n.getString( "everything_is_ok" );
-
- return SUCCESS;
- }
-
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2012-03-22 03:15:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2012-03-23 05:58:50 +0000
@@ -869,66 +869,4 @@
ref="org.hisp.dhis.program.ProgramValidationService" />
</bean>
- <!-- Patient chart -->
-
- <bean id="org.hisp.dhis.patient.action.patientchart.AddPatientChartAction"
- class="org.hisp.dhis.patient.action.patientchart.AddPatientChartAction"
- scope="prototype">
- <property name="patientChartService"
- ref="org.hisp.dhis.patientchart.PatientChartService" />
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.patient.action.patientchart.DeletePatientChartAction"
- class="org.hisp.dhis.patient.action.patientchart.DeletePatientChartAction"
- scope="prototype">
- <property name="patientChartService"
- ref="org.hisp.dhis.patientchart.PatientChartService" />
- </bean>
-
- <bean id="org.hisp.dhis.patient.action.patientchart.GetPatientChartAction"
- class="org.hisp.dhis.patient.action.patientchart.GetPatientChartAction"
- scope="prototype">
- <property name="patientChartService"
- ref="org.hisp.dhis.patientchart.PatientChartService" />
- <property name="programStageDataElementService"
- ref="org.hisp.dhis.program.ProgramStageDataElementService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.patient.action.patientchart.GetPatientChartListAction"
- class="org.hisp.dhis.patient.action.patientchart.GetPatientChartListAction"
- scope="prototype">
- <property name="patientChartService"
- ref="org.hisp.dhis.patientchart.PatientChartService" />
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.patient.action.patientchart.ShowAddPatientChartFormAction"
- class="org.hisp.dhis.patient.action.patientchart.ShowAddPatientChartFormAction"
- scope="prototype">
- <property name="programService" ref="org.hisp.dhis.program.ProgramService" />
- <property name="programStageDataElementService"
- ref="org.hisp.dhis.program.ProgramStageDataElementService" />
- </bean>
-
- <bean id="org.hisp.dhis.patient.action.patientchart.UpdatePatientChartAction"
- class="org.hisp.dhis.patient.action.patientchart.UpdatePatientChartAction"
- scope="prototype">
- <property name="patientChartService"
- ref="org.hisp.dhis.patientchart.PatientChartService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- </bean>
-
- <bean
- id="org.hisp.dhis.patient.action.patientchart.ValidatePatientChartAction"
- class="org.hisp.dhis.patient.action.patientchart.ValidatePatientChartAction"
- scope="prototype">
- <property name="patientChartService"
- ref="org.hisp.dhis.patientchart.PatientChartService" />
- </bean>
-
</beans>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2012-03-22 03:15:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2012-03-23 05:58:50 +0000
@@ -938,65 +938,5 @@
<param name="requiredAuthorities">F_PROGRAM_VALIDATION</param>
</action>
- <!-- Patient chart -->
-
- <action name="patientChartList"
- class="org.hisp.dhis.patient.action.patientchart.GetPatientChartListAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-patient/patientChartList.vm</param>
- <param name="javascripts">javascript/patientChart.js</param>
- </action>
-
- <action name="showAddPatientChart"
- class="org.hisp.dhis.patient.action.patientchart.ShowAddPatientChartFormAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-patient/addPatientChartForm.vm</param>
- <param name="stylesheets">style/basic.css</param>
- </action>
-
- <action name="addPatientChart"
- class="org.hisp.dhis.patient.action.patientchart.AddPatientChartAction">
- <result name="success" type="redirect">
- patientChartList.action?programId=${programId}</result>
- <param name="requiredAuthorities">F_PROGRAM_ADD</param>
- </action>
-
- <action name="showUpdatePatientChart"
- class="org.hisp.dhis.patient.action.patientchart.GetPatientChartAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-patient/updatePatientChartForm.vm</param>
- <param name="stylesheets">style/basic.css</param>
- </action>
-
- <action name="updatePatientChart"
- class="org.hisp.dhis.patient.action.patientchart.UpdatePatientChartAction">
- <result name="success" type="redirect">
- patientChartList.action?programId=${programId}</result>
- <param name="requiredAuthorities">F_PROGRAM_ADD</param>
- </action>
-
- <action name="removePatientChart"
- class="org.hisp.dhis.patient.action.patientchart.DeletePatientChartAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
- <param name="requiredAuthorities">F_PROGRAM_ADD</param>
- </action>
-
- <action name="getPatientChart"
- class="org.hisp.dhis.patient.action.patientchart.GetPatientChartAction">
- <result name="success" type="velocity-json">
- /dhis-web-maintenance-patient/responsePatientChart.vm</result>
- <param name="requiredAuthorities">F_PROGRAM_ADD</param>
- </action>
-
- <action name="validatePatientChart"
- class="org.hisp.dhis.patient.action.patientchart.ValidatePatientChartAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
- <result name="input" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseInput.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
</package>
</struts>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientChartForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientChartForm.vm 2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientChartForm.vm 1970-01-01 00:00:00 +0000
@@ -1,79 +0,0 @@
-<script type="text/javascript" src="javascript/addPatientChartForm.js"></script>
-
-<h3>$i18n.getString( "create_new_patient_chart" )</h3>
-
-<form id="addPatientChartForm" name="addPatientChartForm" method="post" action="addPatientChart.action">
-<input type='hidden' id='programId' name='programId' value='$programId'>
-
-<table>
- <tr>
- <th colspan="2">$i18n.getString( "patient_chart_details" )</th>
- </tr>
- <tr>
- <td><label for="title">$i18n.getString( "title" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="title" name="title" class="{validate:{required:true,minlength:4}}"></td>
- </tr>
-
- <tr>
- <td><label for="type">$i18n.getString( "chart_type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td>
- <select id="type" name="type">
- <option value="bar">$i18n.getString( "bar_chart" )</option>
- <option value="bar3d">$i18n.getString( "bar3d_chart" )</option>
- <option value="line">$i18n.getString( "line_chart" )</option>
- <option value="line3d">$i18n.getString( "line3d_chart" )</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="type">$i18n.getString( "chart_size" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td>
- <select id="size" name="size" >
- <option value="normal"#if ( $!chart.size == "normal" ) selected#end>$i18n.getString( "normal" )</option>
- <option value="wide"#if ( $!chart.size == "wide" ) selected#end>$i18n.getString( "wide" )</option>
- <option value="tall"#if ( $!chart.size == "tall" ) selected#end>$i18n.getString( "tall" )</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="regression">$i18n.getString( "include_regression_line" )</label></td>
- <td><input type="checkbox" id="regression" name="regression" value="true" ></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
-
- <!-- dataelements -->
-
- <tr>
- <td>$i18n.getString( "value_x_dataelements" ) <em title="$i18n.getString( "required" )" class="required">*</em></td>
- <td>
- <select id="dataElementId" name="dataElementId" class="{validate:{required:true}}">
- <option value="">$i18n.getString('please_select')</option>
- #foreach( $dataElement in $dataElements )
- <option value="$dataElement.id">$dataElement.name</option>
- #end
- </select>
- </td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td></td>
- <td>
- <input type="submit" value="$i18n.getString( 'save' )" />
- <input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='patientChartList.action?programId=$programId'" />
- </td>
- </tr>
-
-</table>
-
-</form>
-
-<span id="message"></span>
-
-<script type="text/javascript">
- var i18n_must_select_one_dataelement = '$encoder.jsEscape( $i18n.getString( "must_select_one_dataelement" ), "'")';
-</script>
-
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientChartForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientChartForm.js 2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientChartForm.js 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-jQuery(document).ready( function(){
- validation( 'addPatientChartForm', function( form ){
- form.submit();
- });
- checkValueIsExist( "title", "validatePatientChart.action");
-});
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientChart.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientChart.js 2012-03-13 09:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientChart.js 1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
-
-function showPatientChartDetails( patientChartId )
-{
- jQuery.getJSON( "getPatientChart.action", {
- id:patientChartId
- }, function( json ){
- setInnerHTML( 'titleField', json.title );
-
- var typeMap = {
- 'bar' : i18n_bar_chart,
- 'bar3d' : i18n_bar3d_chart,
- 'line' : i18n_line_chart,
- 'line3d' : i18n_line3d_chart
- };
- var type = json.type;
- setInnerHTML( 'typeField', typeMap[type] );
-
- var sizeMap = {
- 'normal' : i18n_normal,
- 'wide' : i18n_wide,
- 'tall' : i18n_tall
- };
- var size = json.size;
- setInnerHTML( 'sizeField', sizeMap[size] );
-
- var regression = ( json.regression == 'true') ? i18n_yes : i18n_no;
-
- setInnerHTML( 'regressionField', regression );
- setInnerHTML( 'dataElementField', json.dataElement );
- showDetails();
- });
-}
-
-// -----------------------------------------------------------------------------
-// Remove Patient Identifier Type
-// -----------------------------------------------------------------------------
-
-function removePatientChart( patientChartId, name )
-{
- removeItem( patientChartId, name, i18n_confirm_delete, 'removePatientChart.action' );
-}
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientChartForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientChartForm.js 2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientChartForm.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-jQuery(document).ready( function(){
- validation( 'updatePatientChartForm', function( form ){
- form.submit();
- });
-
- checkValueIsExist( "title", "validatePatientChart.action", {id:'$patientChart.id'});
-});
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientChartList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientChartList.vm 2012-02-15 07:24:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientChartList.vm 1970-01-01 00:00:00 +0000
@@ -1,74 +0,0 @@
-<h3>$i18n.getString( "patient_chart_management" )</h3>
-<h4>$program.name</h4>
-
-<table class="mainPageTable">
- <tr>
- <td align="right">
- <input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientChart.action?programId=$program.id'" style="width:100px"><br>
- <input type="button" value="$i18n.getString( "back" )" onclick="window.location.href='program.action'" style="width:100px">
- </td>
- </tr>
- <tr>
- <td style="vertical-align:top">
-
- <table class="listTable" id="listTable">
- <col>
- <col width="100">
- <thead>
- <tr>
- <th>$i18n.getString( "name" )</th>
- <th class="{sorter: false}">$i18n.getString( "operations" )</th>
- </tr>
- </thead>
- <tbody id="list">
- #foreach( $patientChart in $patientCharts )
- <tr id="tr${patientChart.id}">
-
- <td>$encoder.htmlEncode( $patientChart.title )</td>
-
- <td style="text-align:center">
- <a href="showUpdatePatientChart.action?id=$patientChart.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
- <a href="javascript:removePatientChart( '$patientChart.id', '$encoder.jsEncode( $patientChart.title )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
- <a href="javascript:showPatientChartDetails( $patientChart.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
- </td>
-
- </tr>
- #end
-
- </tbody>
- </table>
- </td>
- <td style="width:20em; padding-left:2em; vertical-align:top">
-
- <div id="detailsArea" style="display:none">
- <div style="float:right">
- <a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_details' )"></a>
- </div>
- <p><label class="bold">$i18n.getString( "title" ):</label><br><span id="titleField"></span></p>
- <p><label class="bold">$i18n.getString( "chart_type" ):</label><br><span id="typeField"></span></p>
- <p><label class="bold">$i18n.getString( "chart_size" ):</label><br><span id="sizeField"></span></p>
- <p><label class="bold">$i18n.getString( "include_regression_line" ):</label><br><span id="regressionField"></span></p>
- <p><label class="bold">$i18n.getString( "value_x_dataelements" ):</label><br><span id="dataElementField"></span></p>
- </div>
-
- </td>
- </tr>
-</table>
-
-<script type="text/javascript">
- var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_prorgam" ) , "'" )';
- var i18n_bar_chart = '$encoder.jsEscape( $i18n.getString( "bar_chart" ) , "'" )';
- var i18n_bar3d_chart = '$encoder.jsEscape( $i18n.getString( "bar3d_chart" ) , "'" )';
- var i18n_line_chart = '$encoder.jsEscape( $i18n.getString( "line_chart" ) , "'" )';
- var i18n_line3d_chart = '$encoder.jsEscape( $i18n.getString( "line3d_chart" ) , "'" )';
- var i18n_normal = '$encoder.jsEscape( $i18n.getString( "normal" ) , "'" )';
- var i18n_wide = '$encoder.jsEscape( $i18n.getString( "wide" ) , "'" )';
- var i18n_tall = '$encoder.jsEscape( $i18n.getString( "tall" ) , "'" )';
- var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
- var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
-
- jQuery(document).ready(function(){
- tableSorter( 'listTable' );
- });
-
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2012-03-05 04:22:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2012-03-23 05:58:50 +0000
@@ -29,7 +29,6 @@
#end
<a href="showUpdateProgramForm.action?id=$program.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
<a href="programStage.action?id=$program.id" title="$i18n.getString( 'view_program_stages' )"><img src="../images/add_section.png" alt="$i18n.getString( 'view_stage_management' )"></a>
- <a href="patientChartList.action?programId=$program.id" title="$i18n.getString( 'patient_chart_management' )"><img src="../images/add_to_dashboard.png" alt="$i18n.getString( 'remove' )"></a>
<a href="javascript:removeProgram( '$program.id', '$encoder.jsEncode( $program.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
<a href="javascript:showProgramDetails( $program.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
</td>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientChart.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientChart.vm 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientChart.vm 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-{
- "id":"$patientChart.id",
- "title":"$!encoder.jsEncode( ${patientChart.title} )",
- "type": "$!encoder.jsEncode( ${patientChart.type} )",
- "size": "$patientChart.size",
- "regression": "$patientChart.regression",
- "dataElement": "$!encoder.jsEncode( ${patientChart.dataElement.name} )"
-}
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientChartForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientChartForm.vm 2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientChartForm.vm 1970-01-01 00:00:00 +0000
@@ -1,77 +0,0 @@
-<script type="text/javascript" src="javascript/updatePatientChartForm.js"></script>
-
-<h3>$i18n.getString( "edit_patient_chart" )</h3>
-
-<form id="updatePatientChartForm" name="updatePatientChartForm" method="post" action="updatePatientChart.action">
-<input type='hidden' id='id' name='id' value='$patientChart.id'>
-
-<table>
- <tr>
- <th colspan="2">$i18n.getString( "patient_chart_details" )</th>
- </tr>
- <tr>
- <td><label for="title">$i18n.getString( "title" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="title" name="title" value='$patientChart.title' class="{validate:{required:true,minlength:4}}"></td>
- </tr>
-
- <tr>
- <td><label for="type">$i18n.getString( "chart_type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td>
- <select id="type" name="type" >
- <option value="bar" #if($patientChart.type=='bar') selected #end>$i18n.getString( "bar_chart" )</option>
- <option value="bar3d" #if($patientChart.type=='bar3d') selected #end>$i18n.getString( "bar3d_chart" )</option>
- <option value="line" #if($patientChart.type=='line') selected #end>$i18n.getString( "line_chart" )</option>
- <option value="line3d" #if($patientChart.type=='line3d') selected #end>$i18n.getString( "line3d_chart" )</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="type">$i18n.getString( "chart_size" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td>
- <select id="size" name="size" >
- <option value="normal" #if ( $!patientChart.size == "normal" ) selected #end>$i18n.getString( "normal" )</option>
- <option value="wide" #if ( $!patientChart.size == "wide" ) selected #end>$i18n.getString( "wide" )</option>
- <option value="tall" #if ( $!patientChart.size == "tall" ) selected #end>$i18n.getString( "tall" )</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="regression">$i18n.getString( "include_regression_line" )</label></td>
- <td><input type="checkbox" id="regression" name="regression" value="true" #if ( $!patientChart.regression == "true" ) checked #end></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
-
- <!-- dataelements -->
-
- <tr>
- <td>$i18n.getString( "value_x_dataelements" ) <em title="$i18n.getString( "required" )" class="required">*</em></td>
- <td>
- <select id="dataElementId" name="dataElementId" class="{validate:{required:true}}">
- <option value="">$i18n.getString('please_select')</option>
- #foreach( $dataElement in $dataElements )
- <option value="$dataElement.id" #if( $!patientChart.dataElement.id == $dataElement.id ) selected #end>$dataElement.name</option>
- #end
- </select>
- </td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td></td>
- <td>
- <input type="submit" value="$i18n.getString( 'save' )" />
- <input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='patientChartList.action?programId=$patientChart.program.id'" />
- </td>
- </tr>
-</table>
-
-</form>
-
-<span id="message"></span>
-
-<script type="text/javascript">
- var i18n_must_select_one_dataelement = '$encoder.jsEscape( $i18n.getString( "must_select_one_dataelement" ), "'")';
-</script>