You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
(35) |
May
(20) |
Jun
(15) |
Jul
(201) |
Aug
(514) |
Sep
(283) |
Oct
(189) |
Nov
(274) |
Dec
(290) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(388) |
Feb
(460) |
Mar
(566) |
Apr
(58) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: joel <jl...@us...> - 2006-08-10 19:24:12
|
Update of /cvsroot/tap-apps/opentapas_r1/casa/jboss_conf/default/conf In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv2435/casa/jboss_conf/default/conf Modified Files: login-config.xml Log Message: Fixed reference to HibernateLogin module so that it points to updated path Index: login-config.xml =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/casa/jboss_conf/default/conf/login-config.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** login-config.xml 29 Mar 2006 03:56:46 -0000 1.1 --- login-config.xml 10 Aug 2006 19:24:09 -0000 1.2 *************** *** 155,159 **** <application-policy name = "other"> <authentication> ! <login-module code = "org.tapas.casa.util.HibernateLoginModule" flag = "required" /> </authentication> </application-policy> --- 155,159 ---- <application-policy name = "other"> <authentication> ! <login-module code = "org.opentapas.casa.util.HibernateLoginModule" flag = "required" /> </authentication> </application-policy> |
|
From: Maike <mai...@us...> - 2006-04-26 23:13:04
|
Update of /cvsroot/tap-apps/opentapas_r1/commons/src/org/opentapas/commons/commandImpl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7765/src/org/opentapas/commons/commandImpl Added Files: DeleteObjectsCommand.java Log Message: port changes over to r1 --- NEW FILE: DeleteObjectsCommand.java --- /** * * Copyright (c) 2005. Department of Family Practice, University of British Columbia 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. * TAPAS TEAM * This software was written for the * Department of Family Practice * University of British Columbia * Vancouver,BC Canada * */ package org.opentapas.commons.commandImpl; import org.opentapas.commons.command.*; /** * The SaveObjectsCommand is responsible for persisting the state of an arbitrary object * @author Joel Legris */ public class DeleteObjectsCommand extends Command { private Object persistenObject; static final long serialVersionUID = -4100604921304183645L; private Integer userId; public DeleteObjectsCommand() { } /** * Deletes the supplied Object from the persistent store. * @param obj Object - An arbitrary object whose state must be persisted * @return boolean - true if the save operation was succesful, otherwise false */ public Object deleteObjects(Object obj,Integer userId){ this.userId = userId; this.persistenObject = obj; System.out.println("Deleting: " + obj + " pkId: " + ((org.opentapas.commons.rim.Any)obj).getPkId()); return this.execute(); } public void setPersistenObject(String persistenObject) { this.persistenObject = persistenObject; } public Object getPersistenObject() { return persistenObject; } public void setUserId(Integer userId) { this.userId = userId; } public Integer getUserId() { return userId; } } |
|
From: Maike <mai...@us...> - 2006-04-26 23:11:34
|
Update of /cvsroot/tap-apps/opentapas_r1/casa/src/org/opentapas/casa/handlers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6656/src/org/opentapas/casa/handlers Added Files: DeleteObjectsHandler.java Log Message: port changes over to r1 --- NEW FILE: DeleteObjectsHandler.java --- /** * Copyright (c) 2005. Department of Family Practice, University of British Columbia 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. * TAPAS TEAM * This software was written for the * Department of Family Practice * University of British Columbia * Vancouver,BC Canada * TAPAS TEAM */ package org.opentapas.casa.handlers; import org.opentapas.casa.persistence.*; import org.opentapas.commons.command.*; import org.opentapas.commons.commandImpl.*; import org.opentapas.commons.rim.*; import java.util.HashSet; public class DeleteObjectsHandler implements CommandHandler { /** * Fulfills the contract specified byt the SaveObjectsCommand * @param cmd Command * @return Object */ public Object executeCommand(Command cmd) { DeleteObjectsCommand dcmd = (DeleteObjectsCommand) cmd; DocumentDAO dao = new DocumentDAO(); Object ret = dao.deleteObject(dcmd.getPersistenObject()); return ret; } } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:51
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/alerter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/alerter Modified Files: AlerterSideFunction.java AlerterSidePanel.java Log Message: port changes over to r1 Index: AlerterSidePanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/alerter/AlerterSidePanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AlerterSidePanel.java 23 Mar 2006 01:50:55 -0000 1.1 --- AlerterSidePanel.java 26 Apr 2006 23:10:18 -0000 1.2 *************** *** 47,56 **** public class AlerterSidePanel extends javax.swing.JPanel { ! /** Creates new form AlertsFocusPanel */ public AlerterSidePanel() { initComponents(); } ! /** This method is called from within the constructor to * initialize the form. --- 47,56 ---- public class AlerterSidePanel extends javax.swing.JPanel { ! /** Creates new form AlertsFocusPanel */ public AlerterSidePanel() { initComponents(); } ! /** This method is called from within the constructor to * initialize the form. *************** *** 128,132 **** }// </editor-fold>//GEN-END:initComponents ! public void setRow(java.util.Date date, String alert, String origin) { Observation obs = new Observation(); --- 128,132 ---- }// </editor-fold>//GEN-END:initComponents ! public void setRow(java.util.Date date, String alert, String origin) { Observation obs = new Observation(); *************** *** 137,141 **** this.setRow(obs); } ! /** * Adds a new row with the data from the clinical recommendation --- 137,141 ---- this.setRow(obs); } ! /** * Adds a new row with the data from the clinical recommendation *************** *** 148,160 **** table.getColumnModel().getColumn(0).setCellRenderer(Controller.getInstance().getAlertBlueRenderer()); } ! public int getNumAlerts() { return table.getRowCount(); } ! public void clear() { ((DefaultTableModel) table.getModel()).setRowCount(0); } ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane scrollPane; --- 148,160 ---- table.getColumnModel().getColumn(0).setCellRenderer(Controller.getInstance().getAlertBlueRenderer()); } ! public int getNumAlerts() { return table.getRowCount(); } ! public void clear() { ((DefaultTableModel) table.getModel()).setRowCount(0); } ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane scrollPane; *************** *** 163,166 **** private javax.swing.JPanel titlePanel; // End of variables declaration//GEN-END:variables ! } --- 163,166 ---- private javax.swing.JPanel titlePanel; // End of variables declaration//GEN-END:variables ! } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:32
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/user Modified Files: UserFunction.java UserFunctionPanel.java Log Message: port changes over to r1 Index: UserFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/user/UserFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UserFunctionPanel.java 23 Mar 2006 01:51:49 -0000 1.1 --- UserFunctionPanel.java 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 49,53 **** public class UserFunctionPanel extends javax.swing.JPanel { ! /** * Creates new form UserFunctionPanel --- 49,53 ---- public class UserFunctionPanel extends javax.swing.JPanel { ! /** [...1007 lines suppressed...] ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel PlusMinusPanel1; --- 1800,1804 ---- private boolean toBeCommitted = false; //mod private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel PlusMinusPanel1; *************** *** 1873,1876 **** private javax.swing.JTable userTable; // End of variables declaration//GEN-END:variables ! } --- 1873,1876 ---- private javax.swing.JTable userTable; // End of variables declaration//GEN-END:variables ! } Index: UserFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/user/UserFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UserFunction.java 23 Mar 2006 01:51:49 -0000 1.1 --- UserFunction.java 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 56,80 **** */ private boolean active = false; ! /** * Name of the function */ private String functionName = "Manage Users"; ! /** * Short name of the function this panel performs (i.e. for use on tabs) */ private String functionShortName = "Users"; ! /** * Array of Sidepanels holding the Sidepanels for this function (not used at the moment) */ private SidePanel[] SidePanels = null; ! /** * The GUI part of this function */ private UserFunctionPanel panel; ! private Object[] tapasUserArray = null; private Object[] addresses = new Object[0]; --- 56,80 ---- */ private boolean active = false; ! /** * Name of the function */ private String functionName = "Manage Users"; ! /** * Short name of the function this panel performs (i.e. for use on tabs) */ private String functionShortName = "Users"; ! /** * Array of Sidepanels holding the Sidepanels for this function (not used at the moment) */ private SidePanel[] SidePanels = null; ! /** * The GUI part of this function */ private UserFunctionPanel panel; ! private Object[] tapasUserArray = null; private Object[] addresses = new Object[0]; *************** *** 82,91 **** private Object[] tapasGroups = new Object[0]; private Object[] tapasRoles = new Object[0]; ! ! private ADComparator adComparator = new ADComparator(); private TELComparator telComparator = new TELComparator(); private TapasUserComparator userComparator = new TapasUserComparator(); ! /** * Creates a new GroupingFunction object. --- 82,91 ---- private Object[] tapasGroups = new Object[0]; private Object[] tapasRoles = new Object[0]; ! ! private ADComparator adComparator = new ADComparator(); private TELComparator telComparator = new TELComparator(); private TapasUserComparator userComparator = new TapasUserComparator(); ! /** * Creates a new GroupingFunction object. *************** *** 94,98 **** panel = new UserFunctionPanel(this, demAddTypeList, demCountryList, demProvList, demPrefixList, demTelUseList, demTelTypeList); } ! /** * Returns whether function is active (not used now) --- 94,98 ---- panel = new UserFunctionPanel(this, demAddTypeList, demCountryList, demProvList, demPrefixList, demTelUseList, demTelTypeList); } ! /** * Returns whether function is active (not used now) *************** *** 102,106 **** return active; } ! /** * Sets function active or not (not used now) --- 102,106 ---- return active; } ! /** * Sets function active or not (not used now) *************** *** 110,114 **** active = isActive; } ! /** * Returns the name of the function --- 110,114 ---- active = isActive; } ! /** * Returns the name of the function *************** *** 118,122 **** return functionName; } ! /** * Sets the name of the function --- 118,122 ---- return functionName; } ! /** * Sets the name of the function *************** *** 126,130 **** functionName = isFunctionName; } ! /** * Gets the name of the function --- 126,130 ---- functionName = isFunctionName; } ! /** * Gets the name of the function *************** *** 134,138 **** return functionShortName; } ! /** * Sets the short name of the function --- 134,138 ---- return functionShortName; } ! /** * Sets the short name of the function *************** *** 142,146 **** functionShortName = isFunctionShortName; } ! /** * returns the side panel at [index] --- 142,146 ---- functionShortName = isFunctionShortName; } ! /** * returns the side panel at [index] *************** *** 151,155 **** return SidePanels[index]; } ! /** * Set sidepanel at [index] --- 151,155 ---- return SidePanels[index]; } ! /** * Set sidepanel at [index] *************** *** 160,164 **** SidePanels[index] = isSidePanel; } ! /** * Returns the panel / GUI part of the function --- 160,164 ---- SidePanels[index] = isSidePanel; } ! /** * Returns the panel / GUI part of the function *************** *** 168,172 **** return panel; } ! /** * Sets the panel / GUI part of the function --- 168,172 ---- return panel; } ! /** * Sets the panel / GUI part of the function *************** *** 176,180 **** this.panel = (UserFunctionPanel) panel; } ! protected void save(int index){ TapasUser tapasUser = (TapasUser) tapasUserArray[index]; --- 176,180 ---- this.panel = (UserFunctionPanel) panel; } ! protected void save(int index){ TapasUser tapasUser = (TapasUser) tapasUserArray[index]; *************** *** 196,208 **** loadInEditor(index); } ! public void populate(){ // for standardisation reasons :-) list(); } ! public void list(){ panel.clear(); ! List tapasUsers = Controller.getInstance().getTapasUsers(); if (panel.isActiveCheckBoxSelected()){ --- 196,208 ---- loadInEditor(index); } ! public void populate(){ // for standardisation reasons :-) list(); } ! public void list(){ panel.clear(); ! List tapasUsers = Controller.getInstance().getTapasUsers(); if (panel.isActiveCheckBoxSelected()){ *************** *** 216,220 **** tapasUsers = activeUsers; } ! if (panel.getFindTextField().length() != 0){ List filteredUsers = new ArrayList(); --- 216,220 ---- tapasUsers = activeUsers; } ! if (panel.getFindTextField().length() != 0){ List filteredUsers = new ArrayList(); *************** *** 229,233 **** tapasUsers = filteredUsers; } ! tapasUserArray = tapasUsers.toArray(); Arrays.sort(tapasUserArray, userComparator); --- 229,233 ---- tapasUsers = filteredUsers; } ! tapasUserArray = tapasUsers.toArray(); Arrays.sort(tapasUserArray, userComparator); *************** *** 243,247 **** } } ! protected void loadInEditor(int index){ panel.clear(); --- 243,247 ---- } } ! protected void loadInEditor(int index){ panel.clear(); *************** *** 267,276 **** panel.setSuffixTextField(tapasUser.getThisProvider().getAssignedAuthor().getAssignedPerson().getName().getSuffix()); } ! panel.setAddressTableRows(addresses.length); //new panel.setTelecomTableRows(telecoms.length); //new panel.setGroupsTableRows(tapasGroups.length); //new panel.setRolesTableRows(tapasRoles.length); //new ! panel.setUserNameTextField(tapasUser.getName()); panel.setPasswordField(tapasUser.getPassword()); --- 267,276 ---- panel.setSuffixTextField(tapasUser.getThisProvider().getAssignedAuthor().getAssignedPerson().getName().getSuffix()); } ! panel.setAddressTableRows(addresses.length); //new panel.setTelecomTableRows(telecoms.length); //new panel.setGroupsTableRows(tapasGroups.length); //new panel.setRolesTableRows(tapasRoles.length); //new ! panel.setUserNameTextField(tapasUser.getName()); panel.setPasswordField(tapasUser.getPassword()); *************** *** 292,296 **** i); } ! } if (telecoms.length > 0){ --- 292,296 ---- i); } ! } if (telecoms.length > 0){ *************** *** 317,325 **** panel.addRoleRow(tr.getName(), i); } ! } panel.setReadOnly(false); panel.setSearchActive(false); //wop } ! private Object[] getGroupArrayForUser(TapasUser tu){ tapasGroups = Controller.getInstance().getTapasGroups().toArray(); --- 317,325 ---- panel.addRoleRow(tr.getName(), i); } ! } panel.setReadOnly(false); panel.setSearchActive(false); //wop } ! private Object[] getGroupArrayForUser(TapasUser tu){ tapasGroups = Controller.getInstance().getTapasGroups().toArray(); *************** *** 335,344 **** break; } ! } } return tav.toArray(); } ! private Object[] getRoleArrayForUser(TapasUser tu){ tapasRoles = Controller.getInstance().getTapasRoles().toArray(); --- 335,344 ---- break; } ! } } return tav.toArray(); } ! private Object[] getRoleArrayForUser(TapasUser tu){ tapasRoles = Controller.getInstance().getTapasRoles().toArray(); *************** *** 354,367 **** break; } ! } } return tav.toArray(); } ! protected void createNewUser(){ Controller.getInstance().populateProviderTable(0, tapasUserArray, 31); // 31 is first number of Mgtfunctions } ! public void addNewUser(Author provider){ TapasUser newTapasUser = new TapasUser(); --- 354,367 ---- break; } ! } } return tav.toArray(); } ! protected void createNewUser(){ Controller.getInstance().populateProviderTable(0, tapasUserArray, 31); // 31 is first number of Mgtfunctions } ! public void addNewUser(Author provider){ TapasUser newTapasUser = new TapasUser(); *************** *** 377,381 **** Controller.getInstance().synchroniseUsrmgt(); } ! protected void addAddress(int index, CE addType, CE prov, CE country) { AD newAd = new AD(); --- 377,381 ---- Controller.getInstance().synchroniseUsrmgt(); } ! protected void addAddress(int index, CE addType, CE prov, CE country) { AD newAd = new AD(); *************** *** 391,403 **** loadInEditor(index); } ! protected void removeAddress(int index, int index2) { TapasUser tapasUser = (TapasUser) tapasUserArray[index]; if (index2 > -1 && index2 < addresses.length) { tapasUser.getThisProvider().getAssignedAuthor().deleteAddress( (AD) addresses[index2]); loadInEditor(index); } } ! protected void addTelecom(int index, CE use, CE type) { TEL newTel = new TEL(); --- 391,404 ---- loadInEditor(index); } ! protected void removeAddress(int index, int index2) { TapasUser tapasUser = (TapasUser) tapasUserArray[index]; if (index2 > -1 && index2 < addresses.length) { tapasUser.getThisProvider().getAssignedAuthor().deleteAddress( (AD) addresses[index2]); + Controller.getInstance().deleteObject(addresses[index2]); loadInEditor(index); } } ! protected void addTelecom(int index, CE use, CE type) { TEL newTel = new TEL(); *************** *** 410,426 **** loadInEditor(index); } ! protected void removeTelecom(int index, int index2) { TapasUser tapasUser = (TapasUser) tapasUserArray[index]; if (index2 > -1 && index2 < telecoms.length) { tapasUser.getThisProvider().getAssignedAuthor().deleteTelecom( (TEL) telecoms[index2]); loadInEditor(index); } } ! protected void addRoleToUser(){ Controller.getInstance().displayRoles(tapasRoles); } ! public void addRole(TapasRole role){ int row = panel.getSelectedTableRow(); --- 411,428 ---- loadInEditor(index); } ! protected void removeTelecom(int index, int index2) { TapasUser tapasUser = (TapasUser) tapasUserArray[index]; if (index2 > -1 && index2 < telecoms.length) { tapasUser.getThisProvider().getAssignedAuthor().deleteTelecom( (TEL) telecoms[index2]); + Controller.getInstance().deleteObject(telecoms[index2]); loadInEditor(index); } } ! protected void addRoleToUser(){ Controller.getInstance().displayRoles(tapasRoles); } ! public void addRole(TapasRole role){ int row = panel.getSelectedTableRow(); *************** *** 433,437 **** //panel.enableSaveButton(true, false);//mod } ! protected void removeRolefromUser(int index){ int row = panel.getSelectedTableRow(); --- 435,439 ---- //panel.enableSaveButton(true, false);//mod } ! protected void removeRolefromUser(int index){ int row = panel.getSelectedTableRow(); *************** *** 444,452 **** loadInEditor(row); } ! protected void addGroupToUser(){ Controller.getInstance().displayGroups(tapasGroups); } ! public void addGroup(TapasGroup group){ int row = panel.getSelectedTableRow(); --- 446,454 ---- loadInEditor(row); } ! protected void addGroupToUser(){ Controller.getInstance().displayGroups(tapasGroups); } ! public void addGroup(TapasGroup group){ int row = panel.getSelectedTableRow(); *************** *** 459,463 **** //panel.enableSaveButton(true, false);//mod } ! protected void removeGroupfromUser(int index){ int row = panel.getSelectedTableRow(); --- 461,465 ---- //panel.enableSaveButton(true, false);//mod } ! protected void removeGroupfromUser(int index){ int row = panel.getSelectedTableRow(); *************** *** 470,483 **** loadInEditor(row); } ! protected void dateChanged(boolean saveButtonEnabled, boolean previous){ //mod Controller.getInstance().asterisker(saveButtonEnabled, previous); } ! protected int getNumberOfUsers(){ return tapasUserArray.length; } ! protected int getNumberOfActiveUsers(){ int nrOfActiveUsers = 0 ; --- 472,485 ---- loadInEditor(row); } ! protected void dateChanged(boolean saveButtonEnabled, boolean previous){ //mod Controller.getInstance().asterisker(saveButtonEnabled, previous); } ! protected int getNumberOfUsers(){ return tapasUserArray.length; } ! protected int getNumberOfActiveUsers(){ int nrOfActiveUsers = 0 ; *************** *** 488,508 **** return nrOfActiveUsers; } ! protected int getNumberOfTelecoms(){ return telecoms.length ; } ! protected int getNumberOfAddresses(){ return addresses.length ; } ! protected int getNumberOfRoles(){ return tapasRoles.length ; } ! protected int getNumberOfGroups(){ return tapasGroups.length ; } ! protected void restoreUserSidePanels(){ Controller.getInstance().restoreUserSidePanels(); --- 490,510 ---- return nrOfActiveUsers; } ! protected int getNumberOfTelecoms(){ return telecoms.length ; } ! protected int getNumberOfAddresses(){ return addresses.length ; } ! protected int getNumberOfRoles(){ return tapasRoles.length ; } ! protected int getNumberOfGroups(){ return tapasGroups.length ; } ! protected void restoreUserSidePanels(){ Controller.getInstance().restoreUserSidePanels(); |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:32
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/referring In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/referring Modified Files: ReferringFunction.java ReferringFunctionPanel.form ReferringFunctionPanel.java Log Message: port changes over to r1 Index: ReferringFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/referring/ReferringFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReferringFunction.java 23 Mar 2006 01:51:48 -0000 1.1 --- ReferringFunction.java 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 64,143 **** */ public class ReferringFunction implements UserCentricFunction { ! private boolean doLoad = true; //mod ! TapasUser currentUser; ! ! Object[] acts = null; ! ! private int userActs ; [...1043 lines suppressed...] ! protected int getNumberOfActs(){ ! return encounters == null ? 0 : encounters.size() ; //new } ! protected void gotoOrOpenClinicalDocument(){ try { ! String id = lookupPatientId((Encounter) encounters.get(panel.getSelectedTableRow())); List docs = Controller.getInstance().getCDAByPatientId(id); ClinicalDocument doc = (ClinicalDocument) docs.get(0); Controller.getInstance().gotoOrOpenClinicalDocument(doc); ! Controller.getInstance().selectReferrals((Encounter) encounters.get(panel.getSelectedTableRow())); } catch (java.lang.ArrayIndexOutOfBoundsException e) {} } ! private int cleanupRowNumber(int row){ //new ! return row >= getNumberOfActs() ? getNumberOfActs() - 1 : row ; } ! } Index: ReferringFunctionPanel.form =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/referring/ReferringFunctionPanel.form,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReferringFunctionPanel.form 23 Mar 2006 01:51:48 -0000 1.1 --- ReferringFunctionPanel.form 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 552,556 **** </Property> <Property name="horizontalAlignment" type="int" value="2"/> ! <Property name="text" type="java.lang.String" value="Referral Manager:"/> </Properties> <Constraints> --- 552,556 ---- </Property> <Property name="horizontalAlignment" type="int" value="2"/> ! <Property name="text" type="java.lang.String" value="Referral Manager (assigned to):"/> </Properties> <Constraints> *************** *** 836,839 **** --- 836,863 ---- </Events> </Component> + <Component class="javax.swing.JButton" name="removeButton"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="10" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Remove Assignment"/> + <Property name="enabled" type="boolean" value="false"/> + <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> + <Insets value="[2, 4, 2, 4]"/> + </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[132, 22]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[132, 20]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[132, 22]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="removeButtonActionPerformed"/> + </Events> + </Component> <Component class="javax.swing.JButton" name="reviewFullButton"> <Properties> Index: ReferringFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/referring/ReferringFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReferringFunctionPanel.java 23 Mar 2006 01:51:48 -0000 1.1 --- ReferringFunctionPanel.java 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 41,45 **** public class ReferringFunctionPanel extends javax.swing.JPanel { ! /** Creates new form MessagesFunctionPanel */ public ReferringFunctionPanel(ReferringFunction function, List refSpecialityList, List refUrgencyList, List refStatusList) { --- 41,45 ---- public class ReferringFunctionPanel extends javax.swing.JPanel { ! /** Creates new form MessagesFunctionPanel */ [...1136 lines suppressed...] private javax.swing.JLabel address1Label; *************** *** 1435,1438 **** --- 1476,1480 ---- private javax.swing.JTextField referredToTextField; private javax.swing.JLabel referredToTitleLabel; + private javax.swing.JButton removeButton; private javax.swing.JButton reviewFullButton; private javax.swing.JButton saveButton; *************** *** 1448,1451 **** private javax.swing.JLabel urgencyLabel; // End of variables declaration//GEN-END:variables ! } --- 1490,1493 ---- private javax.swing.JLabel urgencyLabel; // End of variables declaration//GEN-END:variables ! } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:32
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/risks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/risks Modified Files: RisksFunction.java RisksFunctionPanel.java Log Message: port changes over to r1 Index: RisksFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/risks/RisksFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RisksFunction.java 23 Mar 2006 01:51:49 -0000 1.1 --- RisksFunction.java 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 14,18 **** import org.opentapas.tapear.framework.SidePanel; ! import java.util.Arrays; import javax.swing.*; --- 14,18 ---- import org.opentapas.tapear.framework.SidePanel; ! import java.util.*; import javax.swing.*; *************** *** 115,128 **** */ private Observation observation; ! ! /** ! * EMR Observation array ! */ ! private Observation[] observations = new Observation[0]; ! /** ! * Dummy Observation array */ ! private Observation[] dummyObs = new Observation[1]; /** --- 115,123 ---- */ private Observation observation; ! /** ! * Observations List */ ! private List observations = new ArrayList(); /** *************** *** 264,268 **** public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations[index]; if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; --- 259,263 ---- public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations.get(index); if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; *************** *** 313,350 **** StringBuffer textBuffer = new StringBuffer(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); - int numberOfObservations = 0 ; - observations = null ; //new - for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! dummyObs[0] = (Observation) act; ! numberOfObservations ++ ; ! ! Observation[] temp = new Observation[numberOfObservations]; ! if (numberOfObservations > 1) { ! System.arraycopy(observations, 0, temp, 0, numberOfObservations - 1); ! } ! System.arraycopy(dummyObs, 0, temp, numberOfObservations - 1, 1); ! observations = temp; ! observation = observations[numberOfObservations - 1]; if (observation.getText() == null) { observation.setText(new ST()); - //Controller.getInstance().saveObject(observation.getText()); } if (observation.getStartDateTime() == null) { observation.setStartDateTime(new DateTime()); - //Controller.getInstance().saveObject(observation.getStartDate()); } if (observation.getEndDateTime() == null) { observation.setEndDateTime(new DateTime()); - //Controller.getInstance().saveObject(observation.getEndDate()); } ! panel.setTableRowNumber(numberOfObservations);//new panel.addRow( ! observation.getStartDateTime().getStringRepresentation() + " - " + observation.getEndDateTime().getStringRepresentation(), observation.getCode().getDisplayName(), observation.getText().getText(), i); textBuffer.append(observation.getCode().getDisplayName() + "\n"); } --- 308,337 ---- StringBuffer textBuffer = new StringBuffer(); + observations.clear(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! ! observations.add(act); ! observation = (Observation) act ; ! if (observation.getText() == null) { observation.setText(new ST()); } if (observation.getStartDateTime() == null) { observation.setStartDateTime(new DateTime()); } if (observation.getEndDateTime() == null) { observation.setEndDateTime(new DateTime()); } ! panel.setTableRowNumber(observations.size());//new panel.addRow( ! observation.getStartDateTime().getStringRepresentation() + " - " + observation.getEndDateTime().getStringRepresentation(), ! observation.getCode().getDisplayName(), ! observation.getText().getText(), ! observations.size() - 1); textBuffer.append(observation.getCode().getDisplayName() + "\n"); } *************** *** 365,369 **** removeSearchPanel(); try { ! observation = (Observation) observations[index]; panel.setNameTextField(observation.getCode().getDisplayName()); panel.setCodeTextField(observation.getCode().getCode()); --- 352,356 ---- removeSearchPanel(); try { ! observation = (Observation) observations.get(index); panel.setNameTextField(observation.getCode().getDisplayName()); panel.setCodeTextField(observation.getCode().getCode()); *************** *** 400,404 **** if (state == 'q') { ! observation = (Observation) observations[panel.getSelectedTableRow()]; observation.setCode(code); isQ = true; --- 387,391 ---- if (state == 'q') { ! observation = (Observation) observations.get(panel.getSelectedTableRow()); observation.setCode(code); isQ = true; *************** *** 428,432 **** try { int row = panel.getSelectedTableRow(); //new ! observation = (Observation) observations[previousClicked == -1 ? row : previousClicked]; //new observation.getStartDateTime().setYear(panel.getPartialStartYear()); --- 415,419 ---- try { int row = panel.getSelectedTableRow(); //new ! observation = (Observation) observations.get(previousClicked == -1 ? row : previousClicked); //new observation.getStartDateTime().setYear(panel.getPartialStartYear()); *************** *** 482,490 **** int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) observations[row]); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: RiskFunction - remove() - ArrayIndexOutOfBoundsException"); } ! populate((Section)Controller.getInstance().saveObject(section)); //cw if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new --- 469,480 ---- int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) observations.get(row)); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: RiskFunction - remove() - ArrayIndexOutOfBoundsException"); } ! Controller.getInstance().saveObject(section); //cw ! Controller.getInstance().deleteObject(observations.get(row)); ! observations.remove(row); ! list(); if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new *************** *** 494,498 **** protected int getNumberOfActs(){ ! return observations == null ? 0 : observations.length ; //new } --- 484,488 ---- protected int getNumberOfActs(){ ! return observations == null ? 0 : observations.size() ; //new } Index: RisksFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/risks/RisksFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RisksFunctionPanel.java 23 Mar 2006 01:51:49 -0000 1.1 --- RisksFunctionPanel.java 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 40,44 **** class RisksFunctionPanel extends javax.swing.JPanel { ! /** * Creates a new RisksFunctionPanel object. --- 40,44 ---- class RisksFunctionPanel extends javax.swing.JPanel { ! /** * Creates a new RisksFunctionPanel object. *************** *** 64,68 **** } } ! /** This method is called from within the constructor to * initialize the form. --- 64,68 ---- } } ! /** This method is called from within the constructor to * initialize the form. *************** *** 505,513 **** }// </editor-fold>//GEN-END:initComponents ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ --- 505,513 ---- }// </editor-fold>//GEN-END:initComponents ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ *************** *** 532,536 **** } }//GEN-LAST:event_formComponentHidden ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod --- 532,536 ---- } }//GEN-LAST:event_formComponentHidden ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod *************** *** 538,546 **** }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ --- 538,546 ---- }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ *************** *** 568,572 **** } }//GEN-LAST:event_tableKeyReleased ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) --- 568,572 ---- } }//GEN-LAST:event_tableKeyReleased ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) *************** *** 579,583 **** }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void partialEndDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndDayComboBoxActionPerformed if (partialEndDayComboBox.getSelectedIndex() > 1 && --- 579,583 ---- }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void partialEndDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndDayComboBoxActionPerformed if (partialEndDayComboBox.getSelectedIndex() > 1 && *************** *** 590,594 **** }//mod }//GEN-LAST:event_partialEndDayComboBoxActionPerformed ! private void partialEndMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndMonthComboBoxActionPerformed populatePartialEndDay(); --- 590,594 ---- }//mod }//GEN-LAST:event_partialEndDayComboBoxActionPerformed ! private void partialEndMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndMonthComboBoxActionPerformed populatePartialEndDay(); *************** *** 607,611 **** }//mod }//GEN-LAST:event_partialEndMonthComboBoxActionPerformed ! private void partialEndYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndYearComboBoxActionPerformed if (function.canWrite()){ --- 607,611 ---- }//mod }//GEN-LAST:event_partialEndMonthComboBoxActionPerformed ! private void partialEndYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndYearComboBoxActionPerformed if (function.canWrite()){ *************** *** 623,627 **** }//mod }//GEN-LAST:event_partialEndYearComboBoxActionPerformed ! private void partialStartDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartDayComboBoxActionPerformed if (partialStartDayComboBox.getSelectedIndex() > 1&& --- 623,627 ---- }//mod }//GEN-LAST:event_partialEndYearComboBoxActionPerformed ! private void partialStartDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartDayComboBoxActionPerformed if (partialStartDayComboBox.getSelectedIndex() > 1&& *************** *** 634,638 **** }//mod }//GEN-LAST:event_partialStartDayComboBoxActionPerformed ! private void partialStartMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartMonthComboBoxActionPerformed populatePartialStartDay(); --- 634,638 ---- }//mod }//GEN-LAST:event_partialStartDayComboBoxActionPerformed ! private void partialStartMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartMonthComboBoxActionPerformed populatePartialStartDay(); *************** *** 651,655 **** }//mod }//GEN-LAST:event_partialStartMonthComboBoxActionPerformed ! private void partialStartYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartYearComboBoxActionPerformed if (function.canWrite()){ --- 651,655 ---- }//mod }//GEN-LAST:event_partialStartMonthComboBoxActionPerformed ! private void partialStartYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartYearComboBoxActionPerformed if (function.canWrite()){ *************** *** 667,671 **** }//mod }//GEN-LAST:event_partialStartYearComboBoxActionPerformed ! /** * loads clicked Entry in the Editor --- 667,671 ---- }//mod }//GEN-LAST:event_partialStartYearComboBoxActionPerformed ! /** * loads clicked Entry in the Editor *************** *** 697,702 **** } }//GEN-LAST:event_tableMouseClicked ! ! /** * Triggers the update function if the insert (new) state is not active; clears and colours this textfield reddish --- 697,702 ---- } }//GEN-LAST:event_tableMouseClicked ! ! /** * Triggers the update function if the insert (new) state is not active; clears and colours this textfield reddish *************** *** 715,719 **** } }//GEN-LAST:event_nameTextFieldMouseClicked ! /** * activates Insert (new Entry) state, colour text field greenish and clear editor text fields --- 715,719 ---- } }//GEN-LAST:event_nameTextFieldMouseClicked ! /** * activates Insert (new Entry) state, colour text field greenish and clear editor text fields *************** *** 733,737 **** setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! /** * Calls the code to persist edited data --- 733,737 ---- setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! /** * Calls the code to persist edited data *************** *** 743,747 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! /** * removes (for now) the selected Entry and clears all editor fields --- 743,747 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! /** * removes (for now) the selected Entry and clears all editor fields *************** *** 759,763 **** } }//GEN-LAST:event_deleteButtonActionPerformed ! /** * populates a given row of the Table --- 759,763 ---- } }//GEN-LAST:event_deleteButtonActionPerformed ! /** * populates a given row of the Table *************** *** 776,784 **** table.getColumnModel().getColumn(2).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //new if (index > -1){ --- 776,784 ---- table.getColumnModel().getColumn(2).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //new if (index > -1){ *************** *** 789,793 **** } } ! /** * Sets the name text field --- 789,793 ---- } } ! /** * Sets the name text field *************** *** 798,802 **** nameTextField.setText(text); } ! /** * returns the name text field --- 798,802 ---- nameTextField.setText(text); } ! /** * returns the name text field *************** *** 807,811 **** return nameTextField.getText(); } ! /** * sets the code text field --- 807,811 ---- return nameTextField.getText(); } ! /** * sets the code text field *************** *** 816,820 **** codeTextField.setText(text); } ! /** * returns the code text field --- 816,820 ---- codeTextField.setText(text); } ! /** * returns the code text field *************** *** 825,829 **** return codeTextField.getText(); } ! /** * sets the start date end text field --- 825,829 ---- return codeTextField.getText(); } ! /** * sets the start date end text field *************** *** 841,845 **** } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialStartMonthComboBox.setSelectedIndex(date.getMonth() + 1); --- 841,845 ---- } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialStartMonthComboBox.setSelectedIndex(date.getMonth() + 1); *************** *** 851,855 **** } } ! if (date.getDay() <= partialStartDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialStartDayComboBox.setSelectedIndex(date.getDay() + 1); --- 851,855 ---- } } ! if (date.getDay() <= partialStartDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialStartDayComboBox.setSelectedIndex(date.getDay() + 1); *************** *** 862,866 **** } } ! /** * sets the end date end text field --- 862,866 ---- } } ! /** * sets the end date end text field *************** *** 878,882 **** } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialEndMonthComboBox.setSelectedIndex(date.getMonth() + 1); --- 878,882 ---- } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialEndMonthComboBox.setSelectedIndex(date.getMonth() + 1); *************** *** 888,892 **** } } ! if (date.getDay() <= partialEndDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialEndDayComboBox.setSelectedIndex(date.getDay() + 1); --- 888,892 ---- } } ! if (date.getDay() <= partialEndDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialEndDayComboBox.setSelectedIndex(date.getDay() + 1); *************** *** 899,903 **** } } ! /** * returns the partial start date - year portion --- 899,903 ---- } } ! /** * returns the partial start date - year portion *************** *** 912,916 **** } } ! /** * returns the end partial date - year portion --- 912,916 ---- } } ! /** * returns the end partial date - year portion *************** *** 925,929 **** } } ! /** * returns the partial start date - month portion --- 925,929 ---- } } ! /** * returns the partial start date - month portion *************** *** 938,942 **** } } ! /** * returns the partial end date - month portion --- 938,942 ---- } } ! /** * returns the partial end date - month portion *************** *** 951,955 **** } } ! /** * returns the partial start date - day portion --- 951,955 ---- } } ! /** * returns the partial start date - day portion *************** *** 964,968 **** } } ! /** * returns the partial start date - day portion --- 964,968 ---- } } ! /** * returns the partial start date - day portion *************** *** 977,981 **** } } ! /** * returns the partial start date - nullreason --- 977,981 ---- } } ! /** * returns the partial start date - nullreason *************** *** 992,996 **** } } ! /** * returns the partial end date - nullreason --- 992,996 ---- } } ! /** * returns the partial end date - nullreason *************** *** 1007,1012 **** } } ! ! /** * sets the comment text field --- 1007,1012 ---- } } ! ! /** * sets the comment text field *************** *** 1017,1021 **** commentTextArea.setText(text); } ! /** * returns the comment text field --- 1017,1021 ---- commentTextArea.setText(text); } ! /** * returns the comment text field *************** *** 1026,1030 **** return commentTextArea.getText(); } ! /** * colours name text field greenish --- 1026,1030 ---- return commentTextArea.getText(); } ! /** * colours name text field greenish *************** *** 1033,1037 **** nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish --- 1033,1037 ---- nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish *************** *** 1040,1044 **** nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field --- 1040,1044 ---- nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field *************** *** 1047,1051 **** nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * clears the table --- 1047,1051 ---- nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * clears the table *************** *** 1054,1058 **** ((DefaultTableModel) table.getModel()).setRowCount(0); //new } ! /** * returns the table --- 1054,1058 ---- ((DefaultTableModel) table.getModel()).setRowCount(0); //new } ! /** * returns the table *************** *** 1063,1067 **** return table; } ! /** * clears the editor text fields --- 1063,1067 ---- return table; } ! /** * clears the editor text fields *************** *** 1078,1082 **** commentTextArea.setText("") ; } ! /** * adjust the with of the table columns and set the name column font to <b>bold</b> --- 1078,1082 ---- commentTextArea.setText("") ; } ! /** * adjust the with of the table columns and set the name column font to <b>bold</b> *************** *** 1088,1092 **** table.getColumnModel().getColumn(2).setPreferredWidth(300); } ! /** * returns # of selected table row --- 1088,1092 ---- table.getColumnModel().getColumn(2).setPreferredWidth(300); } ! /** * returns # of selected table row *************** *** 1097,1101 **** return table.getSelectedRow(); } ! /** * Adjusts the label of the name text field when searching / restores it --- 1097,1101 ---- return table.getSelectedRow(); } ! /** * Adjusts the label of the name text field when searching / restores it *************** *** 1112,1116 **** } } ! private void populatePartialStartDay(){ if ( --- 1112,1116 ---- } } ! private void populatePartialStartDay(){ if ( *************** *** 1136,1140 **** } } ! private void populatePartialEndDay(){ if ( --- 1136,1140 ---- } } ! private void populatePartialEndDay(){ if ( *************** *** 1160,1164 **** } } ! private void listPartialStartDay(int numberOfDays){ partialStartDayComboBox.removeAllItems(); --- 1160,1164 ---- } } ! private void listPartialStartDay(int numberOfDays){ partialStartDayComboBox.removeAllItems(); *************** *** 1169,1173 **** } } ! private void listPartialEndDay(int numberOfDays){ partialEndDayComboBox.removeAllItems(); --- 1169,1173 ---- } } ! private void listPartialEndDay(int numberOfDays){ partialEndDayComboBox.removeAllItems(); *************** *** 1178,1182 **** } } ! private void populatePartialStartYear(int year){ partialStartDayComboBox.removeAllItems(); --- 1178,1182 ---- } } ! private void populatePartialStartYear(int year){ partialStartDayComboBox.removeAllItems(); *************** *** 1187,1191 **** } } ! private void populatePartialEndYear(int year){ partialEndDayComboBox.removeAllItems(); --- 1187,1191 ---- } } ! private void populatePartialEndYear(int year){ partialEndDayComboBox.removeAllItems(); *************** *** 1196,1205 **** } } ! ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod --- 1196,1205 ---- } } ! ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod *************** *** 1207,1215 **** toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void cancel(){ nameTextFieldBW(); --- 1207,1215 ---- toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void cancel(){ nameTextFieldBW(); *************** *** 1225,1230 **** setSearchActive(false); //wop } ! ! protected void setReadOnly(boolean readonly){ //new nameTextField.setEnabled(!readonly); --- 1225,1230 ---- setSearchActive(false); //wop } ! ! protected void setReadOnly(boolean readonly){ //new nameTextField.setEnabled(!readonly); *************** *** 1238,1247 **** commentTextArea.setEnabled(!readonly); } ! protected void setSearchActive(boolean active){ //wop searchActive = active; } ! ! int previousClicked = 0 ; //new int thisYear = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR) ; --- 1238,1247 ---- commentTextArea.setEnabled(!readonly); } ! protected void setSearchActive(boolean active){ //wop searchActive = active; } ! ! int previousClicked = 0 ; //new int thisYear = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR) ; *************** *** 1249,1253 **** private boolean toBeCommitted = false; //mod private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel blueLabel; --- 1249,1253 ---- private boolean toBeCommitted = false; //mod private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel blueLabel; *************** *** 1284,1287 **** private javax.swing.JLabel titleLabel; // End of variables declaration//GEN-END:variables ! } --- 1284,1287 ---- private javax.swing.JLabel titleLabel; // End of variables declaration//GEN-END:variables ! } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:31
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/problemhx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/problemhx Modified Files: ProblemHxFunction.java ProblemHxFunctionPanel.form ProblemHxFunctionPanel.java Log Message: port changes over to r1 Index: ProblemHxFunctionPanel.form =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/problemhx/ProblemHxFunctionPanel.form,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProblemHxFunctionPanel.form 23 Mar 2006 01:51:48 -0000 1.1 --- ProblemHxFunctionPanel.form 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 443,447 **** </Constraints> </Component> ! <Container class="javax.swing.JScrollPane" name="commentScrollPanel"> <Properties> <Property name="horizontalScrollBarPolicy" type="int" value="31"/> --- 443,447 ---- </Constraints> </Component> ! <Container class="javax.swing.JScrollPane" name="commentScrollPane"> <Properties> <Property name="horizontalScrollBarPolicy" type="int" value="31"/> *************** *** 548,551 **** --- 548,575 ---- </Events> </Component> + <Component class="javax.swing.JButton" name="moveToPastButton"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="10" style="0"/> + </Property> + <Property name="text" type="java.lang.String" value="Move to past Medical Hx"/> + <Property name="toolTipText" type="java.lang.String" value="Moves this Medical Problem to past Medical History"/> + <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> + <Insets value="[2, 4, 2, 4]"/> + </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[154, 22]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[154, 20]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[154, 22]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="moveToPastButtonActionPerformed"/> + </Events> + </Component> </SubComponents> </Container> *************** *** 717,765 **** </Constraints> </Component> ! <Component class="javax.swing.JButton" name="moveToPastButton"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> ! <Font name="Dialog" size="10" style="0"/> ! </Property> ! <Property name="text" type="java.lang.String" value="Move to past Medical Hx"/> ! <Property name="toolTipText" type="java.lang.String" value="Moves this Medical Problem to past Medical History"/> ! <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> ! <Insets value="[2, 4, 2, 4]"/> ! </Property> ! <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> ! <Dimension value="[154, 22]"/> ! </Property> ! <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> ! <Dimension value="[154, 20]"/> </Property> ! <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> ! <Dimension value="[154, 20]"/> </Property> </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="moveToPastButtonActionPerformed"/> - </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="1" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="2" insetsLeft="0" insetsBottom="3" insetsRight="4" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> ! <Component class="javax.swing.JLabel" name="commentDetailsLabel"> <Properties> ! <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> ! <Font name="Dialog" size="10" style="1"/> </Property> ! <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> ! <Color blue="66" green="66" red="66" type="rgb"/> </Property> - <Property name="text" type="java.lang.String" value="Comment / Details:"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="17" weightX="2.0" weightY="0.0"/> </Constraint> </Constraints> ! </Component> </SubComponents> </Container> --- 741,777 ---- </Constraints> </Component> ! <Component class="javax.swing.JLabel" name="commentDetailsLabel"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> ! <Font name="Dialog" size="10" style="1"/> </Property> ! <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> ! <Color blue="66" green="66" red="66" type="rgb"/> </Property> + <Property name="text" type="java.lang.String" value="Comment / Details:"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="17" weightX="2.0" weightY="0.0"/> </Constraint> </Constraints> </Component> ! <Container class="javax.swing.JPanel" name="jPanel1"> <Properties> ! <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> ! <Dimension value="[10, 20]"/> </Property> ! <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> ! <Dimension value="[140, 20]"/> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="4" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="1.0"/> </Constraint> </Constraints> ! ! <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> ! </Container> </SubComponents> </Container> Index: ProblemHxFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/problemhx/ProblemHxFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProblemHxFunctionPanel.java 23 Mar 2006 01:51:48 -0000 1.1 --- ProblemHxFunctionPanel.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 40,44 **** class ProblemHxFunctionPanel extends javax.swing.JPanel { ! /** * Creates a new ProblemHxFunctionPanel object. --- 40,44 ---- class ProblemHxFunctionPanel extends javax.swing.JPanel { ! /** [...1022 lines suppressed...] private javax.swing.JLabel commentDetailsLabel; ! private javax.swing.JScrollPane commentScrollPane; private javax.swing.JTextArea commentTextArea; private javax.swing.JButton deleteButton; private javax.swing.JLabel editorLabel; private javax.swing.JPanel editorPanel; + private javax.swing.JPanel jPanel1; private javax.swing.JPanel mainPanel; private javax.swing.JButton moveToPastButton; *************** *** 1386,1389 **** private javax.swing.JLabel titleLabel; // End of variables declaration//GEN-END:variables ! } --- 1393,1396 ---- private javax.swing.JLabel titleLabel; // End of variables declaration//GEN-END:variables ! } Index: ProblemHxFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/problemhx/ProblemHxFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProblemHxFunction.java 23 Mar 2006 01:51:48 -0000 1.1 --- ProblemHxFunction.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 15,19 **** import org.opentapas.tapear.framework.SidePanel; ! import java.util.Arrays; import org.opentapas.commons.util.ToolKit; --- 15,19 ---- import org.opentapas.tapear.framework.SidePanel; ! import java.util.*; import org.opentapas.commons.util.ToolKit; *************** *** 117,130 **** */ private Observation observation; ! ! /** ! * EMR Observation array ! */ ! private Observation[] observations = new Observation[0]; ! /** ! * Dummy Observation array */ ! private Observation[] dummyObs = new Observation[1]; /** --- 117,125 ---- */ private Observation observation; ! /** ! * Observations List */ ! private List observations = new ArrayList(); /** *************** *** 263,267 **** public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations[index]; if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; --- 258,262 ---- public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations.get(index); if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; *************** *** 312,334 **** StringBuffer textBuffer = new StringBuffer(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); - observations = null ; //new - int numberOfObservations = 0 ; - for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! dummyObs[0] = (Observation) act; ! numberOfObservations ++ ; ! ! Observation[] temp = new Observation[numberOfObservations]; ! if (numberOfObservations > 1){ ! System.arraycopy(observations, 0, temp, 0, numberOfObservations - 1); ! } ! System.arraycopy(dummyObs, 0, temp, numberOfObservations - 1, 1); ! observations = temp; ! observation = observations[numberOfObservations - 1]; if (observation.getText() == null) { observation.setText(new ST()); --- 307,321 ---- StringBuffer textBuffer = new StringBuffer(); + observations.clear(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! ! observations.add(act); ! observation = (Observation) act ; ! if (observation.getText() == null) { observation.setText(new ST()); *************** *** 337,343 **** observation.setStartDateTime(new DateTime()); } ! panel.setTableRowNumber(numberOfObservations);//new panel.addRow( ! observation.getStartDateTime().getStringRepresentation(), observation.getCode().getDisplayName(), observation.getText().getText(), i); textBuffer.append(observation.getCode().getDisplayName() + "\n"); } --- 324,333 ---- observation.setStartDateTime(new DateTime()); } ! panel.setTableRowNumber(observations.size());//new panel.addRow( ! observation.getStartDateTime().getStringRepresentation(), ! observation.getCode().getDisplayName(), ! observation.getText().getText(), ! observations.size() - 1); textBuffer.append(observation.getCode().getDisplayName() + "\n"); } *************** *** 358,362 **** removeSearchPanel(); //wop try { ! observation = (Observation) observations[index]; panel.setNameTextField(observation.getCode().getDisplayName()); panel.setCodeTextField(observation.getCode().getCode()); --- 348,352 ---- removeSearchPanel(); //wop try { ! observation = (Observation) observations.get(index); panel.setNameTextField(observation.getCode().getDisplayName()); panel.setCodeTextField(observation.getCode().getCode()); *************** *** 392,396 **** if (state == 'q') { ! observation = (Observation) observations[panel.getSelectedTableRow()]; observation.setCode(code); isQ = true; --- 382,386 ---- if (state == 'q') { ! observation = (Observation) observations.get(panel.getSelectedTableRow()); observation.setCode(code); isQ = true; *************** *** 421,425 **** try { int row = panel.getSelectedTableRow(); //new ! observation = (Observation) observations[previousClicked == -1 ? row : previousClicked]; //new observation.getStartDateTime().setYear(panel.getPartialStartYear()); observation.getStartDateTime().setMonth(panel.getPartialStartMonth()); --- 411,415 ---- try { int row = panel.getSelectedTableRow(); //new ! observation = (Observation) observations.get(previousClicked == -1 ? row : previousClicked); //new observation.getStartDateTime().setYear(panel.getPartialStartYear()); observation.getStartDateTime().setMonth(panel.getPartialStartMonth()); *************** *** 428,432 **** observation.getText().setText(panel.getCommentTextArea()); observation.setAssignedByUser(Controller.getInstance().getCurrentUser()); - populate((Section)Controller.getInstance().saveObject(section)); //cw if (getNumberOfActs() > 0) { --- 418,421 ---- *************** *** 440,444 **** try { int row = panel.getSelectedTableRow(); ! observation = (Observation) observations[row]; if (observation.getEndDateTime() == null) { observation.setEndDateTime(new DateTime()); --- 429,433 ---- try { int row = panel.getSelectedTableRow(); ! observation = (Observation) observations.get(row); if (observation.getEndDateTime() == null) { observation.setEndDateTime(new DateTime()); *************** *** 498,506 **** int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) observations[row]); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: ProblemHxFunction - remove() - ArrayIndexOutOfBoundsException"); } ! populate((Section)Controller.getInstance().saveObject(section)); //cw if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new --- 487,498 ---- int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) observations.get(row)); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: ProblemHxFunction - remove() - ArrayIndexOutOfBoundsException"); } ! Controller.getInstance().saveObject(section); //cw ! Controller.getInstance().deleteObject(observations.get(row)); ! observations.remove(row); ! list(); if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new *************** *** 510,514 **** protected int getNumberOfActs(){ ! return observations == null ? 0 : observations.length ; //new } --- 502,506 ---- protected int getNumberOfActs(){ ! return observations == null ? 0 : observations.size() ; //new } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:31
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/procedurehx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/procedurehx Modified Files: ProcedureHxFunction.java ProcedureHxFunctionPanel.form ProcedureHxFunctionPanel.java Log Message: port changes over to r1 Index: ProcedureHxFunctionPanel.form =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/procedurehx/ProcedureHxFunctionPanel.form,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProcedureHxFunctionPanel.form 23 Mar 2006 01:51:48 -0000 1.1 --- ProcedureHxFunctionPanel.form 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 334,341 **** </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> ! <Dimension value="[200, 17]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> ! <Dimension value="[240, 1000]"/> </Property> </Properties> --- 334,341 ---- </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> ! <Dimension value="[104, 17]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> ! <Dimension value="[170, 1000]"/> </Property> </Properties> *************** *** 347,350 **** --- 347,358 ---- </Container> <Container class="javax.swing.JPanel" name="buttonPanel"> + <Properties> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[297, 32]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[297, 32]"/> + </Property> + </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> Index: ProcedureHxFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/procedurehx/ProcedureHxFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProcedureHxFunctionPanel.java 23 Mar 2006 01:51:48 -0000 1.1 --- ProcedureHxFunctionPanel.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 40,45 **** class ProcedureHxFunctionPanel extends javax.swing.JPanel { ! ! /** * Creates a new ProcedureHxFunctionPanel object. --- 40,45 ---- class ProcedureHxFunctionPanel extends javax.swing.JPanel { ! ! /** * Creates a new ProcedureHxFunctionPanel object. *************** *** 63,67 **** } } ! /** This method is called from within the constructor to * initialize the form. --- 63,67 ---- } } ! /** This method is called from within the constructor to * initialize the form. *************** *** 295,300 **** commentTextArea.setDisabledTextColor(new java.awt.Color(153, 153, 153)); commentTextArea.setMargin(new java.awt.Insets(4, 4, 4, 4)); ! commentTextArea.setMinimumSize(new java.awt.Dimension(200, 17)); ! commentTextArea.setPreferredSize(new java.awt.Dimension(240, 1000)); commentTextArea.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { --- 295,300 ---- commentTextArea.setDisabledTextColor(new java.awt.Color(153, 153, 153)); commentTextArea.setMargin(new java.awt.Insets(4, 4, 4, 4)); ! commentTextArea.setMinimumSize(new java.awt.Dimension(104, 17)); ! commentTextArea.setPreferredSize(new java.awt.Dimension(170, 1000)); commentTextArea.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { *************** *** 316,319 **** --- 316,321 ---- buttonPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT)); + buttonPanel.setMinimumSize(new java.awt.Dimension(297, 32)); + buttonPanel.setPreferredSize(new java.awt.Dimension(297, 32)); saveButton.setFont(new java.awt.Font("Dialog", 0, 10)); saveButton.setText("Save"); *************** *** 466,470 **** }// </editor-fold>//GEN-END:initComponents ! private void partialDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialDayComboBoxActionPerformed if (function.getState() == 'x' && function.canWrite()){//mod //cw --- 468,472 ---- }// </editor-fold>//GEN-END:initComponents ! private void partialDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialDayComboBoxActionPerformed if (function.getState() == 'x' && function.canWrite()){//mod //cw *************** *** 472,476 **** }//mod }//GEN-LAST:event_partialDayComboBoxActionPerformed ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod --- 474,478 ---- }//mod }//GEN-LAST:event_partialDayComboBoxActionPerformed ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod *************** *** 478,486 **** }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ --- 480,488 ---- }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ *************** *** 505,513 **** } }//GEN-LAST:event_formComponentHidden ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ --- 507,515 ---- } }//GEN-LAST:event_formComponentHidden ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ *************** *** 535,539 **** } }//GEN-LAST:event_tableKeyReleased ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) --- 537,541 ---- } }//GEN-LAST:event_tableKeyReleased ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) *************** *** 546,550 **** }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void partialMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialMonthComboBoxActionPerformed populatePartialDay(); --- 548,552 ---- }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void partialMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialMonthComboBoxActionPerformed populatePartialDay(); *************** *** 560,564 **** }//mod }//GEN-LAST:event_partialMonthComboBoxActionPerformed ! private void partialYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialYearComboBoxActionPerformed if (function.canWrite()){ --- 562,566 ---- }//mod }//GEN-LAST:event_partialMonthComboBoxActionPerformed ! private void partialYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialYearComboBoxActionPerformed if (function.canWrite()){ *************** *** 573,578 **** }//mod }//GEN-LAST:event_partialYearComboBoxActionPerformed ! ! /** * loads clicked Entry in the Editor --- 575,580 ---- }//mod }//GEN-LAST:event_partialYearComboBoxActionPerformed ! ! /** * loads clicked Entry in the Editor *************** *** 604,608 **** } }//GEN-LAST:event_tableMouseClicked ! /** * Triggers the searchSidePanel to pop up and be filled with CE's whose diplayname match the typed text --- 606,610 ---- } }//GEN-LAST:event_tableMouseClicked ! /** * Triggers the searchSidePanel to pop up and be filled with CE's whose diplayname match the typed text *************** *** 624,628 **** } }//GEN-LAST:event_nameTextFieldMouseClicked ! /** * Calls the code to persist edited data --- 626,630 ---- } }//GEN-LAST:event_nameTextFieldMouseClicked ! /** * Calls the code to persist edited data *************** *** 634,638 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! /** * removes (for now) the selected Entry and clears all editor fields --- 636,640 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! /** * removes (for now) the selected Entry and clears all editor fields *************** *** 650,654 **** } }//GEN-LAST:event_deleteButtonActionPerformed ! /** * activates Insert (new Entry) state, colour text field greenish and clear editor text fields --- 652,656 ---- } }//GEN-LAST:event_deleteButtonActionPerformed ! /** * activates Insert (new Entry) state, colour text field greenish and clear editor text fields *************** *** 668,672 **** setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! /** * populates a given row of the Table --- 670,674 ---- setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! /** * populates a given row of the Table *************** *** 685,693 **** table.getColumnModel().getColumn(2).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //new if (index > -1){ --- 687,695 ---- table.getColumnModel().getColumn(2).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //new if (index > -1){ *************** *** 698,702 **** } } ! /** * Sets the name text field --- 700,704 ---- } } ! /** * Sets the name text field *************** *** 707,711 **** nameTextField.setText(text); } ! /** * returns the name text field --- 709,713 ---- nameTextField.setText(text); } ! /** * returns the name text field *************** *** 716,720 **** return nameTextField.getText(); } ! /** * sets the code text field --- 718,722 ---- return nameTextField.getText(); } ! /** * sets the code text field *************** *** 725,729 **** codeTextField.setText(text); } ! /** * returns the code text field --- 727,731 ---- codeTextField.setText(text); } ! /** * returns the code text field *************** *** 734,738 **** return codeTextField.getText(); } ! /** * sets the date end text field --- 736,740 ---- return codeTextField.getText(); } ! /** * sets the date end text field *************** *** 750,754 **** } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialMonthComboBox.setSelectedIndex(date.getMonth() + 1); --- 752,756 ---- } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialMonthComboBox.setSelectedIndex(date.getMonth() + 1); *************** *** 760,764 **** } } ! if (date.getDay() <= partialDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialDayComboBox.setSelectedIndex(date.getDay() + 1); --- 762,766 ---- } } ! if (date.getDay() <= partialDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialDayComboBox.setSelectedIndex(date.getDay() + 1); *************** *** 771,775 **** } } ! /** * sets the partial date - nullreason --- 773,777 ---- } } ! /** * sets the partial date - nullreason *************** *** 793,797 **** } } ! /** * returns the partial date - year portion --- 795,799 ---- } } ! /** * returns the partial date - year portion *************** *** 806,810 **** } } ! /** * returns the partial date - month portion --- 808,812 ---- } } ! /** * returns the partial date - month portion *************** *** 819,823 **** } } ! /** * returns the partial date - day portion --- 821,825 ---- } } ! /** * returns the partial date - day portion *************** *** 832,836 **** } } ! /** * returns the partial date - nullreason --- 834,838 ---- } } ! /** * returns the partial date - nullreason *************** *** 847,851 **** } } ! /** * sets the comment text field --- 849,853 ---- } } ! /** * sets the comment text field *************** *** 856,860 **** commentTextArea.setText(text); } ! /** * returns the comment text field --- 858,862 ---- commentTextArea.setText(text); } ! /** * returns the comment text field *************** *** 865,869 **** return commentTextArea.getText(); } ! /** * colours name text field greenish --- 867,871 ---- return commentTextArea.getText(); } ! /** * colours name text field greenish *************** *** 872,876 **** nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish --- 874,878 ---- nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish *************** *** 879,883 **** nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field --- 881,885 ---- nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field *************** *** 886,890 **** nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * clears the table --- 888,892 ---- nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * clears the table *************** *** 893,897 **** ((DefaultTableModel) table.getModel()).setRowCount(0); //new } ! /** * returns the table --- 895,899 ---- ((DefaultTableModel) table.getModel()).setRowCount(0); //new } ! /** * returns the table *************** *** 902,906 **** return table; } ! /** * clears the editor text fields --- 904,908 ---- return table; } ! /** * clears the editor text fields *************** *** 914,918 **** partialDayComboBox.setSelectedIndex(0); } ! /** * adjust the with of the table columns and set the name column font to <b>bold</b> --- 916,920 ---- partialDayComboBox.setSelectedIndex(0); } ! /** * adjust the with of the table columns and set the name column font to <b>bold</b> *************** *** 924,928 **** table.getColumnModel().getColumn(2).setPreferredWidth(300); } ! /** * returns # of selected table row --- 926,930 ---- table.getColumnModel().getColumn(2).setPreferredWidth(300); } ! /** * returns # of selected table row *************** *** 933,937 **** return table.getSelectedRow(); } ! /** * Adjusts the label of the name text field when searching / restores it --- 935,939 ---- return table.getSelectedRow(); } ! /** * Adjusts the label of the name text field when searching / restores it *************** *** 948,952 **** } } ! private void populatePartialDay(){ if ( --- 950,954 ---- } } ! private void populatePartialDay(){ if ( *************** *** 972,976 **** } } ! private void listPartialDay(int numberOfDays){ partialDayComboBox.removeAllItems(); --- 974,978 ---- } } ! private void listPartialDay(int numberOfDays){ partialDayComboBox.removeAllItems(); *************** *** 981,985 **** } } ! private void populatePartialYear(int year){ partialDayComboBox.removeAllItems(); --- 983,987 ---- } } ! private void populatePartialYear(int year){ partialDayComboBox.removeAllItems(); *************** *** 990,998 **** } } ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod --- 992,1000 ---- } } ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod *************** *** 1000,1008 **** toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void cancel(){ nameTextFieldBW(); --- 1002,1010 ---- toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void cancel(){ nameTextFieldBW(); *************** *** 1018,1022 **** setSearchActive(false); //wop } ! protected void setReadOnly(boolean readonly){ //new nameTextField.setEnabled(!readonly); --- 1020,1024 ---- setSearchActive(false); //wop } ! protected void setReadOnly(boolean readonly){ //new nameTextField.setEnabled(!readonly); *************** *** 1027,1036 **** commentTextArea.setEnabled(!readonly); } ! ! ! protected void setSearchActive(boolean active){ //wop ! searchActive = active; ! } ! int previousClicked = 0 ; //new int onset = 0 ; --- 1029,1038 ---- commentTextArea.setEnabled(!readonly); } ! ! ! protected void setSearchActive(boolean active){ //wop ! searchActive = active; ! } ! int previousClicked = 0 ; //new int onset = 0 ; *************** *** 1038,1043 **** private ProcedureHxFunction function ; private boolean toBeCommitted = false; //mod ! private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel blueLabel; --- 1040,1045 ---- private ProcedureHxFunction function ; private boolean toBeCommitted = false; //mod ! private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel blueLabel; *************** *** 1070,1073 **** private javax.swing.JLabel titleLabel; // End of variables declaration//GEN-END:variables ! } --- 1072,1075 ---- private javax.swing.JLabel titleLabel; // End of variables declaration//GEN-END:variables ! } Index: ProcedureHxFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/procedurehx/ProcedureHxFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProcedureHxFunction.java 23 Mar 2006 01:51:48 -0000 1.1 --- ProcedureHxFunction.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 14,18 **** import org.opentapas.tapear.framework.SidePanel; ! import java.util.Arrays; import javax.swing.*; --- 14,18 ---- import org.opentapas.tapear.framework.SidePanel; ! import java.util.*; import javax.swing.*; *************** *** 115,128 **** */ private Procedure procedure; ! ! /** ! * EMR Procedure array ! */ ! private Procedure[] procedures = new Procedure[0]; ! /** ! * Dummy Procedure array */ ! private Procedure[] dummyProc = new Procedure[1]; /** --- 115,123 ---- */ private Procedure procedure; ! /** ! * Procedures List */ ! private List procedures = new ArrayList(); /** *************** *** 263,267 **** public boolean isFromAnotherUser(int index) { try { ! Procedure procedure = (Procedure) procedures[index]; if (procedure.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; --- 258,262 ---- public boolean isFromAnotherUser(int index) { try { ! Procedure procedure = (Procedure) procedures.get(index); if (procedure.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; *************** *** 312,334 **** StringBuffer textBuffer = new StringBuffer(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); - int numberOfProcedures = 0 ; - procedures = null ; //new - for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("PROC")){ ! dummyProc[0] = (Procedure) act; ! numberOfProcedures ++ ; ! ! Procedure[] temp = new Procedure[numberOfProcedures]; ! if (numberOfProcedures > 1) { ! System.arraycopy(procedures, 0, temp, 0, numberOfProcedures - 1); ! } ! System.arraycopy(dummyProc, 0, temp, numberOfProcedures - 1, 1); ! procedures = temp; ! procedure = procedures[numberOfProcedures - 1]; if (procedure.getText() == null) { procedure.setText(new ST()); --- 307,321 ---- StringBuffer textBuffer = new StringBuffer(); + procedures.clear(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("PROC")){ ! ! procedures.add(act); ! procedure = (Procedure) act ; ! if (procedure.getText() == null) { procedure.setText(new ST()); *************** *** 339,345 **** //Controller.getInstance().saveObject(procedure.getStartDate()); } ! panel.setTableRowNumber(numberOfProcedures);//new panel.addRow( ! procedure.getStartDateTime().getStringRepresentation(), procedure.getCode().getDisplayName(), procedure.getText().getText(), i); textBuffer.append(procedure.getCode().getDisplayName() + "\n"); } --- 326,335 ---- //Controller.getInstance().saveObject(procedure.getStartDate()); } ! panel.setTableRowNumber(procedures.size());//new panel.addRow( ! procedure.getStartDateTime().getStringRepresentation(), ! procedure.getCode().getDisplayName(), ! procedure.getText().getText(), ! procedures.size() - 1); textBuffer.append(procedure.getCode().getDisplayName() + "\n"); } *************** *** 360,364 **** removeSearchPanel(); try { ! procedure = (Procedure) procedures[index]; panel.setNameTextField(procedure.getCode().getDisplayName()); panel.setCodeTextField(procedure.getCode().getCode()); --- 350,354 ---- removeSearchPanel(); try { ! procedure = (Procedure) procedures.get(index); panel.setNameTextField(procedure.getCode().getDisplayName()); panel.setCodeTextField(procedure.getCode().getCode()); *************** *** 394,398 **** if (state == 'q') { ! procedure = (Procedure) procedures[panel.getSelectedTableRow()]; procedure.setCode(code); isQ = true; --- 384,388 ---- if (state == 'q') { ! procedure = (Procedure) procedures.get(panel.getSelectedTableRow()); procedure.setCode(code); isQ = true; *************** *** 422,426 **** try { int row = panel.getSelectedTableRow(); //new ! procedure = (Procedure) procedures[previousClicked == -1 ? row : previousClicked]; //new procedure.getStartDateTime().setYear(panel.getPartialYear()); procedure.getStartDateTime().setMonth(panel.getPartialMonth()); --- 412,416 ---- try { int row = panel.getSelectedTableRow(); //new ! procedure = (Procedure) procedures.get(previousClicked == -1 ? row : previousClicked); //new procedure.getStartDateTime().setYear(panel.getPartialYear()); procedure.getStartDateTime().setMonth(panel.getPartialMonth()); *************** *** 471,479 **** int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) procedures[row]); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: ProcedureHxFunction - remove() - ArrayIndexOutOfBoundsException"); } ! populate((Section)Controller.getInstance().saveObject(section)); //cw if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new --- 461,472 ---- int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) procedures.get(row)); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: ProcedureHxFunction - remove() - ArrayIndexOutOfBoundsException"); } ! Controller.getInstance().saveObject(section); //cw ! Controller.getInstance().deleteObject(procedures.get(row)); ! procedures.remove(row); ! list(); if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new *************** *** 483,487 **** protected int getNumberOfActs(){ ! return procedures == null ? 0 : procedures.length ; //new } --- 476,480 ---- protected int getNumberOfActs(){ ! return procedures == null ? 0 : procedures.size() ; //new } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:31
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/demographics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/demographics Modified Files: DemographicsFunction.java DemographicsFunctionPanel.java Log Message: port changes over to r1 Index: DemographicsFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/demographics/DemographicsFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DemographicsFunction.java 23 Mar 2006 01:50:57 -0000 1.1 --- DemographicsFunction.java 26 Apr 2006 23:10:18 -0000 1.2 *************** *** 72,161 **** implements PatientCentricFunction { // implementing interface stuff ! /** * Boolean to determine whether the funtion is available */ private boolean available = false; ! /** * Boolean to determine whether the funtion is active */ private boolean active = false; ! /** * Patients' ID */ private String patientID = ""; ! /** * Name of the function */ private String functionName = "Patient demographics"; ! /** * short name of the function */ private String functionShortName = "Dem"; ! /** * Array of Sidepanels holding the Sidepanels for this function (not used at the moment) */ private SidePanel[] SidePanels = null; ! /** * The GUI part of this function */ private DemographicsFunctionPanel panel; ! /** * EMS ClinicalDocument */ private ClinicalDocument clinicalDocument; ! private InformationRecipient informationRecipient; ! private IntendedRecipient intendedRecipient; ! private RecordTarget recordTarget; ! private PatientRole patientRole; ! private Patient patient; ! private LanguageCommunication languageCommunication; ! private Object[] addresses = new Object[0]; ! private Object[] telecoms = new Object[0]; ! // actually, Authors private Object[] providers = null; ! private AssignedAuthor assignedAuthor; ! private Person person; ! private Object[] ids = new Object[0]; ! /** * sorts the ii's according to primary key value */ private IIComparator iiComparator = new IIComparator(); ! /** * sorts the ad's according to primary key value */ private ADComparator adComparator = new ADComparator(); ! /** * sorts the tel's according to primary key value */ private TELComparator telComparator = new TELComparator(); ! /** * sorts the ii's according to primary key value */ private AuthorClinicalDocComparator authorClinicalDocComparator = new AuthorClinicalDocComparator(); ! /** * Creates a new DemographicsFunction object. --- 72,161 ---- implements PatientCentricFunction { // implementing interface stuff ! /** * Boolean to determine whether the funtion is available */ private boolean available = false; ! /** * Boolean to determine whether the funtion is active */ private boolean active = false; ! /** * Patients' ID */ private String patientID = ""; ! /** * Name of the function */ private String functionName = "Patient demographics"; ! /** * short name of the function */ private String functionShortName = "Dem"; ! /** * Array of Sidepanels holding the Sidepanels for this function (not used at the moment) */ private SidePanel[] SidePanels = null; ! /** * The GUI part of this function */ private DemographicsFunctionPanel panel; ! /** * EMS ClinicalDocument */ private ClinicalDocument clinicalDocument; ! private InformationRecipient informationRecipient; ! private IntendedRecipient intendedRecipient; ! private RecordTarget recordTarget; ! private PatientRole patientRole; ! private Patient patient; ! private LanguageCommunication languageCommunication; ! private Object[] addresses = new Object[0]; ! private Object[] telecoms = new Object[0]; ! // actually, Authors private Object[] providers = null; ! private AssignedAuthor assignedAuthor; ! private Person person; ! private Object[] ids = new Object[0]; ! /** * sorts the ii's according to primary key value */ private IIComparator iiComparator = new IIComparator(); ! /** * sorts the ad's according to primary key value */ private ADComparator adComparator = new ADComparator(); ! /** * sorts the tel's according to primary key value */ private TELComparator telComparator = new TELComparator(); ! /** * sorts the ii's according to primary key value */ private AuthorClinicalDocComparator authorClinicalDocComparator = new AuthorClinicalDocComparator(); ! /** * Creates a new DemographicsFunction object. *************** *** 164,168 **** panel = new DemographicsFunctionPanel(); } ! /** * Creates a new DemographicsFunction object. --- 164,168 ---- panel = new DemographicsFunctionPanel(); } ! /** * Creates a new DemographicsFunction object. *************** *** 179,183 **** demTelUseList, demTelTypeList); } ! /** * Returns whether function is available (not used now) --- 179,183 ---- demTelUseList, demTelTypeList); } ! /** * Returns whether function is available (not used now) *************** *** 187,191 **** return available; } ! /** * Sets function available or not (not used now) --- 187,191 ---- return available; } ! /** * Sets function available or not (not used now) *************** *** 195,199 **** available = isAvailable; } ! /** * Returns whether function is available (not used now) --- 195,199 ---- available = isAvailable; } ! /** * Returns whether function is available (not used now) *************** *** 203,207 **** return active; } ! /** * Sets function available or not (not used now) --- 203,207 ---- return active; } ! /** * Sets function available or not (not used now) *************** *** 211,215 **** active = isActive; } ! /** * Returns Patients' ID --- 211,215 ---- active = isActive; } ! /** * Returns Patients' ID *************** *** 219,223 **** return patientID; } ! /** * sets Patients' ID --- 219,223 ---- return patientID; } ! /** * sets Patients' ID *************** *** 227,231 **** patientID = isPatientID; } ! /** * Returns the function name --- 227,231 ---- patientID = isPatientID; } ! /** * Returns the function name *************** *** 235,239 **** return functionName; } ! /** * Gets the function name --- 235,239 ---- return functionName; } ! /** * Gets the function name *************** *** 243,247 **** functionName = isFunctionName; } ! /** * Returns the function short name --- 243,247 ---- functionName = isFunctionName; } ! /** * Returns the function short name *************** *** 251,255 **** return functionShortName; } ! /** * Sets the function short name --- 251,255 ---- return functionShortName; } ! /** * Sets the function short name *************** *** 259,263 **** functionShortName = isFunctionShortName; } ! /** * returns the side panel at [index] --- 259,263 ---- functionShortName = isFunctionShortName; } ! /** * returns the side panel at [index] *************** *** 268,272 **** return SidePanels[index]; } ! /** * Set sidepanel at [index] --- 268,272 ---- return SidePanels[index]; } ! /** * Set sidepanel at [index] *************** *** 277,281 **** SidePanels[index] = isSidePanel; } ! /** * Return the GUI part of the function --- 277,281 ---- SidePanels[index] = isSidePanel; } ! /** * Return the GUI part of the function *************** *** 285,289 **** return panel; } ! /** * Sets the GUI part of the function --- 285,289 ---- return panel; } ! /** * Sets the GUI part of the function *************** *** 293,316 **** panel = (DemographicsFunctionPanel) isDemographicsFunctionPanel; } ! // dummy for now public boolean isFromAnotherUser(int index) { return false; } ! public void populate(ClinicalDocument clinicalDocument) { this.clinicalDocument = clinicalDocument; list(); } ! protected void list() { PatientRole pr = clinicalDocument.getRecordTarget().getPatientRole(); panel.clear(); ! listIds(); listAddresses(); listTelecoms(); ! listProviders(); ! if (pr.getPatient().getName().getPrefix() != null) { panel.setPrefix(pr.getPatient().getName().getPrefix().getCode()); --- 293,316 ---- panel = (DemographicsFunctionPanel) isDemographicsFunctionPanel; } ! // dummy for now public boolean isFromAnotherUser(int index) { return false; } ! public void populate(ClinicalDocument clinicalDocument) { this.clinicalDocument = clinicalDocument; list(); } ! protected void list() { PatientRole pr = clinicalDocument.getRecordTarget().getPatientRole(); panel.clear(); ! listIds(); listAddresses(); listTelecoms(); ! listProviders(); ! if (pr.getPatient().getName().getPrefix() != null) { panel.setPrefix(pr.getPatient().getName().getPrefix().getCode()); *************** *** 320,331 **** panel.setFamilyName(pr.getPatient().getName().getFamilyName()); panel.setSuffix(pr.getPatient().getName().getSuffix()); ! if (pr.getPatient().getAdministrativeGenderCode() != null) { panel.setGender(pr.getPatient().getAdministrativeGenderCode().getCode()); } ! panel.setBirthTime(pr.getPatient().getBirthTime() == null ? Controller.getInstance().getNow() : pr.getPatient().getBirthTime()); ! if (pr.getPatient().getLanguageCommunication() != null && pr.getPatient().getLanguageCommunication().getLanguageCode() != null) { --- 320,331 ---- panel.setFamilyName(pr.getPatient().getName().getFamilyName()); panel.setSuffix(pr.getPatient().getName().getSuffix()); ! if (pr.getPatient().getAdministrativeGenderCode() != null) { panel.setGender(pr.getPatient().getAdministrativeGenderCode().getCode()); } ! panel.setBirthTime(pr.getPatient().getBirthTime() == null ? Controller.getInstance().getNow() : pr.getPatient().getBirthTime()); ! if (pr.getPatient().getLanguageCommunication() != null && pr.getPatient().getLanguageCommunication().getLanguageCode() != null) { *************** *** 338,348 **** panel.setConfidentiality(clinicalDocument.getCode2().getCode()); } ! // use CE fk code in Entity for Patient.PatientStatus if (pr.getPatient().getCode() != null) { panel.setPatStatus(pr.getPatient().getCode().getCode()); } ! ! if (pr.getPatient().getText() == null) { pr.getPatient().setText(new ST()); --- 338,348 ---- panel.setConfidentiality(clinicalDocument.getCode2().getCode()); } ! // use CE fk code in Entity for Patient.PatientStatus if (pr.getPatient().getCode() != null) { panel.setPatStatus(pr.getPatient().getCode().getCode()); } ! ! if (pr.getPatient().getText() == null) { pr.getPatient().setText(new ST()); *************** *** 354,358 **** panel.setReady(true); } ! protected void listIds(){ ids = clinicalDocument.getRecordTarget().getPatientRole().getIds().toArray(); --- 354,358 ---- panel.setReady(true); } ! protected void listIds(){ ids = clinicalDocument.getRecordTarget().getPatientRole().getIds().toArray(); *************** *** 364,368 **** } } ! protected void listAddresses(){ addresses = clinicalDocument.getRecordTarget().getPatientRole().getAddresses().toArray(); --- 364,368 ---- } } ! protected void listAddresses(){ addresses = clinicalDocument.getRecordTarget().getPatientRole().getAddresses().toArray(); *************** *** 380,384 **** } } ! protected void listTelecoms(){ telecoms = clinicalDocument.getRecordTarget().getPatientRole().getTelecoms().toArray(); --- 380,384 ---- } } ! protected void listTelecoms(){ telecoms = clinicalDocument.getRecordTarget().getPatientRole().getTelecoms().toArray(); *************** *** 394,398 **** } } ! protected void listProviders(){ providers = clinicalDocument.getAuthorClinicalDocs().toArray(); --- 394,398 ---- } } ! protected void listProviders(){ providers = clinicalDocument.getAuthorClinicalDocs().toArray(); *************** *** 416,421 **** } } ! ! /** * @todo Track down location of note field for Patient Cover Sheet --- 416,421 ---- } } ! ! /** * @todo Track down location of note field for Patient Cover Sheet *************** *** 425,438 **** TapasPrinter printer = new TapasPrinter(); printer.printPatientCoverSheet(bean); ! } ! public void printPatientLabel(){ PatientSummaryBean bean = new PatientSummaryBean(clinicalDocument); TapasPrinter printer = new TapasPrinter(); printer.printPatientLabel(bean); ! } ! public void save() { ids = panel.getIds(ids); --- 425,438 ---- TapasPrinter printer = new TapasPrinter(); printer.printPatientCoverSheet(bean); ! } ! public void printPatientLabel(){ PatientSummaryBean bean = new PatientSummaryBean(clinicalDocument); TapasPrinter printer = new TapasPrinter(); printer.printPatientLabel(bean); ! } ! public void save() { ids = panel.getIds(ids); *************** *** 448,464 **** pr.getPatient().setBirthTime(panel.getBirthTime()); pr.getPatient().getLanguageCommunication().setLanguageCode(panel.getLanguage()); ! clinicalDocument.setCode2(panel.getConfidentiality()); pr.getPatient().setCode(panel.getPatStatus()); pr.getPatient().getText().setText(panel.getAdditionalInfo()); - Controller.getInstance().saveObject(pr.getPatient().getLanguageCommunication()); - Controller.getInstance().saveObject(pr.getPatient().getName()); - Controller.getInstance().saveObject(pr.getPatient()); - Controller.getInstance().saveObject(pr); populate((ClinicalDocument) Controller.getInstance().saveObject(clinicalDocument)); Controller.getInstance().refreshPatientFocusDemographics(pr); Controller.getInstance().refreshPatientFocusGp(clinicalDocument); } ! /** * Update the patient tab with the initial of the preferred, or, failing that, the first given name --- 448,460 ---- pr.getPatient().setBirthTime(panel.getBirthTime()); pr.getPatient().getLanguageCommunication().setLanguageCode(panel.getLanguage()); ! clinicalDocument.setCode2(panel.getConfidentiality()); pr.getPatient().setCode(panel.getPatStatus()); pr.getPatient().getText().setText(panel.getAdditionalInfo()); populate((ClinicalDocument) Controller.getInstance().saveObject(clinicalDocument)); Controller.getInstance().refreshPatientFocusDemographics(pr); Controller.getInstance().refreshPatientFocusGp(clinicalDocument); } ! /** * Update the patient tab with the initial of the preferred, or, failing that, the first given name *************** *** 468,472 **** Controller.getInstance().updateTabName(name.getGivenNames() == null? "" : name.getGivenNames().substring(0, 1) + ". " + name.getFamilyName() == null ? "" : name.getFamilyName()); } ! protected void addId() { II newId = new II(); --- 464,468 ---- Controller.getInstance().updateTabName(name.getGivenNames() == null? "" : name.getGivenNames().substring(0, 1) + ". " + name.getFamilyName() == null ? "" : name.getFamilyName()); } ! protected void addId() { II newId = new II(); *************** *** 477,493 **** panel.selectHealthTableRow(ids.length -1); } ! protected void removeId(int index) { if (index > -1 && index < ids.length) { ! clinicalDocument.getRecordTarget().getPatientRole().deleteId( (II) ids[index]); listIds(); if (index == ids.length){ panel.selectHealthTableRow(index - 1); } else { ! panel.selectHealthTableRow(index); } } } ! protected void addAddress(CE type, CE prov, CE country) { AD newAd = new AD(); --- 473,490 ---- panel.selectHealthTableRow(ids.length -1); } ! protected void removeId(int index) { if (index > -1 && index < ids.length) { ! clinicalDocument.getRecordTarget().getPatientRole().deleteId((II)ids[index]); ! Controller.getInstance().deleteObject(ids[index]); listIds(); if (index == ids.length){ panel.selectHealthTableRow(index - 1); } else { ! panel.selectHealthTableRow(index); } } } ! protected void addAddress(CE type, CE prov, CE country) { AD newAd = new AD(); *************** *** 502,519 **** panel.selectAddressTableRow(addresses.length -1); } ! protected void removeAddress(int index) { if (index > -1 && index < addresses.length) { ! clinicalDocument.getRecordTarget().getPatientRole().deleteAddress( (AD) ! addresses[index]); listAddresses(); if (index == addresses.length){ panel.selectAddressTableRow(index - 1); } else { ! panel.selectAddressTableRow(index); } } } ! protected void addTelecom(CE use, CE type) { TEL newTel = new TEL(); --- 499,516 ---- panel.selectAddressTableRow(addresses.length -1); } ! protected void removeAddress(int index) { if (index > -1 && index < addresses.length) { ! clinicalDocument.getRecordTarget().getPatientRole().deleteAddress((AD)addresses[index]); ! Controller.getInstance().deleteObject(addresses[index]); listAddresses(); if (index == addresses.length){ panel.selectAddressTableRow(index - 1); } else { ! panel.selectAddressTableRow(index); } } } ! protected void addTelecom(CE use, CE type) { TEL newTel = new TEL(); *************** *** 526,548 **** panel.selectTelecomTableRow(telecoms.length -1); } ! protected void removeTelecom(int index) { if (index > -1 && index < telecoms.length) { ! clinicalDocument.getRecordTarget().getPatientRole().deleteTelecom( (TEL) ! telecoms[index]); listTelecoms(); if (index == telecoms.length){ panel.selectTelecomTableRow(index - 1); } else { ! panel.selectTelecomTableRow(index); } } } ! protected void addProvider() { Controller.getInstance().populateProviderTable(0, providers, 1); // functionIndex of Demographics = 1 } ! ! public void addNewProvider(Author provider) { AuthorClinicalDoc acd = new AuthorClinicalDoc(); acd.setAuthor(provider); --- 523,545 ---- panel.selectTelecomTableRow(telecoms.length -1); } ! protected void removeTelecom(int index) { if (index > -1 && index < telecoms.length) { ! clinicalDocument.getRecordTarget().getPatientRole().deleteTelecom( (TEL) telecoms[index]); ! Controller.getInstance().deleteObject(telecoms[index]); listTelecoms(); if (index == telecoms.length){ panel.selectTelecomTableRow(index - 1); } else { ! panel.selectTelecomTableRow(index); } } } ! protected void addProvider() { Controller.getInstance().populateProviderTable(0, providers, 1); // functionIndex of Demographics = 1 } ! ! public void addNewProvider(Author provider) { AuthorClinicalDoc acd = new AuthorClinicalDoc(); acd.setAuthor(provider); *************** *** 551,557 **** listProviders(); panel.selectProviderTableRow(providers.length -1); ! panel.setSearchActive(false); //wop } ! protected void removeProvider(int index) { if (index > -1 && index < providers.length) { --- 548,554 ---- listProviders(); panel.selectProviderTableRow(providers.length -1); ! panel.setSearchActive(false); //wop } ! protected void removeProvider(int index) { if (index > -1 && index < providers.length) { *************** *** 561,585 **** panel.selectProviderTableRow(index - 1); } else { ! panel.selectProviderTableRow(index); } } } ! protected int getNumberOfIds() { return ids.length; } ! protected int getNumberOfAddresses() { return addresses.length; } ! protected int getNumberOfTelecoms() { return telecoms.length; } ! protected int getNumberOfProviders() { return providers.length; } ! protected void avoidMultipleTelecomCheckboxes(int index) { for (int i = 0; i < telecoms.length; i++) { --- 558,582 ---- panel.selectProviderTableRow(index - 1); } else { ! panel.selectProviderTableRow(index); } } } ! protected int getNumberOfIds() { return ids.length; } ! protected int getNumberOfAddresses() { return addresses.length; } ! protected int getNumberOfTelecoms() { return telecoms.length; } ! protected int getNumberOfProviders() { return providers.length; } ! protected void avoidMultipleTelecomCheckboxes(int index) { for (int i = 0; i < telecoms.length; i++) { *************** *** 593,597 **** listTelecoms(); } ! protected void avoidMultipleAddressCheckboxes(int index) { for (int i = 0; i < addresses.length; i++) { --- 590,594 ---- listTelecoms(); } ! protected void avoidMultipleAddressCheckboxes(int index) { for (int i = 0; i < addresses.length; i++) { *************** *** 605,609 **** listAddresses(); } ! protected void avoidMultipleProviderCheckboxes(int index) { for (int i = 0; i < providers.length; i++) { --- 602,606 ---- listAddresses(); } ! protected void avoidMultipleProviderCheckboxes(int index) { for (int i = 0; i < providers.length; i++) { *************** *** 617,621 **** listProviders(); } ! protected void dateChanged(boolean saveButtonEnabled, boolean previous) { //mod --- 614,618 ---- listProviders(); } ! protected void dateChanged(boolean saveButtonEnabled, boolean previous) { //mod *************** *** 626,629 **** Controller.getInstance().restorePatientSidePanels(); } ! } --- 623,626 ---- Controller.getInstance().restorePatientSidePanels(); } ! } Index: DemographicsFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/demographics/DemographicsFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DemographicsFunctionPanel.java 23 Mar 2006 01:50:57 -0000 1.1 --- DemographicsFunctionPanel.java 26 Apr 2006 23:10:18 -0000 1.2 *************** *** 52,61 **** public class DemographicsFunctionPanel extends javax.swing.JPanel { ! /** Creates new form DemographicsFunctionPanel */ public DemographicsFunctionPanel() { initComponents(); } ! /** Creates new form DemographicsFunctionPanel */ public DemographicsFunctionPanel(DemographicsFunction function, [...1054 lines suppressed...] ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel PlusMinusPanel1; --- 1779,1783 ---- private boolean toBeCommitted = false; //mod private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel PlusMinusPanel1; *************** *** 1843,1846 **** private javax.swing.JPanel titlePanel; // End of variables declaration//GEN-END:variables ! } --- 1843,1846 ---- private javax.swing.JPanel titlePanel; // End of variables declaration//GEN-END:variables ! } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:26
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/prescriptions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/prescriptions Modified Files: PrescriptionsFunction.java PrescriptionsFunctionPanel.java Log Message: port changes over to r1 Index: PrescriptionsFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/prescriptions/PrescriptionsFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PrescriptionsFunction.java 23 Mar 2006 01:51:48 -0000 1.1 --- PrescriptionsFunction.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 56,190 **** */ public class PrescriptionsFunction implements PatientCentricFunction { ! /** * Boolean to determine whether the user hase write access to this function */ private boolean canWrite = false ; //cw ! private boolean doLoad = true; //mod ! [...1254 lines suppressed...] return canWrite; } ! } --- 927,941 ---- } } ! protected void removeSearchPanel() { Controller.getInstance().restorePatientSidePanels(); } ! private void jbInit() throws Exception { } ! protected boolean canWrite(){ //cw return canWrite; } ! } Index: PrescriptionsFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/prescriptions/PrescriptionsFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PrescriptionsFunctionPanel.java 23 Mar 2006 01:51:48 -0000 1.1 --- PrescriptionsFunctionPanel.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 1054,1058 **** if (table.getSelectedRow() > function.getNumberOfSans() - 1) { table.setRowSelectionInterval(function.getNumberOfSans() - 1, function.getNumberOfSans() - 1); ! } if (function.getState() != 'x' && function.canWrite()){ function.removeSearchPanel(); --- 1054,1058 ---- if (table.getSelectedRow() > function.getNumberOfSans() - 1) { table.setRowSelectionInterval(function.getNumberOfSans() - 1, function.getNumberOfSans() - 1); ! } if (function.getState() != 'x' && function.canWrite()){ function.removeSearchPanel(); *************** *** 1373,1381 **** } ! protected void setCommentsTextArea(String text){ commentsTextArea.setText(text); } ! protected String getCommentsTextArea(){ return commentsTextArea.getText(); } --- 1373,1381 ---- } ! protected void setComments(String text){ commentsTextArea.setText(text); } ! protected String getComments(){ return commentsTextArea.getText(); } *************** *** 1963,1967 **** endDateTextField.setEnabled(false); } ! protected void setSearchActive(boolean active){ //wop searchActive = active; --- 1963,1967 ---- endDateTextField.setEnabled(false); } ! protected void setSearchActive(boolean active){ //wop searchActive = active; |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:24
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/roler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/roler Modified Files: RolerFunction.java RolerFunctionPanel.form RolerFunctionPanel.java Log Message: port changes over to r1 Index: RolerFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/roler/RolerFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RolerFunctionPanel.java 23 Mar 2006 01:51:49 -0000 1.1 --- RolerFunctionPanel.java 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 40,44 **** public class RolerFunctionPanel extends javax.swing.JPanel { ! /** Creates new form MessagesFunctionPanel */ public RolerFunctionPanel(RolerFunction function) { --- 40,44 ---- public class RolerFunctionPanel extends javax.swing.JPanel { ! /** Creates new form MessagesFunctionPanel */ public RolerFunctionPanel(RolerFunction function) { *************** *** 47,51 **** adjustColumns(); } ! /** This method is called from within the constructor to * initialize the form. --- 47,51 ---- adjustColumns(); } ! /** This method is called from within the constructor to * initialize the form. *************** *** 201,204 **** --- 201,210 ---- deleteRoleButton.setMinimumSize(new java.awt.Dimension(90, 22)); deleteRoleButton.setPreferredSize(new java.awt.Dimension(90, 22)); + deleteRoleButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + deleteRoleButtonActionPerformed(evt); + } + }); + buttonPanel.add(deleteRoleButton); *************** *** 421,429 **** }// </editor-fold>//GEN-END:initComponents private void findTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_findTextFieldKeyReleased function.list(); cancel(); }//GEN-LAST:event_findTextFieldKeyReleased ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); --- 427,439 ---- }// </editor-fold>//GEN-END:initComponents + private void deleteRoleButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteRoleButtonActionPerformed + function.remove(); + }//GEN-LAST:event_deleteRoleButtonActionPerformed + private void findTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_findTextFieldKeyReleased function.list(); cancel(); }//GEN-LAST:event_findTextFieldKeyReleased ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); *************** *** 431,443 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_cancelButtonActionPerformed ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased enableSaveButton(true, false);//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown ready = true; //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ --- 441,453 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_cancelButtonActionPerformed ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased enableSaveButton(true, false);//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown ready = true; //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ *************** *** 454,468 **** } }//GEN-LAST:event_formComponentHidden ! private void addRoleButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addRoleButtonActionPerformed function.createNewRole(); enableSaveButton(true, false);//mod }//GEN-LAST:event_addRoleButtonActionPerformed ! private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveButtonActionPerformed function.save(getSelectedTableRow()); enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed if (currentTable.getSelectedRow() < function.getNumberOfUsers() && currentTable.getSelectedRow() > -1){ --- 464,478 ---- } }//GEN-LAST:event_formComponentHidden ! private void addRoleButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addRoleButtonActionPerformed function.createNewRole(); enableSaveButton(true, false);//mod }//GEN-LAST:event_addRoleButtonActionPerformed ! private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveButtonActionPerformed function.save(getSelectedTableRow()); enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed if (currentTable.getSelectedRow() < function.getNumberOfUsers() && currentTable.getSelectedRow() > -1){ *************** *** 471,475 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_removeButtonActionPerformed ! private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed if (availableTable.getSelectedRow() < function.getNumberOfAvailableUsers() && availableTable.getSelectedRow() > -1){ --- 481,485 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_removeButtonActionPerformed ! private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed if (availableTable.getSelectedRow() < function.getNumberOfAvailableUsers() && availableTable.getSelectedRow() > -1){ *************** *** 478,545 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_addButtonActionPerformed ! private void availableTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_availableTableMouseClicked limitRowSelection(availableTable, function.getNumberOfAvailableUsers()); }//GEN-LAST:event_availableTableMouseClicked ! private void availableTableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_availableTableKeyReleased limitRowSelection(availableTable, function.getNumberOfAvailableUsers()); }//GEN-LAST:event_availableTableKeyReleased ! private void currentTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_currentTableMouseClicked limitRowSelection(currentTable, function.getNumberOfUsers()); }//GEN-LAST:event_currentTableMouseClicked ! private void currentTableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_currentTableKeyReleased limitRowSelection(currentTable, function.getNumberOfUsers()); }//GEN-LAST:event_currentTableKeyReleased ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased limitRowSelection(table, function.getNumberOfRoles()); function.loadInEditor(getSelectedTableRow()); }//GEN-LAST:event_tableKeyReleased ! private void tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMouseClicked limitRowSelection(table, function.getNumberOfRoles()); function.loadInEditor(getSelectedTableRow()); }//GEN-LAST:event_tableMouseClicked ! protected void addRoleRow(String roleName, int numberOfUsers, int row){ table.getModel().setValueAt(roleName, row, 0); table.getModel().setValueAt(numberOfUsers, row, 1); } ! protected void setRoleTableRows(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void setCurrentTableRows(int index){ //new ((DefaultTableModel) currentTable.getModel()).setRowCount(index); } ! protected void setAvailableTableRows(int index){ //new ((DefaultTableModel) availableTable.getModel()).setRowCount(index); } ! protected String getFindTextField(){ return findTextField.getText(); } ! protected void addUser(String userName, int row){ currentTable.getModel().setValueAt(userName, row, 0); } ! protected void addAvailableUser(String userName, int row){ availableTable.getModel().setValueAt(userName, row, 0); } ! protected void setNameTextField(String text){ nameTextField.setText(text); } ! protected String getNameTextField(){ return nameTextField.getText(); } ! private void adjustColumns(){ currentTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); --- 488,561 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_addButtonActionPerformed ! private void availableTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_availableTableMouseClicked limitRowSelection(availableTable, function.getNumberOfAvailableUsers()); }//GEN-LAST:event_availableTableMouseClicked ! private void availableTableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_availableTableKeyReleased limitRowSelection(availableTable, function.getNumberOfAvailableUsers()); }//GEN-LAST:event_availableTableKeyReleased ! private void currentTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_currentTableMouseClicked limitRowSelection(currentTable, function.getNumberOfUsers()); }//GEN-LAST:event_currentTableMouseClicked ! private void currentTableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_currentTableKeyReleased limitRowSelection(currentTable, function.getNumberOfUsers()); }//GEN-LAST:event_currentTableKeyReleased ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased limitRowSelection(table, function.getNumberOfRoles()); function.loadInEditor(getSelectedTableRow()); }//GEN-LAST:event_tableKeyReleased ! private void tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMouseClicked limitRowSelection(table, function.getNumberOfRoles()); function.loadInEditor(getSelectedTableRow()); }//GEN-LAST:event_tableMouseClicked ! protected void addRoleRow(String roleName, int numberOfUsers, int row){ table.getModel().setValueAt(roleName, row, 0); table.getModel().setValueAt(numberOfUsers, row, 1); } ! ! protected void selectTableRow(int index){ //new ! if (index > -1){ ! table.setRowSelectionInterval(index, index); ! } ! } ! protected void setRoleTableRows(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void setCurrentTableRows(int index){ //new ((DefaultTableModel) currentTable.getModel()).setRowCount(index); } ! protected void setAvailableTableRows(int index){ //new ((DefaultTableModel) availableTable.getModel()).setRowCount(index); } ! protected String getFindTextField(){ return findTextField.getText(); } ! protected void addUser(String userName, int row){ currentTable.getModel().setValueAt(userName, row, 0); } ! protected void addAvailableUser(String userName, int row){ availableTable.getModel().setValueAt(userName, row, 0); } ! protected void setNameTextField(String text){ nameTextField.setText(text); } ! protected String getNameTextField(){ return nameTextField.getText(); } ! private void adjustColumns(){ currentTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); *************** *** 549,553 **** table.getColumnModel().getColumn(1).setMinWidth(100); } ! private void limitRowSelection(javax.swing.JTable table, int rows){ if (rows > 0){ --- 565,569 ---- table.getColumnModel().getColumn(1).setMinWidth(100); } ! private void limitRowSelection(javax.swing.JTable table, int rows){ if (rows > 0){ *************** *** 559,567 **** } } ! protected int getSelectedTableRow(){ return table.getSelectedRow(); } ! protected void clear(){ ((DefaultTableModel) availableTable.getModel()).setRowCount(0); //new --- 575,583 ---- } } ! protected int getSelectedTableRow(){ return table.getSelectedRow(); } ! protected void clear(){ ((DefaultTableModel) availableTable.getModel()).setRowCount(0); //new *************** *** 569,573 **** setNameTextField("") ; } ! protected void enableSaveButton(boolean enabled, boolean previous){ if (ready || previous){ --- 585,589 ---- setNameTextField("") ; } ! protected void enableSaveButton(boolean enabled, boolean previous){ if (ready || previous){ *************** *** 577,591 **** } } ! protected void cancel(){ //clear();//mod enableSaveButton(false, false); //mod } ! ! private RolerFunction function ; private boolean ready = false; //mod private boolean toBeCommitted = false; //mod ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton addButton; --- 593,611 ---- } } ! protected void cancel(){ //clear();//mod enableSaveButton(false, false); //mod } ! ! protected void focusName(){ ! nameTextField.requestFocus(); ! } ! ! private RolerFunction function ; private boolean ready = false; //mod private boolean toBeCommitted = false; //mod ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton addButton; *************** *** 617,620 **** private javax.swing.JPanel titleTitlePanel; // End of variables declaration//GEN-END:variables ! } --- 637,640 ---- private javax.swing.JPanel titleTitlePanel; // End of variables declaration//GEN-END:variables ! } Index: RolerFunctionPanel.form =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/roler/RolerFunctionPanel.form,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RolerFunctionPanel.form 23 Mar 2006 01:51:49 -0000 1.1 --- RolerFunctionPanel.form 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 206,209 **** --- 206,212 ---- </Property> </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteRoleButtonActionPerformed"/> + </Events> </Component> </SubComponents> Index: RolerFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/roler/RolerFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RolerFunction.java 23 Mar 2006 01:51:49 -0000 1.1 --- RolerFunction.java 26 Apr 2006 23:10:20 -0000 1.2 *************** *** 249,254 **** --- 249,256 ---- TapasUser tapasAvailableUser = (TapasUser) tapasAvailableUserArray[userIndex]; tapasRole.addTapasUser(tapasAvailableUser); + tapasRole.setName(panel.getNameTextField()); Controller.getInstance().saveObject(tapasRole); list(); + panel.selectTableRow(roleIndex); loadInEditor(roleIndex); } *************** *** 260,263 **** --- 262,266 ---- Controller.getInstance().saveObject(tapasRole); list(); + panel.selectTableRow(roleIndex); loadInEditor(roleIndex); } *************** *** 268,271 **** --- 271,275 ---- Controller.getInstance().saveObject(tapasRole); list(); + panel.selectTableRow(index); } *************** *** 276,280 **** --- 280,301 ---- newRole.setDescription("new role description"); Controller.getInstance().saveObject(newRole); + Controller.getInstance().refreshTapasRoles(); list(); + panel.selectTableRow(getNumberOfRoles() -1); + loadInEditor(getNumberOfRoles() -1); + panel.focusName(); + } + + protected void remove(){ + int row = panel.getSelectedTableRow(); + TapasRole rle = (TapasRole) tapasRoleArray[row]; + int option = JOptionPane.showConfirmDialog(Controller.getInstance().getMainFrame(), "Do you really want to permanently delete role '" + rle.getName() + "'?\n - Users having this role will not be deleted.", "CAUTION!", JOptionPane.YES_NO_OPTION); + if (option == JOptionPane.YES_OPTION) { + Controller.getInstance().deleteObject(rle); + Controller.getInstance().refreshTapasRoles(); + list(); + panel.cancel(); + panel.clear(); + } } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:24
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/messaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/messaging Modified Files: MessagingFunction.java MessagingFunctionPanel.java Log Message: port changes over to r1 Index: MessagingFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/messaging/MessagingFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MessagingFunction.java 23 Mar 2006 01:51:48 -0000 1.1 --- MessagingFunction.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 57,101 **** */ private boolean active = false; ! private SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yy hh:mm a"); ! private SimpleDateFormat todaysSdf = new SimpleDateFormat("hh:mm a"); ! /** * Name of the function */ private String functionName = "My Messages"; ! /** * Short name of the function this panel performs (i.e. for use on tabs) */ private String functionShortName = "Messages"; ! /** * Array of Sidepanels holding the Sidepanels for this function (not used at the moment) */ private SidePanel[] SidePanels = null; ! /** * The GUI part of this function */ private MessagingFunctionPanel panel; ! ! private Object[] tapasUsers = null; private TapasUserComparator userComparator = new TapasUserComparator(); private TapasMessageComparator messageComparator = new TapasMessageComparator() ; private TapasUserMessageComparator userMessageComparator = new TapasUserMessageComparator() ; ! TapasUserMessage tum; TapasUser cu ; TapasMessage tm; ! ! private Object[] receivedUserMessages = null ; private Object[] sentMessages = null ; ! private int i , j, k ; ! /** * Creates a new MessagingFunction object. --- 57,101 ---- */ private boolean active = false; ! private SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yy hh:mm a"); ! private SimpleDateFormat todaysSdf = new SimpleDateFormat("hh:mm a"); ! /** * Name of the function */ private String functionName = "My Messages"; ! /** * Short name of the function this panel performs (i.e. for use on tabs) */ private String functionShortName = "Messages"; ! /** * Array of Sidepanels holding the Sidepanels for this function (not used at the moment) */ private SidePanel[] SidePanels = null; ! /** * The GUI part of this function */ private MessagingFunctionPanel panel; ! ! private Object[] tapasUsers = null; private TapasUserComparator userComparator = new TapasUserComparator(); private TapasMessageComparator messageComparator = new TapasMessageComparator() ; private TapasUserMessageComparator userMessageComparator = new TapasUserMessageComparator() ; ! TapasUserMessage tum; TapasUser cu ; TapasMessage tm; ! ! private Object[] receivedUserMessages = null ; private Object[] sentMessages = null ; ! private int i , j, k ; ! /** * Creates a new MessagingFunction object. *************** *** 105,110 **** Arrays.sort(tapasUsers, userComparator); panel = new MessagingFunctionPanel(this, tapasUsers); } ! /** * Returns whether function is active (not used now) --- 105,111 ---- Arrays.sort(tapasUsers, userComparator); panel = new MessagingFunctionPanel(this, tapasUsers); + setActive(false); } ! /** * Returns whether function is active (not used now) *************** *** 114,118 **** return active; } ! /** * Sets function active or not (not used now) --- 115,119 ---- return active; } ! /** * Sets function active or not (not used now) *************** *** 122,126 **** active = isActive; } ! /** * Returns the name of the function --- 123,127 ---- active = isActive; } ! /** * Returns the name of the function *************** *** 130,134 **** return functionName; } ! /** * Sets the name of the function --- 131,135 ---- return functionName; } ! /** * Sets the name of the function *************** *** 138,142 **** functionName = isFunctionName; } ! /** * Gets the name of the function --- 139,143 ---- functionName = isFunctionName; } ! /** * Gets the name of the function *************** *** 146,150 **** return functionShortName; } ! /** * Sets the short name of the function --- 147,151 ---- return functionShortName; } ! /** * Sets the short name of the function *************** *** 154,158 **** functionShortName = isFunctionShortName; } ! /** * returns the side panel at [index] --- 155,159 ---- functionShortName = isFunctionShortName; } ! /** * returns the side panel at [index] *************** *** 163,167 **** return SidePanels[index]; } ! /** * Set sidepanel at [index] --- 164,168 ---- return SidePanels[index]; } ! /** * Set sidepanel at [index] *************** *** 172,176 **** SidePanels[index] = isSidePanel; } ! /** * Returns the panel / GUI part of the function --- 173,177 ---- SidePanels[index] = isSidePanel; } ! /** * Returns the panel / GUI part of the function *************** *** 180,184 **** return panel; } ! /** * Sets the panel / GUI part of the function --- 181,185 ---- return panel; } ! /** * Sets the panel / GUI part of the function *************** *** 188,192 **** this.panel = (MessagingFunctionPanel) panel; } ! public boolean isNotRead(int index) { try { --- 189,193 ---- this.panel = (MessagingFunctionPanel) panel; } ! public boolean isNotRead(int index) { try { *************** *** 203,207 **** } } ! public boolean isUrgent(int index){ try { --- 204,208 ---- } } ! public boolean isUrgent(int index){ try { *************** *** 219,266 **** } } ! public void populate(TapasUser currentUser){ ! this.cu = currentUser; ! //cu = Controller.getInstance().getCurrentUser(); ! receivedUserMessages = cu.getReceivedUserMessages().toArray(); ! ! // all this is to filter out the archived messages in a neat way ! Object[] dummyReceived = new Object[receivedUserMessages.length]; ! j = 0 ; ! k = 0 ; ! for(Object obj : receivedUserMessages){ ! if (!((TapasUserMessage)obj).getArchived()){ ! System.arraycopy(receivedUserMessages, j, dummyReceived, k, 1); ! k++ ; } ! j++ ; ! } ! ! receivedUserMessages = new Object[k]; ! for(j = 0 ; j < k ; j++){ ! System.arraycopy(dummyReceived, j, receivedUserMessages, j, 1); ! } ! Arrays.sort(receivedUserMessages, userMessageComparator); ! ! sentMessages = cu.getSentMessages().toArray(); ! Object[] dummySent = new Object[sentMessages.length]; ! j = 0 ; ! k = 0 ; ! for(Object obj : sentMessages){ ! if (!((TapasMessage)obj).getArchived()){ ! System.arraycopy(sentMessages, j, dummySent, k, 1); ! k++ ; } ! j++ ; ! } ! ! sentMessages = new Object[k]; ! for(j = 0 ; j < k ; j++){ ! System.arraycopy(dummySent, j, sentMessages, j, 1); } - Arrays.sort(sentMessages, messageComparator); - list(); } ! public void list(){ panel.clearAll(); --- 220,269 ---- } } ! public void populate(TapasUser currentUser){ ! if (!isActive()){ ! this.cu = currentUser; ! //cu = Controller.getInstance().getCurrentUser(); ! receivedUserMessages = cu.getReceivedUserMessages().toArray(); ! ! // all this is to filter out the archived messages in a neat way ! Object[] dummyReceived = new Object[receivedUserMessages.length]; ! j = 0 ; ! k = 0 ; ! for(Object obj : receivedUserMessages){ ! if (!((TapasUserMessage)obj).getArchived()){ ! System.arraycopy(receivedUserMessages, j, dummyReceived, k, 1); ! k++ ; ! } ! j++ ; } ! ! receivedUserMessages = new Object[k]; ! for(j = 0 ; j < k ; j++){ ! System.arraycopy(dummyReceived, j, receivedUserMessages, j, 1); } ! Arrays.sort(receivedUserMessages, userMessageComparator); ! ! sentMessages = cu.getSentMessages().toArray(); ! Object[] dummySent = new Object[sentMessages.length]; ! j = 0 ; ! k = 0 ; ! for(Object obj : sentMessages){ ! if (!((TapasMessage)obj).getArchived()){ ! System.arraycopy(sentMessages, j, dummySent, k, 1); ! k++ ; ! } ! j++ ; ! } ! ! sentMessages = new Object[k]; ! for(j = 0 ; j < k ; j++){ ! System.arraycopy(dummySent, j, sentMessages, j, 1); ! } ! Arrays.sort(sentMessages, messageComparator); ! list(); } } ! public void list(){ panel.clearAll(); *************** *** 269,273 **** Controller.getInstance().clearMessageAlerts(); if (panel.getBox() == 'i'){ // inbox ! List filteredReceivedUserMessages = new ArrayList(); if (panel.getFindTextField().length() != 0){ --- 272,276 ---- Controller.getInstance().clearMessageAlerts(); if (panel.getBox() == 'i'){ // inbox ! List filteredReceivedUserMessages = new ArrayList(); if (panel.getFindTextField().length() != 0){ *************** *** 281,287 **** receivedUserMessages = filteredReceivedUserMessages.toArray(); } ! panel.setTableRows(receivedUserMessages.length);//new ! for (Object obj : receivedUserMessages) { tum = (TapasUserMessage) obj ; --- 284,290 ---- receivedUserMessages = filteredReceivedUserMessages.toArray(); } ! panel.setTableRows(receivedUserMessages.length);//new ! for (Object obj : receivedUserMessages) { tum = (TapasUserMessage) obj ; *************** *** 300,304 **** } } else { // outbox ! List filteredSentMessages = new ArrayList(); if (panel.getFindTextField().length() != 0){ --- 303,307 ---- } } else { // outbox ! List filteredSentMessages = new ArrayList(); if (panel.getFindTextField().length() != 0){ *************** *** 312,316 **** sentMessages = filteredSentMessages.toArray(); } ! panel.setTableRows(sentMessages.length);//new for (Object obj : sentMessages) { --- 315,319 ---- sentMessages = filteredSentMessages.toArray(); } ! panel.setTableRows(sentMessages.length);//new for (Object obj : sentMessages) { *************** *** 329,336 **** i++; } ! } } ! protected void loadInEditor(int index){ try{ --- 332,339 ---- i++; } ! } } ! protected void loadInEditor(int index){ try{ *************** *** 363,378 **** } } catch (ArrayIndexOutOfBoundsException e) {} ! } ! protected int getNumberOfMessages(){ return i ; } ! protected void newMsg(){ panel.clearEditor(); panel.setEditable(true); } ! protected void sendMsg(){ TapasMessage newMessage = new TapasMessage() ; --- 366,381 ---- } } catch (ArrayIndexOutOfBoundsException e) {} ! } ! protected int getNumberOfMessages(){ return i ; } ! protected void newMsg(){ panel.clearEditor(); panel.setEditable(true); } ! protected void sendMsg(){ TapasMessage newMessage = new TapasMessage() ; *************** *** 402,406 **** checkNewMail(); } ! protected void archive(int index){ try{ --- 405,409 ---- checkNewMail(); } ! protected void archive(int index){ try{ *************** *** 409,413 **** tum.setArchived(true); tum = (TapasUserMessage) Controller.getInstance().saveObject(tum); ! } else { tm = (TapasMessage) sentMessages[index]; --- 412,416 ---- tum.setArchived(true); tum = (TapasUserMessage) Controller.getInstance().saveObject(tum); ! } else { tm = (TapasMessage) sentMessages[index]; *************** *** 418,422 **** populate(cu); } ! protected void checkNewMail(){ Controller.getInstance().refreshCurrentUser(cu.getUserName()); --- 421,425 ---- populate(cu); } ! protected void checkNewMail(){ Controller.getInstance().refreshCurrentUser(cu.getUserName()); *************** *** 424,428 **** populate(cu); } ! protected void reply(boolean isReply, int index){ String sender = "" ; --- 427,431 ---- populate(cu); } ! protected void reply(boolean isReply, int index){ String sender = "" ; *************** *** 446,450 **** } catch (ArrayIndexOutOfBoundsException e) {} } ! protected void asterisker(boolean sendButtonEnabled, boolean previous){ Controller.getInstance().asterisker(sendButtonEnabled, previous); --- 449,453 ---- } catch (ArrayIndexOutOfBoundsException e) {} } ! protected void asterisker(boolean sendButtonEnabled, boolean previous){ Controller.getInstance().asterisker(sendButtonEnabled, previous); Index: MessagingFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/messaging/MessagingFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MessagingFunctionPanel.java 23 Mar 2006 01:51:48 -0000 1.1 --- MessagingFunctionPanel.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 42,46 **** public class MessagingFunctionPanel extends javax.swing.JPanel { ! /** Creates new form MessagesFunctionPanel */ public MessagingFunctionPanel(MessagingFunction function, Object[] tapasUsers) { --- 42,46 ---- public class MessagingFunctionPanel extends javax.swing.JPanel { ! /** Creates new form MessagesFunctionPanel */ public MessagingFunctionPanel(MessagingFunction function, Object[] tapasUsers) { *************** *** 52,56 **** setEditable(false); } ! /** This method is called from within the constructor to * initialize the form. --- 52,56 ---- setEditable(false); } ! /** This method is called from within the constructor to * initialize the form. *************** *** 487,501 **** }// </editor-fold>//GEN-END:initComponents ! private void filterBoxComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filterBoxComboBoxActionPerformed function.populate(Controller.getInstance().getCurrentUser()); cancel(); }//GEN-LAST:event_filterBoxComboBoxActionPerformed ! private void findTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_findTextFieldKeyReleased function.populate(Controller.getInstance().getCurrentUser()); cancel(); }//GEN-LAST:event_findTextFieldKeyReleased ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (sendButton.isEnabled()){ --- 487,501 ---- }// </editor-fold>//GEN-END:initComponents ! private void filterBoxComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filterBoxComboBoxActionPerformed function.populate(Controller.getInstance().getCurrentUser()); cancel(); }//GEN-LAST:event_filterBoxComboBoxActionPerformed ! private void findTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_findTextFieldKeyReleased function.populate(Controller.getInstance().getCurrentUser()); cancel(); }//GEN-LAST:event_findTextFieldKeyReleased ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (sendButton.isEnabled()){ *************** *** 516,524 **** } }//GEN-LAST:event_formComponentHidden ! private void printButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_printButtonActionPerformed // TODO add your handling code here: }//GEN-LAST:event_printButtonActionPerformed ! private void fwdButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fwdButtonActionPerformed function.reply(false, table.getSelectedRow()); --- 516,524 ---- } }//GEN-LAST:event_formComponentHidden ! private void printButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_printButtonActionPerformed // TODO add your handling code here: }//GEN-LAST:event_printButtonActionPerformed ! private void fwdButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fwdButtonActionPerformed function.reply(false, table.getSelectedRow()); *************** *** 528,533 **** checkNewMailButton.setEnabled(false); newButton.setEnabled(false); }//GEN-LAST:event_fwdButtonActionPerformed ! private void replyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_replyButtonActionPerformed function.reply(true, table.getSelectedRow()); --- 528,534 ---- checkNewMailButton.setEnabled(false); newButton.setEnabled(false); + function.setActive(true); }//GEN-LAST:event_fwdButtonActionPerformed ! private void replyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_replyButtonActionPerformed function.reply(true, table.getSelectedRow()); *************** *** 537,550 **** checkNewMailButton.setEnabled(false); newButton.setEnabled(false); }//GEN-LAST:event_replyButtonActionPerformed ! private void checkNewMailButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkNewMailButtonActionPerformed function.checkNewMail(); }//GEN-LAST:event_checkNewMailButtonActionPerformed ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void userListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_userListMouseClicked if (!subjectTextField.getText().equalsIgnoreCase("") && userList.getSelectedIndices().length != 0){ --- 538,552 ---- checkNewMailButton.setEnabled(false); newButton.setEnabled(false); + function.setActive(true); }//GEN-LAST:event_replyButtonActionPerformed ! private void checkNewMailButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkNewMailButtonActionPerformed function.checkNewMail(); }//GEN-LAST:event_checkNewMailButtonActionPerformed ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void userListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_userListMouseClicked if (!subjectTextField.getText().equalsIgnoreCase("") && userList.getSelectedIndices().length != 0){ *************** *** 556,560 **** } }//GEN-LAST:event_userListMouseClicked ! private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButtonActionPerformed function.archive(table.getSelectedRow()); --- 558,562 ---- } }//GEN-LAST:event_userListMouseClicked ! private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButtonActionPerformed function.archive(table.getSelectedRow()); *************** *** 562,566 **** newButton.setEnabled(true); }//GEN-LAST:event_deleteButtonActionPerformed ! private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed function.sendMsg(); --- 564,568 ---- newButton.setEnabled(true); }//GEN-LAST:event_deleteButtonActionPerformed ! private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed function.sendMsg(); *************** *** 569,574 **** clearEditor(); setEditable(false); }//GEN-LAST:event_sendButtonActionPerformed ! private void subjectTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_subjectTextFieldKeyReleased if (!subjectTextField.getText().equalsIgnoreCase("") && userList.getSelectedIndices().length != 0){ --- 571,577 ---- clearEditor(); setEditable(false); + function.setActive(false); }//GEN-LAST:event_sendButtonActionPerformed ! private void subjectTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_subjectTextFieldKeyReleased if (!subjectTextField.getText().equalsIgnoreCase("") && userList.getSelectedIndices().length != 0){ *************** *** 580,589 **** } }//GEN-LAST:event_subjectTextFieldKeyReleased ! private void newButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newButtonActionPerformed function.newMsg(); deselectUser(); }//GEN-LAST:event_newButtonActionPerformed ! private void tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMouseClicked limitRowSelection(table, function.getNumberOfMessages()); --- 583,593 ---- } }//GEN-LAST:event_subjectTextFieldKeyReleased ! private void newButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newButtonActionPerformed function.newMsg(); deselectUser(); + function.setActive(true); }//GEN-LAST:event_newButtonActionPerformed ! private void tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMouseClicked limitRowSelection(table, function.getNumberOfMessages()); *************** *** 592,597 **** enableButtons(true); checkNewMailButton.setEnabled(true); }//GEN-LAST:event_tableMouseClicked ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased limitRowSelection(table, function.getNumberOfMessages()); --- 596,602 ---- enableButtons(true); checkNewMailButton.setEnabled(true); + function.setActive(true); }//GEN-LAST:event_tableMouseClicked ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased limitRowSelection(table, function.getNumberOfMessages()); *************** *** 600,609 **** enableButtons(true); checkNewMailButton.setEnabled(true); }//GEN-LAST:event_tableKeyReleased ! private void subjectTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_subjectTextFieldActionPerformed // TODO add your handling code here: }//GEN-LAST:event_subjectTextFieldActionPerformed ! private void mailBoxComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mailBoxComboBoxActionPerformed cancel(); --- 605,615 ---- enableButtons(true); checkNewMailButton.setEnabled(true); + function.setActive(true); }//GEN-LAST:event_tableKeyReleased ! private void subjectTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_subjectTextFieldActionPerformed // TODO add your handling code here: }//GEN-LAST:event_subjectTextFieldActionPerformed ! private void mailBoxComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mailBoxComboBoxActionPerformed cancel(); *************** *** 617,621 **** changeFilterCombobox(getBox()); }//GEN-LAST:event_mailBoxComboBoxActionPerformed ! protected void addRow(String sent, String from, String subject, int row){ table.getModel().setValueAt(sent, row, 0); --- 623,627 ---- changeFilterCombobox(getBox()); }//GEN-LAST:event_mailBoxComboBoxActionPerformed ! protected void addRow(String sent, String from, String subject, int row){ table.getModel().setValueAt(sent, row, 0); *************** *** 626,630 **** table.getColumnModel().getColumn(2).setCellRenderer(Controller.getInstance().getMessageRenderer()); } ! protected void selectTableRow(int index){ //new if (index > -1){ --- 632,636 ---- table.getColumnModel().getColumn(2).setCellRenderer(Controller.getInstance().getMessageRenderer()); } ! protected void selectTableRow(int index){ //new if (index > -1){ *************** *** 632,672 **** } } ! protected void setTableRows(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected String getFindTextField(){ return findTextField.getText(); } ! protected int getFilterComboBox(){ return filterBoxComboBox.getSelectedIndex(); } ! protected void setSubject(String text){ subjectTextField.setText(text); } ! protected String getSubject(){ return subjectTextField.getText(); } ! protected void setBody(String text){ bodyTextArea.setText(text); } ! protected String getBody(){ return bodyTextArea.getText(); } ! protected boolean getUrgent(){ return urgentCheckBox.isSelected(); } ! protected void setUrgent(boolean selected){ urgentCheckBox.setSelected(selected); } ! protected Object[] getToes(){ int[] selectedIndices = userList.getSelectedIndices() ; --- 638,678 ---- } } ! protected void setTableRows(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected String getFindTextField(){ return findTextField.getText(); } ! protected int getFilterComboBox(){ return filterBoxComboBox.getSelectedIndex(); } ! protected void setSubject(String text){ subjectTextField.setText(text); } ! protected String getSubject(){ return subjectTextField.getText(); } ! protected void setBody(String text){ bodyTextArea.setText(text); } ! protected String getBody(){ return bodyTextArea.getText(); } ! protected boolean getUrgent(){ return urgentCheckBox.isSelected(); } ! protected void setUrgent(boolean selected){ urgentCheckBox.setSelected(selected); } ! protected Object[] getToes(){ int[] selectedIndices = userList.getSelectedIndices() ; *************** *** 679,683 **** return selectedUsers ; } ! private void adjustColumns(){ table.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); --- 685,689 ---- return selectedUsers ; } ! private void adjustColumns(){ table.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); *************** *** 687,691 **** table.getColumnModel().getColumn(1).setMaxWidth(130); } ! private void populateUsers(){ userNames = new String[tapasUsers.length]; --- 693,697 ---- table.getColumnModel().getColumn(1).setMaxWidth(130); } ! private void populateUsers(){ userNames = new String[tapasUsers.length]; *************** *** 696,704 **** i++; } ! userList.setListData(userNames); userList.validate(); } ! protected char getBox(){ if (mailBoxComboBox.getSelectedIndex() == 0){ --- 702,710 ---- i++; } ! userList.setListData(userNames); userList.validate(); } ! protected char getBox(){ if (mailBoxComboBox.getSelectedIndex() == 0){ *************** *** 708,717 **** } } ! protected void clearAll(){ clearEditor(); clearTable(); } ! protected void clearEditor(){ subjectTextField.setText(""); --- 714,723 ---- } } ! protected void clearAll(){ clearEditor(); clearTable(); } ! protected void clearEditor(){ subjectTextField.setText(""); *************** *** 721,729 **** deselectUser(); } ! protected void clearTable(){ ((DefaultTableModel) table.getModel()).setRowCount(0); //new } ! private void limitRowSelection(javax.swing.JTable table, int rows){ if (rows > 0){ --- 727,735 ---- deselectUser(); } ! protected void clearTable(){ ((DefaultTableModel) table.getModel()).setRowCount(0); //new } ! private void limitRowSelection(javax.swing.JTable table, int rows){ if (rows > 0){ *************** *** 735,739 **** } } ! protected void setEditable(boolean editable){ subjectTextField.setEditable(editable); --- 741,745 ---- } } ! protected void setEditable(boolean editable){ subjectTextField.setEditable(editable); *************** *** 751,755 **** } } ! protected void enableButtons(boolean enabled){ replyButton.setEnabled(enabled); --- 757,761 ---- } } ! protected void enableButtons(boolean enabled){ replyButton.setEnabled(enabled); *************** *** 758,762 **** deleteButton.setEnabled(enabled); } ! protected void setUser(String userName){ for (int i = 0 ; i < tapasUsers.length ; i++) { --- 764,768 ---- deleteButton.setEnabled(enabled); } ! protected void setUser(String userName){ for (int i = 0 ; i < tapasUsers.length ; i++) { *************** *** 768,772 **** } } ! private void cancel(){ sendButton.setEnabled(false); --- 774,778 ---- } } ! private void cancel(){ sendButton.setEnabled(false); *************** *** 776,785 **** checkNewMailButton.setEnabled(true); newButton.setEnabled(true); } ! protected void deselectUser(){ userList.clearSelection(); } ! private void changeFilterCombobox(char c){ if (c == 'i'){ --- 782,792 ---- checkNewMailButton.setEnabled(true); newButton.setEnabled(true); + function.setActive(false); } ! protected void deselectUser(){ userList.clearSelection(); } ! private void changeFilterCombobox(char c){ if (c == 'i'){ *************** *** 789,793 **** } } ! private String[] userNames = null ; private Object[] tapasUsers = null ; --- 796,800 ---- } } ! private String[] userNames = null ; private Object[] tapasUsers = null ; *************** *** 795,799 **** private javax.swing.PopupFactory factory = javax.swing.PopupFactory.getSharedInstance(); private javax.swing.Popup popup; ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane bodyScrollPane; --- 802,806 ---- private javax.swing.PopupFactory factory = javax.swing.PopupFactory.getSharedInstance(); private javax.swing.Popup popup; ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane bodyScrollPane; *************** *** 833,836 **** private javax.swing.JScrollPane userScrollPane; // End of variables declaration//GEN-END:variables ! } --- 840,843 ---- private javax.swing.JScrollPane userScrollPane; // End of variables declaration//GEN-END:variables ! } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:24
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/referrals In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/referrals Modified Files: ReferralsFunction.java ReferralsFunctionPanel.java Log Message: port changes over to r1 Index: ReferralsFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/referrals/ReferralsFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReferralsFunction.java 23 Mar 2006 01:51:48 -0000 1.1 --- ReferralsFunction.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 50,653 **** */ public class ReferralsFunction ! implements PatientCentricFunction { ! ! /** ! * Boolean to determine whether the user hase write access to this function ! */ ! private boolean canWrite = false; //cw ! ! private boolean doLoad = true; //mod [...1145 lines suppressed...] ! /** ! * printReferralReport ! */ ! public void printReferralReport() { ! encounter = (Encounter) encounters.get(panel.getSelectedTableRow()); ! TapasPrinter printer = new TapasPrinter(); ! ClinicalDocument clinicalDocument = Controller.getInstance().getMainFrame(). ! getCurrentTab().getClinicalDocument(); ! PatientSummaryBean sum = new PatientSummaryBean(clinicalDocument); ! printer.printPatientReferral(sum); } ! ! private int cleanupRowNumber(int row) { //new ! return row >= acts.length ? acts.length - 1 : row; } ! ! protected boolean canWrite() { //cw ! return canWrite; } } Index: ReferralsFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/referrals/ReferralsFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReferralsFunctionPanel.java 23 Mar 2006 01:51:48 -0000 1.1 --- ReferralsFunctionPanel.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 48,52 **** } } ! /** Creates new form ReferralsFunctionPanel */ public ReferralsFunctionPanel(ReferralsFunction function, List refSpecialityList, List refUrgencyList, List refStatusList, boolean canWrite) { //cw --- 48,52 ---- } } ! /** Creates new form ReferralsFunctionPanel */ [...962 lines suppressed...] ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel PlusMinusPanel3; --- 1444,1448 ---- private boolean searchActive = false; //wop Calendar cal = Calendar.getInstance(); ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel PlusMinusPanel3; *************** *** 1493,1496 **** private javax.swing.JLabel urgencyLabel; // End of variables declaration//GEN-END:variables ! } --- 1496,1499 ---- private javax.swing.JLabel urgencyLabel; // End of variables declaration//GEN-END:variables ! } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:24
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/patient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/patient Modified Files: PatientFocusFunction.java PatientFocusPanel.java Log Message: port changes over to r1 Index: PatientFocusFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/patient/PatientFocusFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PatientFocusFunction.java 23 Mar 2006 01:51:48 -0000 1.1 --- PatientFocusFunction.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 26,29 **** --- 26,30 ---- import javax.swing.*; import java.util.*; + import java.text.*; *************** *** 54,90 **** */ public class PatientFocusFunction implements FocusPanel { /** * Boolean to determine if this panel is patient- or user centric */ private boolean patientCentric = false; ! /** * Name of the function */ private String functionName = "Patient"; ! /** * Short name of the function this panel performs (i.e. for use on tabs) */ private String functionShortName = "Pat"; ! /** * The GUI part of this function */ private PatientFocusPanel panel; ! /** * Sorts the addresses, main one first, then to PK value */ private ADComparator adComparator = new ADComparator(); ! private TELComparator telComparator = new TELComparator(); ! ! /** Creates a new instance of PatientFocusFunction */ public PatientFocusFunction() { panel = new PatientFocusPanel(); } ! /** * Returns whether this function is tied to a patient or a user --- 55,93 ---- */ public class PatientFocusFunction implements FocusPanel { + + private SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yyyy"); /** * Boolean to determine if this panel is patient- or user centric */ private boolean patientCentric = false; ! /** * Name of the function */ private String functionName = "Patient"; ! /** * Short name of the function this panel performs (i.e. for use on tabs) */ private String functionShortName = "Pat"; ! /** * The GUI part of this function */ private PatientFocusPanel panel; ! /** * Sorts the addresses, main one first, then to PK value */ private ADComparator adComparator = new ADComparator(); ! private TELComparator telComparator = new TELComparator(); ! ! /** Creates a new instance of PatientFocusFunction */ public PatientFocusFunction() { panel = new PatientFocusPanel(); } ! /** * Returns whether this function is tied to a patient or a user *************** *** 94,98 **** return patientCentric; } ! /** * Sets the boolean patientCentric --- 97,101 ---- return patientCentric; } ! /** * Sets the boolean patientCentric *************** *** 102,106 **** patientCentric = isPatientCentric; } ! /** * Returns the name of the function --- 105,109 ---- patientCentric = isPatientCentric; } ! /** * Returns the name of the function *************** *** 110,114 **** return functionName; } ! /** * Sets the name of the function --- 113,117 ---- return functionName; } ! /** * Sets the name of the function *************** *** 118,122 **** functionName = isFunctionName; } ! /** * Gets the name of the function --- 121,125 ---- functionName = isFunctionName; } ! /** * Gets the name of the function *************** *** 126,130 **** return functionShortName; } ! /** * Sets the short name of the function --- 129,133 ---- return functionShortName; } ! /** * Sets the short name of the function *************** *** 134,138 **** functionShortName = isFunctionShortName; } ! /** * Returns the panel / GUI part of the function --- 137,141 ---- functionShortName = isFunctionShortName; } ! /** * Returns the panel / GUI part of the function *************** *** 142,146 **** return panel; } ! /** * Sets the panel / GUI part of the function --- 145,149 ---- return panel; } ! /** * Sets the panel / GUI part of the function *************** *** 150,154 **** this.panel = (PatientFocusPanel) panel; } ! public void displayPatient(PatientRole pr){ PN patName ; --- 153,157 ---- this.panel = (PatientFocusPanel) panel; } ! public void displayPatient(PatientRole pr){ PN patName ; *************** *** 157,161 **** String familyName = "" ; String suffix = "" ; ! try { patName = pr.getPatient().getName(); --- 160,164 ---- String familyName = "" ; String suffix = "" ; ! try { patName = pr.getPatient().getName(); *************** *** 171,181 **** panel.setName(prefix + preferredName + familyName + suffix); } catch (NullPointerException e) {} catch (ArrayIndexOutOfBoundsException e) {} ! try { panel.setDemographics(ToolKit.getInstance().getAge(pr.getPatient().getBirthTime()) + " yo " + pr.getPatient().getSex().substring(0, 1) + " DOB: " + ! pr.getPatient().getBirthTime().toString()) ; } catch (NullPointerException e) {} ! String phn = "PHN unknown"; try { --- 174,184 ---- panel.setName(prefix + preferredName + familyName + suffix); } catch (NullPointerException e) {} catch (ArrayIndexOutOfBoundsException e) {} ! try { panel.setDemographics(ToolKit.getInstance().getAge(pr.getPatient().getBirthTime()) + " yo " + pr.getPatient().getSex().substring(0, 1) + " DOB: " + ! sdf.format(pr.getPatient().getBirthTime())) ; } catch (NullPointerException e) {} ! String phn = "PHN unknown"; try { *************** *** 190,194 **** panel.setPhn(phn); } ! public void displayGp(ClinicalDocument cdt){ String gpName = "GP : unknown"; --- 193,197 ---- panel.setPhn(phn); } ! public void displayGp(ClinicalDocument cdt){ String gpName = "GP : unknown"; *************** *** 199,203 **** TEL gpTel = new TEL(); AuthorClinicalDoc acc = new AuthorClinicalDoc(); ! try { for (Object obj : cdt.getAuthorClinicalDocs()){ --- 202,206 ---- TEL gpTel = new TEL(); AuthorClinicalDoc acc = new AuthorClinicalDoc(); ! try { for (Object obj : cdt.getAuthorClinicalDocs()){ *************** *** 208,220 **** } } catch (NullPointerException e) {} catch (ArrayIndexOutOfBoundsException a) {} ! try { gpName = "GP : Dr. " + acc.getAuthor().getAssignedAuthor().getAssignedPerson().getName().getFamilyName(); } catch (NullPointerException e) {} panel.setGpName(gpName); ! try { Object[] addresses = acc.getAuthor().getAssignedAuthor().getAddresses().toArray(); ! Arrays.sort(addresses, adComparator); for(Object obj2 : addresses){ gpAd = (AD) obj2; --- 211,223 ---- } } catch (NullPointerException e) {} catch (ArrayIndexOutOfBoundsException a) {} ! try { gpName = "GP : Dr. " + acc.getAuthor().getAssignedAuthor().getAssignedPerson().getName().getFamilyName(); } catch (NullPointerException e) {} panel.setGpName(gpName); ! try { Object[] addresses = acc.getAuthor().getAssignedAuthor().getAddresses().toArray(); ! Arrays.sort(addresses, adComparator); for(Object obj2 : addresses){ gpAd = (AD) obj2; *************** *** 223,235 **** } } ! gpAddress = gpAd.getStreetAddressLine(); ! } catch (NullPointerException e) {} catch (ArrayIndexOutOfBoundsException a) {} panel.setGpAddress(gpAddress); ! ! try { gpCity = gpAd.getCity() + ", " + gpAd.getProvince().getCode() + " " + gpAd.getPostalCode(); } catch (NullPointerException e) {} panel.setGpCity(gpCity); ! try { Object[] telecoms = acc.getAuthor().getAssignedAuthor().getTelecoms().toArray(); --- 226,238 ---- } } ! gpAddress = gpAd.getStreetAddressLine(); ! } catch (NullPointerException e) {} catch (ArrayIndexOutOfBoundsException a) {} panel.setGpAddress(gpAddress); ! ! try { gpCity = gpAd.getCity() + ", " + gpAd.getProvince().getCode() + " " + gpAd.getPostalCode(); } catch (NullPointerException e) {} panel.setGpCity(gpCity); ! try { Object[] telecoms = acc.getAuthor().getAssignedAuthor().getTelecoms().toArray(); *************** *** 242,250 **** } gpPhone = gpTel.getType().getCode() + ": " + gpTel.getText(); ! } catch (NullPointerException e) {} catch (ArrayIndexOutOfBoundsException a) {} panel.setGpPhone(gpPhone); } ! ! /** * function to populate this panel with patient demographics data --- 245,253 ---- } gpPhone = gpTel.getType().getCode() + ": " + gpTel.getText(); ! } catch (NullPointerException e) {} catch (ArrayIndexOutOfBoundsException a) {} panel.setGpPhone(gpPhone); } ! ! /** * function to populate this panel with patient demographics data *************** *** 253,258 **** displayPatient(Controller.getInstance().getMainFrame().getCurrentTab().getClinicalDocument().getRecordTarget().getPatientRole()); } ! ! /** * function to populate this panel with patients GP data --- 256,261 ---- displayPatient(Controller.getInstance().getMainFrame().getCurrentTab().getClinicalDocument().getRecordTarget().getPatientRole()); } ! ! /** * function to populate this panel with patients GP data *************** *** 261,263 **** displayGp(Controller.getInstance().getMainFrame().getCurrentTab().getClinicalDocument()); } ! } --- 264,266 ---- displayGp(Controller.getInstance().getMainFrame().getCurrentTab().getClinicalDocument()); } ! } \ No newline at end of file Index: PatientFocusPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/patient/PatientFocusPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PatientFocusPanel.java 23 Mar 2006 01:51:48 -0000 1.1 --- PatientFocusPanel.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 9,23 **** /** * <p>summary of the patient demographics</p> ! * ! * Copyright (c) 2005. Department of Family Practice, University of British Columbia 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. * * TAPAS TEAM --- 9,23 ---- /** * <p>summary of the patient demographics</p> ! * ! * Copyright (c) 2005. Department of Family Practice, University of British Columbia 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. * * TAPAS TEAM *************** *** 34,43 **** public class PatientFocusPanel extends javax.swing.JPanel { ! /** Creates new form PatientFocusPanel */ public PatientFocusPanel() { initComponents(); } ! /** This method is called from within the constructor to * initialize the form. --- 34,43 ---- public class PatientFocusPanel extends javax.swing.JPanel { ! /** Creates new form PatientFocusPanel */ public PatientFocusPanel() { initComponents(); } ! /** This method is called from within the constructor to * initialize the form. *************** *** 160,164 **** }// </editor-fold>//GEN-END:initComponents ! /** * provisional function to populate Patients' Name field --- 160,164 ---- }// </editor-fold>//GEN-END:initComponents ! /** * provisional function to populate Patients' Name field *************** *** 169,173 **** nameLabel.setText(text); } ! /** * provisional function to populate Patients' address / Street --- 169,173 ---- nameLabel.setText(text); } ! /** * provisional function to populate Patients' address / Street *************** *** 178,182 **** demographicsLabel.setText(text); } ! /** * provisional function to populate Patients' address / City --- 178,182 ---- demographicsLabel.setText(text); } ! /** * provisional function to populate Patients' address / City *************** *** 187,209 **** phnLabel.setText(text); } ! public void setGpName(String text) { gpNameLabel.setText(text); } ! public void setGpAddress(String text) { gpAddressLabel.setText(text); } ! public void setGpCity(String text) { gpCityLabel.setText(text); } ! public void setGpPhone(String text) { gpPhoneLabel.setText(text); } ! ! ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel demographicsLabel; --- 187,209 ---- phnLabel.setText(text); } ! public void setGpName(String text) { gpNameLabel.setText(text); } ! public void setGpAddress(String text) { gpAddressLabel.setText(text); } ! public void setGpCity(String text) { gpCityLabel.setText(text); } ! public void setGpPhone(String text) { gpPhoneLabel.setText(text); } ! ! ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel demographicsLabel; *************** *** 215,218 **** private javax.swing.JLabel phnLabel; // End of variables declaration//GEN-END:variables ! } --- 215,218 ---- private javax.swing.JLabel phnLabel; // End of variables declaration//GEN-END:variables ! } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:23
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/immunizations In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/immunizations Modified Files: ImmunizationsFunction.java ImmunizationsFunctionPanel.form ImmunizationsFunctionPanel.java Log Message: port changes over to r1 Index: ImmunizationsFunctionPanel.form =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/immunizations/ImmunizationsFunctionPanel.form,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ImmunizationsFunctionPanel.form 23 Mar 2006 01:51:12 -0000 1.1 --- ImmunizationsFunctionPanel.form 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 91,94 **** --- 91,95 ---- <Font name="Dialog" size="10" style="0"/> </Property> + <Property name="horizontalAlignment" type="int" value="4"/> <Property name="text" type="java.lang.String" value="Immunization:"/> </Properties> Index: ImmunizationsFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/immunizations/ImmunizationsFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ImmunizationsFunctionPanel.java 23 Mar 2006 01:51:12 -0000 1.1 --- ImmunizationsFunctionPanel.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 43,52 **** public class ImmunizationsFunctionPanel extends javax.swing.JPanel { ! /** Creates new form ImmunizationsFunctionPanel */ public ImmunizationsFunctionPanel() { initComponents(); } ! /** Creates new form ImmunizationsFunctionPanel */ public ImmunizationsFunctionPanel(ImmunizationsFunction function, List immDoseUnitList, List immLocationList, List immRoutesList, boolean canWrite) { //cw [...1058 lines suppressed...] ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel administeredLabel; --- 1464,1468 ---- private boolean toBeCommitted = false; //mod private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel administeredLabel; *************** *** 1502,1505 **** private javax.swing.JCheckBox uptodateCheckBox; // End of variables declaration//GEN-END:variables ! } --- 1506,1509 ---- private javax.swing.JCheckBox uptodateCheckBox; // End of variables declaration//GEN-END:variables ! } Index: ImmunizationsFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/immunizations/ImmunizationsFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ImmunizationsFunction.java 23 Mar 2006 01:51:12 -0000 1.1 --- ImmunizationsFunction.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 18,23 **** import org.opentapas.tapear.framework.SidePanel; ! import java.util.Arrays; ! import java.util.List; import javax.swing.*; --- 18,22 ---- import org.opentapas.tapear.framework.SidePanel; ! import java.util.*; import javax.swing.*; *************** *** 122,135 **** */ private Procedure procedure; ! ! /** ! * EMR Observation array ! */ ! private Procedure[] procedures = new Procedure[0]; ! /** ! * Dummy Procedure array */ ! private Procedure[] dummyProc = new Procedure[1]; /** --- 121,129 ---- */ private Procedure procedure; ! /** ! * Procedures List */ ! private List procedures = new ArrayList(); /** *************** *** 277,281 **** public boolean isFromAnotherUser(int index) { try { ! Procedure procedure = (Procedure) procedures[index]; if (procedure.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; --- 271,275 ---- public boolean isFromAnotherUser(int index) { try { ! Procedure procedure = (Procedure) procedures.get(index); if (procedure.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; *************** *** 327,349 **** StringBuffer textBuffer = new StringBuffer(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); - int numberOfProcedures = 0 ; - procedures = null ; - for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("PROC")){ ! dummyProc[0] = (Procedure) act; ! numberOfProcedures ++ ; ! ! Procedure[] temp = new Procedure[numberOfProcedures]; ! if (numberOfProcedures > 1) { ! System.arraycopy(procedures, 0, temp, 0, numberOfProcedures - 1); ! } ! System.arraycopy(dummyProc, 0, temp, numberOfProcedures - 1, 1); ! procedures = temp; ! procedure = procedures[numberOfProcedures - 1]; if (procedure.getText() == null) { procedure.setText(new ST()); --- 321,335 ---- StringBuffer textBuffer = new StringBuffer(); + procedures.clear(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("PROC")){ ! ! procedures.add(act); ! procedure = (Procedure) act ; ! if (procedure.getText() == null) { procedure.setText(new ST()); *************** *** 359,366 **** procedure.setStartDateTime(new DateTime()); } ! panel.setTableRowNumber(numberOfProcedures);//mod2 panel.addRow(procedure.getStartDateTime().getStringRepresentation(), procedure.getCode().getDisplayName(), ! procedure.getText().getText(), i); textBuffer.append(procedure.getCode().getDisplayName() + "\n"); } --- 345,352 ---- procedure.setStartDateTime(new DateTime()); } ! panel.setTableRowNumber(procedures.size());//mod2 panel.addRow(procedure.getStartDateTime().getStringRepresentation(), procedure.getCode().getDisplayName(), ! procedure.getText().getText(), procedures.size() - 1); textBuffer.append(procedure.getCode().getDisplayName() + "\n"); } *************** *** 380,384 **** removeSearchPanel(); try { ! procedure = (Procedure) procedures[index]; panel.setNameTextField(procedure.getCode().getDisplayName()); panel.setCommentTextArea(procedure.getText().getText()); --- 366,370 ---- removeSearchPanel(); try { ! procedure = (Procedure) procedures.get(index); panel.setNameTextField(procedure.getCode().getDisplayName()); panel.setCommentTextArea(procedure.getText().getText()); *************** *** 437,441 **** if (state == 'q') { ! procedure = (Procedure) procedures[panel.getSelectedTableRow()]; procedure.setCode(code); isQ = true; --- 423,427 ---- if (state == 'q') { ! procedure = (Procedure) procedures.get(panel.getSelectedTableRow()); procedure.setCode(code); isQ = true; *************** *** 466,470 **** try { int row = panel.getSelectedTableRow(); //mod2 ! procedure = (Procedure) procedures[previousClicked == -1 ? row : previousClicked]; //new procedure.getText().setText(panel.getCommentTextArea()); procedure.getTitle().setText(panel.getLotTextField()); --- 452,456 ---- try { int row = panel.getSelectedTableRow(); //mod2 ! procedure = (Procedure) procedures.get(previousClicked == -1 ? row : previousClicked); //new procedure.getText().setText(panel.getCommentTextArea()); procedure.getTitle().setText(panel.getLotTextField()); *************** *** 523,531 **** int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) procedures[row]); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: ImmunizationsFunction() - remove() - ArrayIndexOutOfBoundsException"); } ! populate((Section)Controller.getInstance().saveObject(section)); //cw if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new --- 509,520 ---- int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) procedures.get(row)); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: ImmunizationsFunction() - remove() - ArrayIndexOutOfBoundsException"); } ! Controller.getInstance().saveObject(section); //cw ! Controller.getInstance().deleteObject(procedures.get(row)); ! procedures.remove(row); ! list(); if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new *************** *** 556,560 **** protected int getNumberOfActs(){ ! return procedures == null ? 0 : procedures.length ; } --- 545,549 ---- protected int getNumberOfActs(){ ! return procedures == null ? 0 : procedures.size() ; } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:23
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/medicalhx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/medicalhx Modified Files: MedicalHxFunction.java MedicalHxFunctionPanel.java Log Message: port changes over to r1 Index: MedicalHxFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/medicalhx/MedicalHxFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MedicalHxFunctionPanel.java 23 Mar 2006 01:51:47 -0000 1.1 --- MedicalHxFunctionPanel.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 41,46 **** class MedicalHxFunctionPanel extends javax.swing.JPanel { ! ! /** * Creates a new MedicalHxFunctionPanel object. --- 41,46 ---- class MedicalHxFunctionPanel extends javax.swing.JPanel { ! ! /** * Creates a new MedicalHxFunctionPanel object. *************** *** 66,70 **** } } ! /** This method is called from within the constructor to * initialize the form. --- 66,70 ---- } } ! /** This method is called from within the constructor to * initialize the form. *************** *** 521,529 **** }// </editor-fold>//GEN-END:initComponents ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ --- 521,529 ---- }// </editor-fold>//GEN-END:initComponents ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ *************** *** 548,552 **** } }//GEN-LAST:event_formComponentHidden ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod --- 548,552 ---- } }//GEN-LAST:event_formComponentHidden ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod *************** *** 554,558 **** }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ --- 554,558 ---- }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ *************** *** 580,588 **** } }//GEN-LAST:event_tableKeyReleased ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) --- 580,588 ---- } }//GEN-LAST:event_tableKeyReleased ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) *************** *** 595,599 **** }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void partialEndDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndDayComboBoxActionPerformed if (partialEndDayComboBox.getSelectedIndex() > 1 && --- 595,599 ---- }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void partialEndDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndDayComboBoxActionPerformed if (partialEndDayComboBox.getSelectedIndex() > 1 && *************** *** 608,612 **** }//mod }//GEN-LAST:event_partialEndDayComboBoxActionPerformed ! private void partialStartDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartDayComboBoxActionPerformed if (partialStartDayComboBox.getSelectedIndex() > 1 && --- 608,612 ---- }//mod }//GEN-LAST:event_partialEndDayComboBoxActionPerformed ! private void partialStartDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartDayComboBoxActionPerformed if (partialStartDayComboBox.getSelectedIndex() > 1 && *************** *** 621,625 **** }//mod }//GEN-LAST:event_partialStartDayComboBoxActionPerformed ! private void partialEndMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndMonthComboBoxActionPerformed populatePartialEndDay(); --- 621,625 ---- }//mod }//GEN-LAST:event_partialStartDayComboBoxActionPerformed ! private void partialEndMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndMonthComboBoxActionPerformed populatePartialEndDay(); *************** *** 639,643 **** }//mod }//GEN-LAST:event_partialEndMonthComboBoxActionPerformed ! private void partialEndYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndYearComboBoxActionPerformed if (function.canWrite()){ //cw --- 639,643 ---- }//mod }//GEN-LAST:event_partialEndMonthComboBoxActionPerformed ! private void partialEndYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialEndYearComboBoxActionPerformed if (function.canWrite()){ //cw *************** *** 655,659 **** }//mod }//GEN-LAST:event_partialEndYearComboBoxActionPerformed ! private void partialStartMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartMonthComboBoxActionPerformed populatePartialStartDay(); --- 655,659 ---- }//mod }//GEN-LAST:event_partialEndYearComboBoxActionPerformed ! private void partialStartMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartMonthComboBoxActionPerformed populatePartialStartDay(); *************** *** 673,677 **** }//mod }//GEN-LAST:event_partialStartMonthComboBoxActionPerformed ! private void partialStartYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartYearComboBoxActionPerformed if (function.canWrite()){ //cw --- 673,677 ---- }//mod }//GEN-LAST:event_partialStartMonthComboBoxActionPerformed ! private void partialStartYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartYearComboBoxActionPerformed if (function.canWrite()){ //cw *************** *** 689,693 **** }//mod }//GEN-LAST:event_partialStartYearComboBoxActionPerformed ! /** * Calls the code to persist edited data --- 689,693 ---- }//mod }//GEN-LAST:event_partialStartYearComboBoxActionPerformed ! /** * Calls the code to persist edited data *************** *** 699,703 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! /** * Triggers the searchSidePanel to pop up and be filled with CE's whose diplayname match the typed text --- 699,703 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! /** * Triggers the searchSidePanel to pop up and be filled with CE's whose diplayname match the typed text *************** *** 719,723 **** } }//GEN-LAST:event_nameTextFieldMouseClicked ! /** * removes (for now) the selected Entry and clears all editor fields --- 719,723 ---- } }//GEN-LAST:event_nameTextFieldMouseClicked ! /** * removes (for now) the selected Entry and clears all editor fields *************** *** 735,739 **** } }//GEN-LAST:event_deleteButtonActionPerformed ! /** * loads clicked Entry in the Editor --- 735,739 ---- } }//GEN-LAST:event_deleteButtonActionPerformed ! /** * loads clicked Entry in the Editor *************** *** 765,769 **** } }//GEN-LAST:event_tableMouseClicked ! /** * activates Insert (new Entry) state, colour text field greenish and clear editor text fields --- 765,769 ---- } }//GEN-LAST:event_tableMouseClicked ! /** * activates Insert (new Entry) state, colour text field greenish and clear editor text fields *************** *** 783,787 **** setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! /** * populates a given row of the Table --- 783,787 ---- setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! /** * populates a given row of the Table *************** *** 800,808 **** table.getColumnModel().getColumn(2).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //new if (index > -1){ --- 800,808 ---- table.getColumnModel().getColumn(2).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //new if (index > -1){ *************** *** 813,818 **** } } ! ! /** * Sets the name text field --- 813,818 ---- } } ! ! /** * Sets the name text field *************** *** 823,827 **** nameTextField.setText(text); } ! /** * returns the name text field --- 823,827 ---- nameTextField.setText(text); } ! /** * returns the name text field *************** *** 832,836 **** return nameTextField.getText(); } ! /** * sets the code text field --- 832,836 ---- return nameTextField.getText(); } ! /** * sets the code text field *************** *** 841,845 **** codeTextField.setText(text); } ! /** * returns the code text field --- 841,845 ---- codeTextField.setText(text); } ! /** * returns the code text field *************** *** 850,854 **** return codeTextField.getText(); } ! /** * sets the start date end text field --- 850,854 ---- return codeTextField.getText(); } ! /** * sets the start date end text field *************** *** 866,870 **** } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialStartMonthComboBox.setSelectedIndex(date.getMonth() + 1); --- 866,870 ---- } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialStartMonthComboBox.setSelectedIndex(date.getMonth() + 1); *************** *** 876,880 **** } } ! if (date.getDay() <= partialStartDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialStartDayComboBox.setSelectedIndex(date.getDay() + 1); --- 876,880 ---- } } ! if (date.getDay() <= partialStartDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialStartDayComboBox.setSelectedIndex(date.getDay() + 1); *************** *** 887,891 **** } } ! /** * sets the end date end text field --- 887,891 ---- } } ! /** * sets the end date end text field *************** *** 903,907 **** } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialEndMonthComboBox.setSelectedIndex(date.getMonth() + 1); --- 903,907 ---- } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialEndMonthComboBox.setSelectedIndex(date.getMonth() + 1); *************** *** 913,917 **** } } ! if (date.getDay() <= partialEndDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialEndDayComboBox.setSelectedIndex(date.getDay() + 1); --- 913,917 ---- } } ! if (date.getDay() <= partialEndDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialEndDayComboBox.setSelectedIndex(date.getDay() + 1); *************** *** 924,928 **** } } ! /** * returns the partial start date - year portion --- 924,928 ---- } } ! /** * returns the partial start date - year portion *************** *** 937,941 **** } } ! /** * returns the end partial date - year portion --- 937,941 ---- } } ! /** * returns the end partial date - year portion *************** *** 950,954 **** } } ! /** * returns the partial start date - month portion --- 950,954 ---- } } ! /** * returns the partial start date - month portion *************** *** 963,967 **** } } ! /** * returns the partial end date - month portion --- 963,967 ---- } } ! /** * returns the partial end date - month portion *************** *** 976,980 **** } } ! /** * returns the partial start date - day portion --- 976,980 ---- } } ! /** * returns the partial start date - day portion *************** *** 989,993 **** } } ! /** * returns the partial start date - day portion --- 989,993 ---- } } ! /** * returns the partial start date - day portion *************** *** 1002,1006 **** } } ! /** * returns the partial start date - nullreason --- 1002,1006 ---- } } ! /** * returns the partial start date - nullreason *************** *** 1017,1021 **** } } ! /** * returns the partial end date - nullreason --- 1017,1021 ---- } } ! /** * returns the partial end date - nullreason *************** *** 1032,1036 **** } } ! /** * sets the comment text field --- 1032,1036 ---- } } ! /** * sets the comment text field *************** *** 1041,1045 **** commentTextArea.setText(text); } ! /** * returns the comment text field --- 1041,1045 ---- commentTextArea.setText(text); } ! /** * returns the comment text field *************** *** 1050,1054 **** return commentTextArea.getText(); } ! /** * colours name text field greenish --- 1050,1054 ---- return commentTextArea.getText(); } ! /** * colours name text field greenish *************** *** 1057,1061 **** nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish --- 1057,1061 ---- nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish *************** *** 1064,1068 **** nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field --- 1064,1068 ---- nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field *************** *** 1071,1075 **** nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * returns the table --- 1071,1075 ---- nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * returns the table *************** *** 1080,1084 **** return table; } ! /** * clears the editor text fields --- 1080,1084 ---- return table; } ! /** * clears the editor text fields *************** *** 1095,1099 **** commentTextArea.setText("") ; } ! /** * adjust the with of the table columns and set the name column font to <b>bold</b> --- 1095,1099 ---- commentTextArea.setText("") ; } ! /** * adjust the with of the table columns and set the name column font to <b>bold</b> *************** *** 1105,1109 **** table.getColumnModel().getColumn(2).setPreferredWidth(300); } ! /** * returns # of selected table row --- 1105,1109 ---- table.getColumnModel().getColumn(2).setPreferredWidth(300); } ! /** * returns # of selected table row *************** *** 1114,1118 **** return table.getSelectedRow(); } ! /** * Adjusts the label of the name text field when searching / restores it --- 1114,1118 ---- return table.getSelectedRow(); } ! /** * Adjusts the label of the name text field when searching / restores it *************** *** 1129,1133 **** } } ! private void populatePartialStartDay(){ if ( --- 1129,1133 ---- } } ! private void populatePartialStartDay(){ if ( *************** *** 1153,1157 **** } } ! private void populatePartialEndDay(){ if ( --- 1153,1157 ---- } } ! private void populatePartialEndDay(){ if ( *************** *** 1177,1181 **** } } ! private void listPartialStartDay(int numberOfDays){ partialStartDayComboBox.removeAllItems(); --- 1177,1181 ---- } } ! private void listPartialStartDay(int numberOfDays){ partialStartDayComboBox.removeAllItems(); *************** *** 1186,1190 **** } } ! private void listPartialEndDay(int numberOfDays){ partialEndDayComboBox.removeAllItems(); --- 1186,1190 ---- } } ! private void listPartialEndDay(int numberOfDays){ partialEndDayComboBox.removeAllItems(); *************** *** 1195,1199 **** } } ! private void populatePartialStartYear(int year){ partialStartDayComboBox.removeAllItems(); --- 1195,1199 ---- } } ! private void populatePartialStartYear(int year){ partialStartDayComboBox.removeAllItems(); *************** *** 1204,1208 **** } } ! private void populatePartialEndYear(int year){ partialEndDayComboBox.removeAllItems(); --- 1204,1208 ---- } } ! private void populatePartialEndYear(int year){ partialEndDayComboBox.removeAllItems(); *************** *** 1213,1221 **** } } ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod --- 1213,1221 ---- } } ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod *************** *** 1223,1231 **** toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void cancel(){ nameTextFieldBW(); --- 1223,1231 ---- toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void cancel(){ nameTextFieldBW(); *************** *** 1241,1245 **** setSearchActive(false); //wop } ! /** * clears the table --- 1241,1245 ---- setSearchActive(false); //wop } ! /** * clears the table *************** *** 1248,1252 **** ((DefaultTableModel) table.getModel()).setRowCount(0); } ! protected void setReadOnly(boolean readonly){ //new nameTextField.setEnabled(!readonly); --- 1248,1252 ---- ((DefaultTableModel) table.getModel()).setRowCount(0); } ! protected void setReadOnly(boolean readonly){ //new nameTextField.setEnabled(!readonly); *************** *** 1260,1268 **** commentTextArea.setEnabled(!readonly); } ! protected void setSearchActive(boolean active){ //wop searchActive = active; } ! int previousClicked = 0 ; //new int thisYear = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR) ; --- 1260,1268 ---- commentTextArea.setEnabled(!readonly); } ! protected void setSearchActive(boolean active){ //wop searchActive = active; } ! int previousClicked = 0 ; //new int thisYear = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR) ; *************** *** 1270,1274 **** private boolean toBeCommitted = false; //mod private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel blueLabel; --- 1270,1274 ---- private boolean toBeCommitted = false; //mod private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel blueLabel; *************** *** 1305,1308 **** private javax.swing.JLabel titleLabel; // End of variables declaration//GEN-END:variables ! } --- 1305,1308 ---- private javax.swing.JLabel titleLabel; // End of variables declaration//GEN-END:variables ! } Index: MedicalHxFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/medicalhx/MedicalHxFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MedicalHxFunction.java 23 Mar 2006 01:51:47 -0000 1.1 --- MedicalHxFunction.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 18,22 **** import org.opentapas.tapear.framework.SidePanel; ! import java.util.Arrays; import javax.swing.*; --- 18,22 ---- import org.opentapas.tapear.framework.SidePanel; ! import java.util.*; import javax.swing.*; *************** *** 118,131 **** */ private Observation observation; ! ! /** ! * EMR Observation array ! */ ! private Observation[] observations = new Observation[0]; ! /** ! * Dummy Observation array */ ! private Observation[] dummyObs = new Observation[1]; /** --- 118,126 ---- */ private Observation observation; ! /** ! * Observations List */ ! private List observations = new ArrayList(); /** *************** *** 281,285 **** public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations[index]; if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; --- 276,280 ---- public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations.get(index); if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; *************** *** 330,351 **** StringBuffer textBuffer = new StringBuffer(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); - observations = null ; //new - int numberOfObservations = 0 ; for (int i = 0; i < acts.length ; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! dummyObs[0] = (Observation) act; ! numberOfObservations ++ ; ! ! Observation[] temp = new Observation[numberOfObservations]; ! if (numberOfObservations > 1) { ! System.arraycopy(observations, 0, temp, 0, numberOfObservations - 1); ! } ! System.arraycopy(dummyObs, 0, temp, numberOfObservations - 1, 1); ! observations = temp; ! observation = observations[numberOfObservations - 1]; if (observation.getText() == null) { observation.setText(new ST()); --- 325,339 ---- StringBuffer textBuffer = new StringBuffer(); + observations.clear(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); for (int i = 0; i < acts.length ; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! ! observations.add(act); ! observation = (Observation) act ; ! if (observation.getText() == null) { observation.setText(new ST()); *************** *** 357,363 **** observation.setEndDateTime(new DateTime()); } ! panel.setTableRowNumber(numberOfObservations);//new panel.addRow( ! observation.getStartDateTime().getStringRepresentation() + " - " + observation.getEndDateTime().getStringRepresentation(), observation.getCode().getDisplayName(), observation.getText().getText(), i); textBuffer.append(observation.getCode().getDisplayName() + "\n"); } --- 345,354 ---- observation.setEndDateTime(new DateTime()); } ! panel.setTableRowNumber(observations.size());//new panel.addRow( ! observation.getStartDateTime().getStringRepresentation() + " - " + observation.getEndDateTime().getStringRepresentation(), ! observation.getCode().getDisplayName(), ! observation.getText().getText(), ! observations.size() - 1); textBuffer.append(observation.getCode().getDisplayName() + "\n"); } *************** *** 378,382 **** removeSearchPanel(); try { ! observation = (Observation) observations[index]; panel.setNameTextField(observation.getCode().getDisplayName()); panel.setCodeTextField(observation.getCode().getCode()); --- 369,373 ---- removeSearchPanel(); try { ! observation = (Observation) observations.get(index); panel.setNameTextField(observation.getCode().getDisplayName()); panel.setCodeTextField(observation.getCode().getCode()); *************** *** 413,417 **** if (state == 'q') { ! observation = (Observation) observations[panel.getSelectedTableRow()]; observation.setCode(code); isQ = true; --- 404,408 ---- if (state == 'q') { ! observation = (Observation) observations.get(panel.getSelectedTableRow()); observation.setCode(code); isQ = true; *************** *** 439,443 **** try { int row = panel.getSelectedTableRow(); //new ! observation = (Observation) observations[previousClicked == -1 ? row : previousClicked]; //new observation.getStartDateTime().setYear(panel.getPartialStartYear()); observation.getStartDateTime().setMonth(panel.getPartialStartMonth()); --- 430,434 ---- try { int row = panel.getSelectedTableRow(); //new ! observation = (Observation) observations.get(previousClicked == -1 ? row : previousClicked); //new observation.getStartDateTime().setYear(panel.getPartialStartYear()); observation.getStartDateTime().setMonth(panel.getPartialStartMonth()); *************** *** 450,454 **** observation.getText().setText(panel.getCommentTextArea()); observation.setAssignedByUser(Controller.getInstance().getCurrentUser()); ! populate((Section)Controller.getInstance().saveObject(section)); //cw loadInEditor(row); //new panel.selectTableRow(cleanupRowNumber(row));//new --- 441,446 ---- observation.getText().setText(panel.getCommentTextArea()); observation.setAssignedByUser(Controller.getInstance().getCurrentUser()); ! this.section = (Section)Controller.getInstance().saveObject(section); //cw ! list(); loadInEditor(row); //new panel.selectTableRow(cleanupRowNumber(row));//new *************** *** 490,498 **** int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) observations[row]); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: MedicalFunction - remove() - ArrayIndexOutOfBoundsException"); } ! populate((Section)Controller.getInstance().saveObject(section)); //cw if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new --- 482,493 ---- int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) observations.get(row)); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: MedicalFunction - remove() - ArrayIndexOutOfBoundsException"); } ! Controller.getInstance().saveObject(section); //cw ! Controller.getInstance().deleteObject(observations.get(row)); ! observations.remove(row); ! list(); if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new *************** *** 502,506 **** protected int getNumberOfActs(){ ! return observations == null ? 0 : observations.length ; // new } --- 497,501 ---- protected int getNumberOfActs(){ ! return observations == null ? 0 : observations.size() ; // new } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:23
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/grouping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/grouping Modified Files: GroupingFunction.java GroupingFunctionPanel.java Log Message: port changes over to r1 Index: GroupingFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/grouping/GroupingFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GroupingFunction.java 23 Mar 2006 01:51:12 -0000 1.1 --- GroupingFunction.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 257,260 **** --- 257,261 ---- Controller.getInstance().saveObject(tapasGroup); list(); + panel.selectTableRow(groupIndex); loadInEditor(groupIndex); } *************** *** 266,269 **** --- 267,271 ---- Controller.getInstance().saveObject(tapasGroup); list(); + panel.selectTableRow(groupIndex); loadInEditor(groupIndex); } *************** *** 279,282 **** --- 281,285 ---- TapasGroup tapasGroup = (TapasGroup) tapasGroupArray[index]; Controller.getInstance().saveObject(tapasGroup); + panel.selectTableRow(index); list(); } Index: GroupingFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/grouping/GroupingFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GroupingFunctionPanel.java 23 Mar 2006 01:51:12 -0000 1.1 --- GroupingFunctionPanel.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 39,43 **** public class GroupingFunctionPanel extends javax.swing.JPanel { ! /** Creates new form MessagesFunctionPanel */ public GroupingFunctionPanel(GroupingFunction function) { --- 39,43 ---- public class GroupingFunctionPanel extends javax.swing.JPanel { ! /** Creates new form MessagesFunctionPanel */ public GroupingFunctionPanel(GroupingFunction function) { *************** *** 46,50 **** adjustColumns(); } ! /** This method is called from within the constructor to * initialize the form. --- 46,50 ---- adjustColumns(); } ! /** This method is called from within the constructor to * initialize the form. *************** *** 380,392 **** }// </editor-fold>//GEN-END:initComponents ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ int option = JOptionPane.showConfirmDialog(Controller.getInstance().getMainFrame(), "Do you want to save outstanding changes?", "Unsaved changes", JOptionPane.YES_NO_OPTION); ! if (option == JOptionPane.YES_OPTION) { ready = false; enableSaveButton(false, true);//mod function.save(getSelectedTableRow()); ! } else { cancel(); ready = false; --- 380,392 ---- }// </editor-fold>//GEN-END:initComponents ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ int option = JOptionPane.showConfirmDialog(Controller.getInstance().getMainFrame(), "Do you want to save outstanding changes?", "Unsaved changes", JOptionPane.YES_NO_OPTION); ! if (option == JOptionPane.YES_OPTION) { ready = false; enableSaveButton(false, true);//mod function.save(getSelectedTableRow()); ! } else { cancel(); ready = false; *************** *** 395,407 **** } }//GEN-LAST:event_formComponentHidden ! private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveButtonActionPerformed // TODO add your handling code here: }//GEN-LAST:event_saveButtonActionPerformed ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed // TODO add your handling code here: }//GEN-LAST:event_cancelButtonActionPerformed ! private void removeMeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeMeButtonActionPerformed function.removeMe(getSelectedTableRow()); --- 395,407 ---- } }//GEN-LAST:event_formComponentHidden ! private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveButtonActionPerformed // TODO add your handling code here: }//GEN-LAST:event_saveButtonActionPerformed ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed // TODO add your handling code here: }//GEN-LAST:event_cancelButtonActionPerformed ! private void removeMeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeMeButtonActionPerformed function.removeMe(getSelectedTableRow()); *************** *** 409,413 **** limitRowSelection(table, function.getNumberOfGroups()); }//GEN-LAST:event_removeMeButtonActionPerformed ! private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed if (currentTable.getSelectedRow() < function.getNumberOfUsers() && currentTable.getSelectedRow() > -1){ --- 409,413 ---- limitRowSelection(table, function.getNumberOfGroups()); }//GEN-LAST:event_removeMeButtonActionPerformed ! private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed if (currentTable.getSelectedRow() < function.getNumberOfUsers() && currentTable.getSelectedRow() > -1){ *************** *** 416,420 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_removeButtonActionPerformed ! private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed if (availableTable.getSelectedRow() < function.getNumberOfAvailableUsers() && availableTable.getSelectedRow() > -1){ --- 416,420 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_removeButtonActionPerformed ! private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed if (availableTable.getSelectedRow() < function.getNumberOfAvailableUsers() && availableTable.getSelectedRow() > -1){ *************** *** 423,443 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_addButtonActionPerformed ! private void currentTableMouseClicked1(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_currentTableMouseClicked1 limitRowSelection(availableTable, function.getNumberOfAvailableUsers()); }//GEN-LAST:event_currentTableMouseClicked1 ! private void currentTableKeyReleased1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_currentTableKeyReleased1 limitRowSelection(availableTable, function.getNumberOfAvailableUsers()); }//GEN-LAST:event_currentTableKeyReleased1 ! private void availableTableMouseClicked1(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_availableTableMouseClicked1 limitRowSelection(currentTable, function.getNumberOfUsers()); }//GEN-LAST:event_availableTableMouseClicked1 ! private void availableTableKeyReleased1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_availableTableKeyReleased1 limitRowSelection(currentTable, function.getNumberOfUsers()); }//GEN-LAST:event_availableTableKeyReleased1 ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased limitRowSelection(table, function.getNumberOfGroups()); --- 423,443 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_addButtonActionPerformed ! private void currentTableMouseClicked1(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_currentTableMouseClicked1 limitRowSelection(availableTable, function.getNumberOfAvailableUsers()); }//GEN-LAST:event_currentTableMouseClicked1 ! private void currentTableKeyReleased1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_currentTableKeyReleased1 limitRowSelection(availableTable, function.getNumberOfAvailableUsers()); }//GEN-LAST:event_currentTableKeyReleased1 ! private void availableTableMouseClicked1(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_availableTableMouseClicked1 limitRowSelection(currentTable, function.getNumberOfUsers()); }//GEN-LAST:event_availableTableMouseClicked1 ! private void availableTableKeyReleased1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_availableTableKeyReleased1 limitRowSelection(currentTable, function.getNumberOfUsers()); }//GEN-LAST:event_availableTableKeyReleased1 ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased limitRowSelection(table, function.getNumberOfGroups()); *************** *** 445,449 **** removeMeButton.setEnabled(true); }//GEN-LAST:event_tableKeyReleased ! private void tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMouseClicked limitRowSelection(table, function.getNumberOfGroups()); --- 445,449 ---- removeMeButton.setEnabled(true); }//GEN-LAST:event_tableKeyReleased ! private void tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMouseClicked limitRowSelection(table, function.getNumberOfGroups()); *************** *** 451,488 **** removeMeButton.setEnabled(true); }//GEN-LAST:event_tableMouseClicked ! protected void addGroupRow(String groupName, int numberOfUsers, int row){ table.getModel().setValueAt(groupName, row, 0); table.getModel().setValueAt(numberOfUsers, row, 1); } ! protected void setGroupTableRows(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void setCurrentTableRows(int index){ //new ((DefaultTableModel) currentTable.getModel()).setRowCount(index); } ! protected void setAvailableTableRows(int index){ //new ((DefaultTableModel) availableTable.getModel()).setRowCount(index); } ! protected void addUser(String userName, int row){ currentTable.getModel().setValueAt(userName, row, 0); } ! protected void addAvailableUser(String userName, int row){ availableTable.getModel().setValueAt(userName, row, 0); } ! protected void setGroupNameLabel(String text){ groupNameLabel.setText(text); } ! protected String getGroupNameLabel(){ return groupNameLabel.getText(); } ! private void adjustColumns(){ currentTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); --- 451,494 ---- removeMeButton.setEnabled(true); }//GEN-LAST:event_tableMouseClicked ! protected void addGroupRow(String groupName, int numberOfUsers, int row){ table.getModel().setValueAt(groupName, row, 0); table.getModel().setValueAt(numberOfUsers, row, 1); } ! ! protected void selectTableRow(int index){ //new ! if (index > -1){ ! table.setRowSelectionInterval(index, index); ! } ! } ! protected void setGroupTableRows(int index){ //new ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void setCurrentTableRows(int index){ //new ((DefaultTableModel) currentTable.getModel()).setRowCount(index); } ! protected void setAvailableTableRows(int index){ //new ((DefaultTableModel) availableTable.getModel()).setRowCount(index); } ! protected void addUser(String userName, int row){ currentTable.getModel().setValueAt(userName, row, 0); } ! protected void addAvailableUser(String userName, int row){ availableTable.getModel().setValueAt(userName, row, 0); } ! protected void setGroupNameLabel(String text){ groupNameLabel.setText(text); } ! protected String getGroupNameLabel(){ return groupNameLabel.getText(); } ! private void adjustColumns(){ currentTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); *************** *** 492,496 **** table.getColumnModel().getColumn(1).setMinWidth(100); } ! private void limitRowSelection(javax.swing.JTable table, int rows){ if (rows > 0){ --- 498,502 ---- table.getColumnModel().getColumn(1).setMinWidth(100); } ! private void limitRowSelection(javax.swing.JTable table, int rows){ if (rows > 0){ *************** *** 502,510 **** } } ! protected int getSelectedTableRow(){ return table.getSelectedRow(); } ! protected void clear(){ ((DefaultTableModel) availableTable.getModel()).setRowCount(0); //new --- 508,516 ---- } } ! protected int getSelectedTableRow(){ return table.getSelectedRow(); } ! protected void clear(){ ((DefaultTableModel) availableTable.getModel()).setRowCount(0); //new *************** *** 512,521 **** setGroupNameLabel("Group Name:") ; } ! ! protected void clearTable(){ ((DefaultTableModel) table.getModel()).setRowCount(0); //new } ! protected void enableSaveButton(boolean enabled, boolean previous){ if (ready || previous){ --- 518,527 ---- setGroupNameLabel("Group Name:") ; } ! ! protected void clearTable(){ ((DefaultTableModel) table.getModel()).setRowCount(0); //new } ! protected void enableSaveButton(boolean enabled, boolean previous){ if (ready || previous){ *************** *** 525,538 **** } } ! protected void cancel(){ //clear();//mod enableSaveButton(false, false); //mod } ! private GroupingFunction function ; private boolean ready = false; //mod private boolean toBeCommitted = false; //mod ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton addButton; --- 531,544 ---- } } ! protected void cancel(){ //clear();//mod enableSaveButton(false, false); //mod } ! private GroupingFunction function ; private boolean ready = false; //mod private boolean toBeCommitted = false; //mod ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton addButton; *************** *** 558,561 **** private javax.swing.JPanel titlePanel; // End of variables declaration//GEN-END:variables ! } --- 564,567 ---- private javax.swing.JPanel titlePanel; // End of variables declaration//GEN-END:variables ! } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:23
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/persistence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/persistence Modified Files: DocumentManager.java Log Message: port changes over to r1 Index: DocumentManager.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/persistence/DocumentManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DocumentManager.java 23 Mar 2006 01:51:48 -0000 1.1 --- DocumentManager.java 26 Apr 2006 23:10:19 -0000 1.2 *************** *** 52,57 **** */ public List getCDAByPatientId(String patientId, int adjacentSet) { ! GetDocumentsCommand cmd = (GetDocumentsCommand) factory.getCommand( ! GetDocumentsCommand.class); return cmd.getDocuments(patientId); --- 52,56 ---- */ public List getCDAByPatientId(String patientId, int adjacentSet) { ! GetDocumentsCommand cmd = (GetDocumentsCommand) factory.getCommand(GetDocumentsCommand.class); return cmd.getDocuments(patientId); *************** *** 151,155 **** * @param object Object */ ! public Object saveObject(Object object,Integer userId) { SaveObjectsCommand cmd = (SaveObjectsCommand) factory.getCommand( SaveObjectsCommand.class); --- 150,154 ---- * @param object Object */ ! public Object saveObject(Object object, Integer userId) { SaveObjectsCommand cmd = (SaveObjectsCommand) factory.getCommand( SaveObjectsCommand.class); *************** *** 157,160 **** --- 156,169 ---- } + /** + * deletObject + * + * @param object Object + */ + public Object deleteObject(Object object, Integer userId) { + DeleteObjectsCommand cmd = (DeleteObjectsCommand) factory.getCommand(DeleteObjectsCommand.class); + return cmd.deleteObjects(object, userId); + } + public List getTapasUsers() { GetTapasUsersCommand cmd = (GetTapasUsersCommand) factory.getCommand( |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:23
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/thread In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/thread Added Files: RefreshDataTask.java Removed Files: RefreshMessagesTask.java Log Message: port changes over to r1 --- NEW FILE: RefreshDataTask.java --- package org.opentapas.tapear.thread; import org.opentapas.tapear.framework.Controller; import java.util.TimerTask; import org.opentapas.commons.security.TapasUser; public class RefreshDataTask extends TimerTask { public RefreshDataTask() { } /** * * When an object implementing interface <code>Runnable</code> is used to * create a thread, starting the thread causes the object's <code>run</code> * method to be called in that separately executing thread. * * @todo Implement this java.lang.Runnable method */ public void run() { Controller.getInstance().refreshUserPanels(); Controller.getInstance().refreshAlertsAndReferrals(); } } --- RefreshMessagesTask.java DELETED --- |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:22
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/allergy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/allergy Modified Files: AllergyFunction.java AllergyFunctionPanel.java Log Message: port changes over to r1 Index: AllergyFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/allergy/AllergyFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AllergyFunctionPanel.java 23 Mar 2006 01:50:57 -0000 1.1 --- AllergyFunctionPanel.java 26 Apr 2006 23:10:18 -0000 1.2 *************** *** 42,46 **** public class AllergyFunctionPanel extends javax.swing.JPanel { ! /** Creates new form AllergyFunctionPanel */ public AllergyFunctionPanel(AllergyFunction function, List allTypeList, List allSeverityList, boolean canWrite) { //cw --- 42,46 ---- public class AllergyFunctionPanel extends javax.swing.JPanel { ! /** Creates new form AllergyFunctionPanel */ public AllergyFunctionPanel(AllergyFunction function, List allTypeList, List allSeverityList, boolean canWrite) { //cw *************** *** 60,64 **** } } ! /** This method is called from within the constructor to * initialize the form. --- 60,64 ---- } } ! /** This method is called from within the constructor to * initialize the form. *************** *** 492,496 **** }// </editor-fold>//GEN-END:initComponents ! private void nameTextFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_nameTextFieldMouseClicked if (function.canWrite()){ --- 492,496 ---- }// </editor-fold>//GEN-END:initComponents ! private void nameTextFieldMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_nameTextFieldMouseClicked if (function.canWrite()){ *************** *** 505,509 **** } }//GEN-LAST:event_nameTextFieldMouseClicked ! private void tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMouseClicked if (function.getNumberOfActs() > 0){ --- 505,509 ---- } }//GEN-LAST:event_nameTextFieldMouseClicked ! private void tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMouseClicked if (function.getNumberOfActs() > 0){ *************** *** 531,535 **** } }//GEN-LAST:event_tableMouseClicked ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ --- 531,535 ---- } }//GEN-LAST:event_tableMouseClicked ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ *************** *** 557,561 **** } }//GEN-LAST:event_tableKeyReleased ! private void partialStartDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartDayComboBoxActionPerformed if (function.getState() == 'x'){//mod --- 557,561 ---- } }//GEN-LAST:event_tableKeyReleased ! private void partialStartDayComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartDayComboBoxActionPerformed if (function.getState() == 'x'){//mod *************** *** 563,567 **** }//mod }//GEN-LAST:event_partialStartDayComboBoxActionPerformed ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod --- 563,567 ---- }//mod }//GEN-LAST:event_partialStartDayComboBoxActionPerformed ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod *************** *** 569,573 **** }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ --- 569,573 ---- }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ *************** *** 592,600 **** } }//GEN-LAST:event_formComponentHidden ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) --- 592,600 ---- } }//GEN-LAST:event_formComponentHidden ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) *************** *** 607,615 **** }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void typeComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_typeComboBoxActionPerformed if (function.getState() == 'x'){//mod --- 607,615 ---- }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! private void typeComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_typeComboBoxActionPerformed if (function.getState() == 'x'){//mod *************** *** 617,621 **** }//mod }//GEN-LAST:event_typeComboBoxActionPerformed ! private void severityComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_severityComboBoxActionPerformed if (function.getState() == 'x'){//mod --- 617,621 ---- }//mod }//GEN-LAST:event_typeComboBoxActionPerformed ! private void severityComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_severityComboBoxActionPerformed if (function.getState() == 'x'){//mod *************** *** 623,627 **** }//mod }//GEN-LAST:event_severityComboBoxActionPerformed ! private void partialStartMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartMonthComboBoxActionPerformed populatePartialStartDay(); --- 623,627 ---- }//mod }//GEN-LAST:event_severityComboBoxActionPerformed ! private void partialStartMonthComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartMonthComboBoxActionPerformed populatePartialStartDay(); *************** *** 637,641 **** } }//GEN-LAST:event_partialStartMonthComboBoxActionPerformed ! private void partialStartYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartYearComboBoxActionPerformed if (function.canWrite()){ //cw --- 637,641 ---- } }//GEN-LAST:event_partialStartMonthComboBoxActionPerformed ! private void partialStartYearComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_partialStartYearComboBoxActionPerformed if (function.canWrite()){ //cw *************** *** 650,654 **** } }//GEN-LAST:event_partialStartYearComboBoxActionPerformed ! private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButtonActionPerformed if (function.getNumberOfActs() > 0){ --- 650,654 ---- } }//GEN-LAST:event_partialStartYearComboBoxActionPerformed ! private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButtonActionPerformed if (function.getNumberOfActs() > 0){ *************** *** 661,665 **** } }//GEN-LAST:event_deleteButtonActionPerformed ! private void newButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newButtonActionPerformed if (deleteButton.isEnabled()) { //new --- 661,665 ---- } }//GEN-LAST:event_deleteButtonActionPerformed ! private void newButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newButtonActionPerformed if (deleteButton.isEnabled()) { //new *************** *** 676,680 **** setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveButtonActionPerformed if (function.getNumberOfActs() > 0){ --- 676,680 ---- setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveButtonActionPerformed if (function.getNumberOfActs() > 0){ *************** *** 683,687 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! /** * populates a given row of the Table --- 683,687 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! /** * populates a given row of the Table *************** *** 701,709 **** table.getColumnModel().getColumn(4).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //mod2 ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //mod2 if (index > -1){ --- 701,709 ---- table.getColumnModel().getColumn(4).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //mod2 ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //mod2 if (index > -1){ *************** *** 713,717 **** } } ! private void adjustColumns(){ table.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); --- 713,717 ---- } } ! private void adjustColumns(){ table.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); *************** *** 726,730 **** table.getColumnModel().getColumn(3).setMaxWidth(70); } ! private void populateTypes(List allTypeList){ typeComboBox.setModel(new javax.swing.DefaultComboBoxModel()); --- 726,730 ---- table.getColumnModel().getColumn(3).setMaxWidth(70); } ! private void populateTypes(List allTypeList){ typeComboBox.setModel(new javax.swing.DefaultComboBoxModel()); *************** *** 736,740 **** } } ! private void populateSeverities(List allSeverityList){ severityComboBox.setModel(new javax.swing.DefaultComboBoxModel()); --- 736,740 ---- } } ! private void populateSeverities(List allSeverityList){ severityComboBox.setModel(new javax.swing.DefaultComboBoxModel()); *************** *** 746,758 **** } } ! protected void setNameTextField(String text){ nameTextField.setText(text); } ! protected String getNameTextField(){ return nameTextField.getText(); } ! /** * sets the start date end text field --- 746,758 ---- } } ! protected void setNameTextField(String text){ nameTextField.setText(text); } ! protected String getNameTextField(){ return nameTextField.getText(); } ! /** * sets the start date end text field *************** *** 770,774 **** } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialStartMonthComboBox.setSelectedIndex(date.getMonth() + 1); --- 770,774 ---- } } ! if (date.getMonth() < 12 && date.getMonth() > 0){ partialStartMonthComboBox.setSelectedIndex(date.getMonth() + 1); *************** *** 780,784 **** } } ! if (date.getDay() <= partialStartDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialStartDayComboBox.setSelectedIndex(date.getDay() + 1); --- 780,784 ---- } } ! if (date.getDay() <= partialStartDayComboBox.getItemCount() - 2 && date.getDay() > 0){ partialStartDayComboBox.setSelectedIndex(date.getDay() + 1); *************** *** 791,795 **** } } ! /** * returns the partial start date - year portion --- 791,795 ---- } } ! /** * returns the partial start date - year portion *************** *** 804,808 **** } } ! /** * returns the partial start date - month portion --- 804,808 ---- } } ! /** * returns the partial start date - month portion *************** *** 817,821 **** } } ! /** * returns the partial start date - day portion --- 817,821 ---- } } ! /** * returns the partial start date - day portion *************** *** 830,834 **** } } ! /** * returns the partial start date - nullreason --- 830,834 ---- } } ! /** * returns the partial start date - nullreason *************** *** 845,849 **** } } ! protected void setType(String code){ CE ce; --- 845,849 ---- } } ! protected void setType(String code){ CE ce; *************** *** 856,864 **** } } ! protected CE getType(){ return (CE)types[typeComboBox.getSelectedIndex()]; } ! protected void setSeverity(String code){ CE ce; --- 856,864 ---- } } ! protected CE getType(){ return (CE)types[typeComboBox.getSelectedIndex()]; } ! protected void setSeverity(String code){ CE ce; *************** *** 871,898 **** } } ! protected CE getSeverity(){ return (CE)severities[severityComboBox.getSelectedIndex()]; } ! ! protected void setCommentTextArea(String text){ commentTextArea.setText(text); } ! protected String getCommentTextArea(){ return commentTextArea.getText(); } ! ! ! protected void setTypeNull(){ typeComboBox.setSelectedIndex(0); } ! protected void setSeverityNull(){ severityComboBox.setSelectedIndex(0); } ! /** * returns # of selected table row --- 871,898 ---- } } ! protected CE getSeverity(){ return (CE)severities[severityComboBox.getSelectedIndex()]; } ! ! protected void setCommentTextArea(String text){ commentTextArea.setText(text); } ! protected String getCommentTextArea(){ return commentTextArea.getText(); } ! ! ! protected void setTypeNull(){ typeComboBox.setSelectedIndex(0); } ! protected void setSeverityNull(){ severityComboBox.setSelectedIndex(0); } ! /** * returns # of selected table row *************** *** 903,907 **** return table.getSelectedRow(); } ! private void populatePartialStartDay(){ if ( --- 903,907 ---- return table.getSelectedRow(); } ! private void populatePartialStartDay(){ if ( *************** *** 927,931 **** } } ! private void listPartialStartDay(int numberOfDays){ partialStartDayComboBox.removeAllItems(); --- 927,931 ---- } } ! private void listPartialStartDay(int numberOfDays){ partialStartDayComboBox.removeAllItems(); *************** *** 936,940 **** } } ! private void populatePartialStartYear(int year){ partialStartDayComboBox.removeAllItems(); --- 936,940 ---- } } ! private void populatePartialStartYear(int year){ partialStartDayComboBox.removeAllItems(); *************** *** 945,949 **** } } ! /** * Adjusts the label of the name text field when searching / restores it --- 945,949 ---- } } ! /** * Adjusts the label of the name text field when searching / restores it *************** *** 960,964 **** } } ! /** * colours name text field greenish --- 960,964 ---- } } ! /** * colours name text field greenish *************** *** 967,971 **** nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish --- 967,971 ---- nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish *************** *** 974,978 **** nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field --- 974,978 ---- nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field *************** *** 981,985 **** nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * clears the table --- 981,985 ---- nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * clears the table *************** *** 988,992 **** ((DefaultTableModel) table.getModel()).setRowCount(0); } ! /** * returns the table --- 988,992 ---- ((DefaultTableModel) table.getModel()).setRowCount(0); } ! /** * returns the table *************** *** 997,1001 **** return table; } ! /** * clears the editor text fields --- 997,1001 ---- return table; } ! /** * clears the editor text fields *************** *** 1010,1014 **** commentTextArea.setText("") ; } ! protected void cancel(){ nameTextFieldBW(); --- 1010,1014 ---- commentTextArea.setText("") ; } ! protected void cancel(){ nameTextFieldBW(); *************** *** 1024,1028 **** setSearchActive(false); //wop } ! protected void setReadOnly(boolean readonly){ nameTextField.setEnabled(!readonly); --- 1024,1028 ---- setSearchActive(false); //wop } ! protected void setReadOnly(boolean readonly){ nameTextField.setEnabled(!readonly); *************** *** 1034,1043 **** commentTextArea.setEnabled(!readonly); } ! ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod --- 1034,1043 ---- commentTextArea.setEnabled(!readonly); } ! ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod *************** *** 1045,1057 **** toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void setSearchActive(boolean active){ //wop searchActive = active; } ! private Object[] types ; private Object[] severities ; --- 1045,1057 ---- toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void setSearchActive(boolean active){ //wop searchActive = active; } ! private Object[] types ; private Object[] severities ; *************** *** 1061,1065 **** int thisYear = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR) ; private boolean toBeCommitted = false; //mod ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel blueLabel; --- 1061,1065 ---- int thisYear = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR) ; private boolean toBeCommitted = false; //mod ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel blueLabel; *************** *** 1093,1096 **** private javax.swing.JLabel typeLabel; // End of variables declaration//GEN-END:variables ! } --- 1093,1096 ---- private javax.swing.JLabel typeLabel; // End of variables declaration//GEN-END:variables ! } Index: AllergyFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/allergy/AllergyFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AllergyFunction.java 23 Mar 2006 01:50:57 -0000 1.1 --- AllergyFunction.java 26 Apr 2006 23:10:18 -0000 1.2 *************** *** 124,137 **** */ private Observation observation; ! ! /** ! * EMR Observation array ! */ ! private Observation[] observations = null; ! /** ! * Dummy Observation array */ ! private Observation[] dummyObs = new Observation[1]; /** --- 124,132 ---- */ private Observation observation; ! /** ! * Observations List */ ! private List observations = new ArrayList(); /** *************** *** 274,278 **** public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations[index]; if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; --- 269,273 ---- public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations.get(index); if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; *************** *** 323,364 **** Controller.getInstance().clearAllergies(); StringBuffer text = new StringBuffer(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); - observations = null ; - int numberOfObservations = 0 ; ! for (int i = 0; i < acts.length; i++) { ! act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! dummyObs[0] = (Observation) act; ! numberOfObservations ++ ; ! ! Observation[] temp = new Observation[numberOfObservations]; ! if (numberOfObservations > 1){ ! System.arraycopy(observations, 0, temp, 0, numberOfObservations - 1); ! } ! System.arraycopy(dummyObs, 0, temp, numberOfObservations - 1, 1); ! observations = temp; ! observation = observations[numberOfObservations - 1]; if (observation.getText() == null) { observation.setText(new ST()); - //Controller.getInstance().saveObject(observation.getText()); - } - if (observation.getTitle() == null) { - observation.setTitle(new ST()); - //Controller.getInstance().saveObject(observation.getTitle()); } if (observation.getStartDateTime() == null) { observation.setStartDateTime(new DateTime()); - //Controller.getInstance().saveObject(observation.getStartDate()); } ! panel.setTableRowNumber(numberOfObservations);//mod2 panel.addRow(observation.getStartDateTime().getStringRepresentation(), (observation.getCode() == null ? "" : observation.getCode().getDisplayName()), (observation.getCode2() == null ? "" : observation.getCode2().getDisplayName()), (observation.getCode3() == null ? "" : observation.getCode3().getDisplayName()), ! observation.getText().getText(), i); ! text.append((observation.getTitle().getText() == null ? "" : observation.getTitle().getText()) + "\n"); ! Controller.getInstance().addAllergyRow(observation.getTitle().getText(), i); } } --- 318,346 ---- Controller.getInstance().clearAllergies(); StringBuffer text = new StringBuffer(); + observations.clear(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); ! for (Object obj : acts) { ! act = (Act) obj; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! ! observations.add(act); ! observation = (Observation) act ; ! if (observation.getText() == null) { observation.setText(new ST()); } if (observation.getStartDateTime() == null) { observation.setStartDateTime(new DateTime()); } ! panel.setTableRowNumber(observations.size());//mod2 panel.addRow(observation.getStartDateTime().getStringRepresentation(), (observation.getCode() == null ? "" : observation.getCode().getDisplayName()), (observation.getCode2() == null ? "" : observation.getCode2().getDisplayName()), (observation.getCode3() == null ? "" : observation.getCode3().getDisplayName()), ! observation.getText().getText(), observations.size() - 1); ! text.append((observation.getCode() == null ? "" : observation.getCode().getDisplayName()) + "\n"); ! Controller.getInstance().addAllergyRow(observation.getCode().getDisplayName(), observations.size() - 1); } } *************** *** 376,380 **** removeSearchPanel(); try { ! observation = (Observation) observations[index]; if (observation.getCode() != null){ panel.setNameTextField(observation.getCode().getDisplayName()); --- 358,362 ---- removeSearchPanel(); try { ! observation = (Observation) observations.get(index); if (observation.getCode() != null){ panel.setNameTextField(observation.getCode().getDisplayName()); *************** *** 421,425 **** if (state == 'q') { ! observation = (Observation) observations[panel.getSelectedTableRow()]; observation.setCode(code); isQ = true; --- 403,407 ---- if (state == 'q') { ! observation = (Observation) observations.get(panel.getSelectedTableRow()); observation.setCode(code); isQ = true; *************** *** 450,459 **** try { int row = panel.getSelectedTableRow(); //mod2 ! observation = (Observation) observations[previousClicked == -1 ? row : previousClicked]; //new observation.getStartDateTime().setYear(panel.getPartialStartYear()); observation.getStartDateTime().setMonth(panel.getPartialStartMonth()); observation.getStartDateTime().setDay(panel.getPartialStartDay()); observation.getStartDateTime().setNullReason(panel.getStartNullReason()); - observation.getTitle().setText(panel.getNameTextField()); observation.setCode2(panel.getType()); observation.setCode3(panel.getSeverity()); --- 432,440 ---- try { int row = panel.getSelectedTableRow(); //mod2 ! observation = (Observation) observations.get(previousClicked == -1 ? row : previousClicked); //new observation.getStartDateTime().setYear(panel.getPartialStartYear()); observation.getStartDateTime().setMonth(panel.getPartialStartMonth()); observation.getStartDateTime().setDay(panel.getPartialStartDay()); observation.getStartDateTime().setNullReason(panel.getStartNullReason()); observation.setCode2(panel.getType()); observation.setCode3(panel.getSeverity()); *************** *** 501,509 **** int row = panel.getSelectedTableRow(); try { ! section.deleteAct((Act) observations[row]); } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: AllergyFunction - remove() - ArrayIndexOutOfBoundsException"); } ! populate((Section)Controller.getInstance().saveObject(section)); //cw panel.selectTableRow(cleanupRowNumber(row)); if (getNumberOfActs() > 0) { --- 482,492 ---- int row = panel.getSelectedTableRow(); try { ! section.deleteAct((Act) observations.get(row)); } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug(ex.getMessage() + "\nIN: AllergyFunction - remove() - ArrayIndexOutOfBoundsException"); } ! Controller.getInstance().saveObject(section); //cw ! Controller.getInstance().deleteObject(observations.get(row)); ! list(); panel.selectTableRow(cleanupRowNumber(row)); if (getNumberOfActs() > 0) { *************** *** 517,521 **** protected int getNumberOfActs(){ ! return (observations == null? 0 : observations.length) ; } --- 500,504 ---- protected int getNumberOfActs(){ ! return (observations == null? 0 : observations.size()) ; } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:22
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/familyhx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/familyhx Modified Files: FamilyHxFunction.java FamilyHxFunctionPanel.java Log Message: port changes over to r1 Index: FamilyHxFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/familyhx/FamilyHxFunctionPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FamilyHxFunctionPanel.java 23 Mar 2006 01:50:57 -0000 1.1 --- FamilyHxFunctionPanel.java 26 Apr 2006 23:10:18 -0000 1.2 *************** *** 41,45 **** public class FamilyHxFunctionPanel extends javax.swing.JPanel { ! /** Creates new form FamilyFunctionPanel */ public FamilyHxFunctionPanel(FamilyHxFunction function, List famRelList, boolean canWrite) { //cw --- 41,45 ---- public class FamilyHxFunctionPanel extends javax.swing.JPanel { ! /** Creates new form FamilyFunctionPanel */ public FamilyHxFunctionPanel(FamilyHxFunction function, List famRelList, boolean canWrite) { //cw *************** *** 56,60 **** } } ! /** This method is called from within the constructor to * initialize the form. --- 56,60 ---- } } ! /** This method is called from within the constructor to * initialize the form. *************** *** 469,473 **** }// </editor-fold>//GEN-END:initComponents ! private void familyComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_familyComboBoxActionPerformed if (function.getState() == 'x'){//mod --- 469,473 ---- }// </editor-fold>//GEN-END:initComponents ! private void familyComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_familyComboBoxActionPerformed if (function.getState() == 'x'){//mod *************** *** 475,479 **** } }//GEN-LAST:event_familyComboBoxActionPerformed ! private void ageOnsetTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_ageOnsetTextFieldKeyReleased if (function.getState() == 'x'){//mod --- 475,479 ---- } }//GEN-LAST:event_familyComboBoxActionPerformed ! private void ageOnsetTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_ageOnsetTextFieldKeyReleased if (function.getState() == 'x'){//mod *************** *** 481,485 **** }//mod }//GEN-LAST:event_ageOnsetTextFieldKeyReleased ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod --- 481,485 ---- }//mod }//GEN-LAST:event_ageOnsetTextFieldKeyReleased ! private void commentTextAreaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_commentTextAreaKeyReleased if (function.getState() == 'x'){//mod *************** *** 487,495 **** }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ --- 487,495 ---- }//mod }//GEN-LAST:event_commentTextAreaKeyReleased ! private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown function.doLoad(); //mod }//GEN-LAST:event_formComponentShown ! private void formComponentHidden(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentHidden if (toBeCommitted){ *************** *** 514,518 **** } }//GEN-LAST:event_formComponentHidden ! private void ageOnsetTextFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_ageOnsetTextFieldFocusLost try { --- 514,518 ---- } }//GEN-LAST:event_formComponentHidden ! private void ageOnsetTextFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_ageOnsetTextFieldFocusLost try { *************** *** 520,524 **** } catch (NumberFormatException e) {ageOnsetTextField.setText("0");} }//GEN-LAST:event_ageOnsetTextFieldFocusLost ! private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButtonActionPerformed if (function.getNumberOfActs() > 0){ --- 520,524 ---- } catch (NumberFormatException e) {ageOnsetTextField.setText("0");} }//GEN-LAST:event_ageOnsetTextFieldFocusLost ! private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButtonActionPerformed if (function.getNumberOfActs() > 0){ *************** *** 533,537 **** } }//GEN-LAST:event_deleteButtonActionPerformed ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ --- 533,537 ---- } }//GEN-LAST:event_deleteButtonActionPerformed ! private void tableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableKeyReleased if (function.getNumberOfActs() > 0){ *************** *** 559,563 **** } }//GEN-LAST:event_tableKeyReleased ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) --- 559,563 ---- } }//GEN-LAST:event_tableKeyReleased ! private void nameTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameTextFieldKeyReleased if ((function.getState() == 'n' || (function.getNumberOfActs() > 0 && function.getState() == 'q')) *************** *** 570,574 **** }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! /** * loads clicked Entry in the Editor --- 570,574 ---- }//mod }//GEN-LAST:event_nameTextFieldKeyReleased ! /** * loads clicked Entry in the Editor *************** *** 600,604 **** } }//GEN-LAST:event_tableMouseClicked ! /** * Triggers the update function if the insert (new) state is not active; clears and colours this textfield reddish --- 600,604 ---- } }//GEN-LAST:event_tableMouseClicked ! /** * Triggers the update function if the insert (new) state is not active; clears and colours this textfield reddish *************** *** 617,621 **** } }//GEN-LAST:event_nameTextFieldMouseClicked ! /** * activates Insert (new Entry) state, colour text field greenish and clear editor text fields --- 617,621 ---- } }//GEN-LAST:event_nameTextFieldMouseClicked ! /** * activates Insert (new Entry) state, colour text field greenish and clear editor text fields *************** *** 634,638 **** setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! /** * Calls the code to persist edited data --- 634,638 ---- setSearchActive(true) ; //wop }//GEN-LAST:event_newButtonActionPerformed ! /** * Calls the code to persist edited data *************** *** 644,652 **** enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! /** * populates a given row of the Table --- 644,652 ---- enableSaveButton(false, false);//mod }//GEN-LAST:event_saveButtonActionPerformed ! private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed cancel(); }//GEN-LAST:event_cancelButtonActionPerformed ! /** * populates a given row of the Table *************** *** 675,683 **** table.getColumnModel().getColumn(3).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //mod2 ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //mod2 if (index > -1){ --- 675,683 ---- table.getColumnModel().getColumn(3).setCellRenderer(Controller.getInstance().getBlueRenderer()); } ! protected void setTableRowNumber(int index){ //mod2 ((DefaultTableModel) table.getModel()).setRowCount(index); } ! protected void selectTableRow(int index){ //mod2 if (index > -1){ *************** *** 688,692 **** } } ! /** * Sets the name text field --- 688,692 ---- } } ! /** * Sets the name text field *************** *** 697,701 **** nameTextField.setText(text); } ! /** * returns the name text field --- 697,701 ---- nameTextField.setText(text); } ! /** * returns the name text field *************** *** 706,710 **** return nameTextField.getText(); } ! protected int getAgeOnset(){ try{ --- 706,710 ---- return nameTextField.getText(); } ! protected int getAgeOnset(){ try{ *************** *** 712,720 **** } catch (NumberFormatException e) {return 0;} } ! protected void setAgeOnset(String text){ ageOnsetTextField.setText(text); } ! /** * sets the code text field --- 712,720 ---- } catch (NumberFormatException e) {return 0;} } ! protected void setAgeOnset(String text){ ageOnsetTextField.setText(text); } ! /** * sets the code text field *************** *** 725,729 **** codeTextField.setText(text); } ! /** * returns the code text field --- 725,729 ---- codeTextField.setText(text); } ! /** * returns the code text field *************** *** 734,739 **** return codeTextField.getText(); } ! ! /** * sets the comment text field --- 734,739 ---- return codeTextField.getText(); } ! ! /** * sets the comment text field *************** *** 744,748 **** commentTextArea.setText(text); } ! /** * returns the comment text field --- 744,748 ---- commentTextArea.setText(text); } ! /** * returns the comment text field *************** *** 753,757 **** return commentTextArea.getText(); } ! /** * sets the comment text field --- 753,757 ---- return commentTextArea.getText(); } ! /** * sets the comment text field *************** *** 762,766 **** causeDeathCheckBox.setSelected(b); } ! /** * returns the comment text field --- 762,766 ---- causeDeathCheckBox.setSelected(b); } ! /** * returns the comment text field *************** *** 771,775 **** return causeDeathCheckBox.isSelected(); } ! protected void setFamilyComboBox(String compareToThis){ if (compareToThis.equalsIgnoreCase("")){ --- 771,775 ---- return causeDeathCheckBox.isSelected(); } ! protected void setFamilyComboBox(String compareToThis){ if (compareToThis.equalsIgnoreCase("")){ *************** *** 787,796 **** } } ! protected CE getFamilyComboBox(){ return (CE) famRelation[familyComboBox.getSelectedIndex()]; } ! ! private void populateFamilyComboBox(List famRelList){ familyComboBox.setModel(new javax.swing.DefaultComboBoxModel()); --- 787,796 ---- } } ! protected CE getFamilyComboBox(){ return (CE) famRelation[familyComboBox.getSelectedIndex()]; } ! ! private void populateFamilyComboBox(List famRelList){ familyComboBox.setModel(new javax.swing.DefaultComboBoxModel()); *************** *** 802,810 **** } } ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! /** * colours name text field greenish --- 802,810 ---- } } ! private Object makeObj(final String item) { return new Object() { public String toString() { return item; } }; } ! /** * colours name text field greenish *************** *** 813,817 **** nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish --- 813,817 ---- nameTextField.setBackground(ToolKit.NEWGREEN); } ! /** * colours name text field reddish *************** *** 820,824 **** nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field --- 820,824 ---- nameTextField.setBackground(ToolKit.EDITBLUE); } ! /** * restores default colours of name text field *************** *** 827,831 **** nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * returns the table --- 827,831 ---- nameTextField.setBackground(ToolKit.NORMALWHITE); } ! /** * returns the table *************** *** 836,840 **** return table; } ! /** * clears the table --- 836,840 ---- return table; } ! /** * clears the table *************** *** 843,847 **** ((DefaultTableModel) table.getModel()).setRowCount(0); } ! /** * clears the editor text fields --- 843,847 ---- ((DefaultTableModel) table.getModel()).setRowCount(0); } ! /** * clears the editor text fields *************** *** 855,859 **** causeDeathCheckBox.setSelected(false); } ! /** * adjust the with of the table columns and set the name column font to <b>bold</b> --- 855,859 ---- causeDeathCheckBox.setSelected(false); } ! /** * adjust the with of the table columns and set the name column font to <b>bold</b> *************** *** 869,873 **** table.getColumnModel().getColumn(2).setMaxWidth(110); } ! /** * returns # of selected table row --- 869,873 ---- table.getColumnModel().getColumn(2).setMaxWidth(110); } ! /** * returns # of selected table row *************** *** 878,882 **** return table.getSelectedRow(); } ! /** * Adjusts the label of the name text field when searching / restores it --- 878,882 ---- return table.getSelectedRow(); } ! /** * Adjusts the label of the name text field when searching / restores it *************** *** 893,897 **** } } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod --- 893,897 ---- } } ! protected void enableSaveButton(boolean enabled, boolean previous){ saveButton.setEnabled(enabled); //mod *************** *** 899,907 **** toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void cancel(){ nameTextFieldBW(); --- 899,907 ---- toBeCommitted = enabled; //mod } ! protected void enableDeleteButton(boolean enabled){ deleteButton.setEnabled(enabled); } ! protected void cancel(){ nameTextFieldBW(); *************** *** 917,921 **** setSearchActive(false); //wop } ! protected void setReadOnly(boolean readonly){ nameTextField.setEnabled(!readonly); --- 917,921 ---- setSearchActive(false); //wop } ! protected void setReadOnly(boolean readonly){ nameTextField.setEnabled(!readonly); *************** *** 926,935 **** commentTextArea.setEnabled(!readonly); } ! ! protected void setSearchActive(boolean active){ //wop searchActive = active; } ! Object [] famRelation = null; int previousClicked = 0 ; //new --- 926,935 ---- commentTextArea.setEnabled(!readonly); } ! ! protected void setSearchActive(boolean active){ //wop searchActive = active; } ! Object [] famRelation = null; int previousClicked = 0 ; //new *************** *** 937,941 **** private boolean toBeCommitted = false; //mod private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel ageOnsetLabel; --- 937,941 ---- private boolean toBeCommitted = false; //mod private boolean searchActive = false; //wop ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel ageOnsetLabel; *************** *** 967,970 **** private javax.swing.JPanel titlePanel; // End of variables declaration//GEN-END:variables ! } --- 967,970 ---- private javax.swing.JPanel titlePanel; // End of variables declaration//GEN-END:variables ! } Index: FamilyHxFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/familyhx/FamilyHxFunction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FamilyHxFunction.java 23 Mar 2006 01:50:57 -0000 1.1 --- FamilyHxFunction.java 26 Apr 2006 23:10:18 -0000 1.2 *************** *** 125,138 **** */ private Observation observation; ! ! /** ! * EMR Observation array ! */ ! private Observation[] observations = new Observation[0]; ! /** ! * Dummy Observation array */ ! private Observation[] dummyObs = new Observation[1]; /** --- 125,133 ---- */ private Observation observation; ! /** ! * Observations List */ ! private List observations = new ArrayList(); /** *************** *** 278,282 **** public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations[index]; if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; --- 273,277 ---- public boolean isFromAnotherUser(int index) { try { ! Observation observation = (Observation) observations.get(index); if (observation.getAssignedByUser().getName().equalsIgnoreCase(Controller.getInstance().getCurrentUser().getName())){ return false; *************** *** 327,358 **** StringBuffer textBuffer = new StringBuffer(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); - observations = null ; - int numberOfObservations = 0 ; for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! dummyObs[0] = (Observation) act; ! numberOfObservations ++ ; ! ! Observation[] temp = new Observation[numberOfObservations]; ! if (numberOfObservations > 1) { ! System.arraycopy(observations, 0, temp, 0, numberOfObservations - 1); ! } ! System.arraycopy(dummyObs, 0, temp, numberOfObservations - 1, 1); ! observations = temp; ! observation = observations[numberOfObservations - 1]; if (observation.getText() == null) { observation.setText(new ST()); //Controller.getInstance().saveObject(observation.getText()); } ! panel.setTableRowNumber(numberOfObservations);//mod2 panel.addRow( (observation.getAgeOnset() == null ? 0 : observation.getAgeOnset()), (observation.getCode() == null ? "" : observation.getCode().getDisplayName()), (observation.getCode2() == null ? "" : observation.getCode2().getDisplayName()), ! observation.getText().getText(), i); textBuffer.append(observation.getCode().getDisplayName() + "\n"); } --- 322,346 ---- StringBuffer textBuffer = new StringBuffer(); + observations.clear(); acts = section.getActs().toArray(); Arrays.sort(acts, actComparator); for (int i = 0; i < acts.length; i++) { act = (Act) acts[i]; if (act.getClassCode().equalsIgnoreCase("OBS")){ ! ! observations.add(act); ! observation = (Observation) act ; ! if (observation.getText() == null) { observation.setText(new ST()); //Controller.getInstance().saveObject(observation.getText()); } ! panel.setTableRowNumber(observations.size());//mod2 panel.addRow( (observation.getAgeOnset() == null ? 0 : observation.getAgeOnset()), (observation.getCode() == null ? "" : observation.getCode().getDisplayName()), (observation.getCode2() == null ? "" : observation.getCode2().getDisplayName()), ! observation.getText().getText(), observations.size() - 1); textBuffer.append(observation.getCode().getDisplayName() + "\n"); } *************** *** 373,377 **** removeSearchPanel(); try { ! observation = (Observation) observations[index]; panel.setNameTextField(observation.getCode().getDisplayName()); panel.setCodeTextField(observation.getCode().getCode()); --- 361,365 ---- removeSearchPanel(); try { ! observation = (Observation) observations.get(index); panel.setNameTextField(observation.getCode().getDisplayName()); panel.setCodeTextField(observation.getCode().getCode()); *************** *** 408,412 **** if (state == 'q') { ! observation = (Observation) observations[panel.getSelectedTableRow()]; observation.setCode(code); isQ = true; --- 396,400 ---- if (state == 'q') { ! observation = (Observation) observations.get(panel.getSelectedTableRow()); observation.setCode(code); isQ = true; *************** *** 437,441 **** try { int row = panel.getSelectedTableRow(); //mod2 ! observation = (Observation) observations[previousClicked == -1 ? row : previousClicked]; //new observation.setCode2(panel.getFamilyComboBox()); observation.setAgeOnset(panel.getAgeOnset()); --- 425,429 ---- try { int row = panel.getSelectedTableRow(); //mod2 ! observation = (Observation) observations.get(previousClicked == -1 ? row : previousClicked); //new observation.setCode2(panel.getFamilyComboBox()); observation.setAgeOnset(panel.getAgeOnset()); *************** *** 486,494 **** int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) observations[row]); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug("FamilyHxFunction - remove() - ArrayIndexOutOfBoundsException"); } ! populate((Section)Controller.getInstance().saveObject(section)); //cw if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new --- 474,484 ---- int row = panel.getSelectedTableRow(); //new try { ! section.deleteAct((Act) observations.get(row)); //new } catch (java.lang.ArrayIndexOutOfBoundsException ex) { org.opentapas.commons.util.Logger.debug("FamilyHxFunction - remove() - ArrayIndexOutOfBoundsException"); } ! Controller.getInstance().saveObject(section); //cw ! Controller.getInstance().deleteObject(observations.get(row)); ! list(); if (getNumberOfActs() > 0) { loadInEditor(cleanupRowNumber(row)); //new *************** *** 498,502 **** protected int getNumberOfActs(){ ! return observations == null ? 0 : observations.length ; } --- 488,492 ---- protected int getNumberOfActs(){ ! return observations == null ? 0 : observations.size() ; } |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:22
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/framework Modified Files: Controller.java SearchSidePanel.java Log Message: port changes over to r1 Index: Controller.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/framework/Controller.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Controller.java 23 Mar 2006 01:50:57 -0000 1.1 --- Controller.java 26 Apr 2006 23:10:18 -0000 1.2 *************** *** 53,57 **** import org.opentapas.tapear.user.*; import org.opentapas.tapear.thread.TapearTimer; ! import org.opentapas.tapear.thread.RefreshMessagesTask; /** --- 53,57 ---- import org.opentapas.tapear.user.*; import org.opentapas.tapear.thread.TapearTimer; ! import org.opentapas.tapear.thread.RefreshDataTask; /** *************** *** 120,125 **** * To compare and order tapasFuncions to their index number */ ! private TapasRoleFunctionComparator tapasRoleFunctionComparator = new ! TapasRoleFunctionComparator(); /** --- 120,124 ---- * To compare and order tapasFuncions to their index number */ ! private TapasRoleFunctionComparator tapasRoleFunctionComparator = new TapasRoleFunctionComparator(); /** *************** *** 152,156 **** /** ! * List of TapasGroups */ private List tapasRolesList; --- 151,155 ---- /** ! * List of TapasRoles */ private List tapasRolesList; *************** *** 440,450 **** refStatusList = getCEListByType(ToolKit.REFSTAT, ordPriorCeList); ! String ceTypes2[] = { ! ToolKit.LANG, ToolKit.COUNTRY, ToolKit.PROV}; List ordPriorCeList2 = documentManager.getCEBundle(ceTypes2, ordPriorName); demLangList = getCEListByType(ToolKit.LANG, ordPriorCeList2); ! demCountryList = getCEListByType(ToolKit.COUNTRY, ! ordPriorCeList2); demProvList = getCEListByType(ToolKit.PROV, ordPriorCeList2); --- 439,447 ---- refStatusList = getCEListByType(ToolKit.REFSTAT, ordPriorCeList); ! String ceTypes2[] = {ToolKit.LANG, ToolKit.COUNTRY, ToolKit.PROV}; List ordPriorCeList2 = documentManager.getCEBundle(ceTypes2, ordPriorName); demLangList = getCEListByType(ToolKit.LANG, ordPriorCeList2); ! demCountryList = getCEListByType(ToolKit.COUNTRY, ordPriorCeList2); demProvList = getCEListByType(ToolKit.PROV, ordPriorCeList2); *************** *** 498,501 **** --- 495,506 ---- tapasRolesList = documentManager.getTapasRoles(); } + + public void refreshTapasGroups(){ + tapasGroupsList = documentManager.getTapasGroups(); + } + + public void refreshTapasRoles(){ + tapasRolesList = documentManager.getTapasRoles(); + } private void getProviderData() { *************** *** 533,539 **** } initSearchSidePanel(); ! ! RefreshMessagesTask tsk = new RefreshMessagesTask(this.getCurrentUser()); ! TapearTimer.getInstance(tsk, 100000); } --- 538,545 ---- } initSearchSidePanel(); ! ! RefreshDataTask tsk = new RefreshDataTask(); ! TapearTimer.getInstance(tsk, 300000); // 5 minutes ! //TapearTimer.getInstance(tsk, 30000); // test: 0.5 minutes } *************** *** 570,575 **** //documentManager.openDocument(); restoreSearchSidePanel(); ! ( (SearchSideFunction) searchSidePanels[0]).populatePatientNamesList( ! filterPatients(documentManager.listPatients(patientPartialName))); //((SearchSideFunction) searchSidePanels[0]).populatePatientNamesList(documentManager.listPatients(patientPartialName)); //searchSideFunction.populatePatientNamesList(documentManager.listPatients(patientId), patientId); --- 576,580 ---- //documentManager.openDocument(); restoreSearchSidePanel(); ! ( (SearchSideFunction) searchSidePanels[0]).populatePatientNamesList(filterPatients(documentManager.listPatients(patientPartialName))); //((SearchSideFunction) searchSidePanels[0]).populatePatientNamesList(documentManager.listPatients(patientPartialName)); //searchSideFunction.populatePatientNamesList(documentManager.listPatients(patientId), patientId); *************** *** 585,593 **** if (ptCode.getCode().equalsIgnoreCase(ToolKit.PTSTATUSACTIVE)) { filteredPatientList.add(obj); ! } else if (ptCode.getCode().equalsIgnoreCase(ToolKit.PTSTATUSINACTIVE) && ! mainFrame.selectInactivePatients()) { filteredPatientList.add(obj); ! } else if (ptCode.getCode().equalsIgnoreCase(ToolKit.PTSTATUSDECEASED) && ! mainFrame.selectDeceasedPatients()) { filteredPatientList.add(obj); } --- 590,596 ---- if (ptCode.getCode().equalsIgnoreCase(ToolKit.PTSTATUSACTIVE)) { filteredPatientList.add(obj); ! } else if (ptCode.getCode().equalsIgnoreCase(ToolKit.PTSTATUSINACTIVE) && mainFrame.selectInactivePatients()) { filteredPatientList.add(obj); ! } else if (ptCode.getCode().equalsIgnoreCase(ToolKit.PTSTATUSDECEASED) && mainFrame.selectDeceasedPatients()) { filteredPatientList.add(obj); } *************** *** 656,661 **** private boolean hasAccessToPatientFunction(int index) { for (Object obj : patientRoleFunctions) { ! if ( ( (TapasRoleFunction) obj).getFunction().getIndex().intValue() == ! index) { return true; } --- 659,663 ---- private boolean hasAccessToPatientFunction(int index) { for (Object obj : patientRoleFunctions) { ! if ( ( (TapasRoleFunction) obj).getFunction().getIndex().intValue() == index) { return true; } *************** *** 754,759 **** public void selectReferrals(Encounter enc) { mainFrame.getCurrentTab().selectTab(10); ! ( (ReferralsFunction) patientCentricFunctions[locatePatientFunction(10)]). ! select(enc); } --- 756,760 ---- public void selectReferrals(Encounter enc) { mainFrame.getCurrentTab().selectTab(10); ! ( (ReferralsFunction) patientCentricFunctions[locatePatientFunction(10)]).select(enc); } *************** *** 909,912 **** --- 910,921 ---- } + if (obj instanceof Section) { + System.out.println("LET OP"); + Section sec = (Section) obj ; + for(Object obj2 : sec.getActs()){ + System.out.println("pkId = " + ((Any)obj2).getPkId()); + } + } + /** * if (transport.getMessages().isEmpty()) { *************** *** 917,920 **** --- 926,937 ---- * }**/ return obj; + } + + /** + * Deletes the specified object from the database + * @param object Object - The object to be deleted + */ + public Object deleteObject(Object object) { + return documentManager.deleteObject(object, this.getCurrentUser().getPkId()); } *************** *** 935,939 **** public void populateCETable(String partialName, char state, int functionIndex, int adjacentSet) { restoreSearchSidePanel(); ! // ( (SearchSideFunction) searchSidePanels[0]).listCE(documentManager.getCEList(partialName, functionIndex, adjacentSet), state, functionIndex); } --- 952,956 ---- public void populateCETable(String partialName, char state, int functionIndex, int adjacentSet) { restoreSearchSidePanel(); ! ( (SearchSideFunction) searchSidePanels[0]).listCE(documentManager.getCEList(partialName, functionIndex, adjacentSet), state, functionIndex); } *************** *** 1794,1799 **** } ! private void performFileExport(File f, ! Integer id) { SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd"); String formattedDate = fmt.format(new Date()); --- 1811,1815 ---- } ! private void performFileExport(File f, Integer id) { SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd"); String formattedDate = fmt.format(new Date()); *************** *** 1820,1823 **** --- 1836,1856 ---- } } + + public void refreshAdminPanels(){ + refreshCurrentUser(getCurrentUser().getUserName()); + getSecurityData(); + for (int i = 0 ; i < adminCentricFunctions.length ; i++) { + if (adminCentricFunctions[i] instanceof UserFunction) { + ( (UserFunction) adminCentricFunctions[i]).populate(); + i++; + } else if (adminCentricFunctions[i] instanceof GrouperFunction) { + ( (GrouperFunction) adminCentricFunctions[i]).populate(); + i++; + } else if (adminCentricFunctions[i] instanceof RolerFunction) { + ( (RolerFunction) adminCentricFunctions[i]).populate(); + i++; + } + } + } /** *************** *** 1826,1837 **** * @param user TapasUser */ ! public void refreshUserMessages(TapasUser user) { ! refreshCurrentUser(user.getUserName()); ! user = Controller.getInstance().getCurrentUser() ; ! /** ! * ! * @todo Maike we need to find the correct tab ! */ ! //populate(user); } } --- 1859,1898 ---- * @param user TapasUser */ ! public void refreshUserPanels() { ! refreshCurrentUser(getCurrentUser().getUserName()); ! refreshTapasGroups(); ! try { ! for (Object obj : userCentricFunctions) { ! if (obj instanceof MessagingFunction){ ! ((MessagingFunction)obj).populate(getCurrentUser()); ! } else if (obj instanceof AlertingFunction){ ! ((AlertingFunction)obj).populate(getCurrentUser()); ! } else if (obj instanceof ReferringFunction){ ! ((ReferringFunction)obj).populate(getCurrentUser()); ! } ! } ! } catch (NullPointerException e) {} } + + + public void refreshAlertsAndReferrals() { + try { + if (getMainFrame().getSelectedTabIndex() > (administrator ? 1 : 0)){ + ClinicalDocument currentSan = (ClinicalDocument) (getCDAByPatientId(getMainFrame().getCurrentTab().getClinicalDocument().getPatient().getPkId().toString())).get(0); + PatientCentricFunction[] patientCentricFunctions = getMainFrame().getCurrentTab().getPatientCentricFunctions(); + for (Object obj : currentSan.getSections()){ + Section section = (Section) obj ; + for (Object obj2 : patientCentricFunctions){ + PatientCentricFunction pcf = (PatientCentricFunction) obj2 ; + if ((section.getCode().getCode().equalsIgnoreCase(ToolKit.ALERTS) && hasAccessToPatientFunction(11)) & pcf instanceof AlertsFunction) { + ((AlertsFunction) pcf).populate(section); + } else if ((section.getCode().getCode().equalsIgnoreCase(ToolKit.REFERRALHX) && hasAccessToPatientFunction(10)) & pcf instanceof ReferralsFunction) { + ((ReferralsFunction) pcf).populate(section); + } + } + } + } + } catch (NullPointerException e) {} + } + } Index: SearchSidePanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas_r1/tapear/src/org/opentapas/tapear/framework/SearchSidePanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SearchSidePanel.java 23 Mar 2006 01:50:57 -0000 1.1 --- SearchSidePanel.java 26 Apr 2006 23:10:18 -0000 1.2 *************** *** 59,62 **** --- 59,63 ---- private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; + popupPanel = new javax.swing.JPanel(); pleaseWaitLabel = new javax.swing.JLabel(); |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:22
|
Update of /cvsroot/tap-apps/opentapas/tapear/src/org/tapas/tapear/grouper In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/src/org/opentapas/tapear/grouper Modified Files: GrouperFunction.java GrouperFunctionPanel.java Log Message: port changes over to r1 Index: GrouperFunctionPanel.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas/tapear/src/org/tapas/tapear/grouper/GrouperFunctionPanel.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** GrouperFunctionPanel.java 30 Mar 2006 00:04:56 -0000 1.26 --- GrouperFunctionPanel.java 26 Apr 2006 23:10:19 -0000 1.27 *************** *** 5,12 **** */ ! package org.tapas.tapear.grouper; ! import org.tapas.tapear.framework.Controller; import javax.swing.table.DefaultTableModel; //new ! import org.tapas.commons.util.ToolKit ; import javax.swing.JOptionPane; --- 5,12 ---- */ ! package org.opentapas.tapear.grouper; ! import org.opentapas.tapear.framework.Controller; import javax.swing.table.DefaultTableModel; //new ! import org.opentapas.commons.util.ToolKit ; import javax.swing.JOptionPane; Index: GrouperFunction.java =================================================================== RCS file: /cvsroot/tap-apps/opentapas/tapear/src/org/tapas/tapear/grouper/GrouperFunction.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** GrouperFunction.java 30 Mar 2006 00:04:56 -0000 1.21 --- GrouperFunction.java 26 Apr 2006 23:10:19 -0000 1.22 *************** *** 8,17 **** * Open. You can then make changes to the template in the Source Editor. */ ! package org.tapas.tapear.grouper; ! import org.tapas.tapear.framework.Controller; ! import org.tapas.tapear.framework.SidePanel; ! import org.tapas.tapear.framework.UserCentricFunction; ! import org.tapas.commons.security.*; import java.util.Vector; --- 8,17 ---- * Open. You can then make changes to the template in the Source Editor. */ ! package org.opentapas.tapear.grouper; ! import org.opentapas.tapear.framework.Controller; ! import org.opentapas.tapear.framework.SidePanel; ! import org.opentapas.tapear.framework.UserCentricFunction; ! import org.opentapas.commons.security.*; import java.util.Vector; |
|
From: Maike <mai...@us...> - 2006-04-26 23:10:21
|
Update of /cvsroot/tap-apps/opentapas_r1/tapear/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4964/img Added Files: alert.png Log Message: port changes over to r1 --- NEW FILE: alert.png --- (This appears to be a binary file; contents omitted.) |