Update of /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/oscar/oscarEncounter/immunization/config/pageUtil
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22738
Modified Files:
EctImmCreateImmunizationSetConfigAction.java
Log Message:
Change method perform to execute
Index: EctImmCreateImmunizationSetConfigAction.java
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/oscar/oscarEncounter/immunization/config/pageUtil/EctImmCreateImmunizationSetConfigAction.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** EctImmCreateImmunizationSetConfigAction.java 21 Jul 2004 14:58:59 -0000 1.5
--- EctImmCreateImmunizationSetConfigAction.java 28 Dec 2004 17:05:00 -0000 1.6
***************
*** 1,24 ****
/*
! *
* Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. *
! * This software is published under the GPL GNU General Public License.
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version. *
! * This program is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License
! * along with this program; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
! *
* <OSCAR TEAM>
! *
! * This software was written for the
! * Department of Family Medicine
! * McMaster Unviersity
! * Hamilton
! * Ontario, Canada
*/
package oscar.oscarEncounter.immunization.config.pageUtil;
--- 1,24 ----
/*
! *
* Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. *
! * This software is published under the GPL GNU General Public License.
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version. *
! * This program is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License
! * along with this program; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
! *
* <OSCAR TEAM>
! *
! * This software was written for the
! * Department of Family Medicine
! * McMaster University
! * Hamilton
! * Ontario, Canada
*/
package oscar.oscarEncounter.immunization.config.pageUtil;
***************
*** 34,171 ****
import oscar.oscarEncounter.pageUtil.EctSessionBean;
! public class EctImmCreateImmunizationSetConfigAction extends Action
! {
!
! public String webizeNewLines(String str)
! {
! String temp = str.replaceAll("\n", "<br>");
! return temp;
! }
!
! public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
! throws ServletException, IOException
! {
! EctSessionBean bean = (EctSessionBean)request.getSession().getAttribute("EctSessionBean");
! String providerNo = bean.providerNo;
! Enumeration e = request.getParameterNames();
! Vector headingVec = new Vector();
! Vector immunizationVec = new Vector();
! Vector yearAgeVec = new Vector();
! String setName = ((EctImmCreateImmunizationSetConfigForm)form).getName();
! String headers = "true";
! String str;
! for(; e.hasMoreElements(); System.out.println("str ".concat(String.valueOf(String.valueOf(str)))))
! {
! str = (String)e.nextElement();
! if(str.startsWith("heading"))
! {
! headingVec.add(str);
! continue;
! }
! if(str.startsWith("immunization"))
! {
! immunizationVec.add(str);
! continue;
! }
! boolean flag1;
! if(str.startsWith("yearAge"))
! yearAgeVec.add(str);
! else
! flag1 = false;
! }
!
! //System.out.println(String.valueOf(String.valueOf((new StringBuffer("There are: headings = ")).append(headingVec.size()).append(" imms = ").append(immunizationVec.size()).append(" yearAge = ").append(yearAgeVec.size()))));
! int flag = 0;
! Vector headingVector = new Vector();
! headingVector.setSize(headingVec.size());
! for(int u = 0; u < headingVec.size(); u++)
! {
! String headingString = (String)headingVec.elementAt(u);
! if(!headingString.equals(""))
! flag = 1;
! String gett = headingString.substring(9);
! StringTokenizer stringTokenizer = new StringTokenizer(gett, "D");
! String shouldBeCol = (String)stringTokenizer.nextElement();
! String headVal = request.getParameter(headingString);
! headVal = headVal.trim();
! headVal = webizeNewLines(headVal);
! EctImmHeading header = new EctImmHeading();
! header.headVal = headVal;
! int forTheCol = 0;
! try
! {
! forTheCol = Integer.parseInt(shouldBeCol);
! }
! catch(Exception colE)
! {
! System.out.println("Kick'm out");
! }
! header.col = forTheCol;
! headingVector.setElementAt(header, header.col - 1);
! }
!
! Vector immunizationVector = new Vector();
! immunizationVector.setSize(immunizationVec.size());
! for(int i = 0; i < immunizationVec.size(); i++)
! {
! EctImmImmunizations immunization = new EctImmImmunizations();
! String colHead = (String)immunizationVec.elementAt(i);
! String immName = (String)immunizationVec.elementAt(i);
! String gett = immName.substring(12);
! StringTokenizer stringTokenizer = new StringTokenizer(gett, "D");
! String shouldBeRow = (String)stringTokenizer.nextElement();
! int forTheRow = 0;
! try
! {
! forTheRow = Integer.parseInt(shouldBeRow);
! }
! catch(Exception colE)
! {
! System.out.println("Kick'm out");
! }
! String immVal = request.getParameter(immName);
! immVal = immVal.trim();
! immunization.immunizationName = immVal;
! immunization.row = forTheRow;
! immunization.indexAge = new Vector();
! immunizationVector.setElementAt(immunization, immunization.row - 1);
! }
!
! for(int q = 0; q < immunizationVector.size(); q++)
! {
! EctImmImmunizations immunization = (EctImmImmunizations)immunizationVector.elementAt(q);
! //System.out.println(String.valueOf(String.valueOf((new StringBuffer("immunization ")).append(immunization.immunizationName).append(" at row index ").append(immunization.row).append(" q = ").append(q))));
! }
!
! Vector yearAgeVector = new Vector();
! yearAgeVector.setSize(yearAgeVec.size());
! for(int i = 0; i < yearAgeVec.size(); i++)
! {
! String yearAgeName = (String)yearAgeVec.elementAt(i);
! String subbedString = yearAgeName.substring(7);
! StringTokenizer stringTokenizer = new StringTokenizer(subbedString, "D");
! String rowToBeParsed = (String)stringTokenizer.nextElement();
! String colToBeParsed = (String)stringTokenizer.nextElement();
! int intRow = 0;
! int intCol = 0;
! try
! {
! intRow = Integer.parseInt(rowToBeParsed);
! intCol = Integer.parseInt(colToBeParsed);
! }
! catch(Exception rowAndCole)
! {
! System.out.println("kickum out");
! }
! EctImmImmunizations immunizations = (EctImmImmunizations)immunizationVector.elementAt(intRow - 1);
! immunizations.indexAge.add(colToBeParsed);
! //System.out.println(String.valueOf(String.valueOf((new StringBuffer("year Age ")).append(yearAgeName).append(" subbedString ").append(subbedString).append(" the row i get ").append(rowToBeParsed).append(" the col i get ").append(colToBeParsed))));
! }
!
! EctImmImmunizationSetWriter immunizationSetWriter = new EctImmImmunizationSetWriter();
! immunizationSetWriter.doWrite(flag, headingVector, immunizationVector, yearAgeVec, setName, providerNo);
! request.setAttribute("cols", "2");
! request.setAttribute("rows", "2");
! return mapping.findForward("success");
! }
}
--- 34,155 ----
import oscar.oscarEncounter.pageUtil.EctSessionBean;
! public class EctImmCreateImmunizationSetConfigAction extends Action {
!
! public String webizeNewLines(String str) {
! String temp = str.replaceAll("\n", "<br>");
! return temp;
! }
!
! public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
! throws ServletException, IOException {
! EctSessionBean bean = (EctSessionBean)request.getSession().getAttribute("EctSessionBean");
! String providerNo = bean.providerNo;
! Enumeration e = request.getParameterNames();
! Vector headingVec = new Vector();
! Vector immunizationVec = new Vector();
! Vector yearAgeVec = new Vector();
! String setName = ((EctImmCreateImmunizationSetConfigForm)form).getName();
! String headers = "true";
! String str;
! for(; e.hasMoreElements(); System.out.println("str ".concat(String.valueOf(String.valueOf(str))))) {
! str = (String)e.nextElement();
! if(str.startsWith("heading")) {
! headingVec.add(str);
! continue;
! }
! if(str.startsWith("immunization")) {
! immunizationVec.add(str);
! continue;
! }
! boolean flag1;
! if(str.startsWith("yearAge"))
! yearAgeVec.add(str);
! else
! flag1 = false;
! }
!
! //System.out.println(String.valueOf(String.valueOf((new StringBuffer("There are: headings = ")).append(headingVec.size()).append(" imms = ").append(immunizationVec.size()).append(" yearAge = ").append(yearAgeVec.size()))));
! int flag = 0;
! Vector headingVector = new Vector();
! headingVector.setSize(headingVec.size());
! for(int u = 0; u < headingVec.size(); u++) {
! String headingString = (String)headingVec.elementAt(u);
! if(!headingString.equals(""))
! flag = 1;
! String gett = headingString.substring(9);
! StringTokenizer stringTokenizer = new StringTokenizer(gett, "D");
! String shouldBeCol = (String)stringTokenizer.nextElement();
! String headVal = request.getParameter(headingString);
! headVal = headVal.trim();
! headVal = webizeNewLines(headVal);
! EctImmHeading header = new EctImmHeading();
! header.headVal = headVal;
! int forTheCol = 0;
! try {
! forTheCol = Integer.parseInt(shouldBeCol);
! }
! catch(Exception colE) {
! System.out.println("Kick'm out");
! }
! header.col = forTheCol;
! headingVector.setElementAt(header, header.col - 1);
! }
!
! Vector immunizationVector = new Vector();
! immunizationVector.setSize(immunizationVec.size());
! for(int i = 0; i < immunizationVec.size(); i++) {
! EctImmImmunizations immunization = new EctImmImmunizations();
! String colHead = (String)immunizationVec.elementAt(i);
! String immName = (String)immunizationVec.elementAt(i);
! String gett = immName.substring(12);
! StringTokenizer stringTokenizer = new StringTokenizer(gett, "D");
! String shouldBeRow = (String)stringTokenizer.nextElement();
! int forTheRow = 0;
! try {
! forTheRow = Integer.parseInt(shouldBeRow);
! }
! catch(Exception colE) {
! System.out.println("Kick'm out");
! }
! String immVal = request.getParameter(immName);
! immVal = immVal.trim();
! immunization.immunizationName = immVal;
! immunization.row = forTheRow;
! immunization.indexAge = new Vector();
! immunizationVector.setElementAt(immunization, immunization.row - 1);
! }
!
! for(int q = 0; q < immunizationVector.size(); q++) {
! EctImmImmunizations immunization = (EctImmImmunizations)immunizationVector.elementAt(q);
! //System.out.println(String.valueOf(String.valueOf((new StringBuffer("immunization ")).append(immunization.immunizationName).append(" at row index ").append(immunization.row).append(" q = ").append(q))));
! }
!
! Vector yearAgeVector = new Vector();
! yearAgeVector.setSize(yearAgeVec.size());
! for(int i = 0; i < yearAgeVec.size(); i++) {
! String yearAgeName = (String)yearAgeVec.elementAt(i);
! String subbedString = yearAgeName.substring(7);
! StringTokenizer stringTokenizer = new StringTokenizer(subbedString, "D");
! String rowToBeParsed = (String)stringTokenizer.nextElement();
! String colToBeParsed = (String)stringTokenizer.nextElement();
! int intRow = 0;
! int intCol = 0;
! try {
! intRow = Integer.parseInt(rowToBeParsed);
! intCol = Integer.parseInt(colToBeParsed);
! }
! catch(Exception rowAndCole) {
! System.out.println("kickum out");
! }
! EctImmImmunizations immunizations = (EctImmImmunizations)immunizationVector.elementAt(intRow - 1);
! immunizations.indexAge.add(colToBeParsed);
! //System.out.println(String.valueOf(String.valueOf((new StringBuffer("year Age ")).append(yearAgeName).append(" subbedString ").append(subbedString).append(" the row i get ").append(rowToBeParsed).append(" the col i get ").append(colToBeParsed))));
! }
!
! EctImmImmunizationSetWriter immunizationSetWriter = new EctImmImmunizationSetWriter();
! immunizationSetWriter.doWrite(flag, headingVector, immunizationVector, yearAgeVec, setName, providerNo);
! request.setAttribute("cols", "2");
! request.setAttribute("rows", "2");
! return mapping.findForward("success");
! }
}
|