You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(141) |
Sep
(184) |
Oct
(159) |
Nov
(77) |
Dec
(114) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(212) |
Feb
(302) |
Mar
(323) |
Apr
(360) |
May
(302) |
Jun
(392) |
Jul
(299) |
Aug
(858) |
Sep
(499) |
Oct
(489) |
Nov
(324) |
Dec
(438) |
2008 |
Jan
(449) |
Feb
(388) |
Mar
(811) |
Apr
(583) |
May
(949) |
Jun
(1431) |
Jul
(943) |
Aug
(527) |
Sep
(576) |
Oct
(440) |
Nov
(1046) |
Dec
(658) |
2009 |
Jan
(259) |
Feb
(192) |
Mar
(495) |
Apr
(2322) |
May
(2023) |
Jun
(1387) |
Jul
(722) |
Aug
(771) |
Sep
(167) |
Oct
(142) |
Nov
(384) |
Dec
(884) |
2010 |
Jan
(344) |
Feb
(82) |
Mar
(248) |
Apr
(341) |
May
(389) |
Jun
(289) |
Jul
(19) |
Aug
(478) |
Sep
(274) |
Oct
(431) |
Nov
(322) |
Dec
(207) |
2011 |
Jan
(125) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: John C. <jc...@us...> - 2007-03-01 22:26:42
|
Update of /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv8753/src/org/tolven/mobile/client/view/form Modified Files: LoginPage.java Log Message: Cosmetics Index: LoginPage.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form/LoginPage.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LoginPage.java 28 Feb 2007 07:12:16 -0000 1.2 --- LoginPage.java 1 Mar 2007 22:26:38 -0000 1.3 *************** *** 97,104 **** } - // private final int urlRecord = 1; - // private final int userNameRecord = 2; - // private final int passwordRecord = 3; - // private final int accountIdRecord = 3; /** * Attempt to recover session data from persistent store if it exists. --- 97,100 ---- *************** *** 122,126 **** session.setUrl(new String( rs.getRecord(++recordNum))); session.setUserName(new String( rs.getRecord(++recordNum))); ! // session.setPassword (new String( rs.getRecord(passwordRecord))); session.setAccountId(new String( rs.getRecord(++recordNum))); session.setRecovered( true); --- 118,122 ---- session.setUrl(new String( rs.getRecord(++recordNum))); session.setUserName(new String( rs.getRecord(++recordNum))); ! session.setPassword (""); session.setAccountId(new String( rs.getRecord(++recordNum))); session.setRecovered( true); *************** *** 139,152 **** byte[] urlBytes = session.getUrl().getBytes(); rs.addRecord(urlBytes, 0, urlBytes.length ); - System.out.println( "Saved url"); byte[] userNameBytes = session.getUserName().getBytes(); rs.addRecord(userNameBytes, 0, userNameBytes.length ); - System.out.println( "Saved userName"); - // byte[] passwordBytes = session.getPassword().getBytes(); - // rs.addRecord(passwordBytes, 0, passwordBytes.length ); - // System.out.println( "Saved password"); byte[] accountIdBytes = session.getAccountId().getBytes(); rs.addRecord(accountIdBytes, 0, accountIdBytes.length ); - System.out.println( "Saved accountId"); rs.closeRecordStore(); } catch (Exception e) { --- 135,142 ---- |
From: John C. <jc...@us...> - 2007-03-01 20:54:36
|
Update of /cvsroot/tolven/tolvenMobileClient In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31814 Added Files: build.xml Log Message: Client build file - includes build and emulator - requires Wireless Toolket from Java --- NEW FILE: build.xml --- <project name="tolvenMobileClient" basedir="." default="packaging" > <property file="../tolven/resources/ant-build.properties"/> <property name="cldc.lib" value="${wtk.home}/lib/cldcapi11.jar"/> <property name="midp.lib" value="${wtk.home}/lib/midpapi21.jar"/> <property name="MIDlet1Name" value="Tolven Health Record"/> <property name="MIDlet1Icon" value="/img/bubbles.png"/> <property name="MIDlet1Class" value="org.tolven.mobile.client.TolvenMidlet"/> <property name="MIDlet1" value="${MIDlet1Name}, ${MIDlet1Icon}, ${MIDlet1Class}"/> <property name="MIDletDescription" value="Tolven Applications"/> <property name="MIDletIcon" value="/img/ePHR.png"/> <property name="MIDletName" value="tolven"/> <property name="MIDletPermissions" value="javax.microedition.io.Connector.http,javax.microedition.io.Connector.https"/> <property name="MIDletVendor" value="Tolven Inc"/> <property name="MIDletVersion" value="1.4.4"/> <property name="MicroEditionConfiguration" value="CLDC-1.1"/> <property name="MicroEditionProfile" value="MIDP-2.1"/> <path id="project.classpath"> <pathelement location="${cldc.lib}"/> <pathelement location="${midp.lib}"/> </path> <target name="init"> <mkdir dir="${tolvenMobileClient.location}/build/bin"/> <mkdir dir="${tolvenMobileClient.location}/build/tmp"/> <mkdir dir="${tolvenMobileClient.location}/build/tmpclasses"/> <mkdir dir="${tolvenMobileClient.location}/build/doc"/> </target> <target name="clean"> <delete dir="${tolvenMobileClient.location}/build"/> </target> <target name="compile" depends="init"> <echo message="${ant.project.name}: ${ant.file}"/> <javac destdir="${tolvenMobileClient.location}/build/tmpclasses" source="1.3" target="1.3" > <src path="${tolvenMobileClient.location}/src"/> <bootclasspath refid="project.classpath"/> </javac> </target> <target name="preverify" depends="compile"> <exec dir="." executable="${wtk.home}/bin/preverify" > <arg line="-classpath ${cldc.lib};${midp.lib};."/> <arg line="-d ${tolvenMobileClient.location}/build/classes"/> <arg line="${tolvenMobileClient.location}/build/tmpclasses"/> </exec> </target> <target name="jar" depends="preverify" description="Build ${MIDletName}.jar for Mobile"> <jar destfile="${tolvenMobileClient.location}/build/${MIDletName}.jar"> <manifest> <attribute name="MIDlet-1" value="${MIDlet1}"/> <attribute name="MIDlet-Description" value="${MIDletDescription}"/> <attribute name="MIDlet-Icon" value="${MIDletIcon}"/> <attribute name="MIDlet-Name" value="${MIDletName}"/> <attribute name="MIDlet-Permissions" value="${MIDletPermissions}"/> <attribute name="MIDlet-Vendor" value="${MIDletVendor}"/> <attribute name="MIDlet-Version" value="${MIDletVersion}"/> <attribute name="MicroEdition-Configuration" value="${MicroEditionConfiguration}"/> <attribute name="MicroEdition-Profile" value="{MicroEditionProfile}"/> </manifest> <zipfileset dir="${tolvenMobileClient.location}/build/classes" includes="**/*.class"/> <zipfileset dir="${tolvenMobileClient.location}/res"/> </jar> </target> <target name="sign" depends="jar" description="Sign the mobile client jar file"> <!-- Not finished, need to add cert to JAD as well --> <signjar jar="${tolvenMobileClient.location}/build/${MIDletName}.jar" keystore="f:/ssl/demo-tolven-org.p12" storetype="pkcs12" verbose="true" alias="tolvendemo" storepass="upstairs"/> <exec dir="bin" executable="java" > <arg line="-jar ${midp.path}/bin/JadTool.jar -addcert "/> <arg line="-alias ${MIDletName}"/> <arg line="-keystore ${root}VerisignCert/java.ks -storepass pwd " /> <arg line="-inputjad ${MIDletName}.jad -outputjad ${MIDletName}.jad"/> </exec> </target> <target name="jad" depends="jar" description="Build JAD file"> <length file="${tolvenMobileClient.location}/build/${MIDletName}.jar" property="MIDletJarSize"/> <copy file="${tolvenMobileClient.location}/template/jad.template" tofile="${tolvenMobileClient.location}/build/${MIDletName}.jad" overwrite="true" preservelastmodified="true" > <filterset> <filter token="MIDlet1" value="${MIDlet1}"/> <filter token="MIDletDescription" value="${MIDletDescription}"/> <filter token="MIDletIcon" value="${MIDletIcon}"/> <filter token="MIDletName" value="${MIDletName}"/> <filter token="MIDletJarSize" value="${MIDletJarSize}"/> <filter token="MIDletPermissions" value="${MIDletPermissions}"/> <filter token="MIDletVendor" value="${MIDletVendor}"/> <filter token="MIDletVersion" value="${MIDletVersion}"/> <filter token="MicroEditionConfiguration" value="${MicroEditionConfiguration}"/> <filter token="MicroEditionProfile" value="${MicroEditionProfile}"/> </filterset> </copy> </target> <target name="packaging" depends="jad" description="Build (and potentially) sign the tolven.jar for Mobile"> </target> <target name="emulator" depends="packaging"> <exec dir="." executable="${wtk.home}/bin/emulator" > <arg line="-classpath ${tolvenMobileClient.location}/build/classes;${tolvenMobileClient.location}/res"/> <arg line="-Xdescriptor ${tolvenMobileClient.location}/build/${MIDletName}.jad"/> </exec> </target> <target name="javadoc" description="Generate Javadoc"> <javadoc access="public" author="true" destdir="${tolvenMobileClient.location}/build/doc" doctitle="Tolven Mobile Client" packagenames="*" classpathref="project.classpath" source="1.3" sourcepath="${tolvenMobileClient.location}/src" splitindex="true" use="true" version="true"/> </target> </project> |
From: John C. <jc...@us...> - 2007-03-01 20:12:49
|
Update of /cvsroot/tolven/tolvenMobileClient/lib In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11735/lib Removed Files: proguard.jar jadmaker.jar Log Message: Obsolete --- jadmaker.jar DELETED --- --- proguard.jar DELETED --- |
From: John C. <jc...@us...> - 2007-03-01 20:08:13
|
Update of /cvsroot/tolven/tolvenMobileClient/template In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9225/template Added Files: jad.template Log Message: Template for JAD file --- NEW FILE: jad.template --- MIDlet-1: @MIDlet1@ MIDlet-Description: @MIDletDescription@ MIDlet-Icon: @MIDletIcon@ MIDlet-Jar-Size: @MIDletJarSize@ MIDlet-Jar-URL: @MIDletJarURL@ MIDlet-Name: @MIDletName@ MIDlet-Permissions: @MIDletPermissions@ MIDlet-Vendor: @MIDletVendor@ MIDlet-Version: @MIDletVersion@ MicroEdition-Configuration: @MicroEditionConfiguration@ MicroEdition-Profile: @MicroEditionProfile@ |
From: John C. <jc...@us...> - 2007-03-01 20:08:09
|
Update of /cvsroot/tolven/tolvenMobileClient/template In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9199/template Log Message: Directory /cvsroot/tolven/tolvenMobileClient/template added to the repository |
From: John C. <jc...@us...> - 2007-02-28 07:13:17
|
Update of /cvsroot/tolven/tolvenMobileClient/res/img In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv14365/res/img Added Files: mobilelazye.png Log Message: Add full size Tolven logo for use in About page --- NEW FILE: mobilelazye.png --- (This appears to be a binary file; contents omitted.) |
From: John C. <jc...@us...> - 2007-02-28 07:12:20
|
Update of /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13860/src/org/tolven/mobile/client/view/form Modified Files: ObservationForm.java PeakFlowForm.java WeightForm.java BPForm.java LoginPage.java GlucoseForm.java TemperatureForm.java Added Files: DrilldownForm.java MedicationForm.java Log Message: Add about, help, medication drilldown (general drilldown), Results, fix bux in Peak Flow. Index: LoginPage.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form/LoginPage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LoginPage.java 24 Feb 2007 09:03:49 -0000 1.1 --- LoginPage.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 19,24 **** --- 19,27 ---- import org.tolven.mobile.client.comm.Session; import org.tolven.mobile.client.control.Application; + import org.tolven.mobile.client.control.CommandProcessor; import org.tolven.mobile.client.control.EPHRApplication; + import org.tolven.mobile.client.view.AboutPage; import org.tolven.mobile.client.view.HeaderItem; + import org.tolven.mobile.client.view.HelpPage; /** *************** *** 27,31 **** * */ ! public class LoginPage implements CommandListener, ServerRequestListener { private Display display; private CommandListener outerCommandListener; --- 30,34 ---- * */ ! public class LoginPage extends CommandProcessor implements CommandListener, ServerRequestListener { private Display display; private CommandListener outerCommandListener; *************** *** 45,48 **** --- 48,52 ---- protected static Command cmdLogin = new Command("Login", Command.SCREEN, 4); protected static Command cmdHelp = new Command("Help", Command.SCREEN, 6); + private static Command cmdAbout = new Command("About", Command.HELP, 6); protected static Command cmdExit = new Command("Exit", Command.EXIT, 10); protected static String settingsFile = "rememberMe"; *************** *** 77,83 **** loginForm.append(urlText); loginForm.append("\n"); loginForm.addCommand(cmdLogin); loginForm.addCommand(cmdHelp); ! loginForm.addCommand(cmdExit); loginForm.setCommandListener(this); display.setCurrent(loginForm); --- 81,88 ---- loginForm.append(urlText); loginForm.append("\n"); + loginForm.addCommand(cmdExit); loginForm.addCommand(cmdLogin); loginForm.addCommand(cmdHelp); ! loginForm.addCommand(cmdAbout); loginForm.setCommandListener(this); display.setCurrent(loginForm); *************** *** 85,88 **** --- 90,94 ---- public LoginPage( Display display, CommandListener outerCommandListener ) { + super(null); this.display = display; this.outerCommandListener = outerCommandListener; *************** *** 108,112 **** session.setPassword( ""); session.setAccountId( ""); ! session.setUrl("http://67.161.50.91:8080/Mobile/"); session.setRecovered( false); } else { --- 114,119 ---- session.setPassword( ""); session.setAccountId( ""); ! // session.setUrl("http://67.161.50.91:8080/Mobile/"); ! session.setUrl("http://demo.tolven.org/Mobile/"); session.setRecovered( false); } else { *************** *** 215,218 **** --- 222,234 ---- public void commandAction(Command command, Displayable displayable) { + if (command==cmdHelp) { + new HelpPage( display ); + return; + } + if (command==cmdAbout) { + new AboutPage( display ); + return; + } + if (command==cmdLogin) { session.setUrl( this.getUrl() ); *************** *** 267,269 **** --- 283,290 ---- } + public boolean doAction(Command command, Displayable displayable) { + System.out.println( "Command: " + command.getLabel()); + return false; + } + } Index: GlucoseForm.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form/GlucoseForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GlucoseForm.java 24 Feb 2007 09:03:49 -0000 1.1 --- GlucoseForm.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 11,17 **** TextField glucoseField; ! public GlucoseForm(PatientController controller, Observation data) { ! super(controller, data); ! } public GlucoseForm() {}; --- 11,15 ---- TextField glucoseField; ! public GlucoseForm() {}; *************** *** 27,30 **** --- 25,29 ---- public void buildFormBody(Form form) { + super.buildFormBody(form); glucoseField = new TextField("Glucose in mg/dL: ", getData().getPqStringVal01(), 5, TextField.DECIMAL | ( getData().isNew() ? 0 : TextField.UNEDITABLE)); // setValue( glucoseField ); Index: PeakFlowForm.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form/PeakFlowForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PeakFlowForm.java 24 Feb 2007 09:03:49 -0000 1.1 --- PeakFlowForm.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 13,19 **** TextField commentField; - public PeakFlowForm(PatientController controller, Observation data) { - super(controller, data); - } public PeakFlowForm() { } --- 13,16 ---- *************** *** 26,30 **** super.initData(); getData().setString01("Peak Flow"); - getData().setString04(commentField.getString()); getData().setPqUnits01("L/min"); } --- 23,26 ---- *************** *** 37,44 **** --- 33,42 ---- super.storeBodyData(); getData().setPqStringVal01(valueField.getString()); + getData().setString04(commentField.getString()); } public void buildFormBody(Form form) { + super.buildFormBody(form); valueField = new TextField("Reading in L/min: ", getData().getPqStringVal01(), 5, TextField.DECIMAL | ( getData().isNew() ? 0 : TextField.UNEDITABLE)); form.append(valueField); *************** *** 51,66 **** } - public MenuData submit( ) { - Observation data = new Observation(); - data.setParent01(getPatient().getId()); - data.setDate01(this.getEffectiveTime().getDate()); - data.setString01("PeakFlow"); - data.setString02(getUserName()); - data.setString04(commentField.getString()); - data.setPqStringVal01(valueField.getString()); - data.setPqUnits01("L/min"); - return data; - } - public boolean validate() { // TODO Auto-generated method stub --- 49,52 ---- --- NEW FILE: MedicationForm.java --- package org.tolven.mobile.client.view.form; import java.util.Date; import javax.microedition.lcdui.DateField; import javax.microedition.lcdui.Form; import javax.microedition.lcdui.StringItem; import org.tolven.mobile.client.data.Medication; import org.tolven.mobile.client.data.Observation; import org.tolven.mobile.client.util.DateUtil; public class MedicationForm extends DrilldownForm { private DateField effectiveTime; /** * Init data for a new medication. */ public void initData( ) { setData(new Medication()); super.initData(); System.out.println( "[ObservationForm] initData for patient: " + getController().getShortName()); getData().setDate01(new Date()); // getData().setString02(getUserName()); } protected void buildFormBody(Form form) { if (getData().isNew()) { effectiveTime = new DateField("Date: ", DateField.DATE_TIME ); effectiveTime.setDate(getData().getDate01()); form.append(effectiveTime); } else { form.append(new StringItem( "Date: ", DateUtil.toDateString(getData().getDate01()))); } } public String getFormName() { // TODO Auto-generated method stub return null; } public void storeBodyData() { // TODO Auto-generated method stub } protected boolean validate() { // TODO Auto-generated method stub return false; } } Index: ObservationForm.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form/ObservationForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ObservationForm.java 24 Feb 2007 09:03:49 -0000 1.1 --- ObservationForm.java 28 Feb 2007 07:12:15 -0000 1.2 *************** *** 2,101 **** import java.util.Date; - import java.util.Vector; - import javax.microedition.lcdui.Command; - import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.DateField; - import javax.microedition.lcdui.Display; - import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; import javax.microedition.lcdui.StringItem; - import javax.microedition.lcdui.TextField; - import org.tolven.mobile.client.comm.ServerRequest; - import org.tolven.mobile.client.comm.ServerRequestListener; - import org.tolven.mobile.client.comm.SubmitMenuData; - import org.tolven.mobile.client.control.PatientController; - import org.tolven.mobile.client.data.MenuData; import org.tolven.mobile.client.data.Observation; - import org.tolven.mobile.client.data.Patient; import org.tolven.mobile.client.util.DateUtil; ! public abstract class ObservationForm implements CommandListener, ServerRequestListener{ ! private static final Command okCmd = new Command( "OK", Command.OK, 1); ! private static final Command cancelCmd = new Command( "Cancel", Command.CANCEL, 2); ! private static final Command closeCmd = new Command( "Close", Command.CANCEL, 2); - private PatientController controller; - protected Form form; private DateField effectiveTime; // private Vector values; - private StringItem messageItem; - private Observation data; - - /** - * Return the name of this form - * @return - */ - public abstract String getFormName(); - - /** - * Add any for-specific contents. - * @param form - */ - protected abstract void buildFormBody( Form form ); - /** - * Validate the form. return false if invalid. - * @return - */ - protected abstract boolean validate( ); /** ! * Prepare a new Data item to be shipped to the server */ - public MenuData submit( ) { - return getData(); - } - public void initData( ) { ! System.out.println( "[ObservationForm] initData for patient: " + getPatient()); ! System.out.println( "Patient id: " + getPatient().getId()); ! getData().setParent01(getPatient().getId()); getData().setDate01(new Date()); getData().setString02(getUserName()); - getData().setString01("Blood Pressure"); - getData().setPqUnits01("mm/hg"); - getData().setPqUnits02("mm/hg"); - getData().setPqUnits03("mm/hg"); - } - - public ObservationForm() { - } /** ! * Create an observation form and make it visible ! * @param controller ! * @param display */ ! public ObservationForm( PatientController controller, Observation data) { ! this.controller = controller; ! show(); ! } ! ! public void show() { ! if (controller==null) throw new IllegalStateException("Missing controller" ); ! // If no previous data supplied, we create new data. ! if (getData()==null) { ! setData(new Observation()); ! initData( ); ! System.out.println( "Edit new data data" ); ! } else { ! setData(data); ! System.out.println( "Display existing data" ); ! } ! form = new Form( getFormName() ); ! StringItem patientName = new StringItem( "For: ", getPatient().getShortName()); ! form.append(patientName); if (getData().isNew()) { effectiveTime = new DateField("Date: ", DateField.DATE_TIME ); --- 2,35 ---- import java.util.Date; import javax.microedition.lcdui.DateField; import javax.microedition.lcdui.Form; import javax.microedition.lcdui.StringItem; import org.tolven.mobile.client.data.Observation; import org.tolven.mobile.client.util.DateUtil; ! public abstract class ObservationForm extends DrilldownForm { private DateField effectiveTime; // private Vector values; /** ! * Init data for a new observation. We create the object itself for observations. */ public void initData( ) { ! setData(new Observation()); ! super.initData(); ! System.out.println( "[ObservationForm] initData for patient: " + getController().getShortName()); getData().setDate01(new Date()); getData().setString02(getUserName()); } + public ObservationForm() {} + /** ! * Add our part to the form body (Effective date on all observations) */ ! public void buildFormBody(Form form) { if (getData().isNew()) { effectiveTime = new DateField("Date: ", DateField.DATE_TIME ); *************** *** 105,172 **** form.append(new StringItem( "Date: ", DateUtil.toDateString(getData().getDate01()))); } - buildFormBody( form ); - messageItem = new StringItem( " ", ""); - form.append( messageItem ); - if (getData().isNew()) { - form.addCommand(okCmd); - form.addCommand(cancelCmd); - } else { - form.addCommand(closeCmd); - } - form.setCommandListener(this); - getController().display(form); } ! public void storeBodyData( ) { getData().setDate01(this.getEffectiveTime().getDate()); } - /** - * Make an error message visible - */ - public void addError(String message ) { - messageItem.setLabel("Error: "); - messageItem.setText(message); - } - - /** - * If the item is already instantiated, then - */ - public void commandAction(Command command, Displayable displayable ) { - if ( command==cancelCmd || command==closeCmd) { - // Back to where we came from - controller.show(getController().getDisplay()); - return; - } - if (command==okCmd && validate()) { - // Notice that validation must use form data not menuData since we don't load up the menuData until validation is successful - storeBodyData(); - // System.out.println( "Submitting " + getFormName() + ": " + getValue().getString()); - MenuData menuData = submit(); - ServerRequest requestMD = new SubmitMenuData( controller.getSession(), this, menuData); - requestMD.start(); - controller.refreshPage("Observations"); - controller.show(getController().getDisplay()); - } - } - - // public Vector getValues( ) { - // if (values==null) values = new Vector(); - // return values; - // } - // - // /** - // * Assume there is only one value in the array - // * @return - // */ - // public TextField getValue() { - // if (getValues().size() == 1) return (TextField) getValues().elementAt(0); - // return null; - // } - // public void setValue(TextField value) { - // if (getValues().size() > 0) getValues().setElementAt(value, 0); - // getValues( ).addElement(value); - // } - public void setEffectiveTime(DateField effectiveTime) { this.effectiveTime = effectiveTime; --- 39,48 ---- form.append(new StringItem( "Date: ", DateUtil.toDateString(getData().getDate01()))); } } ! public void storeBodyData( ) { getData().setDate01(this.getEffectiveTime().getDate()); } public void setEffectiveTime(DateField effectiveTime) { this.effectiveTime = effectiveTime; *************** *** 176,210 **** } ! public Observation getData() { ! return data; ! } ! ! public void setData(Observation data) { ! this.data = data; ! } ! ! public Patient getPatient() { ! return controller.getPatient(); ! } ! ! public String getUserName() { ! return controller.getApplication().getSession().getUserName(); ! } ! ! /** ! * Submit completed ! * @param request ! */ ! public void serverRequestAction (ServerRequest request) { ! System.out.println( "Result: " + request.getResponse()); ! } - public PatientController getController() { - return controller; - } - public void setController(PatientController controller) { - this.controller = controller; - } } --- 52,60 ---- } ! // public Patient getPatient() { ! // return getController().getPatient(); ! // } } Index: WeightForm.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form/WeightForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WeightForm.java 24 Feb 2007 09:03:49 -0000 1.1 --- WeightForm.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 14,21 **** ChoiceGroup unitsField; - public WeightForm(PatientController controller, Observation data) { - super(controller, data); - } - public WeightForm() {} --- 14,17 ---- *************** *** 31,34 **** --- 27,31 ---- public void buildFormBody(Form form) { + super.buildFormBody(form); weightField = new TextField("Weight: ", getData().getPqStringVal01(), 5, TextField.DECIMAL | ( getData().isNew() ? 0 : TextField.UNEDITABLE)); form.append(weightField); Index: BPForm.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form/BPForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BPForm.java 24 Feb 2007 09:03:49 -0000 1.1 --- BPForm.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 13,20 **** TextField diastolicField; ! public BPForm(PatientController controller, Observation data ) { ! super(controller, data); ! } ! public BPForm() {}; --- 13,17 ---- TextField diastolicField; ! public BPForm() {}; *************** *** 32,35 **** --- 29,33 ---- public void buildFormBody(Form form) { + super.buildFormBody(form); System.out.println("Systolic: " + getData().getPqStringVal02()); systolicField = new TextField("Systolic: ", getData().getPqStringVal02(), 3, TextField.NUMERIC | ( getData().isNew() ? 0 : TextField.UNEDITABLE)); Index: TemperatureForm.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/form/TemperatureForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TemperatureForm.java 24 Feb 2007 09:03:49 -0000 1.1 --- TemperatureForm.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 27,33 **** TextField commentField; - public TemperatureForm(PatientController controller, Observation data ) { - super( controller, data); - } public TemperatureForm() {} --- 27,30 ---- *************** *** 47,50 **** --- 44,48 ---- public void buildFormBody( Form form ) { + super.buildFormBody(form); temperatureField = new TextField("Temperature: ", getData().getPqStringVal01(), 5, TextField.DECIMAL | ( getData().isNew() ? 0 : TextField.UNEDITABLE)); form.append(temperatureField); --- NEW FILE: DrilldownForm.java --- package org.tolven.mobile.client.view.form; import java.util.Date; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.DateField; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; import javax.microedition.lcdui.StringItem; import org.tolven.mobile.client.comm.ServerRequest; import org.tolven.mobile.client.comm.ServerRequestListener; import org.tolven.mobile.client.comm.SubmitMenuData; import org.tolven.mobile.client.control.Controller; import org.tolven.mobile.client.control.PatientController; import org.tolven.mobile.client.data.MenuData; import org.tolven.mobile.client.data.Observation; import org.tolven.mobile.client.util.DateUtil; /** * A form containing drilldown information for a specific kind of Menudata. * * @author John Churin * */ public abstract class DrilldownForm implements CommandListener, ServerRequestListener{ protected static final Command okCmd = new Command( "OK", Command.OK, 1); protected static final Command cancelCmd = new Command( "Cancel", Command.CANCEL, 2); protected static final Command closeCmd = new Command( "Close", Command.CANCEL, 2); private Controller controller; private Form form; private MenuData data; private StringItem messageItem; public void initData( ) { getController().initDrilldownData( getData()); getData().setDate01(new Date()); getData().setString02(getUserName()); } /** * Return the name of this form * @return */ public abstract String getFormName(); /** * Add any for-specific contents. * @param form */ protected abstract void buildFormBody( Form form ); /** * Validate the form. return false if invalid. * @return */ protected abstract boolean validate( ); /** * Get the menu data for this object * @return */ public MenuData getData() { return data; } /** * Set new Menu Data for this form * @param data */ public void setData(MenuData data) { this.data = data; } /** * When completed, the form needs to move form data to menuData. * Each subclass should call super.storeBodyData() */ public abstract void storeBodyData( ); public void show() { if (getController()==null) throw new IllegalStateException("Missing controller" ); // If no previous data supplied, we create new data. if (getData()==null) { initData( ); System.out.println( "Edit new data data" ); } else { setData(data); System.out.println( "Display existing data" ); } form = new Form( getFormName() ); StringItem patientName = new StringItem( "For: ", getController().getShortName()); form.append(patientName); buildFormBody( form ); messageItem = new StringItem( " ", ""); form.append( messageItem ); if (getData().isNew()) { form.addCommand(okCmd); form.addCommand(cancelCmd); } else { form.addCommand(closeCmd); } form.setCommandListener(this); getController().display(form); } /** * Drilldown action - if OK and valid, we submit to the server and invalidate the * list upon which this item occurs so that it will be queried anew. * Otherwise, just close the form and show the previous page. */ public void commandAction(Command command, Displayable displayable ) { if ( command==cancelCmd || command==closeCmd) { // Back to where we came from getController().show(getController().getDisplay()); return; } if (command==okCmd && validate()) { // Notice that validation must use form data not menuData since we don't load up the menuData until validation is successful storeBodyData(); // System.out.println( "Submitting " + getFormName() + ": " + getValue().getString()); MenuData menuData = submit(); ServerRequest requestMD = new SubmitMenuData( getController().getSession(), this, menuData); requestMD.start(); getController().refreshPage("Observations"); getController().show(getController().getDisplay()); } } /** * Prepare a new Data item to be shipped to the server */ public MenuData submit( ) { return getData(); } public Controller getController() { return controller; } public void setController(Controller controller) { this.controller = controller; } /** * Get the current username * @return */ public String getUserName() { return controller.getApplication().getSession().getUserName(); } /** * Make an error message visible */ public void addError(String message ) { messageItem.setLabel("Error: "); messageItem.setText(message); } /** * Submit completed * @param request */ public void serverRequestAction (ServerRequest request) { System.out.println( "Result: " + request.getResponse()); } } |
Update of /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/control In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13860/src/org/tolven/mobile/client/control Modified Files: EPHRApplication.java PatientController.java Application.java AllPatientController.java Controller.java Log Message: Add about, help, medication drilldown (general drilldown), Results, fix bux in Peak Flow. Index: Application.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/control/Application.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Application.java 24 Feb 2007 09:03:50 -0000 1.1 --- Application.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 56,61 **** --- 56,64 ---- */ public void show( Display display, int newCurrent ) { + //Before changind, make note of the current controller + int last = getCurrentController(); setCurrentController(newCurrent); Controller controller = (Controller) controllers.elementAt(getCurrentController()); + controller.setLastController( last ); // System.out.println( "Application: Showing..."); controller.show( display ); *************** *** 63,66 **** --- 66,74 ---- } + public void showLast( Display display ) { + Controller currentController = (Controller) getControllers().elementAt(getCurrentController( )); + show( display, currentController.getLastController()); + } + public Vector getControllers() { if (controllers==null) controllers = new Vector(); *************** *** 68,73 **** } ! public void addController(Controller controller) { getControllers().addElement(controller); } --- 76,82 ---- } ! public int addController(Controller controller) { getControllers().addElement(controller); + return getControllers().size()-1; } Index: Controller.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/control/Controller.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Controller.java 24 Feb 2007 09:03:50 -0000 1.1 --- Controller.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 1,4 **** --- 1,5 ---- package org.tolven.mobile.client.control; + import java.util.Date; import java.util.Vector; *************** *** 13,16 **** --- 14,18 ---- import org.tolven.mobile.client.comm.Session; import org.tolven.mobile.client.data.Data; + import org.tolven.mobile.client.data.MenuData; import org.tolven.mobile.client.view.TolvenPage; *************** *** 21,25 **** --- 23,36 ---- private Display display; private int lastPage = 0; + private int lastController; + public int getLastController() { + return lastController; + } + + public void setLastController(int lastController) { + this.lastController = lastController; + } + /** * Add a page to the list of pages we maintain. *************** *** 40,43 **** --- 51,55 ---- } } + /** * Make the specified displayable current *************** *** 69,73 **** */ public Vector getData( ) { ! return application.getData(); } --- 81,89 ---- */ public Vector getData( ) { ! if (application==null) { ! return null; ! } else { ! return application.getData(); ! } } *************** *** 75,83 **** /** ! * The page asks us to prepare the data (usually patients) popup list on every page * @param form */ public ChoiceGroup buildData( Form form ) { Vector data = getData( ); ChoiceGroup dataChoices = new ChoiceGroup( "", ChoiceGroup.POPUP ); for (int x = 0; x < data.size(); x++) { --- 91,100 ---- /** ! * The page asks us to prepare the data (usually patients) popup list on every page. * @param form */ public ChoiceGroup buildData( Form form ) { Vector data = getData( ); + if (data==null) return null; ChoiceGroup dataChoices = new ChoiceGroup( "", ChoiceGroup.POPUP ); for (int x = 0; x < data.size(); x++) { *************** *** 92,96 **** /** ! * The page asks us to decorate the page with commands * @param form */ --- 109,113 ---- /** ! * Someone asks us to decorate the page with commands * @param form */ *************** *** 100,104 **** form.addCommand( new Command( page.getFormName(), Command.ITEM, 5 )); } ! application.buildCommands(form); form.setCommandListener(this); } --- 117,121 ---- form.addCommand( new Command( page.getFormName(), Command.ITEM, 5 )); } ! if (application!=null) application.buildCommands(form); form.setCommandListener(this); } *************** *** 115,118 **** --- 132,136 ---- TolvenPage page = (TolvenPage) tolvenPages.elementAt(currentPage); // System.out.println( "controller: Showing..."); + Thread.yield(); page.show(display); // System.out.println( "controller: Shown"); *************** *** 152,155 **** --- 170,186 ---- application.show(display, pageChoices.getSelectedIndex()); } + /** + * A drilldown item is asking us to add whatever we need to add to + * a newly minted MenuData item. for example, a patient controller would add patient id as a + * parent. + * + */ + public abstract void initDrilldownData( MenuData drilldownItem); + /** + * Get the shortName for whatever entity we're controlling. + * @return + */ + public abstract String getShortName( ); + } Index: AllPatientController.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/control/AllPatientController.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AllPatientController.java 24 Feb 2007 09:03:50 -0000 1.1 --- AllPatientController.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- import org.tolven.mobile.client.data.AllPatientData; import org.tolven.mobile.client.data.Data; + import org.tolven.mobile.client.data.MenuData; import org.tolven.mobile.client.view.list.AllPatientAppointments; import org.tolven.mobile.client.view.list.AllPatientReminders; *************** *** 19,21 **** --- 20,41 ---- return allPatientData; } + + /** + * A drilldown item is asking us to add whatever we need to add to + * a newly minted MenuData item. In our case, we add patient id as a + * parent. + * + */ + public void initDrilldownData( MenuData drilldownItem) { + throw new IllegalStateException("Cannot create a new drilldown item in the all patient contoller"); + } + + /** + * Get the shortName for the item we're controlling. + * @return + */ + public String getShortName( ) { + return "All"; + } + } Index: PatientController.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/control/PatientController.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PatientController.java 24 Feb 2007 09:03:50 -0000 1.1 --- PatientController.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 1,4 **** --- 1,5 ---- package org.tolven.mobile.client.control; + import java.util.Date; import java.util.Vector; *************** *** 8,11 **** --- 9,13 ---- import org.tolven.mobile.client.data.Data; + import org.tolven.mobile.client.data.MenuData; import org.tolven.mobile.client.data.Patient; import org.tolven.mobile.client.view.PatientEntryMenu; *************** *** 71,73 **** --- 73,95 ---- return patient; } + + /** + * A drilldown item is asking us to add whatever we need to add to + * a newly minted MenuData item. In our case, we add patient id as a + * parent. + * + */ + public void initDrilldownData( MenuData drilldownItem) { + System.out.println( "Patient id: " + getPatient().getId()); + drilldownItem.setParent01(getPatient().getId()); + } + + /** + * Get the shortName for the patient we're controlling. + * @return + */ + public String getShortName( ) { + return getPatient().getShortName(); + } + } Index: EPHRApplication.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/control/EPHRApplication.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EPHRApplication.java 24 Feb 2007 09:03:50 -0000 1.1 --- EPHRApplication.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Display; + import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; *************** *** 15,18 **** --- 16,21 ---- import org.tolven.mobile.client.data.AllPatientData; import org.tolven.mobile.client.data.Patient; + import org.tolven.mobile.client.view.AboutPage; + import org.tolven.mobile.client.view.HelpPage; public class EPHRApplication extends Application implements ServerRequestListener{ *************** *** 21,24 **** --- 24,29 ---- private long years = days*365; private Display display; + private static Command cmdHelp = new Command("Help", Command.HELP, 10); + private static Command cmdAbout = new Command("About", Command.HELP, 10); // private ServerProgress progress; // private int progressItemIndex; *************** *** 64,93 **** protected void initData() { - // Date now = new Date(); - // // get data from server here - // patients = new Vector(); - // patients.addElement(new AllPatientData( )); - // Patient patient1 = new Patient(); - // patient1.setFirstName("Abe"); - // patient1.setLastName("Westinghouse"); - // patient1.setDob(new Date(now.getTime()-(37*years))); - // patients.addElement(patient1); - // Patient patient2 = new Patient(); - // patient2.setFirstName("Laura"); - // patient2.setLastName("Westinghouse"); - // patient2.setDob(new Date(now.getTime()-(24*years))); - // patients.addElement(patient2); - // Patient patient3 = new Patient(); - // patient3.setFirstName("Elizabeth"); - // patient3.setLastName("Westinghouse"); - // patient3.setDob(new Date(now.getTime()-(2*years))); - // patients.addElement(patient3); - // for (int x = 0; x < 10; x++) { - // Patient pat = new Patient(); - // pat.setFirstName("First " + x); - // pat.setLastName("Last " + x); - // pat.setDob(new Date(now.getTime()-(x*7*years))); - // patients.addElement(pat); - // } } --- 69,72 ---- *************** *** 115,121 **** form.addCommand(new Command("Exit", Command.EXIT, 1)); form.addCommand(new Command("Back", Command.BACK, 2)); ! form.addCommand(new Command("Help", Command.HELP, 10)); ! form.addCommand(new Command("About", Command.HELP, 10)); } } --- 94,113 ---- form.addCommand(new Command("Exit", Command.EXIT, 1)); form.addCommand(new Command("Back", Command.BACK, 2)); ! form.addCommand(cmdHelp); ! form.addCommand(cmdAbout); } + public boolean doAction(Command command, Displayable displayable) { + if (command==cmdHelp) { + new HelpPage( display ); + return true; + } + if (command==cmdAbout) { + new AboutPage( display ); + return true; + } + + return super.doAction(command, displayable); + } + } |
From: John C. <jc...@us...> - 2007-02-28 07:12:19
|
Update of /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/comm In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13860/src/org/tolven/mobile/client/comm Modified Files: ServerRequest.java Log Message: Add about, help, medication drilldown (general drilldown), Results, fix bux in Peak Flow. Index: ServerRequest.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/comm/ServerRequest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ServerRequest.java 24 Feb 2007 09:03:49 -0000 1.1 --- ServerRequest.java 28 Feb 2007 07:12:16 -0000 1.2 *************** *** 1,4 **** --- 1,5 ---- package org.tolven.mobile.client.comm; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; *************** *** 68,76 **** public void run() { setResponseCode( 0 ); try { try { // Thread.yield(); ! Thread.sleep(500); // Allow progress bar to display } catch (InterruptedException ie) {} --- 69,78 ---- public void run() { + if (listener==null) throw new IllegalArgumentException( "No listetener specified in ServerRequest"); setResponseCode( 0 ); try { try { // Thread.yield(); ! Thread.sleep(200); // Allow progress bar to display } catch (InterruptedException ie) {} *************** *** 135,146 **** } response = new String( data ); } else { ! StringBuffer rawResponse = new StringBuffer( ); int ch; while ((ch = is.read()) != -1) { ! rawResponse.append(ch); } ! response = rawResponse.toString(); ! // System.out.println( "Response: " + response ); } } else if (getResponseCode() == HttpConnection.HTTP_MOVED_TEMP) { --- 137,150 ---- } response = new String( data ); + // System.out.println( "Response1: " + response ); } else { ! ByteArrayOutputStream baos = new ByteArrayOutputStream( 10000 ); int ch; while ((ch = is.read()) != -1) { ! baos.write(ch); } ! response = baos.toString(); ! baos.close(); ! // System.out.println( "Response2: " + response ); } } else if (getResponseCode() == HttpConnection.HTTP_MOVED_TEMP) { *************** *** 148,152 **** // System.out.println( "Redirect: " + getRedirect() ); } else { ! // System.out.println( "Error: " + Integer.toString(getResponseCode()) ); response = "Server error: " + Integer.toString(getResponseCode()); } --- 152,156 ---- // System.out.println( "Redirect: " + getRedirect() ); } else { ! System.out.println( "Error: " + Integer.toString(getResponseCode()) ); response = "Server error: " + Integer.toString(getResponseCode()); } |
Update of /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/list In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13860/src/org/tolven/mobile/client/view/list Modified Files: AllPatientAppointments.java ListPage.java MedicationsPage.java AppointmentsPage.java Log Message: Add about, help, medication drilldown (general drilldown), Results, fix bux in Peak Flow. Index: ListPage.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/list/ListPage.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ListPage.java 24 Feb 2007 20:18:29 -0000 1.2 --- ListPage.java 28 Feb 2007 07:12:15 -0000 1.3 *************** *** 26,29 **** --- 26,30 ---- import org.tolven.mobile.client.data.Observation; import org.tolven.mobile.client.view.TolvenPage; + import org.tolven.mobile.client.view.form.DrilldownForm; import org.tolven.mobile.client.view.form.ObservationForm; *************** *** 129,138 **** class TolvenListItem extends StringItem implements CommandListener { ! private PatientController controller; private MenuData data; public TolvenListItem(Controller controller, MenuData data) { super("", data.getShortName()); ! this.controller = (PatientController) controller; this.data = data; } --- 130,139 ---- class TolvenListItem extends StringItem implements CommandListener { ! private Controller controller; private MenuData data; public TolvenListItem(Controller controller, MenuData data) { super("", data.getShortName()); ! this.controller = controller; this.data = data; } *************** *** 151,157 **** // System.out.println( " formClass: " + formClass.getName()); try { ! ObservationForm form = (ObservationForm)(formClass).newInstance( ); form.setController( controller ); ! form.setData((Observation)data); form.show(); } catch (Exception e) { --- 152,158 ---- // System.out.println( " formClass: " + formClass.getName()); try { ! DrilldownForm form = (DrilldownForm)(formClass).newInstance( ); form.setController( controller ); ! form.setData(data); form.show(); } catch (Exception e) { Index: MedicationsPage.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/list/MedicationsPage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MedicationsPage.java 24 Feb 2007 09:03:49 -0000 1.1 --- MedicationsPage.java 28 Feb 2007 07:12:15 -0000 1.2 *************** *** 17,20 **** --- 17,27 ---- /** + * Can drilldown on medications lists + */ + protected boolean canDrilldown(){ + return true; + } + + /** * Provide the query string * @return Index: AppointmentsPage.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/list/AppointmentsPage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AppointmentsPage.java 24 Feb 2007 09:03:49 -0000 1.1 --- AppointmentsPage.java 28 Feb 2007 07:12:15 -0000 1.2 *************** *** 21,25 **** */ public String getQuery( ) { ! return "ephr:patient-"+patient.getId()+":pers:appts:past"; } --- 21,25 ---- */ public String getQuery( ) { ! return "ephr:patient-"+patient.getId()+":pers:appts:future"; } Index: AllPatientAppointments.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/list/AllPatientAppointments.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AllPatientAppointments.java 24 Feb 2007 09:03:49 -0000 1.1 --- AllPatientAppointments.java 28 Feb 2007 07:12:15 -0000 1.2 *************** *** 1,9 **** package org.tolven.mobile.client.view.list; import org.tolven.mobile.client.control.Controller; import org.tolven.mobile.client.data.AllPatientData; import org.tolven.mobile.client.view.TolvenPage; ! public class AllPatientAppointments extends TolvenPage { AllPatientData allPatient; --- 1,14 ---- package org.tolven.mobile.client.view.list; + import java.util.Vector; + import org.tolven.mobile.client.control.Controller; + import org.tolven.mobile.client.data.AllAppointment; import org.tolven.mobile.client.data.AllPatientData; + import org.tolven.mobile.client.data.Allergy; + import org.tolven.mobile.client.data.MenuData; import org.tolven.mobile.client.view.TolvenPage; ! public class AllPatientAppointments extends ListPage { AllPatientData allPatient; *************** *** 12,15 **** --- 17,36 ---- this.allPatient = allPatient; } + + /** + * Provide the query string + * @return + */ + public String getQuery( ) { + return "ephr:family:appts:allAppt"; + } + + public MenuData createItem( String line ) { + return new AllAppointment( line ); + } + + public Vector getList( ) { + return allPatient.getAppointments(); + } } |
From: John C. <jc...@us...> - 2007-02-28 07:12:19
|
Update of /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/data In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13860/src/org/tolven/mobile/client/data Modified Files: Medication.java Result.java AllPatientData.java Added Files: AllAppointment.java Log Message: Add about, help, medication drilldown (general drilldown), Results, fix bux in Peak Flow. Index: AllPatientData.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/data/AllPatientData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AllPatientData.java 24 Feb 2007 09:03:49 -0000 1.1 --- AllPatientData.java 28 Feb 2007 07:12:15 -0000 1.2 *************** *** 1,10 **** --- 1,22 ---- package org.tolven.mobile.client.data; + import java.util.Vector; + public class AllPatientData implements Data { + private Vector appointments; + public String getShortName() { return "All Members"; } + public Vector getAppointments() { + if (appointments==null) appointments = new Vector(); + return appointments; + } + + public void addAppointment(Data appointment) { + getAppointments().addElement(appointment); + } } Index: Medication.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/data/Medication.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Medication.java 24 Feb 2007 09:03:49 -0000 1.1 --- Medication.java 28 Feb 2007 07:12:15 -0000 1.2 *************** *** 1,6 **** --- 1,20 ---- package org.tolven.mobile.client.data; + import org.tolven.mobile.client.view.form.MedicationForm; + public class Medication extends MenuData implements Data { + /** + * Create a new medication + * + */ + public Medication() { + super(); + } + + /** + * Construct a medication from delimited menudata line + * @param line + */ public Medication(String line) { super(line); *************** *** 10,16 **** return getString01(); } public Class getFormClass() { ! return null; } - } --- 24,30 ---- return getString01(); } + public Class getFormClass() { ! return MedicationForm.class; } } Index: Result.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/data/Result.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Result.java 24 Feb 2007 09:03:49 -0000 1.1 --- Result.java 28 Feb 2007 07:12:15 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- public Result(String line) { super(line); + // System.out.println( "Loading result: " + line); } --- NEW FILE: AllAppointment.java --- package org.tolven.mobile.client.data; import org.tolven.mobile.client.util.DateUtil; public class AllAppointment extends MenuData implements Data { public AllAppointment(String line) { super(line); } public Class getFormClass() { // TODO Auto-generated method stub return null; } public String getShortName() { return DateUtil.toShortDateString( getDate01()) + " " + getString01() + ", " + getString02(); } } |
Update of /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13860/src/org/tolven/mobile/client/view Modified Files: PatientEntryMenu.java TolvenPage.java Added Files: ModalPage.java AboutPage.java HelpPage.java Log Message: Add about, help, medication drilldown (general drilldown), Results, fix bux in Peak Flow. --- NEW FILE: AboutPage.java --- package org.tolven.mobile.client.view; import java.io.IOException; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Form; import javax.microedition.lcdui.Image; import javax.microedition.lcdui.ImageItem; import javax.microedition.lcdui.Item; public class AboutPage extends ModalPage{ public AboutPage(Display display) { super( "About Tolven", display ); } /** * Called by superclass to build the content of this form */ protected void buildForm( Form form ) { try { ImageItem imageItem = new ImageItem( null, Image.createImage("/img/mobilelazye.png"), ImageItem.LAYOUT_CENTER, "Tolven Logo"); form.append(imageItem); } catch (IOException e) { } int index = form.append("Healthcare Innovations\n"); form.get(index).setLayout(Item.LAYOUT_CENTER); index = form.append("Tolven Inc\n"); form.get(index).setLayout(Item.LAYOUT_CENTER); index = form.append("Contact: in...@to...\n"); form.get(index).setLayout(Item.LAYOUT_CENTER); } } --- NEW FILE: ModalPage.java --- package org.tolven.mobile.client.view; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; public abstract class ModalPage implements CommandListener{ Displayable previous; Display display; Form form; Command cmdBack = new Command("Back", Command.BACK, 2); public ModalPage( String formName, Display display ) { this.display = display; previous = display.getCurrent(); form = new Form( formName ); form.addCommand(cmdBack); form.setCommandListener(this); buildForm( form ); display.setCurrent(form); } protected abstract void buildForm( Form form ); public void commandAction(Command command, Displayable displayable) { if (command==cmdBack) { display.setCurrent(previous); } } } Index: PatientEntryMenu.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/PatientEntryMenu.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PatientEntryMenu.java 24 Feb 2007 09:03:50 -0000 1.1 --- PatientEntryMenu.java 28 Feb 2007 07:12:15 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- import org.tolven.mobile.client.control.PatientController; import org.tolven.mobile.client.view.form.BPForm; + import org.tolven.mobile.client.view.form.DrilldownForm; import org.tolven.mobile.client.view.form.GlucoseForm; import org.tolven.mobile.client.view.form.PeakFlowForm; *************** *** 41,44 **** --- 42,47 ---- public void commandAction(Command command, Displayable displayable ) { System.out.println( "Command: " + command.getLabel()); + DrilldownForm drilldown; + if (command==backCmd) { // Back to where we came from *************** *** 49,70 **** System.out.println( "Selected: " + selection); if ("Temperature".equals(selection)) { ! new TemperatureForm( controller, null ); return; } if ("Blood Glucose".equals(selection)) { ! new GlucoseForm( controller, null ); return; } if ("Blood Pressure".equals(selection)) { // Create a new Blood Pressure ! new BPForm( controller, null ); return; } if ("Weight".equals(selection)) { ! new WeightForm( controller, null ); return; } if ("Peak Flow".equals(selection)) { ! new PeakFlowForm( controller, null ); return; } --- 52,83 ---- System.out.println( "Selected: " + selection); if ("Temperature".equals(selection)) { ! drilldown = new TemperatureForm( ); ! drilldown.setController(controller); ! drilldown.show(); return; } if ("Blood Glucose".equals(selection)) { ! drilldown = new GlucoseForm( ); ! drilldown.setController(controller); ! drilldown.show(); return; } if ("Blood Pressure".equals(selection)) { // Create a new Blood Pressure ! drilldown = new BPForm( ); ! drilldown.setController(controller); ! drilldown.show(); return; } if ("Weight".equals(selection)) { ! drilldown = new WeightForm( ); ! drilldown.setController(controller); ! drilldown.show(); return; } if ("Peak Flow".equals(selection)) { ! drilldown = new PeakFlowForm( ); ! drilldown.setController(controller); ! drilldown.show(); return; } --- NEW FILE: HelpPage.java --- package org.tolven.mobile.client.view; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Form; import javax.microedition.lcdui.StringItem; public class HelpPage extends ModalPage { public HelpPage(Display display) { super("Tolven Help", display); } /** * We play a part in building the page by adding a list to the body. * But in reality, all we can do is start getting the list from the server * and then populate the list upon its arrival. */ protected void buildForm( Form form ) { form.append(new StringItem("Log-In","The user-name and password for the mobile electronic Personal Health Record are the same as those used for the web-application.")); form.append("Check the box if you wish the device to remember you Username. The system does not allow you to remember you password for security reasons."); form.append("The URL displayed is the default server that the application will connect too. If you have multiple services, the URL can be change to access other installations."); form.append(new StringItem("Select Person", "From the All Members display - select the drop-down arrow to see a list of all members of an account. Use the stylus or 5-function button to select an individual.")); form.append(new StringItem("Menu", "The default display for the electronic Personal Health Record is an individuals allergies. Use the Menu Button, [ ] or stylus to access a list of other data displays from the Menu Bar. The other data views are available from the Menu Bar (i.e., allergies, appointments, diagnoses, medications, observations, problems, procedures, reminders and results).")); form.append(new StringItem("Detail View", "When reviewing a list of items more details can be seen by selecting the item using the stylus or 5-function button.")); form.append(new StringItem("Back", "The Back Button displayed at the bottom of the screen or in the navigate section of the menu bar navigates to the previous page.")); form.append(new StringItem("[ ]", "This button provides access to the Menu Bar.")); form.append(new StringItem("Inputting Data", "Select New from either the Menu Bar or the button at the bottom of the screen. Select the type of data that is to be entered. Complete the data entry form and press the OK button.")); form.append(new StringItem("Exit", "Use the Exit button at the bottom of the screen or on the navigator bar to exit the electronic Personal Health Record solution." )); } } Index: TolvenPage.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileClient/src/org/tolven/mobile/client/view/TolvenPage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TolvenPage.java 24 Feb 2007 09:03:50 -0000 1.1 --- TolvenPage.java 28 Feb 2007 07:12:15 -0000 1.2 *************** *** 1,7 **** package org.tolven.mobile.client.view; - import java.io.IOException; - import java.util.Vector; - import javax.microedition.lcdui.ChoiceGroup; import javax.microedition.lcdui.Command; --- 1,4 ---- *************** *** 38,41 **** --- 35,39 ---- this.formName = formName; } + /** * Insure that the next time this page shows we get fresh data. *************** *** 43,64 **** */ public void refresh( ) { form = null; } - // /** - // * One-time initialization of this page. Note: the patient list may change but the list of pages - // * is constant (at this point). - // * @throws IOException - // */ - // public void init(PageList pageList ) throws IOException { - // // Build a list of pages - // Vector pages = pageList.getTolvenPages(); - // ChoiceGroup pageChoices = new ChoiceGroup( "Member", ChoiceGroup.POPUP ); - // for (int x = 0; x < pages.size(); x++) { - // TolvenPage page = (TolvenPage) pages.elementAt(x); - // form.addCommand( new Command( page.getFormName(), Command.ITEM, 5 )); - // pageChoices.append( page.getFormName(), null ); - // } - // form.append( pageChoices ); - // } /** --- 41,47 ---- */ public void refresh( ) { + System.out.println( "TolvenPage: Refreshing " + getFormName()); form = null; } /** *************** *** 78,82 **** dataChoices = controller.buildData( form ); // System.out.println( "TolvenPage: Build Page #3..."); ! thisDataChoice = dataChoices.getSelectedIndex(); } --- 61,67 ---- dataChoices = controller.buildData( form ); // System.out.println( "TolvenPage: Build Page #3..."); ! if (dataChoices!=null) { ! thisDataChoice = dataChoices.getSelectedIndex(); ! } } *************** *** 94,99 **** // System.out.println( "TolvenPage: Showing #3..."); // Need to reset this because when the user selects a different patient, it's now on that patient. ! dataChoices.setSelectedIndex(thisDataChoice, true); ! System.out.println( "Displaying TolvenPage: " + getFormName() + " for " + controller.getDataItem().getShortName()); display.setCurrent(form); // System.out.println( "TolvenPage: Shown..."); --- 79,86 ---- // System.out.println( "TolvenPage: Showing #3..."); // Need to reset this because when the user selects a different patient, it's now on that patient. ! if (dataChoices!=null) { ! dataChoices.setSelectedIndex(thisDataChoice, true); ! } ! // System.out.println( "Displaying TolvenPage: " + getFormName() + " for " + controller.getDataItem().getShortName()); display.setCurrent(form); // System.out.println( "TolvenPage: Shown..."); |
From: John C. <jc...@us...> - 2007-02-28 07:10:50
|
Update of /cvsroot/tolven/tolvenWEB/web/five/test In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13063/web/five/test Modified Files: dummyDetail.xhtml Log Message: Enhance demo display in busy window Index: dummyDetail.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/test/dummyDetail.xhtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dummyDetail.xhtml 31 Jul 2006 02:09:27 -0000 1.2 --- dummyDetail.xhtml 28 Feb 2007 07:10:49 -0000 1.3 *************** *** 4,14 **** xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> ! <f:attribute name="Cache-Control" value="no-cache"/> ! <f:attribute name="expires" value="1"/> ! <f:attribute name="contentType" value="text/xml"/> ! <ajax-response> ! <response type="element" id="rslt"> ! <h:outputText id="name" value="This number is from the server at #{top.serverTime} is: #{top.dummyCount}" /> ! </response> ! </ajax-response> </f:view> \ No newline at end of file --- 4,19 ---- xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> ! ! <f:attribute name="Cache-Control" value="no-cache"/> ! <f:attribute name="expires" value="1"/> ! <f:attribute name="contentType" value="text/xml"/> ! ! <ajax-response> ! <response type="element" id="rslt"> ! <h:outputText value="#{top.tp.cn}, you have access to 1 account." rendered="#{top.accountCount == 1}" /> ! <h:outputText value="#{top.tp.cn}, you have access to #{top.accountCount} accounts." rendered="#{top.accountCount > 1}" /> ! <br /> <br /> ! <h:outputText id="name" value="This number is from the server at #{top.serverTime} is: #{top.dummyCount}" /> ! </response> ! </ajax-response> </f:view> \ No newline at end of file |
From: John C. <jc...@us...> - 2007-02-28 07:08:38
|
Update of /cvsroot/tolven/tolvenWEB/web/WEB-INF In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12178/web/WEB-INF Modified Files: faces-config.xml Log Message: Remove obsolete rules. Index: faces-config.xml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/WEB-INF/faces-config.xml,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** faces-config.xml 25 Feb 2007 21:57:53 -0000 1.38 --- faces-config.xml 28 Feb 2007 07:08:37 -0000 1.39 *************** *** 55,68 **** </navigation-case> <navigation-case> - <from-outcome>/private/portal3</from-outcome> - <to-view-id>/private/portal3.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>publicHome</from-outcome> - <to-view-id>/publicHome.xhtml</to-view-id> - </navigation-case> - <navigation-case> <from-outcome>loggedOut</from-outcome> <to-view-id>/loggedOut.xhtml</to-view-id> </navigation-case> <navigation-case> --- 55,61 ---- </navigation-case> <navigation-case> <from-outcome>loggedOut</from-outcome> <to-view-id>/loggedOut.xhtml</to-view-id> + <redirect/> </navigation-case> <navigation-case> *************** *** 70,134 **** <to-view-id>/private/deleteUser.xhtml</to-view-id> </navigation-case> - <navigation-case> - <from-outcome>/tab/phrInbox</from-outcome> - <to-view-id>/tab/phrInbox.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-action>#{gen.createCHRPatients}</from-action> - <from-outcome>success</from-outcome> - <to-view-id>/five/test/patientGen.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/phrToDo</from-outcome> - <to-view-id>/tab/phrToDo.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/phrAppt</from-outcome> - <to-view-id>/tab/phrAppt.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/phrNotify</from-outcome> - <to-view-id>/tab/phrNotify.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/phrRecList</from-outcome> - <to-view-id>/tab/phrRecList.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/phrRecLog</from-outcome> - <to-view-id>/tab/phrRecLog.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/prefDemog</from-outcome> - <to-view-id>/tab/prefDemog.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/testLdap</from-outcome> - <to-view-id>/tab/testLdap.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/testDoc</from-outcome> - <to-view-id>/tab/testDoc.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/genNewUser</from-outcome> - <to-view-id>/tab/genNewUser.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/genPerson</from-outcome> - <to-view-id>/tab/genPerson.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/tab/familyDetail</from-outcome> - <to-view-id>/tab/familyDetail.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/setup/loadUMLS</from-outcome> - <to-view-id>/setup/loadUMLS.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>/setup/umls</from-outcome> - <to-view-id>/setup/umls.xhtml</to-view-id> - </navigation-case> </navigation-rule> --- 63,66 ---- *************** *** 358,396 **** </navigation-case> </navigation-rule> ! <navigation-rule> ! <description> ! Post-login dispatching occurs here so there's lots of possible outcomes depending on ! invitations and default account preferences. ! </description> ! <from-view-id>/private/dispatch.xhtml</from-view-id> ! <navigation-case> ! <from-action>#{top.postLogin}</from-action> ! <from-outcome>activated</from-outcome> ! <to-view-id>/private/activated.xhtml</to-view-id> ! <redirect/> ! </navigation-case> ! <navigation-case> ! <from-outcome>dispatch</from-outcome> ! <to-view-id>/private/dispatch.xhtml</to-view-id> ! </navigation-case> ! <navigation-case> ! <from-action>#{top.postLogin}</from-action> ! <from-outcome>missingUserObject</from-outcome> ! <to-view-id>/public/missingUserObject.xhtml</to-view-id> ! <redirect/> ! </navigation-case> ! <navigation-case> ! <from-action>#{top.postLogin}</from-action> ! <from-outcome>waitingActivation</from-outcome> ! <to-view-id>/public/waitingActivation.xhtml</to-view-id> ! <redirect/> ! </navigation-case> ! <navigation-case> ! <from-action>#{top.postLogin}</from-action> ! <from-outcome>invalidInvitation</from-outcome> ! <to-view-id>/public/invalidInvitation.xhtml</to-view-id> ! <redirect/> ! </navigation-case> ! </navigation-rule> <navigation-rule> <description> --- 290,294 ---- </navigation-case> </navigation-rule> ! <navigation-rule> <description> *************** *** 514,547 **** </navigation-rule> <navigation-rule> - <from-view-id>/tab/testLdap.xhtml</from-view-id> - <navigation-case> - <from-action>#{reg.search}</from-action> - <to-view-id>/tab/testLdap.xhtml</to-view-id> - </navigation-case> - </navigation-rule> - - <navigation-rule> - <from-view-id>/tab/testDoc.xhtml</from-view-id> - <navigation-case> - <from-action>#{doc.create}</from-action> - <to-view-id>/tab/testDoc.xhtml</to-view-id> - </navigation-case> - </navigation-rule> - - <navigation-rule> - <from-view-id>/tab/genNewUser.xhtml</from-view-id> - <navigation-case> - <from-action>#{gen.newPerson}</from-action> - <from-outcome>success</from-outcome> - <to-view-id>/tab/genNewUser.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-action>#{gen.newUser}</from-action> - <from-outcome>success</from-outcome> - <to-view-id>/tab/genNewUser.xhtml</to-view-id> - </navigation-case> - </navigation-rule> - - <navigation-rule> <from-view-id>/five/patients.xhtml</from-view-id> <navigation-case> --- 412,415 ---- *************** *** 606,609 **** --- 474,482 ---- <to-view-id>/five/test/docList.xhtml</to-view-id> </navigation-case> + <navigation-case> + <from-action>#{menu.genDM}</from-action> + <from-outcome>success</from-outcome> + <to-view-id>/five/problems.xhtml</to-view-id> + </navigation-case> </navigation-rule> |
From: John C. <jc...@us...> - 2007-02-28 07:07:48
|
Update of /cvsroot/tolven/tolvenWEB/web/vestibule In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11749/web/vestibule Modified Files: selectAccount.xhtml Log Message: Add support for default account selection, thus avoiding selectAccount. Index: selectAccount.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/vestibule/selectAccount.xhtml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** selectAccount.xhtml 25 Feb 2007 21:57:53 -0000 1.2 --- selectAccount.xhtml 28 Feb 2007 07:07:47 -0000 1.3 *************** *** 42,46 **** <h:panelGroup rendered="#{acc.accountUserCount!=0}"> <h2>Select the account you would like to log into</h2> ! <h:selectBooleanCheckbox value="#{top.rememberDefault}"/> <h:outputText value="Remember my choice below and go there directly the next time I login"/> <h:dataTable id="accounts" value="#{acc.accountUsersModel}" --- 42,46 ---- <h:panelGroup rendered="#{acc.accountUserCount!=0}"> <h2>Select the account you would like to log into</h2> ! <h:selectBooleanCheckbox value="#{acc.rememberDefault}"/> <h:outputText value="Remember my choice below and go there directly the next time I login"/> <h:dataTable id="accounts" value="#{acc.accountUsersModel}" |
From: John C. <jc...@us...> - 2007-02-28 07:06:46
|
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11331/web/five Modified Files: problems.xhtml Log Message: Add support for default account selection, thus avoiding selectAccount. Index: problems.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/problems.xhtml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** problems.xhtml 7 Nov 2006 08:41:03 -0000 1.5 --- problems.xhtml 28 Feb 2007 07:06:46 -0000 1.6 *************** *** 10,13 **** --- 10,14 ---- <body> <ui:composition> + <div> <script language="JavaScript" type="text/javascript"> // <![CDATA[ *************** *** 72,76 **** </table> </div> ! </ui:composition> </body> --- 73,80 ---- </table> </div> ! <h:form id="demoGen" onsubmit="return ajaxSubmit2(this);" rendered="#{top.accountType=='ephr'}"> ! <h:commandButton action="#{menu.genDM}" value="Generate Diabetes"/> ! </h:form> ! </div> </ui:composition> </body> |
From: John C. <jc...@us...> - 2007-02-28 07:06:12
|
Update of /cvsroot/tolven/tolvenWEB/src/org/tolven/web In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11282/src/org/tolven/web Modified Files: AccountAction.java Log Message: Add support for default account selection, thus avoiding selectAccount. Index: AccountAction.java =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/src/org/tolven/web/AccountAction.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** AccountAction.java 25 Feb 2007 19:47:04 -0000 1.11 --- AccountAction.java 28 Feb 2007 07:06:12 -0000 1.12 *************** *** 37,41 **** private AccountUser accountUser; private DataModel accountUsersModel; ! public AccountAction() throws NamingException { super(); --- 37,43 ---- private AccountUser accountUser; private DataModel accountUsersModel; ! // Starting with next login, remember my selection this time ! private boolean rememberDefault; ! public AccountAction() throws NamingException { super(); *************** *** 86,89 **** --- 88,99 ---- } + public boolean isRememberDefault() { + return rememberDefault; + } + + public void setRememberDefault(boolean rememberDefault) { + this.rememberDefault = rememberDefault; + } + /** * User has selected an account to log into *************** *** 92,95 **** --- 102,109 ---- public String login( ) { AccountUser accountUser = (AccountUser) accountUsersModel.getRowData(); + // Remember default + if (this.isRememberDefault()) { + accountUser.setDefaultAccount(true); + } // Save accountUserId in session for subsequent request ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext(); |
From: John C. <jc...@us...> - 2007-02-28 07:05:31
|
Update of /cvsroot/tolven/tolvenWEB/src/org/tolven/web/security In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10893/src/org/tolven/web/security Modified Files: VestibuleSecurityFilter.java Log Message: Add support for default account selection, thus avoiding selectAccount. Index: VestibuleSecurityFilter.java =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/src/org/tolven/web/security/VestibuleSecurityFilter.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** VestibuleSecurityFilter.java 28 Feb 2007 03:45:04 -0000 1.15 --- VestibuleSecurityFilter.java 28 Feb 2007 07:05:30 -0000 1.16 *************** *** 42,46 **** import org.tolven.core.bean.InvitationException; import org.tolven.core.entity.AccountUser; - import org.tolven.core.entity.Status; import org.tolven.core.entity.TolvenUser; import org.tolven.security.LoginLocal; --- 42,45 ---- *************** *** 49,53 **** import org.tolven.security.key.UserPublicKey; import org.tolven.web.TolvenContext; - import org.tolven.web.TopAction; /** --- 48,51 ---- *************** *** 93,97 **** HttpServletRequest request = (HttpServletRequest) servletRequest; HttpServletResponse response = (HttpServletResponse) servletResponse; ! //System.out.println(getClass() + " :REQUEST=" + request.getRequestURL()); if (!request.isRequestedSessionIdValid()) { logout("INVALID SESSION", request, response); --- 91,95 ---- HttpServletRequest request = (HttpServletRequest) servletRequest; HttpServletResponse response = (HttpServletResponse) servletResponse; ! System.out.println(getClass() + " :REQUEST=" + request.getRequestURL()); if (!request.isRequestedSessionIdValid()) { logout("INVALID SESSION", request, response); *************** *** 129,137 **** // PHASE ONE: User Authentication HttpSession session = request.getSession(); - TopAction top = (TopAction) session.getAttribute(TOP); - if (top == null) { - top = new TopAction(); - session.setAttribute(TOP, top); - } TolvenUser user = null; obj = session.getAttribute(TOLVENUSER_ID); --- 127,130 ---- *************** *** 184,193 **** // If session has AccountUserId, then we're ready to dispatch OUT of the vestibule. Long accountUserId = (Long) session.getAttribute(ACCOUNTUSER_ID); ! if (accountUserId!=null) { ! AccountUser accountUser = activation.findAccountUser(accountUserId); ! if (accountUser == null) { ! logout("ACCOUNTUSER IS NULL", request, response); ! return; ! } // SAFETY CHECK HERE - Don't trust the accountUserId alone, it must match user. if (accountUser.getUser().getId() != user.getId()) { --- 177,191 ---- // If session has AccountUserId, then we're ready to dispatch OUT of the vestibule. Long accountUserId = (Long) session.getAttribute(ACCOUNTUSER_ID); ! AccountUser accountUser = null; ! // If the user has a default account, then we can exit vestibule to that account ! if (accountUserId==null) { ! accountUser = activation.findDefaultAccountUser(user); ! if (accountUser!=null) { ! session.setAttribute(ACCOUNTUSER_ID, accountUser.getId()); ! } ! } else { ! accountUser = activation.findAccountUser(accountUserId); ! } ! if (accountUser!=null) { // SAFETY CHECK HERE - Don't trust the accountUserId alone, it must match user. if (accountUser.getUser().getId() != user.getId()) { |
From: John C. <jc...@us...> - 2007-02-28 07:04:31
|
Update of /cvsroot/tolven/tolvenWEB/src/org/tolven/web In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10476/src/org/tolven/web Modified Files: MenuAction.java Log Message: Add demo command to generate diabetes scenario on this patient. Index: MenuAction.java =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/src/org/tolven/web/MenuAction.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** MenuAction.java 24 Feb 2007 07:57:36 -0000 1.36 --- MenuAction.java 28 Feb 2007 07:04:30 -0000 1.37 *************** *** 15,18 **** --- 15,19 ---- import java.awt.Color; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.URLEncoder; *************** *** 24,28 **** --- 25,32 ---- import java.util.Map; + import javax.annotation.Resource; import javax.faces.context.FacesContext; + import javax.jms.ConnectionFactory; + import javax.jms.Queue; import javax.naming.InitialContext; import javax.naming.NamingException; *************** *** 49,55 **** --- 53,61 ---- import org.tolven.app.entity.MenuStructure; import org.tolven.ccr.ContinuityOfCareRecord; + import org.tolven.core.util.Queuer; import org.tolven.doc.DocumentLocal; import org.tolven.doc.XMLLocal; import org.tolven.doc.XMLProtectedLocal; + import org.tolven.doc.bean.TolvenMessage; import org.tolven.doc.bean.XMLBean; import org.tolven.doc.entity.CCRException; *************** *** 57,60 **** --- 63,68 ---- import org.tolven.doc.entity.DocCCR; import org.tolven.doc.entity.DocXML; + import org.tolven.gen.entity.FamilyMember; + import org.tolven.gen.model.GenMedicalCCR; import org.tolven.trim.util.TRIMException; /** *************** *** 86,90 **** // The CCR document for this menuDataItem, if any private ContinuityOfCareRecord ccr; ! public MenuAction() throws NamingException { super(); --- 94,98 ---- // The CCR document for this menuDataItem, if any private ContinuityOfCareRecord ccr; ! public MenuAction() throws NamingException { super(); *************** *** 519,522 **** --- 527,553 ---- /** + * Generate a diabetes scenario for the current patient + * @throws Exception + */ + public String genDM() throws Exception { + // Find the patient id + long patientId = getTargetMenuPath().getNodeValues().get("patient"); + MenuData mdPatient = menuLocal.findMenuDataItem(patientId); + System.out.println( "[genDM] patient=" + patientId ); + // Generate new data directly from here + GenMedicalCCR generator = new GenMedicalCCR( getNow(), 1996); + // Set an existing id (rather thant the usual virtual person) + generator.setPatient( mdPatient ); + // generator.setFamily(control.getFamilyUnit()); + Queuer q = new Queuer(); + String OID = System.getProperty("tolven.repository.oid", "0"); + generator.setDocumentId(OID + "." + getNow() + "." + 1 ); + // Create a CCR document which will be the target for this operation + ContinuityOfCareRecord ccr = generator.generate( "DiabetesGen" ); + creatorBean.submit(getTop().getAccountId(), getTop().getAccountUser().getUser().getId(), ccr); + return "success"; + } + + /** * Temporary: Create an assessment * @return |
From: John C. <jc...@us...> - 2007-02-28 07:03:21
|
Update of /cvsroot/tolven/tolvenWEB/src/org/tolven/web In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10036/src/org/tolven/web Modified Files: TopAction.java Log Message: Remove postLogin, now handled by VestibuleFilter Index: TopAction.java =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/src/org/tolven/web/TopAction.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** TopAction.java 28 Feb 2007 03:45:04 -0000 1.44 --- TopAction.java 28 Feb 2007 07:03:19 -0000 1.45 *************** *** 15,22 **** --- 15,24 ---- import java.io.IOException; + import java.security.GeneralSecurityException; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Properties; + import java.util.Set; import javax.faces.context.ExternalContext; *************** *** 24,36 **** --- 26,47 ---- import javax.naming.InitialContext; import javax.naming.NamingException; + import javax.security.auth.Subject; + import javax.security.jacc.PolicyContext; + import javax.security.jacc.PolicyContextException; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; + import org.tolven.app.MenuLocal; import org.tolven.core.ActivationLocal; import org.tolven.core.InvitationLocal; import org.tolven.core.entity.AccountUser; + import org.tolven.core.entity.Status; import org.tolven.core.entity.TolvenUser; import org.tolven.security.LDAPLocal; import org.tolven.security.LoginLocal; import org.tolven.security.TolvenPerson; + import org.tolven.security.key.PrivateKeyRing; + import org.tolven.security.key.UserPrivateKey; + import org.tolven.security.key.UserPublicKey; import org.tolven.web.security.VestibuleSecurityFilter; *************** *** 50,54 **** private long invitationId; private String timeZone; - private String postLoginAction; private TolvenPerson tp; --- 61,64 ---- *************** *** 58,63 **** // One-time ignore default account private boolean ignoreDefault; - // Starting with next login, remember my selection this time - private boolean rememberDefault; private String info; --- 68,71 ---- *************** *** 70,74 **** dummyCount = 0; invitationId = 0; - rememberDefault = false; InitialContext ctx = new InitialContext(); --- 78,81 ---- *************** *** 82,86 **** // setStartPage( "../private/myHome.jsf" ); } ! /** * Return a list of the last 100 server transaction elapsed times for this session --- 89,101 ---- // setStartPage( "../private/myHome.jsf" ); } ! ! /** ! * This should only be used in the demo to simulate a simple database activity. ! * @return ! */ ! public long getAccountCount() { ! return activation.countUserAccounts(getAccountUser().getUser()); ! } ! /** * Return a list of the last 100 server transaction elapsed times for this session *************** *** 97,194 **** } - /** - * <p>Post Login preparation. We can assume that the container has verified username and password at this point. - * The first thing to do is get the Tolven User object associated with this user.</p> - * <p>If we got a "verification" RSVP from the invitation sent to the user, then we - * can complete the activation process.</p> - * <p>Beyond RSVPs, we need to dispatch to the appropriate home page for the user. Or, if there are - * multiple accounts and no default, we prompt for which account they want to start in.</p> - * - * <p>If the user object has a status of "activating", then we know that the user is in the middle - * of a registration process. If there was no accompanying RSVP to complete the activation, then we need to - * log the user out and ask them to wait for their eMail to come through.</p> - * <p>If the user has already selected an account, don't allow any further changes. Just dispatch to the - * main page. To change accounts, the user must re-authenticate which means login again. This is a security feature.</p> - */ - public String postLogin() throws Exception{ - // Initialize tolven here - Map<String,Object> appMap = FacesContext.getCurrentInstance().getExternalContext().getApplicationMap(); - TolvenContext tolven = (TolvenContext) appMap.get("tolven"); - if (tolven==null) { - tolven = new TolvenContext(); - appMap.put("tolven", tolven); - } - tolven.initialize(); - ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext(); - HttpSession session = ((HttpSession) ctx.getSession(true)); - info = "Login Processing: " + getTp().getUid(); - System.out.println( info ); - // Subject subject; - // try { - // subject = (Subject) PolicyContext.getContext("javax.security.auth.Subject.container"); - // } catch (PolicyContextException e) { - // throw new IllegalStateException("[WEB] PolicyContext exception", e); - // } - // if (subject == null) - // throw new IllegalStateException("[WEB] No Subject found in PolicyContext"); - // Get the TolvenUser - TolvenUser user = activation.loginUser( getTp().getUid(), getNow() ); - //setUser( activation.loginUser( getTp().getUid(), getNow() ) ); - // Get invitation id if any - // If the user object is missing but we have an invitation, see if it might get the user all the way logged in. - if (user==null && getInvitationId()!=0) { - // Since we have no user yet, we'll try executing an activation invitation (if it works) - if (!loginBean.activate(getTp().getUid(), getInvitationId(), getNow())) { - return dispatchingLogout("invalidInvitation"); - } - // try TolvenUser again - user = activation.loginUser( getTp().getUid(), getNow() ); - if (user==null) return dispatchingLogout("waitingActivation"); - // Now we can complete the activation - invitationBean.executeInvitation( getInvitationId(), getNow()); - } - - // If user still not logged in, send them packing, we've got a problem - if (user==null) { - // It appears that Faces doesn't allow a message to persist beyond a session invalidate so, instead, - // we'll just go to a page specific to describe the problem for the user. - // FacesContext.getCurrentInstance().addMessage( null, new FacesMessage("Internal Error: LDAP valid, missing UserObject")); - return dispatchingLogout("missingUserObject"); - } - - long accountUserId = getSessionAccountUserId( ); - AccountUser accountUser = null; - // Otherwise, we dispatch based on the defaultAccount or the one the user selected. - if (accountUserId!=0) { - accountUser = activation.findAccountUser(accountUserId ); - // SAFETY CHECK HERE - Don't trust the accountUserId alone, it must match user. - if (accountUser.getUser().getId() != user.getId()) { - return dispatchingLogout("invalidInvitation"); - } - if (this.isRememberDefault()) { - accountUser.setDefaultAccount(true); - activation.updateAccountUser(accountUser); - } - } - // See if there's a default available - if (accountUser==null && !this.isIgnoreDefault()) { - accountUser = activation.findDefaultAccountUser(user); - } - // If still null, because there's no default or maybe because the user has no account yet, ask user what to do - // Note: We'll return here after the user decides. - if (accountUser==null) { - if (activation.countUserAccounts( user ) > 0 ) { - postLoginAction = "selectAccount.jsf"; - } else { - postLoginAction = "createAccount.jsf"; - } - return "dispatch"; - } - // Save accountUserId in session for subsequent request - session.setAttribute(VestibuleSecurityFilter.ACCOUNTUSER_ID, new Long( accountUser.getId())); - setPostLoginAction(accountUser.getAccount().getAccountType().getHomePage()); - return "dispatch"; - } /** * Return the accountUser from current request based on the selected accountUserId stored in session. --- 112,116 ---- *************** *** 216,226 **** } - public String getPostLoginAction() throws Exception { - postLogin(); - return postLoginAction; - } - public void setPostLoginAction(String postLoginAction) { - this.postLoginAction = postLoginAction; - } public String dispatchingLogout(String outcome){ // System.out.println( "Logged out "); --- 138,141 ---- *************** *** 291,302 **** } - public boolean isRememberDefault() { - return rememberDefault; - } - - public void setRememberDefault(boolean rememberDefault) { - this.rememberDefault = rememberDefault; - } - public long getAccountUserId() { ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext(); --- 206,209 ---- |
From: John C. <jc...@us...> - 2007-02-28 07:02:16
|
Update of /cvsroot/tolven/tolvenMobileServer/web In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9557/web Modified Files: tolven.jar tolven.jad Log Message: Binary mobile client Index: tolven.jad =================================================================== RCS file: /cvsroot/tolven/tolvenMobileServer/web/tolven.jad,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tolven.jad 24 Feb 2007 22:44:55 -0000 1.2 --- tolven.jad 28 Feb 2007 07:02:14 -0000 1.3 *************** *** 2,11 **** MIDlet-Description: Tolven Applications MIDlet-Icon: /img/ePHR.png ! MIDlet-Jar-Size: 117864 MIDlet-Jar-URL: tolven.jar MIDlet-Name: Tolven MIDlet-Permissions: javax.microedition.io.Connector.http,javax.microedition.io.Connector.https MIDlet-Vendor: Tolven Inc ! MIDlet-Version: 1.4.0 MicroEdition-Configuration: CLDC-1.1 MicroEdition-Profile: MIDP-2.1 --- 2,11 ---- MIDlet-Description: Tolven Applications MIDlet-Icon: /img/ePHR.png ! MIDlet-Jar-Size: 107243 MIDlet-Jar-URL: tolven.jar MIDlet-Name: Tolven MIDlet-Permissions: javax.microedition.io.Connector.http,javax.microedition.io.Connector.https MIDlet-Vendor: Tolven Inc ! MIDlet-Version: 1.4.1 MicroEdition-Configuration: CLDC-1.1 MicroEdition-Profile: MIDP-2.1 Index: tolven.jar =================================================================== RCS file: /cvsroot/tolven/tolvenMobileServer/web/tolven.jar,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvs0zCZX1 and /tmp/cvshE2dAM differ |
From: John C. <jc...@us...> - 2007-02-28 07:01:34
|
Update of /cvsroot/tolven/tolvenMobileServer/src/org/tolven/mobile In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9168/src/org/tolven/mobile Modified Files: Mobile.java MobileSecurityFilter.java Log Message: Cosmetic Index: MobileSecurityFilter.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileServer/src/org/tolven/mobile/MobileSecurityFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MobileSecurityFilter.java 24 Feb 2007 07:52:30 -0000 1.1 --- MobileSecurityFilter.java 28 Feb 2007 07:01:28 -0000 1.2 *************** *** 47,51 **** public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { ! System.out.println(getClass() + " : doFilter"); HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) resp; --- 47,51 ---- public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { ! // System.out.println(getClass() + " : doFilter"); HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) resp; Index: Mobile.java =================================================================== RCS file: /cvsroot/tolven/tolvenMobileServer/src/org/tolven/mobile/Mobile.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Mobile.java 24 Feb 2007 07:52:30 -0000 1.1 --- Mobile.java 28 Feb 2007 07:01:28 -0000 1.2 *************** *** 36,40 **** @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println( "doGetEntry"); try { String uri = request.getRequestURI(); --- 36,39 ---- |
From: John C. <jc...@us...> - 2007-02-28 06:59:51
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv8240/src/org/tolven/app/bean Modified Files: MenuBean.java Log Message: Fix problem in appointments for all patients Index: MenuBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean/MenuBean.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** MenuBean.java 16 Feb 2007 04:02:33 -0000 1.48 --- MenuBean.java 28 Feb 2007 06:59:49 -0000 1.49 *************** *** 119,123 **** query.setParameter( "id", id ); query.setParameter( "accountId", ctrl.getActualMenuStructure().getAccount().getId() ); ! System.out.println( "[MenuBean.findMenuDataItem] Looking for menuData with key: " + id + " for account: " + ctrl.getActualMenuStructure().getAccount().getId() ); query.setMaxResults(2); List<MenuData> items = query.getResultList(); --- 119,123 ---- query.setParameter( "id", id ); query.setParameter( "accountId", ctrl.getActualMenuStructure().getAccount().getId() ); ! // System.out.println( "[MenuBean.findMenuDataItem] Looking for menuData with key: " + id + " for account: " + ctrl.getActualMenuStructure().getAccount().getId() ); query.setMaxResults(2); List<MenuData> items = query.getResultList(); *************** *** 216,221 **** } } ! System.out.println( "MenuData Query: " + qs.toString()); ! System.out.println( "m=" + ctrl.getActualMenuStructure().getPath()); Query query = em.createQuery( qs.toString() ); query.setParameter( "m", ctrl.getActualMenuStructure() ); --- 216,221 ---- } } ! // System.out.println( "MenuData Query: " + qs.toString()); ! // System.out.println( "m=" + ctrl.getActualMenuStructure().getPath()); Query query = em.createQuery( qs.toString() ); query.setParameter( "m", ctrl.getActualMenuStructure() ); *************** *** 223,227 **** if (getParentOrNull(ctrl, x)!=null) { query.setParameter( "p0" + (x+1), getParentOrNull(ctrl, x) ); ! System.out.println( "p0" + (x+1) + "=" + getParentOrNull(ctrl, x)); } } --- 223,227 ---- if (getParentOrNull(ctrl, x)!=null) { query.setParameter( "p0" + (x+1), getParentOrNull(ctrl, x) ); ! // System.out.println( "p0" + (x+1) + "=" + getParentOrNull(ctrl, x)); } } *************** *** 229,233 **** for (int f = 0; f < filterValues.size(); f++) { query.setParameter("fltr" + f, filterValues.get(f)); ! System.out.println( "fltr" + f + "=" + filterValues.get(f)); } return query; --- 229,233 ---- for (int f = 0; f < filterValues.size(); f++) { query.setParameter("fltr" + f, filterValues.get(f)); ! // System.out.println( "fltr" + f + "=" + filterValues.get(f)); } return query; *************** *** 257,261 **** Query query = prepareCriteria( ctrl, "SELECT COUNT(md) FROM MenuData md WHERE "); Long rslt = (Long) query.getSingleResult(); ! System.out.println( "[MenuLocal.countMenuData]: " + ctrl + " count=" + rslt.longValue() ); return rslt.longValue(); } catch (RuntimeException e) { --- 257,261 ---- Query query = prepareCriteria( ctrl, "SELECT COUNT(md) FROM MenuData md WHERE "); Long rslt = (Long) query.getSingleResult(); ! // System.out.println( "[MenuLocal.countMenuData]: " + ctrl + " count=" + rslt.longValue() ); return rslt.longValue(); } catch (RuntimeException e) { *************** *** 416,420 **** root.getAccount(), appointments, "appointments2.xhtml", null, 1, "today", "Today", "true", null, "tab" ); em.persist( today ); ! em.persist( new MSColumn( today, 1, "Who", "reference", "%s, %s", "String01,string02") ); em.persist( new MSColumn( today, 2, "Date", "date01", "d MMM yyyy hh:mm") ); em.persist( new MSColumn( today, 3, "Purpose", "string03", null) ); --- 416,420 ---- root.getAccount(), appointments, "appointments2.xhtml", null, 1, "today", "Today", "true", null, "tab" ); em.persist( today ); ! em.persist( new MSColumn( today, 1, "Who", "reference", "%s, %s", "string01,string02") ); em.persist( new MSColumn( today, 2, "Date", "date01", "d MMM yyyy hh:mm") ); em.persist( new MSColumn( today, 3, "Purpose", "string03", null) ); *************** *** 423,427 **** root.getAccount(), appointments, "appointments2.xhtml", null, 2, "tomorrow", "Tomorrow", "true", null, "tab" ); em.persist( tomorrow ); ! em.persist( new MSColumn( tomorrow, 1, "Who", "reference", "%s, %s", "String01,string02") ); em.persist( new MSColumn( tomorrow, 2, "Date", "date01", "d MMM yyyy hh:mm") ); em.persist( new MSColumn( tomorrow, 3, "Purpose", "string03", null) ); --- 423,427 ---- root.getAccount(), appointments, "appointments2.xhtml", null, 2, "tomorrow", "Tomorrow", "true", null, "tab" ); em.persist( tomorrow ); ! em.persist( new MSColumn( tomorrow, 1, "Who", "reference", "%s, %s", "string01,string02") ); em.persist( new MSColumn( tomorrow, 2, "Date", "date01", "d MMM yyyy hh:mm") ); em.persist( new MSColumn( tomorrow, 3, "Purpose", "string03", null) ); *************** *** 430,434 **** root.getAccount(), appointments, "appointments2.xhtml", null, 3, "nextWeek", "Next Week", "true", null, "tab" ); em.persist( nextWeek ); ! em.persist( new MSColumn( nextWeek, 1, "Who", "reference", "%s, %s", "String01,string02") ); em.persist( new MSColumn( nextWeek, 2, "Date", "date01", "d MMM yyyy hh:mm") ); em.persist( new MSColumn( nextWeek, 3, "Purpose", "string03", null) ); --- 430,434 ---- root.getAccount(), appointments, "appointments2.xhtml", null, 3, "nextWeek", "Next Week", "true", null, "tab" ); em.persist( nextWeek ); ! em.persist( new MSColumn( nextWeek, 1, "Who", "reference", "%s, %s", "string01,string02") ); em.persist( new MSColumn( nextWeek, 2, "Date", "date01", "d MMM yyyy hh:mm") ); em.persist( new MSColumn( nextWeek, 3, "Purpose", "string03", null) ); *************** *** 437,441 **** root.getAccount(), appointments, "appointments2.xhtml", null, 4, "allAppt", "All Appointments", "true", null, "tab" ); em.persist( allAppt ); ! em.persist( new MSColumn( allAppt, 1, "Who", "reference", "%s, %s", "String01,string02") ); em.persist( new MSColumn( allAppt, 2, "Date", "date01", "d MMM yyyy hh:mm") ); em.persist( new MSColumn( allAppt, 3, "Purpose", "string03", null) ); --- 437,441 ---- root.getAccount(), appointments, "appointments2.xhtml", null, 4, "allAppt", "All Appointments", "true", null, "tab" ); em.persist( allAppt ); ! em.persist( new MSColumn( allAppt, 1, "Who", "reference", "%s, %s", "string01,string02") ); em.persist( new MSColumn( allAppt, 2, "Date", "date01", "d MMM yyyy hh:mm") ); em.persist( new MSColumn( allAppt, 3, "Purpose", "string03", null) ); |
From: John C. <jc...@us...> - 2007-02-28 06:59:51
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv8240/src/org/tolven/app/entity Modified Files: MenuData.java Log Message: Fix problem in appointments for all patients Index: MenuData.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/entity/MenuData.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** MenuData.java 24 Feb 2007 07:58:30 -0000 1.16 --- MenuData.java 28 Feb 2007 06:59:49 -0000 1.17 *************** *** 452,457 **** rslt = getPQValueField( fieldName ); if (rslt!=null) return rslt; ! return null; } public Date getDateField( String fieldName ) { if (fieldName.equals("date01")) return this.getDate01(); --- 452,458 ---- rslt = getPQValueField( fieldName ); if (rslt!=null) return rslt; ! throw new IllegalArgumentException( "Invalid menuData field name: " + fieldName); } + public Date getDateField( String fieldName ) { if (fieldName.equals("date01")) return this.getDate01(); |
From: John C. <jc...@us...> - 2007-02-28 06:58:20
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/ccr In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7754/src/org/tolven/ccr Modified Files: PersonNameType.java Log Message: Add ability to generate new data for an existing patient. Index: PersonNameType.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/ccr/PersonNameType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PersonNameType.java 2 Oct 2006 05:30:08 -0000 1.3 --- PersonNameType.java 28 Feb 2007 06:58:18 -0000 1.4 *************** *** 60,64 **** if (s!=null) { String st = s.trim(); ! if (st.length()>0) components.add(s); } } --- 60,64 ---- if (s!=null) { String st = s.trim(); ! if (st.length()>0) components.add(st); } } |