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...> - 2006-08-31 05:15:59
|
Update of /cvsroot/tolven/tolvenWEB/web/styles In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18952/web/styles Modified Files: tolven6.css Log Message: Fix table column heading so thy follow the justification specified in the table (left, center, right) Index: tolven6.css =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/styles/tolven6.css,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tolven6.css 16 Aug 2006 18:14:31 -0000 1.9 --- tolven6.css 31 Aug 2006 05:15:56 -0000 1.10 *************** *** 299,303 **** thead th { background: url(../images/bkgd_th.gif) #cccccc repeat-x left center; color: #333333; ! FONT-FAMILY: 'Lucide Grande', Verdana, Arial, sans-serif; text-align: center } --- 299,303 ---- thead th { background: url(../images/bkgd_th.gif) #cccccc repeat-x left center; color: #333333; ! FONT-FAMILY: 'Lucide Grande', Verdana, Arial, sans-serif; } |
From: John C. <jc...@us...> - 2006-08-31 05:13:20
|
Update of /cvsroot/tolven/tolven/template In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18013/template Modified Files: tolven.template Log Message: Add optional default timezone (overrides system timezone) Index: tolven.template =================================================================== RCS file: /cvsroot/tolven/tolven/template/tolven.template,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tolven.template 20 Aug 2006 23:04:02 -0000 1.3 --- tolven.template 31 Aug 2006 05:13:16 -0000 1.4 *************** *** 3,6 **** --- 3,7 ---- mail.smtp.auth=false mail.debug=false + tolven.timezone=America/Los_Angeles tolven.repository.oid=1.2 tolven.mail.from=no...@my... |
From: John C. <jc...@us...> - 2006-08-29 21:10:39
|
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30921/web/five Modified Files: lab.xhtml activity.xhtml Log Message: Add support for displaying Lab batteries and ability to generate data for same. Includes widening New Activity display to show name of battery. Index: activity.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/activity.xhtml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** activity.xhtml 24 Aug 2006 07:54:00 -0000 1.5 --- activity.xhtml 29 Aug 2006 21:10:36 -0000 1.6 *************** *** 31,36 **** <tr> <th width="75px">Date</th> ! <th width="200px">For</th> ! <th width="150px">Action</th> <th width="150px">RequestedBy</th> <th width="50px">Priority</th> --- 31,36 ---- <tr> <th width="75px">Date</th> ! <th width="150px">For</th> ! <th width="250px">Action</th> <th width="150px">RequestedBy</th> <th width="50px">Priority</th> *************** *** 41,60 **** <table id="#{menu.element}LG" > <tbody> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="200px">-</td><td width="150px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> </tbody> </table> --- 41,60 ---- <table id="#{menu.element}LG" > <tbody> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> ! <tr><td width="75px">-</td><td width="150px">-</td><td width="250px">-</td><td width="150px">-</td><td width="50px">-</td><td width="85px">-</td></tr> </tbody> </table> Index: lab.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/lab.xhtml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lab.xhtml 25 Aug 2006 15:00:37 -0000 1.6 --- lab.xhtml 29 Aug 2006 21:10:36 -0000 1.7 *************** *** 14,18 **** #{menu.elementLabel}DG = new Rico.LiveGrid( '#{menu.element}LG', 15, #{menu.menuDataCount}, 'menuData.ajax', ! {prefetchBuffer: true, tableClass: 'dataGrid', largeBufferSize: 4.0, --- 14,18 ---- #{menu.elementLabel}DG = new Rico.LiveGrid( '#{menu.element}LG', 15, #{menu.menuDataCount}, 'menuData.ajax', ! {prefetchBuffer: false, tableClass: 'dataGrid', largeBufferSize: 4.0, *************** *** 22,25 **** --- 22,30 ---- sortAscendImg: '../images/sort_asc.gif', sortDescendImg:'../images/sort_desc.gif'}); + #{menu.elementLabel}DG.setSupressColumnRange( 0, 1); + #{menu.elementLabel}DG.addSortSupressColumn( 'date', 0, 1); + #{menu.elementLabel}DG.addSortSupressColumn( 'test', 1, 2); + #{menu.elementLabel}DG.addSortSupressColumn( 'result', 2, 3); + #{menu.elementLabel}DG.requestContentRefresh(0); #{menu.elementLabel}DGFilter = ''; |
From: John C. <jc...@us...> - 2006-08-29 21:10:36
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30891/src/org/tolven/gen/bean Modified Files: GenMedical.java LabTestScenario.java DiabetesGen.java Added Files: LabTest.java BatteryScenario.java Log Message: Add support for displaying Lab batteries and ability to generate data for same. Includes widening New Activity display to show name of battery. Index: GenMedical.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean/GenMedical.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GenMedical.java 28 Aug 2006 19:37:36 -0000 1.9 --- GenMedical.java 29 Aug 2006 21:10:32 -0000 1.10 *************** *** 259,269 **** * Generate a lab result. We ignore requests before the start date presuming that if the practice wasn't in * business, then the results wouldn't be in this record. ! * TODO: Allow batteries * @return */ ! public void generateLabResult( Date effective, String test, String result, double value, String valueString, String units, String interpretation, String source ) { // Anything before the start time we ignore. GregorianCalendar effectiveCal = new GregorianCalendar( ); ! effectiveCal.setTime( effective ); if (effectiveCal.get(GregorianCalendar.YEAR) < this.getStartYear()) return; // The main test result entry (as received, not normalized) --- 259,271 ---- * Generate a lab result. We ignore requests before the start date presuming that if the practice wasn't in * business, then the results wouldn't be in this record. ! * ! * @param showInActivityIf If the result is received within the number of days specific (if non-zero) ! * include it on the activity list. * @return */ ! public void generateLabResult( String battery, LabTest test, int showInActivityIf) { // Anything before the start time we ignore. GregorianCalendar effectiveCal = new GregorianCalendar( ); ! effectiveCal.setTime( test.getEffectiveTime() ); if (effectiveCal.get(GregorianCalendar.YEAR) < this.getStartYear()) return; // The main test result entry (as received, not normalized) *************** *** 272,282 **** md.setMenuStructure( msLabResult ); md.setParent01(patient); ! md.setDate01( effective ); ! md.setString01(test); ! md.setString02(result); ! md.setString04(interpretation); ! md.setPqStringVal01(valueString); ! md.setPqValue01(value); ! md.setPqUnits01(units); menu.persistMenuData( md); --- 274,284 ---- md.setMenuStructure( msLabResult ); md.setParent01(patient); ! md.setDate01( test.getEffectiveTime() ); ! md.setString01(battery); ! md.setString02(test.getTestName()); ! md.setString04(test.getInterpretation()); ! md.setPqStringVal01(test.getStringValue()); ! md.setPqValue01(test.getValue()); ! md.setPqUnits01(test.getUnits()); menu.persistMenuData( md); *************** *** 286,292 **** mds.setReference(md); mds.setParent01(patient); ! mds.setDate01( effective ); ! mds.setString01(test); ! mds.setString02(valueString + " " + units); menu.persistMenuData( mds); --- 288,294 ---- mds.setReference(md); mds.setParent01(patient); ! mds.setDate01( test.getEffectiveTime() ); ! mds.setString01(test.getTestName()); ! mds.setString02(test.getStringValue() + " " + test.getUnits()); menu.persistMenuData( mds); *************** *** 294,308 **** GregorianCalendar recent = new GregorianCalendar(); recent.setTime(getNow()); ! recent.add(GregorianCalendar.HOUR, -24*10); ! System.out.println( "Effective: " + effective + "Now-10days" + recent.getTime()); ! if (effective.after(recent.getTime())) { // New Activity referencing the result just created MenuData mda = new MenuData(); mda.setMenuStructure( msActivity ); mds.setReference(md); ! mda.setDate01( effective ); mda.setParent01(patient); mda.setString01(patient.getString02() + " " + patient.getString01()); ! mda.setString02("Lab Result"); menu.persistMenuData( mda); } --- 296,310 ---- GregorianCalendar recent = new GregorianCalendar(); recent.setTime(getNow()); ! recent.add(GregorianCalendar.HOUR, -24*showInActivityIf); ! System.out.println( "Effective: " + test.getEffectiveTime() + "Now-Ndays" + recent.getTime()); ! if (test.getEffectiveTime().after(recent.getTime())) { // New Activity referencing the result just created MenuData mda = new MenuData(); mda.setMenuStructure( msActivity ); mds.setReference(md); ! mda.setDate01( test.getEffectiveTime() ); mda.setParent01(patient); mda.setString01(patient.getString02() + " " + patient.getString01()); ! mda.setString02(battery + " Result"); menu.persistMenuData( mda); } --- NEW FILE: LabTest.java --- package org.tolven.gen.bean; import java.util.Date; /** * A simple bean to hold the essential elements of a lab test. * @author John Churin * */ public class LabTest { private Date effectiveTime; private String testName; private double value; private String stringValue; private String units; private String interpretation; private String source; public String getInterpretation() { return interpretation; } public void setInterpretation(String interpretation) { this.interpretation = interpretation; } public String getSource() { return source; } public void setSource(String source) { this.source = source; } public Date getEffectiveTime() { return effectiveTime; } public void setEffectiveTime(Date effectiveTime) { this.effectiveTime = effectiveTime; } public String getStringValue() { return stringValue; } public void setStringValue(String stringValue) { this.stringValue = stringValue; } public String getTestName() { return testName; } public void setTestName(String testName) { this.testName = testName; } public String getUnits() { return units; } public void setUnits(String units) { this.units = units; } public double getValue() { return value; } public void setValue(double value) { this.value = value; } } Index: LabTestScenario.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean/LabTestScenario.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LabTestScenario.java 21 Aug 2006 00:26:29 -0000 1.2 --- LabTestScenario.java 29 Aug 2006 21:10:32 -0000 1.3 *************** *** 36,48 **** /** ! * Actually create a lab test at the start time (we ignore endTime). */ public boolean apply(GenMedical patient, Date startTime, Date endTime, RandomData rng ) { ! double value = getValueGen().generate(rng); ! String stringValue = nf.format(value); ! patient.generateLabResult( startTime, test, test, value, stringValue, units, null, null ); return true; } ! public ValueGen getValueGen() { return valueGen; --- 36,62 ---- /** ! * Actually create a lab test at the start time (we ignore endTime). Also add to new activity if newer than 30 days old. */ public boolean apply(GenMedical patient, Date startTime, Date endTime, RandomData rng ) { ! LabTest labTest = generateTest(startTime, rng ); ! patient.generateLabResult( test, labTest, 30 ); return true; } ! /** ! * Create a representation of the test instance with the value we want to see. ! * @param startTime ! * @param rng ! * @return ! */ ! public LabTest generateTest( Date startTime, RandomData rng ) { ! LabTest labTest = new LabTest(); ! labTest.setValue( getValueGen().generate(rng) ); ! labTest.setStringValue( nf.format(labTest.getValue())); ! labTest.setEffectiveTime(startTime); ! labTest.setTestName(test); ! labTest.setUnits(units); ! return labTest; ! } ! public ValueGen getValueGen() { return valueGen; Index: DiabetesGen.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean/DiabetesGen.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DiabetesGen.java 29 Aug 2006 07:36:43 -0000 1.7 --- DiabetesGen.java 29 Aug 2006 21:10:32 -0000 1.8 *************** *** 39,54 **** Scenario podiatry = new RadiologyScenario( "Foot Exam", "No abnormality noted on either foot.", "Normal"); Scenario eagerLab = new GroupScenario("0.50 scenario in Diabetes", new Scenario[] { ! new LabTestScenario("hemoglobin A1C test", "%", "7 (or less)", 1, new GaussianValueGen( 6.0, rng.nextUniform(0.5, 1.3)) ), ! new LabTestScenario("Creatinine", "mg/dL", "0.9 to 1.4 mg/dL", 1, new GaussianValueGen( 1.2, rng.nextUniform(0.1, 0.3)) ), new LabTestScenario("low-density lipoprotein (LDL)", "mg/dL", ">100 mg/dL", 0, new GaussianValueGen( 85.0, rng.nextUniform(10.0, 20.0)) ), ! new LabTestScenario("triglycerides", "mg/dL", ">150 mg/dL", 0, new GaussianValueGen( 140.0, rng.nextUniform(5.0, 15.0)) ), ! new LabTestScenario("urine albumin", "mcg", ">30 mcg", 0, new GaussianValueGen( 29.0, rng.nextUniform(4.0, 7.0)) ) }); Scenario lazyLab = new GroupScenario("0.25 scenario in Diabetes", new Scenario[] { ! new LabTestScenario("hemoglobin A1C test", "%", "7 (or less)", 1, new GaussianValueGen( 9.0, rng.nextUniform(1.0, 3.5)) ), ! new LabTestScenario("Creatinine", "mg/dL", "0.9 to 1.4 mg/dL", 1, new GaussianValueGen( 1.1, rng.nextUniform(0.3, 0.7)) ), new LabTestScenario("low-density lipoprotein (LDL)", "mg/dL", ">100 mg/dL", 0, new GaussianValueGen( 165.0, rng.nextUniform(10.0, 40.0)) ), ! new LabTestScenario("triglycerides", "mg/dL", ">150 mg/dL", 0, new GaussianValueGen( 180.0, rng.nextUniform(15.0, 28.0)) ), ! new LabTestScenario("urine albumin", "mcg", ">30 mcg", 0, new GaussianValueGen( 35.0, rng.nextUniform(5.1, 11.2)) ) }); // Specify the scenario here. --- 39,58 ---- Scenario podiatry = new RadiologyScenario( "Foot Exam", "No abnormality noted on either foot.", "Normal"); Scenario eagerLab = new GroupScenario("0.50 scenario in Diabetes", new Scenario[] { ! new LabTestScenario("hemoglobin A1C test", "%", "7 (or less)", 1, new GaussianValueGen( 6.0, rng.nextUniform(0.5, 1.3)) ), ! new LabTestScenario("Creatinine", "mg/dL", "0.9 to 1.4 mg/dL", 1, new GaussianValueGen( 1.2, rng.nextUniform(0.1, 0.3)) ), ! new BatteryScenario( "Cholesterol, Total", new Scenario[] { new LabTestScenario("low-density lipoprotein (LDL)", "mg/dL", ">100 mg/dL", 0, new GaussianValueGen( 85.0, rng.nextUniform(10.0, 20.0)) ), ! new LabTestScenario("triglycerides", "mg/dL", ">150 mg/dL", 0, new GaussianValueGen( 140.0, rng.nextUniform(5.0, 15.0)) ) ! }), ! new LabTestScenario("urine albumin", "mcg", ">30 mcg", 0, new GaussianValueGen( 29.0, rng.nextUniform(4.0, 7.0)) ) }); Scenario lazyLab = new GroupScenario("0.25 scenario in Diabetes", new Scenario[] { ! new LabTestScenario("hemoglobin A1C test", "%", "7 (or less)", 1, new GaussianValueGen( 9.0, rng.nextUniform(1.0, 3.5)) ), ! new LabTestScenario("Creatinine", "mg/dL", "0.9 to 1.4 mg/dL", 1, new GaussianValueGen( 1.1, rng.nextUniform(0.3, 0.7)) ), ! new BatteryScenario( "Cholesterol, Total", new Scenario[] { new LabTestScenario("low-density lipoprotein (LDL)", "mg/dL", ">100 mg/dL", 0, new GaussianValueGen( 165.0, rng.nextUniform(10.0, 40.0)) ), ! new LabTestScenario("triglycerides", "mg/dL", ">150 mg/dL", 0, new GaussianValueGen( 180.0, rng.nextUniform(15.0, 28.0)) ) ! }), ! new LabTestScenario("urine albumin", "mcg", ">30 mcg", 0, new GaussianValueGen( 35.0, rng.nextUniform(5.1, 11.2)) ) }); // Specify the scenario here. --- NEW FILE: BatteryScenario.java --- package org.tolven.gen.bean; import java.util.Date; import org.apache.commons.math.random.RandomData; /** * A battery is almost the same as a group scenario except that a battery creates a * manifestation of the group in the output which a group is only a group relative to * the input side. * Functionally, a battery is a group of tests ordered together, usually taken from a single * specimen collection event. * @author John Churin * */ public class BatteryScenario extends GroupScenario { public BatteryScenario( String title, Scenario[] scenarios ) { super( title, scenarios ); } /** * Apply a battery of tests. The test is asked to return it's result to us rather than * generating a result independently. This way, we control the overall creation process. * Only the first test in the group triggers an entry on the new activity list (if it is less than 30 days old). * @param patient * @param startTime * @param endTime * @param rng * @return Return true if at least one of the child scenarios did something (returned true), otherwise false. */ public boolean apply(GenMedical patient, Date startTime, Date endTime, RandomData rng ) { boolean rslt = false; int showNewActivity = 30; for ( Scenario s : getScenarios()) { LabTest test = ((LabTestScenario)s).generateTest(startTime, rng ); patient.generateLabResult(getTitle(), test, showNewActivity); showNewActivity = 0; } return rslt; } } |
From: John C. <jc...@us...> - 2006-08-29 07:40:55
|
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32307/web/five Modified Files: dispats.xhtml Log Message: A page can now specify, per sort column, which column values should be supressed when the value is duplicated. Index: dispats.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/dispats.xhtml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dispats.xhtml 25 Aug 2006 15:00:37 -0000 1.4 --- dispats.xhtml 29 Aug 2006 07:40:52 -0000 1.5 *************** *** 14,18 **** dispatsGridz = new Rico.LiveGrid( 'dispatsGrid', 15, #{menu.menuDataCount}, 'menuData.ajax', ! {prefetchBuffer: true, tableClass: 'dataGrid', largeBufferSize: 4.0, --- 14,18 ---- dispatsGridz = new Rico.LiveGrid( 'dispatsGrid', 15, #{menu.menuDataCount}, 'menuData.ajax', ! {prefetchBuffer: false, tableClass: 'dataGrid', largeBufferSize: 4.0, *************** *** 21,26 **** loadingClass: 'dataGridLoading', sortAscendImg: '../images/sort_asc.gif', ! sortDescendImg:'../images/sort_desc.gif'}); ! prevdispatsFilterValue = ''; prevdiseaseFilterValue = ''; --- 21,33 ---- loadingClass: 'dataGridLoading', sortAscendImg: '../images/sort_asc.gif', ! sortDescendImg:'../images/sort_desc.gif'}); ! dispatsGridz.setSupressColumnRange( 0, 3); ! dispatsGridz.addSortSupressColumn( 'name', 0, 3); ! dispatsGridz.addSortSupressColumn( 'age', 0, 3); ! dispatsGridz.addSortSupressColumn( 'sex', 0, 3); ! dispatsGridz.addSortSupressColumn( 'disease', 3, 4); ! dispatsGridz.addSortSupressColumn( 'onset', 4, 5); ! dispatsGridz.requestContentRefresh(0); ! prevdispatsFilterValue = ''; prevdiseaseFilterValue = ''; |
From: John C. <jc...@us...> - 2006-08-29 07:40:55
|
Update of /cvsroot/tolven/tolvenWEB/web/scripts In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32307/web/scripts Modified Files: rico.js Log Message: A page can now specify, per sort column, which column values should be supressed when the value is duplicated. Index: rico.js =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/scripts/rico.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rico.js 31 Jul 2006 02:09:28 -0000 1.2 --- rico.js 29 Aug 2006 07:40:52 -0000 1.3 *************** *** 2144,2148 **** } }, ! bufferChanged: function() { this.refreshContents( parseInt(this.lastPixelOffset / this.rowHeight)); --- 2144,2163 ---- } }, ! ! populateSupressedRow: function(htmlRow, row) { ! for (var j=0; j < row.length; j++) { ! if (j >= this.liveGrid.supressLow && j < this.liveGrid.supressHigh ) htmlRow.cells[j].innerHTML = ' '; ! else htmlRow.cells[j].innerHTML = row[j]; ! } ! }, ! ! getRowContent: function(row) { ! var content = ""; ! for (var j=this.liveGrid.supressLow; j < this.liveGrid.supressHigh; j++) { ! content = content + row[j]; ! } ! return content; ! }, ! bufferChanged: function() { this.refreshContents( parseInt(this.lastPixelOffset / this.rowHeight)); *************** *** 2186,2192 **** var blankOffset = viewPrecedesBuffer ? 0: rowSize; var contentOffset = viewPrecedesBuffer ? blankSize: 0; ! for (var i=0; i < rows.length; i++) {//initialize what we have ! this.populateRow(this.table.rows[i + contentOffset], rows[i]); } for (var i=0; i < blankSize; i++) {// blank out the rest --- 2201,2211 ---- var blankOffset = viewPrecedesBuffer ? 0: rowSize; var contentOffset = viewPrecedesBuffer ? blankSize: 0; ! var rowContent; // Tolven ! var prevRowContent = ""; // Tolven for (var i=0; i < rows.length; i++) {//initialize what we have ! rowContent = this.getRowContent(rows[i]); // Tolven ! if (rowContent!=prevRowContent) this.populateRow(this.table.rows[i + contentOffset], rows[i]); // Tolven ! else this.populateSupressedRow(this.table.rows[i + contentOffset], rows[i]); // Tolven ! prevRowContent = rowContent; // Tolven } for (var i=0; i < blankSize; i++) {// blank out the rest *************** *** 2234,2238 **** initialize: function( tableId, visibleRows, totalRows, url, options, ajaxOptions ) { ! this.options = { tableClass: $(tableId).className, --- 2253,2259 ---- initialize: function( tableId, visibleRows, totalRows, url, options, ajaxOptions ) { ! this.sortSupress = new Array(); ! this.supressLow = 0; // Tolven ! this.supressHigh = 0; // Tolven this.options = { tableClass: $(tableId).className, *************** *** 2292,2296 **** } }, ! addLiveGridHtml: function() { // Check to see if need to create a header table. --- 2313,2328 ---- } }, ! ! setSupressColumnRange: function( l, h ) { ! this.supressLow = l; // Tolven ! this.supressHigh = h; // Tolven ! }, ! ! addSortSupressColumn: function( n, l, h ) { ! this.sortSupress[n] = new Object(); ! this.sortSupress[n].low = l; ! this.sortSupress[n].high = h; ! }, ! addLiveGridHtml: function() { // Check to see if need to create a header table. *************** *** 2314,2318 **** }, - resetContents: function() { this.scroller.moveScroll(0); --- 2346,2349 ---- *************** *** 2325,2329 **** this.sortCol = column.name; this.sortDir = column.currentSort; ! this.resetContents(); this.requestContentRefresh(0) --- 2356,2365 ---- this.sortCol = column.name; this.sortDir = column.currentSort; ! // Reset supress columns based on sort column ! var s = this.sortSupress[column.name]; ! if (s!=null) { ! this.setSupressColumnRange( s.low, s.high ); ! } ! // alert( "name: " + column.name + " current sort: " + column.currentSort); this.resetContents(); this.requestContentRefresh(0) |
From: John C. <jc...@us...> - 2006-08-29 07:36:45
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30634/src/org/tolven/gen/bean Modified Files: DiabetesGen.java Log Message: Add randomness to the degreee of variability of test results Index: DiabetesGen.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean/DiabetesGen.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DiabetesGen.java 24 Aug 2006 07:57:06 -0000 1.6 --- DiabetesGen.java 29 Aug 2006 07:36:43 -0000 1.7 *************** *** 39,54 **** Scenario podiatry = new RadiologyScenario( "Foot Exam", "No abnormality noted on either foot.", "Normal"); Scenario eagerLab = new GroupScenario("0.50 scenario in Diabetes", new Scenario[] { ! new LabTestScenario("hemoglobin A1C test", "%", "7 (or less)", 1, new GaussianValueGen( 6.0, 1.2) ), ! new LabTestScenario("Creatinine", "mg/dL", "0.9 to 1.4 mg/dL", 1, new GaussianValueGen( 1.2, 0.2) ), ! new LabTestScenario("low-density lipoprotein (LDL)", "mg/dL", ">100 mg/dL", 0, new GaussianValueGen( 85.0, 15.0) ), ! new LabTestScenario("triglycerides", "mg/dL", ">150 mg/dL", 0, new GaussianValueGen( 140.0, 10.0) ), ! new LabTestScenario("urine albumin", "mcg", ">30 mcg", 0, new GaussianValueGen( 29.0, 6.0) ) }); Scenario lazyLab = new GroupScenario("0.25 scenario in Diabetes", new Scenario[] { ! new LabTestScenario("hemoglobin A1C test", "%", "7 (or less)", 1, new GaussianValueGen( 9.0, 3.0) ), ! new LabTestScenario("Creatinine", "mg/dL", "0.9 to 1.4 mg/dL", 1, new GaussianValueGen( 1.1, 0.4) ), ! new LabTestScenario("low-density lipoprotein (LDL)", "mg/dL", ">100 mg/dL", 0, new GaussianValueGen( 165.0, 35.0) ), ! new LabTestScenario("triglycerides", "mg/dL", ">150 mg/dL", 0, new GaussianValueGen( 180.0, 20.0) ), ! new LabTestScenario("urine albumin", "mcg", ">30 mcg", 0, new GaussianValueGen( 35.0, 8.0) ) }); // Specify the scenario here. --- 39,54 ---- Scenario podiatry = new RadiologyScenario( "Foot Exam", "No abnormality noted on either foot.", "Normal"); Scenario eagerLab = new GroupScenario("0.50 scenario in Diabetes", new Scenario[] { ! new LabTestScenario("hemoglobin A1C test", "%", "7 (or less)", 1, new GaussianValueGen( 6.0, rng.nextUniform(0.5, 1.3)) ), ! new LabTestScenario("Creatinine", "mg/dL", "0.9 to 1.4 mg/dL", 1, new GaussianValueGen( 1.2, rng.nextUniform(0.1, 0.3)) ), ! new LabTestScenario("low-density lipoprotein (LDL)", "mg/dL", ">100 mg/dL", 0, new GaussianValueGen( 85.0, rng.nextUniform(10.0, 20.0)) ), ! new LabTestScenario("triglycerides", "mg/dL", ">150 mg/dL", 0, new GaussianValueGen( 140.0, rng.nextUniform(5.0, 15.0)) ), ! new LabTestScenario("urine albumin", "mcg", ">30 mcg", 0, new GaussianValueGen( 29.0, rng.nextUniform(4.0, 7.0)) ) }); Scenario lazyLab = new GroupScenario("0.25 scenario in Diabetes", new Scenario[] { ! new LabTestScenario("hemoglobin A1C test", "%", "7 (or less)", 1, new GaussianValueGen( 9.0, rng.nextUniform(1.0, 3.5)) ), ! new LabTestScenario("Creatinine", "mg/dL", "0.9 to 1.4 mg/dL", 1, new GaussianValueGen( 1.1, rng.nextUniform(0.3, 0.7)) ), ! new LabTestScenario("low-density lipoprotein (LDL)", "mg/dL", ">100 mg/dL", 0, new GaussianValueGen( 165.0, rng.nextUniform(10.0, 40.0)) ), ! new LabTestScenario("triglycerides", "mg/dL", ">150 mg/dL", 0, new GaussianValueGen( 180.0, rng.nextUniform(15.0, 28.0)) ), ! new LabTestScenario("urine albumin", "mcg", ">30 mcg", 0, new GaussianValueGen( 35.0, rng.nextUniform(5.1, 11.2)) ) }); // Specify the scenario here. |
From: John C. <jc...@us...> - 2006-08-29 07:35:33
|
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30215/web/five Modified Files: personal.xhtml Log Message: Add missing spacer Index: personal.xhtml =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/five/personal.xhtml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** personal.xhtml 28 Aug 2006 19:37:40 -0000 1.1 --- personal.xhtml 29 Aug 2006 07:35:30 -0000 1.2 *************** *** 17,20 **** --- 17,22 ---- <h:outputText value="Last Name:"/> <h:outputText value="#{menu.docCCR.patientActor.person.name.currentName.family[0]}"/> + <h:panelGroup><hr/></h:panelGroup> + <h:panelGroup><hr/></h:panelGroup> <h:outputText value="Date of Birth:"/> <h:outputText value="#{menu.docCCR.patientActor.person.dateOfBirth.exactDateTime}"/> *************** *** 41,46 **** </h:panelGrid> <h:outputText value="#{menu.docCCR.patientActor.actorObjectID}"/> - - </ui:composition> --- 43,46 ---- |
From: John C. <jc...@us...> - 2006-08-28 21:39:29
|
Update of /cvsroot/tolven/tolven/lib/jaxb/lib In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9198/lib/jaxb/lib Modified Files: jaxb-impl.jar jaxb1-impl.jar jaxb-xjc.jar Log Message: Update to 2.0.2 GA release Index: jaxb-impl.jar =================================================================== RCS file: /cvsroot/tolven/tolven/lib/jaxb/lib/jaxb-impl.jar,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsjus84r and /tmp/cvsKx7Jjw differ Index: jaxb1-impl.jar =================================================================== RCS file: /cvsroot/tolven/tolven/lib/jaxb/lib/jaxb1-impl.jar,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsL676xv and /tmp/cvsu6ijWz differ Index: jaxb-xjc.jar =================================================================== RCS file: /cvsroot/tolven/tolven/lib/jaxb/lib/jaxb-xjc.jar,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsf3dBWD and /tmp/cvshWpBHI differ |
From: John C. <jc...@us...> - 2006-08-28 19:38:08
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/org/tolven/gen/bean Modified Files: GenMedical.java CHRGeneratorBean.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: GenMedical.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean/GenMedical.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GenMedical.java 24 Aug 2006 08:02:17 -0000 1.8 --- GenMedical.java 28 Aug 2006 19:37:36 -0000 1.9 *************** *** 23,26 **** --- 23,27 ---- import org.tolven.app.entity.MenuStructure; import org.tolven.core.entity.Account; + import org.tolven.core.entity.TolvenUser; import org.tolven.gen.entity.VirtualPerson; *************** *** 35,38 **** --- 36,40 ---- private MenuLocal menu; private VirtualPerson vp; + private TolvenUser user; private int startYear; MenuStructure msProblem; *************** *** 53,57 **** * @param now */ ! public GenMedical ( MenuLocal menu, MenuData patient, Date now, VirtualPerson vp, int startYear, CHRGeneratorBean chrGen) { this.menu = menu; this.patient = patient; --- 55,59 ---- * @param now */ ! public GenMedical ( MenuLocal menu, MenuData patient, Date now, VirtualPerson vp, int startYear, CHRGeneratorBean chrGen, TolvenUser user) { this.menu = menu; this.patient = patient; *************** *** 60,63 **** --- 62,66 ---- this.startYear = startYear; this.chrGen = chrGen; + this.user = user; msProblem = menu.findMenuStructure( patient.getAccount().getId(), "echr:patient:problems"); msProblemSum = menu.findMenuStructure( patient.getAccount().getId(), "echr:patient:overview:summary:probsum"); *************** *** 543,546 **** --- 546,555 ---- return vp; } + public TolvenUser getUser() { + return user; + } + public void setUser(TolvenUser user) { + this.user = user; + } Index: CHRGeneratorBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/bean/CHRGeneratorBean.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CHRGeneratorBean.java 21 Aug 2006 00:26:29 -0000 1.5 --- CHRGeneratorBean.java 28 Aug 2006 19:37:36 -0000 1.6 *************** *** 14,17 **** --- 14,19 ---- package org.tolven.gen.bean; + import java.io.IOException; + import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; *************** *** 28,31 **** --- 30,34 ---- import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; + import javax.xml.bind.JAXBException; import org.apache.commons.math.random.RandomData; *************** *** 34,40 **** --- 37,51 ---- import org.tolven.app.entity.MenuData; import org.tolven.app.entity.MenuStructure; + import org.tolven.ccr.ActorType; + import org.tolven.ccr.CodedDescriptionType; + import org.tolven.ccr.DateTimeType; + import org.tolven.ccr.PersonNameType; + import org.tolven.ccr.ActorType.Address; import org.tolven.core.AccountDAOLocal; import org.tolven.core.entity.Account; import org.tolven.core.entity.TolvenUser; + import org.tolven.doc.DocumentLocal; + import org.tolven.doc.entity.CCRException; + import org.tolven.doc.entity.DocCCR; import org.tolven.gen.CHRGenerator; import org.tolven.gen.PersonGenerator; *************** *** 64,70 **** --- 75,85 ---- private PersonGenerator personGen; + @EJB + private DocumentLocal documentLocal; + private GeneratePlace placeGenerator; private RandomData rng; private List<GenSource> criteria = null; + private static SimpleDateFormat iso8601d = new SimpleDateFormat("yyyy-MM-dd"); public CHRGeneratorBean( ) { *************** *** 104,108 **** // Make sure this user is a member of the new account accountBean.addAccountUser(account, user, now, true); ! createPatients( account, count, now, startYear ); } --- 119,123 ---- // Make sure this user is a member of the new account accountBean.addAccountUser(account, user, now, true); ! createPatients( user, account, count, now, startYear ); } *************** *** 116,120 **** * @throws Exception */ ! public void createPatients( Account account, int count, Date now, int startYear ) throws Exception { ArrayList<VirtualPerson> mothers = new ArrayList<VirtualPerson>( count/2 ); LinkedList<VirtualPerson> fathers = new LinkedList<VirtualPerson>( ); --- 131,135 ---- * @throws Exception */ ! public void createPatients( TolvenUser user, Account account, int count, Date now, int startYear ) throws Exception { ArrayList<VirtualPerson> mothers = new ArrayList<VirtualPerson>( count/2 ); LinkedList<VirtualPerson> fathers = new LinkedList<VirtualPerson>( ); *************** *** 150,159 **** if (father!=null) { // And in this case, mom's name changes to dad's (just imply marriage) mother.setLast( father.getLast() ); family.setFamilyName( father.getLast() ); ! registerPatient( account, father, now, startYear ); System.out.println( "Registered father: " + father.getLast() + " " + father.getFirst()); } ! registerPatient( account, mother, now, startYear ); } --- 165,175 ---- if (father!=null) { // And in this case, mom's name changes to dad's (just imply marriage) + mother.setMaiden( mother.getLast() ); mother.setLast( father.getLast() ); family.setFamilyName( father.getLast() ); ! registerPatient( user, account, father, family, now, startYear ); System.out.println( "Registered father: " + father.getLast() + " " + father.getFirst()); } ! registerPatient( user, account, mother, family, now, startYear ); } *************** *** 163,168 **** placeGenerator.generateZipCode(family); placeGenerator.generateAddress(family); ! family.setFamilyName( father.getLast() ); // Temporary if/until we get a father ! registerPatient( account, father, now, startYear ); } } --- 179,184 ---- placeGenerator.generateZipCode(family); placeGenerator.generateAddress(family); ! family.setFamilyName( father.getLast() ); ! registerPatient( user, account, father, family, now, startYear ); } } *************** *** 179,183 **** start.setTime( dob ); System.out.print( "Registering baby: " + person.getDob()); ! registerPatient( mother.getAccount(), person, mother.getNow(), start.get(GregorianCalendar.YEAR) ); } catch (Exception e) { // forget it if there's a problem --- 195,199 ---- start.setTime( dob ); System.out.print( "Registering baby: " + person.getDob()); ! registerPatient( mother.getUser(), mother.getAccount(), person, null, mother.getNow(), start.get(GregorianCalendar.YEAR) ); } catch (Exception e) { // forget it if there's a problem *************** *** 189,197 **** * @param account * @param vp */ ! public void registerPatient( Account account, VirtualPerson vp, Date now, int startYear ) { initCriteria(); if (vp.getDob().after(now)) return; if (vp.getDod() != null && vp.getDod().before(now)) return; // The generic, free-floating patient menu structure MenuStructure mspat = menu.findMenuStructure( account.getId(), "echr:patient"); --- 205,262 ---- * @param account * @param vp + * @throws CCRException + * @throws IOException + * @throws JAXBException */ ! public void registerPatient( TolvenUser user, Account account, VirtualPerson vp, FamilyUnit family, Date now, int startYear ) throws IOException, CCRException, JAXBException { initCriteria(); if (vp.getDob().after(now)) return; if (vp.getDod() != null && vp.getDod().before(now)) return; + + // Create the CCR document describing the patient. + DocCCR ccr = documentLocal.createCCRDocument(user.getId()); + ActorType pat = ccr.addNewPatient(); + ActorType.Person person = new ActorType.Person(); + ActorType.Person.Name name = new ActorType.Person.Name(); + PersonNameType pnt = new PersonNameType(); + pnt.getGiven().add(vp.getFirst()); + pnt.getMiddle().add(vp.getMiddle()); + pnt.getFamily().add(vp.getLast()); + name.setCurrentName(pnt); + person.setName(name); + pat.setPerson(person); + if (vp.getMaiden()!=null) { + PersonNameType pntb = new PersonNameType(); + pntb.getGiven().add(vp.getFirst()); + pntb.getMiddle().add(vp.getMiddle()); + pntb.getFamily().add(vp.getMaiden()); + name.setBirthName(pntb); + } + if (family!=null) { + Address address = new Address(); + address.setLine1(family.getAddress()); + address.setCity(family.getCity()); + address.setState(family.getState()); + address.setPostalCode(family.getZip()); + address.setCountry("USA"); + pat.getAddress().add(address); + } + if (vp.getDob()!=null) { + DateTimeType dob = new DateTimeType(); + dob.setExactDateTime(iso8601d.format(vp.getDob()) ); + person.setDateOfBirth(dob); + } + if ("M".equals(vp.getGender())) { + CodedDescriptionType genderCode = new CodedDescriptionType(); + genderCode.setText("Male"); + person.setGender(genderCode); + } + if ("F".equals(vp.getGender())) { + CodedDescriptionType genderCode = new CodedDescriptionType(); + genderCode.setText("Female"); + person.setGender(genderCode); + } + documentLocal.persistCCRDocument(ccr); + // The generic, free-floating patient menu structure MenuStructure mspat = menu.findMenuStructure( account.getId(), "echr:patient"); *************** *** 199,202 **** --- 264,268 ---- MenuData mdpat = new MenuData(); mdpat.setMenuStructure( mspat ); + mdpat.setDocument(ccr); mdpat.setDate01( vp.getDob()); mdpat.setString01(vp.getLast()); *************** *** 210,213 **** --- 276,280 ---- MenuData mdpats = new MenuData(); mdpats.setMenuStructure( mspats ); + mdpats.setDocument(ccr); mdpats.setDate01( mdpat.getDate01()); mdpats.setString01(mdpat.getString01()); *************** *** 219,223 **** menu.persistMenuData(mdpats); // OK, nice start but let's give this person some medical data. ! GenMedical genMed = new GenMedical( menu, mdpat, now, vp, startYear, this); genMed.generateNewPatient(); for (GenSource gs: criteria) { --- 286,290 ---- menu.persistMenuData(mdpats); // OK, nice start but let's give this person some medical data. ! GenMedical genMed = new GenMedical( menu, mdpat, now, vp, startYear, this, user); genMed.generateNewPatient(); for (GenSource gs: criteria) { |
From: John C. <jc...@us...> - 2006-08-28 19:37:42
|
Update of /cvsroot/tolven/tolvenWEB/src/org/tolven/web In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23195/src/org/tolven/web Modified Files: MenuAction.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: MenuAction.java =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/src/org/tolven/web/MenuAction.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** MenuAction.java 21 Aug 2006 02:59:37 -0000 1.17 --- MenuAction.java 28 Aug 2006 19:37:40 -0000 1.18 *************** *** 44,47 **** --- 44,49 ---- import org.tolven.app.entity.MenuData; import org.tolven.app.entity.MenuStructure; + import org.tolven.doc.entity.DocBase; + import org.tolven.doc.entity.DocCCR; /** * Faces Action Bean concerned with menu configuration and display. Note that menus include both metadata (MenuStructure) and *************** *** 59,62 **** --- 61,66 ---- private long accountId = 0; private MenuStructure ms; + private MenuData menuDataItem = null; + private List<MenuStructure> menus = null; *************** *** 240,251 **** */ public MenuData getMenuDataItem( ) throws Exception { ! MenuQueryControl ctrl = new MenuQueryControl(); ! ctrl.setMenuStructure( getThisMenu() ); ! ctrl.setNow( getNow()); ! ctrl.setOriginalTargetPath( getTargetMenuPath() ); ! ctrl.setRequestedPath( getTargetMenuPath() ); ! return menuLocal.findMenuDataItem( ctrl ); } /** * Creates a chart based on MenuData --- 244,273 ---- */ public MenuData getMenuDataItem( ) throws Exception { ! if (menuDataItem==null) { ! MenuQueryControl ctrl = new MenuQueryControl(); ! ctrl.setMenuStructure( getThisMenu() ); ! ctrl.setNow( getNow()); ! ctrl.setOriginalTargetPath( getTargetMenuPath() ); ! ctrl.setRequestedPath( getTargetMenuPath() ); ! menuDataItem = menuLocal.findMenuDataItem( ctrl ); ! } ! return menuDataItem; } + public DocCCR getDocCCR( ) throws Exception { + MenuData md = getMenuDataItem(); + System.out.println( "[getDocCCR] MD.id=" + md.getId()); + DocBase doc = md.getDocument(); + if (doc==null) { + // System.out.println( "No Document in MD"); + return null; + } + if (!(doc instanceof DocCCR)) { + System.out.println( "Document is not CCR " + doc.getId() + " Class: " + doc.getClass().getName()); + return null; + } + return (DocCCR) doc; + } + /** * Creates a chart based on MenuData |
From: John C. <jc...@us...> - 2006-08-28 19:37:42
|
Update of /cvsroot/tolven/tolvenWEB/web/five In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23195/web/five Added Files: xml.xhtml personal.xhtml Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. --- NEW FILE: personal.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>Patient Demographics</title> </head> <body> <ui:composition> <h:panelGrid columns="2"> <h:outputText value="First Name:"/> <h:outputText value="#{menu.docCCR.patientActor.person.name.currentName.given[0]}"/> <h:outputText value="Middle:"/> <h:outputText value="#{menu.docCCR.patientActor.person.name.currentName.middle[0]}"/> <h:outputText value="Last Name:"/> <h:outputText value="#{menu.docCCR.patientActor.person.name.currentName.family[0]}"/> <h:outputText value="Date of Birth:"/> <h:outputText value="#{menu.docCCR.patientActor.person.dateOfBirth.exactDateTime}"/> <h:panelGroup><hr/></h:panelGroup> <h:panelGroup><hr/></h:panelGroup> <h:outputText value="Gender:"/> <h:outputText value="#{menu.docCCR.patientActor.person.gender.text}"/> <h:panelGroup><hr/></h:panelGroup> <h:panelGroup><hr/></h:panelGroup> <h:outputText value="Address line 1:"/> <h:outputText value="#{menu.docCCR.patientActor.address[0].line1}"/> <h:outputText value="Address line 2:"/> <h:outputText value="#{menu.docCCR.patientActor.address[0].line2}"/> <h:outputText value="City:"/> <h:outputText value="#{menu.docCCR.patientActor.address[0].city}"/> <h:outputText value="State/Province:"/> <h:outputText value="#{menu.docCCR.patientActor.address[0].state}"/> <h:outputText value="Country:"/> <h:outputText value="#{menu.docCCR.patientActor.address[0].country}"/> <h:outputText value="Zip/Postal Code:"/> <h:outputText value="#{menu.docCCR.patientActor.address[0].postalCode}"/> <h:panelGroup><hr/></h:panelGroup> <h:panelGroup><hr/></h:panelGroup> </h:panelGrid> <h:outputText value="#{menu.docCCR.patientActor.actorObjectID}"/> </ui:composition> </body> </html> --- NEW FILE: xml.xhtml --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core"> <head> <title>List of a patients problems</title> </head> <body> <ui:composition> Document: #{menu.menuDataItem.document.id} <pre> #{menu.menuDataItem.document.contentString} </pre> </ui:composition> </body> </html> |
From: John C. <jc...@us...> - 2006-08-28 19:37:39
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/doc/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/org/tolven/doc/entity Modified Files: DocBase.java Added Files: CCRException.java DocXML.java DocCCR.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: DocBase.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/doc/entity/DocBase.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DocBase.java 21 Aug 2006 00:26:30 -0000 1.4 --- DocBase.java 28 Aug 2006 19:37:36 -0000 1.5 *************** *** 14,21 **** --- 14,27 ---- package org.tolven.doc.entity; + import java.io.IOException; import java.io.Serializable; + import java.io.StringReader; + import java.io.StringWriter; import javax.persistence.Basic; import javax.persistence.Column; + import javax.persistence.DiscriminatorColumn; + import javax.persistence.DiscriminatorType; + import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.FetchType; *************** *** 23,33 **** --- 29,49 ---- import javax.persistence.GenerationType; import javax.persistence.Id; + import javax.persistence.Inheritance; + import javax.persistence.InheritanceType; import javax.persistence.Lob; import javax.persistence.ManyToOne; import javax.persistence.Table; + import javax.xml.bind.JAXBContext; + import javax.xml.bind.JAXBElement; + import javax.xml.bind.JAXBException; + import javax.xml.bind.Marshaller; + import javax.xml.bind.Unmarshaller; + import javax.xml.namespace.QName; + import javax.xml.transform.stream.StreamSource; import org.apache.commons.codec.binary.Base64; import org.tolven.core.entity.TolvenUser; + /** * A Document managed by Tolven. *************** *** 36,49 **** @Entity @Table(name = "DOCUMENT", schema="doc") public class DocBase implements Serializable { ! @Id @GeneratedValue(strategy=GenerationType.TABLE, generator="DOC_SEQ_GEN") private long id; ! @ManyToOne TolvenUser author; ! @ManyToOne private SubjectLink subjectLink; --- 52,73 ---- @Entity @Table(name = "DOCUMENT", schema="doc") + @Inheritance(strategy=InheritanceType.SINGLE_TABLE) + @DiscriminatorColumn(name="DISC", discriminatorType=DiscriminatorType.STRING,length=10) + @DiscriminatorValue("DOC") public class DocBase implements Serializable { ! /** ! * Version number used for serialization ! */ ! private static final long serialVersionUID = 2L; ! ! @Id @GeneratedValue(strategy=GenerationType.TABLE, generator="DOC_SEQ_GEN") private long id; ! @ManyToOne(fetch=FetchType.LAZY) TolvenUser author; ! @ManyToOne(fetch=FetchType.LAZY) private SubjectLink subjectLink; *************** *** 51,54 **** --- 75,81 ---- private String mediaType; + @Column(name="STATUS") + private String status; + @Lob @Basic(fetch=FetchType.LAZY) *************** *** 61,65 **** public DocBase() { } ! public boolean equals(Object obj) { if (!(obj instanceof DocBase)) return false; --- 88,92 ---- public DocBase() { } ! public boolean equals(Object obj) { if (!(obj instanceof DocBase)) return false; *************** *** 161,164 **** this.mediaType = mediaType; } ! } --- 188,205 ---- this.mediaType = mediaType; } ! /** ! * Either "NEW" or "ACTIVE". ! * @return ! */ ! public String getStatus() { ! return status; ! } ! ! public void setStatus(String status) { ! this.status = status; ! } ! ! public boolean isEditable() { ! return ("NEW".equals(getStatus())); ! } } --- NEW FILE: CCRException.java --- package org.tolven.doc.entity; public class CCRException extends Exception { public CCRException( String error ) { super( error); } } --- NEW FILE: DocXML.java --- /* * Copyright (C) 2006 Tolven Inc * * This library is free software; you can redistribute it and/or modify it under the terms of * the GNU Lesser General Public License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * Contact: in...@to... */ package org.tolven.doc.entity; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.util.HashMap; import java.util.Map; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.Transient; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import javax.xml.bind.Unmarshaller; import javax.xml.namespace.QName; import javax.xml.transform.stream.StreamSource; @Entity @DiscriminatorValue("XML") public class DocXML extends DocBase { /** * Version number used for serialization */ private static final long serialVersionUID = 2L; @Transient private Object binding; @Column(name="XML_NS") private String xmlNS; @Column(name="XML_NAME") private String xmlName; public DocXML() { } /** * Create a new XML-based document specifying the name and namespace of the * XSD defining the document. * @param name * @param nameSpace */ public DocXML(String name, String nameSpace) { this.setXmlName(name); this.setXmlNS(nameSpace); } private static Map<String, JAXBContext> jaxbContexts; /** * Create or use a JAXB context. We keep a map of already-used jindings in a static variable. * @return A JAXB context. * @throws JAXBException */ protected JAXBContext setupJAXBContext() throws JAXBException { if (getBindingContext()==null) throw new IllegalArgumentException( "JAXB binding context missing" ); JAXBContext jc; if (jaxbContexts==null) jaxbContexts = new HashMap<String, JAXBContext>( 4 ); if( jaxbContexts.containsKey(getBindingContext()) ) { jc = jaxbContexts.get(getBindingContext()); } else { jc = JAXBContext.newInstance( getBindingContext(), DocXML.class.getClassLoader() ); jaxbContexts.put(getBindingContext(), jc); } return jc; } /** * When non-null, specifies the XML to Java binding context. For example, "org.tolven.ccr" * or "org.tolven.rim". * The XmlNamespace attribute mut already be available. * @return */ public String getBindingContext() { String ns =getXmlNS(); if (ns==null) throw new IllegalArgumentException( "Namespace required to determine binding context" ); if ("urn:astm-org:CCR".equals(ns)) return "org.tolven.ccr"; return null; } /** * <p>When bindingContext is non-null, this method will unmarshal the XML content of the document * into an object graph and return the head of that graph. Subsequent calls to get the graph will * not unmarshal the XML again.</p> * <p>Since documents are immutable in most cases, modifying the returned graph will have no effect on the * document. However, the graph, modified or not, can in whole or in part be applied to another document. * </p> * @return * @throws JAXBException */ public Object getBinding() throws JAXBException { if (binding==null) { JAXBContext jc = setupJAXBContext(); Unmarshaller u = jc.createUnmarshaller(); binding = u.unmarshal( new StreamSource( new StringReader( getContentString() ) ) ); } return binding; } /** * Used for unit testing only */ public void resetBinding( ) { binding = null; } /** * This method will store an object graph as XML by marshalling the graph * using the specified BindingContext. This operation does the binding immediatly and may throw an exception * if the graph does not match the schema. Using this technique, the caller never sees any XML and must * only specify the binding context used to translate XML to java or java to XML. * @param binding * @throws JAXBException * @throws IOException */ public void setBinding(Object binding) throws JAXBException, IOException { if (getXmlNS()==null) throw new IllegalArgumentException( "XML Namespace required to marshall" ); if (getXmlName()==null) throw new IllegalArgumentException( "XML schema Name required to marshall" ); this.binding = binding; JAXBContext jc = setupJAXBContext(); JAXBElement root = new JAXBElement(new QName( getXmlNS(), getXmlName()), binding.getClass(), null, binding); Marshaller m = jc.createMarshaller(); m.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE ); // m.setProperty( Marshaller.JAXB_FRAGMENT, Boolean.TRUE ); // m.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, "http://xxx" ); StringWriter result = new StringWriter( 1000 ); m.marshal( root, result ); setContentString(result.toString()); result.close(); } public String getXmlName() { return xmlName; } public void setXmlName(String xmlName) { this.xmlName = xmlName; } public String getXmlNS() { return xmlNS; } public void setXmlNS(String xmlNS) { this.xmlNS = xmlNS; } } --- NEW FILE: DocCCR.java --- /* * Copyright (C) 2006 Tolven Inc * * This library is free software; you can redistribute it and/or modify it under the terms of * the GNU Lesser General Public License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * Contact: in...@to... */ package org.tolven.doc.entity; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.PrePersist; import javax.persistence.Transient; import javax.xml.bind.JAXBException; import org.tolven.ccr.ActorType; import org.tolven.ccr.ContinuityOfCareRecord; import org.tolven.rim.Patient; @Entity @DiscriminatorValue("CCR") public class DocCCR extends DocXML { /** * Version number used for serialization */ private static final long serialVersionUID = 2L; @Column(name="UNIQUEID_SEQ") private int uniqueIDSeq; @Transient private Map<String, ActorType> actors; @Transient private ContinuityOfCareRecord newCCR; public DocCCR() { super( "ContinuityOfCareRecord", "urn:astm-org:CCR"); } /** * We build and maintain a transient map of ActorType instances in the document. * Thus, when an object has an ActorLink, we can easily find the actor. * We keep this map up if we create another actor. * If the object graph already exists and this is the first time we've been asked for the actorMap, * then walk through the object graph to get the actors. * @return * @throws JAXBException */ public Map<String, ActorType> getActors() throws JAXBException { if (actors==null) { actors = new HashMap<String, ActorType>( 10 ); ContinuityOfCareRecord ccr = getCCR(); ContinuityOfCareRecord.Actors ccrActors = ccr.getActors(); if (ccrActors!=null) for (ActorType actor : ccrActors.getActor()) { actors.put(actor.getActorObjectID(), actor); } } return actors; } public void setActors(Map<String, ActorType> actors) { this.actors = actors; } /** * When creating a new node containing a unique ID, we assign a document-relative ID using this attribute. * This could almost be a transient attribute except that cocuments can be persisted before they are complete. * Once the document transitions to the active state, this number just represents the read-only highest number * created. * @return the current value of the unique sequence number. */ public int getUniqueIDSeq() { return uniqueIDSeq; } /** * Construct an ID string after incrementing the unique ID value. * @param prefix * @return the unique ID */ public String getNextId(String prefix) { setUniqueIDSeq(getUniqueIDSeq()+1); int id = getUniqueIDSeq(); return String.format("%s%06d", prefix, id); } public void setUniqueIDSeq(int uniqueIDSeq) { this.uniqueIDSeq = uniqueIDSeq; } /** * Get the CCR if there is one for this document. It will either be new in process (assuming a call was made to createCCR) or an unmarshalled * existing CCR from the content of this document. * @return * @throws JAXBException */ public ContinuityOfCareRecord getCCR() throws JAXBException { if (newCCR!=null) return newCCR; return (ContinuityOfCareRecord)getBinding(); } /** * Prior to persistence, if we have an object graph, we'll need to marshall it to XML. * This method sets (or resets) the actors list from the transient actors map we've kept internally. * The caller should normally not mess with the actors list in the object graph for that reason. * @throws JAXBException * @throws IOException * @throws CCRException */ public void validateAndMarshallXML() throws JAXBException, IOException, CCRException { if (newCCR==null) return; // Reset the actors list with the actors we now have in the transient map ContinuityOfCareRecord.Actors actors = new ContinuityOfCareRecord.Actors(); actors.getActor().addAll(getActors().values()); newCCR.setActors(actors); if (newCCR.getPatient().size()==0) throw new CCRException("Patient required A2.5.2.6(1)" ); // We're done with the graph, marshall to XML setBinding( newCCR ); } /** * The constructor for this class is not sufficient to create a CCR document. This method * actually create the document. * This method does the things needed to initialize a new CCR document. Creating a unique ID for the CCR document is * a bit of a catch 22 since we want to base it on the PK id of this document. We take care of this by persisting * immediately after the CCR document is created (although it still could be rollled back) but before this method is called. this yields us a valid Id to * use in order to identify this object. * We're not going to marshall this graph until we're all done and ready to persist the document. * So in the meantime, we remember the * graph in a a transient variable. We'll add the ID and marshall to XML when persisting. * @throws CCRException */ public void createCCR( String OID ) throws CCRException { if (getStatus()==null) setStatus("NEW"); checkEditable(); newCCR = new ContinuityOfCareRecord(); newCCR.setCCRDocumentObjectID(OID + "."+ Long.toString(getId()) ); newCCR.setVersion("V1.0"); } /** * A convenience method that finds the patient object which just contains an actorId and * then returns the actor. * @return the actor or null if no patient yet. * @throws JAXBException * @throws CCRException */ public ActorType getPatientActor() throws JAXBException, CCRException { ContinuityOfCareRecord ccr = getCCR(); if (ccr==null) { System.out.println( "No CCR"); return null; } List<ContinuityOfCareRecord.Patient> pats = ccr.getPatient(); if (pats.size()>1) throw new CCRException( "[tolven Compliance Issue]Siamese twins not supported" ); if (pats.size()==0) return null; ContinuityOfCareRecord.Patient pat = pats.get(0); ActorType actor = getActors().get(pat.getActorID()); if (actor==null) throw new CCRException( "Missing Actor for Patient A2.5.2.6(1)" ); // System.out.println( "PatientActor: " + actor.getActorObjectID()); return actor; } public void checkEditable() throws CCRException { if (!isEditable()) throw new CCRException( "Document must be in an editable state in order to modify its content"); } /** * Create a new actor. It should be referenced from at least one place in the * document. Use convenience methods such as addNewPatient instead of this method in most cases. * @return * @throws CCRException * @throws JAXBException */ public ActorType addNewActor( ) throws CCRException, JAXBException { checkEditable(); ActorType actor = new ActorType(); actor.setActorObjectID(getNextId("AC")); // Remember that we're storing actors at the Tolven document level until marshall time // when we put it in the CCR document. getActors().put(actor.getActorObjectID(), actor); return actor; } /** * Add a new patient actor to the document and return the actor. the caller is expected to fill out the * actor at this point. The Id has already been populated. * @return the Actor * @throws CCRException * @throws JAXBException */ public ActorType addNewPatient( ) throws CCRException, JAXBException { // Create the actor ActorType actor = addNewActor(); // Make this actor the patient addPatient( actor ); return actor; } /** * The actor already exists, we're just adding this actor as the patient. * Only do this once or you're violating CCR semantics (except for Siamese twins) * @param actor * @return * @throws CCRException * @throws JAXBException */ public void addPatient( ActorType actor ) throws CCRException, JAXBException { checkEditable(); if (getCCR().getPatient().size()==2) throw new CCRException( "No more than two patients allowed A2.5.2.6(3) "); ContinuityOfCareRecord.Patient pat = new ContinuityOfCareRecord.Patient(); pat.setActorID(actor.getActorObjectID()); getCCR().getPatient().add(pat); } } |
From: John C. <jc...@us...> - 2006-08-28 19:37:39
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/doc/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/org/tolven/doc/bean Modified Files: DocumentBean.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: DocumentBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/doc/bean/DocumentBean.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DocumentBean.java 21 Aug 2006 00:26:29 -0000 1.4 --- DocumentBean.java 28 Aug 2006 19:37:36 -0000 1.5 *************** *** 19,22 **** --- 19,23 ---- import java.util.List; + import javax.annotation.EJB; import javax.annotation.PostConstruct; import javax.ejb.Local; *************** *** 34,40 **** --- 35,44 ---- import org.tolven.admin.AdministrativeDetail; import org.tolven.admin.Details; + import org.tolven.core.TolvenPropertiesLocal; import org.tolven.core.entity.TolvenUser; import org.tolven.doc.DocumentLocal; + import org.tolven.doc.entity.CCRException; import org.tolven.doc.entity.DocBase; + import org.tolven.doc.entity.DocCCR; /** *************** *** 54,58 **** private EntityManager em; ! JAXBContext jc = null; /** --- 58,64 ---- private EntityManager em; ! @EJB private TolvenPropertiesLocal propertyBean; ! ! JAXBContext jc = null; /** *************** *** 76,80 **** } ! /** * Persist a new document and return it's ID * @param doc --- 82,116 ---- } ! /** ! * The document is immediately persisted (with no XML in it). This gives us the ID we'll need ! * to create actual CCR object graph. ! * @param userId ! * @return ! * @throws IOException ! * @throws CCRException ! */ ! public DocCCR createCCRDocument( long userId ) throws IOException, CCRException { ! DocCCR doc = new DocCCR(); ! doc.setAuthor(em.getReference( TolvenUser.class, userId )); ! em.persist( doc ); ! String oid = propertyBean.getProperties().getProperty("tolven.repository.oid"); ! doc.createCCR(oid); ! return doc; ! } ! ! /** ! * We've actually persisted the document already, this performs an update containing ! * the validated XML content. ! * @param doc ! * @throws CCRException ! * @throws IOException ! * @throws JAXBException ! */ ! public void persistCCRDocument( DocCCR doc ) throws JAXBException, IOException, CCRException { ! doc.validateAndMarshallXML(); ! em.merge(doc); ! } ! ! /** * Persist a new document and return it's ID * @param doc |
From: John C. <jc...@us...> - 2006-08-28 19:37:39
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/gen In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/org/tolven/gen Modified Files: CHRGenerator.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: CHRGenerator.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/CHRGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CHRGenerator.java 21 Aug 2006 00:26:30 -0000 1.3 --- CHRGenerator.java 28 Aug 2006 19:37:36 -0000 1.4 *************** *** 34,38 **** * @throws Exception */ ! public void createPatients( Account account, int count, Date now, int startYear ) throws Exception; } --- 34,38 ---- * @throws Exception */ ! public void createPatients( TolvenUser user, Account account, int count, Date now, int startYear ) throws Exception; } |
From: John C. <jc...@us...> - 2006-08-28 19:37:39
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/org/tolven/gen/entity Modified Files: VirtualPerson.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: VirtualPerson.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/gen/entity/VirtualPerson.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VirtualPerson.java 21 Aug 2006 00:26:29 -0000 1.3 --- VirtualPerson.java 28 Aug 2006 19:37:36 -0000 1.4 *************** *** 47,50 **** --- 47,52 ---- @Column( name="LAST", length=50 ) private String last; + @Column( name="MAIDEN", length=50 ) + private String maiden; @Column( name="MIDDLE", length=50 ) private String middle; *************** *** 64,67 **** --- 66,73 ---- @ManyToOne(fetch = FetchType.LAZY) private VirtualPerson father; + @Column( name="SSN", length=10 ) + private String ssn; + @Column( name="MOBILE_PHONE", length=50 ) + private String mobilePhone; *************** *** 259,262 **** --- 265,286 ---- this.id = id; } + public String getMaiden() { + return maiden; + } + public void setMaiden(String maiden) { + this.maiden = maiden; + } + public String getMobilePhone() { + return mobilePhone; + } + public void setMobilePhone(String mobilePhone) { + this.mobilePhone = mobilePhone; + } + public String getSsn() { + return ssn; + } + public void setSsn(String ssn) { + this.ssn = ssn; + } } |
From: John C. <jc...@us...> - 2006-08-28 19:37:38
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/org/tolven/app/bean Modified Files: MenuBean.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: MenuBean.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/bean/MenuBean.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** MenuBean.java 25 Aug 2006 15:00:27 -0000 1.27 --- MenuBean.java 28 Aug 2006 19:37:35 -0000 1.28 *************** *** 29,32 **** --- 29,33 ---- import org.tolven.app.entity.MenuStructure; import org.tolven.core.entity.Account; + import org.tolven.doc.entity.DocBase; /** *************** *** 80,86 **** List<MenuData> items = query.getResultList(); if ( items.size()!=1) return null; ! return items.get(0); } /** * @see MenuLocal --- 81,89 ---- List<MenuData> items = query.getResultList(); if ( items.size()!=1) return null; ! MenuData rslt = items.get(0); ! return rslt; } + /** * @see MenuLocal *************** *** 416,427 **** MenuStructure personal = new MenuStructure( ! account, patient, "personal.xhtml", null, 6, "personal", "Personal Info", "true", null, "tab" ); em.persist( personal ); MenuStructure providers = new MenuStructure( ! account, patient, "providers.xhtml", null, 6, "providers", "Providers", "true", null, "tab" ); em.persist( providers ); // PORTLETS MenuStructure probSummary = new MenuStructure( --- 419,434 ---- MenuStructure personal = new MenuStructure( ! account, patient, "personal.xhtml", null, 7, "personal", "Personal Info", "true", null, "tab" ); em.persist( personal ); MenuStructure providers = new MenuStructure( ! account, patient, "providers.xhtml", null, 8, "providers", "Providers", "true", null, "tab" ); em.persist( providers ); + MenuStructure xml = new MenuStructure( + account, patient, "xml.xhtml", null, 9, "xml", "XML (demo)", "true", null, "tab" ); + em.persist( xml ); + // PORTLETS MenuStructure probSummary = new MenuStructure( |
From: John C. <jc...@us...> - 2006-08-28 19:37:38
|
Update of /cvsroot/tolven/tolvenEJB/src/test/org/tolven/ccr In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/test/org/tolven/ccr Modified Files: Demog.java Added Files: Document.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. --- NEW FILE: Document.java --- package test.org.tolven.ccr; import java.io.IOException; import javax.xml.bind.JAXBException; import org.tolven.ccr.ContinuityOfCareRecord; import org.tolven.doc.entity.DocCCR; import junit.framework.TestCase; public class Document extends TestCase { public void testGetBinding() throws JAXBException, IOException { DocCCR doc = new DocCCR(); doc.setBinding(Demog.createCCR()); System.out.println(doc.getContentString()); doc.resetBinding( ); Object obj = doc.getBinding(); ContinuityOfCareRecord ccr = (ContinuityOfCareRecord)obj; System.out.println( ccr.getBody().getAlerts().getAlert().get(0).getDescription().getText() ); System.out.println( ccr.getActors().getActor().get(0).getPerson().getName().getDisplayName() ); } public void testRepeatBinding() throws JAXBException, IOException { for (int x = 0; x < 10;x++) { testGetBinding(); } } } Index: Demog.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/test/org/tolven/ccr/Demog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Demog.java 21 Jul 2006 19:12:09 -0000 1.2 --- Demog.java 28 Aug 2006 19:37:36 -0000 1.3 *************** *** 40,44 **** } ! public ContinuityOfCareRecord createCCR() { ObjectFactory factory = new ObjectFactory(); ContinuityOfCareRecord ccr = factory.createContinuityOfCareRecord(); --- 40,44 ---- } ! public static ContinuityOfCareRecord createCCR() { ObjectFactory factory = new ObjectFactory(); ContinuityOfCareRecord ccr = factory.createContinuityOfCareRecord(); *************** *** 62,66 **** } ! public ActorType.Person createActorBob() { ActorType.Person person = new ActorType.Person(); ActorType.Person.Name name = new ActorType.Person.Name(); --- 62,66 ---- } ! public static ActorType.Person createActorBob() { ActorType.Person person = new ActorType.Person(); ActorType.Person.Name name = new ActorType.Person.Name(); |
From: John C. <jc...@us...> - 2006-08-28 19:37:38
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/org/tolven/app Modified Files: MenuLocal.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: MenuLocal.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/MenuLocal.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MenuLocal.java 7 Aug 2006 03:26:48 -0000 1.11 --- MenuLocal.java 28 Aug 2006 19:37:36 -0000 1.12 *************** *** 25,28 **** --- 25,29 ---- import org.tolven.app.entity.MenuStructure; import org.tolven.core.entity.Account; + import org.tolven.doc.entity.DocBase; /** * EJB Session interface for manipulating menu and index structures. *************** *** 78,82 **** */ public MenuData findMenuDataItem( MenuQueryControl ctrl ); ! /** * <p>We're asked to add a menu item to one of the active menus for this user. --- 79,83 ---- */ public MenuData findMenuDataItem( MenuQueryControl ctrl ); ! /** * <p>We're asked to add a menu item to one of the active menus for this user. |
From: John C. <jc...@us...> - 2006-08-28 19:37:38
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/doc In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/org/tolven/doc Modified Files: DocumentLocal.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: DocumentLocal.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/doc/DocumentLocal.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DocumentLocal.java 21 Aug 2006 00:26:29 -0000 1.3 --- DocumentLocal.java 28 Aug 2006 19:37:36 -0000 1.4 *************** *** 25,29 **** --- 25,31 ---- import org.tolven.admin.AdministrativeDetail; import org.tolven.admin.Details; + import org.tolven.doc.entity.CCRException; import org.tolven.doc.entity.DocBase; + import org.tolven.doc.entity.DocCCR; *************** *** 48,51 **** --- 50,69 ---- /** + * The document is immediately persisted (with no XML in it). This gives us the ID we'll need + * to create actual CCR object graph. + * @param userId + * @return + * @throws IOException + * @throws CCRException + */ + public DocCCR createCCRDocument( long userId ) throws IOException, CCRException; + + /** + * We've actually persisted the document already, this performs an update containing + * the validated XML content. + * @param doc + */ + public void persistCCRDocument( DocCCR doc ) throws JAXBException, IOException, CCRException; + /** * Not a very practical method but we'll use it for testing. * @return |
From: John C. <jc...@us...> - 2006-08-28 19:37:38
|
Update of /cvsroot/tolven/tolvenEJB/src/org/tolven/app/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23120/src/org/tolven/app/entity Modified Files: MSColumn.java MenuData.java Log Message: Add patient personal info page. Since this uses CCR stored as XML, a separate page is added (for demo purposes) showing the CCR document as XML. Index: MenuData.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/entity/MenuData.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MenuData.java 25 Aug 2006 15:00:28 -0000 1.11 --- MenuData.java 28 Aug 2006 19:37:36 -0000 1.12 *************** *** 78,82 **** private Account account; ! @ManyToOne(fetch = FetchType.LAZY) private DocBase document; --- 78,82 ---- private Account account; ! @ManyToOne private DocBase document; Index: MSColumn.java =================================================================== RCS file: /cvsroot/tolven/tolvenEJB/src/org/tolven/app/entity/MSColumn.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MSColumn.java 25 Aug 2006 15:00:28 -0000 1.3 --- MSColumn.java 28 Aug 2006 19:37:36 -0000 1.4 *************** *** 62,65 **** --- 62,68 ---- private String displayFunctionArguments; + @Column( name="SUPRESS") + private String supressColumns; + public MSColumn( ) { *************** *** 175,178 **** --- 178,191 ---- } + /** + * Either contains the name of a MenuData field (eg string01) or + * if DisplayFunctionArguments is non-null, a Java "format" specification. For + * example, this field might contain + * <pre>%s, %s</pre> + * and displayFunctionArguments might contain: + * <pre>string01,string02</pre> + * assuming that a person's last and first names are in string01 and string02 respectively. + * @return + */ public String getDisplayFunction() { return displayFunction; *************** *** 182,186 **** this.displayFunction = displayFunction; } ! public String getDisplayFunctionArguments() { return displayFunctionArguments; --- 195,202 ---- this.displayFunction = displayFunction; } ! /** ! * A comma-separated list, no spaces, with the names of MD fields (eg string01) used as arguments to displayFunction format. ! * @return ! */ public String getDisplayFunctionArguments() { return displayFunctionArguments; *************** *** 190,193 **** --- 206,223 ---- this.displayFunctionArguments = displayFunctionArguments; } + + /** + * A comma-separated list of the columns to supress duplicates if sorting on this column. + * For example, sorting on the Name column might supress Name, Age, DOB, and Sex. Use the column number. For example: + * <pre>1,2,3,4</pre> + * @return + */ + public String getSupressColumns() { + return supressColumns; + } + + public void setSupressColumns(String supressColumns) { + this.supressColumns = supressColumns; + } } |
From: John C. <jc...@us...> - 2006-08-28 19:21:07
|
Update of /cvsroot/tolven/tolvenWEB/web/scripts In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15645/web/scripts Modified Files: tolven6.js Log Message: On closing a patient, some divs were not being removed (in Firefox). Index: tolven6.js =================================================================== RCS file: /cvsroot/tolven/tolvenWEB/web/scripts/tolven6.js,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tolven6.js 24 Aug 2006 07:52:32 -0000 1.6 --- tolven6.js 28 Aug 2006 19:21:00 -0000 1.7 *************** *** 146,150 **** if (c.length<1) return "-"; if (c[0].childNodes.length<1) return "-"; ! return c[0].childNodes[0].data; } --- 146,150 ---- if (c.length<1) return "-"; if (c[0].childNodes.length<1) return "-"; ! return c[0].childNodes[0].data.replace(/[\0\n\r\f\t]*/g, "" ); } *************** *** 357,360 **** --- 357,361 ---- var id = removeLast(lis[0].id); visiblePage = id; + content.visibleSubPage = id; addRemoteContent( id, id ); } *************** *** 424,427 **** --- 425,429 ---- // Now do the delete var idcomp = id + ":"; + // alert( "Closing prefix: " + idcomp ); var e = document.body.getElementsByTagName('*'); for (var x=0; x < e.length;x++) { *************** *** 431,434 **** --- 433,444 ---- } } + // Do a second pass making sure we got everything. + var f = document.body.getElementsByTagName('*'); + for (var x=0; x < f.length;x++) { + if (idcomp==f[x].id.substr( 0, idcomp.length )) { + // alert( "Remove2: " + f[x].id ); + Element.remove( f[x] ); + } + } // alert( "Remove: " + id ); Element.remove( id ); |
From: Joseph I. <jos...@us...> - 2006-08-27 04:32:40
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6243/security-config Modified Files: build.xml Log Message: Removed a cut and paste error which pointed the DB port to LDAP port Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** build.xml 26 Aug 2006 22:01:05 -0000 1.28 --- build.xml 27 Aug 2006 04:32:36 -0000 1.29 *************** *** 389,393 **** <input message="Please enter password for DB private key" addproperty="tolven.db.key" /> <exec executable="${tolven.security.openssl.command}" failonerror="true"> ! <arg line="s_client -verify 10 -pass pass:${tolven.db.key} -connect ${tolven.security.openssl.ldap.host-port} -cert ${tolven.security.credentials.dir}/ca/certs/cacert.pem -key ${tolven.security.credentials.dir}/ca/keys/private/cakey.pem -prexit" /> </exec> </target> --- 389,393 ---- <input message="Please enter password for DB private key" addproperty="tolven.db.key" /> <exec executable="${tolven.security.openssl.command}" failonerror="true"> ! <arg line="s_client -verify 10 -pass pass:${tolven.db.key} -connect ${tolven.security.openssl.db.host-port} -cert ${tolven.security.credentials.dir}/ca/certs/cacert.pem -key ${tolven.security.credentials.dir}/ca/keys/private/cakey.pem -prexit" /> </exec> </target> |
From: Joseph I. <jos...@us...> - 2006-08-26 22:01:10
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv3404/security-config Modified Files: build.xml Log Message: The old namimg of certificates was used, in the echo message. Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** build.xml 26 Aug 2006 21:59:18 -0000 1.27 --- build.xml 26 Aug 2006 22:01:05 -0000 1.28 *************** *** 440,444 **** </fileset> </scp> ! <echo level="info" message="tolvendev-pg-cert.pem, tolvendev-pg-key.pem and tolvendev-pg-cacerts.pem have been copied to ${jdbc.host}:${postgres.location}/data" /> </target> --- 440,444 ---- </fileset> </scp> ! <echo level="info" message="server.crt, server.key and root.crt have been copied to ${jdbc.host}:${postgres.location}/data" /> </target> |
From: Joseph I. <jos...@us...> - 2006-08-26 21:59:21
|
Update of /cvsroot/tolven/tolven/security-config In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv2813/security-config Modified Files: build.xml Log Message: The certificates are copied to the correct place, but the echo message mentioned the directory above that location. Index: build.xml =================================================================== RCS file: /cvsroot/tolven/tolven/security-config/build.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** build.xml 24 Aug 2006 05:55:11 -0000 1.26 --- build.xml 26 Aug 2006 21:59:18 -0000 1.27 *************** *** 440,444 **** </fileset> </scp> ! <echo level="info" message="tolvendev-pg-cert.pem, tolvendev-pg-key.pem and tolvendev-pg-cacerts.pem have been copied to ${jdbc.host}:${postgres.location}" /> </target> --- 440,444 ---- </fileset> </scp> ! <echo level="info" message="tolvendev-pg-cert.pem, tolvendev-pg-key.pem and tolvendev-pg-cacerts.pem have been copied to ${jdbc.host}:${postgres.location}/data" /> </target> |