Update of /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/oscar/dms
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv32002/web/WEB-INF/classes/src/oscar/dms
Modified Files:
EDoc.java EDocUtil.java
Log Message:
eyeform updates
Index: EDoc.java
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/oscar/dms/EDoc.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** EDoc.java 9 Jul 2010 21:56:39 -0000 1.22
--- EDoc.java 4 Nov 2010 06:25:16 -0000 1.23
***************
*** 67,71 ****
private boolean indivoRegistered = false;
private int numberOfPages = 0;
!
/** Creates a new instance of EDoc */
public EDoc() {
--- 67,72 ----
private boolean indivoRegistered = false;
private int numberOfPages = 0;
! private Integer appointmentNo = -1;
!
/** Creates a new instance of EDoc */
public EDoc() {
***************
*** 360,363 ****
--- 361,374 ----
this.programId = programId;
}
+
+
+
+ public Integer getAppointmentNo() {
+ return appointmentNo;
+ }
+
+ public void setAppointmentNo(Integer appointmentNo) {
+ this.appointmentNo = appointmentNo;
+ }
public Date getDateTimeStampAsDate() {
Index: EDocUtil.java
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/WEB-INF/classes/src/oscar/dms/EDocUtil.java,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** EDocUtil.java 6 Oct 2010 08:45:26 -0000 1.67
--- EDocUtil.java 4 Nov 2010 06:25:16 -0000 1.68
***************
*** 135,140 ****
*/
public static String addDocumentSQL(EDoc newDocument) {
! String preparedSQL = "INSERT INTO document (doctype, docdesc, docxml, docfilename, doccreator, source, responsible, program_id, updatedatetime, status, contenttype, public1, observationdate,number_of_pages) VALUES (?,?,?, ?,?,?, ?,?,?, ?,?,?,?,?)";
! DBPreparedHandlerParam[] param = new DBPreparedHandlerParam[14];
int counter = 0;
param[counter++] = new DBPreparedHandlerParam(newDocument.getType());
--- 135,140 ----
*/
public static String addDocumentSQL(EDoc newDocument) {
! String preparedSQL = "INSERT INTO document (doctype, docdesc, docxml, docfilename, doccreator, source, responsible, program_id, updatedatetime, status, contenttype, public1, observationdate,number_of_pages,appointment_no) VALUES (?,?,?, ?,?,?, ?,?,?, ?,?,?,?,?,?)";
! DBPreparedHandlerParam[] param = new DBPreparedHandlerParam[15];
int counter = 0;
param[counter++] = new DBPreparedHandlerParam(newDocument.getType());
***************
*** 156,159 ****
--- 156,160 ----
param[counter++] = new DBPreparedHandlerParam(od2);
param[counter++] = new DBPreparedHandlerParam(newDocument.getNumberOfPages());
+ param[counter++] = new DBPreparedHandlerParam(newDocument.getAppointmentNo());
/*
***************
*** 246,253 ****
*/
public static ArrayList<EDoc> listDocs(String demoNo, String consultationId, boolean attached) {
! String sql = "SELECT DISTINCT d.document_no, d.doccreator, d.source, d.responsible, d.program_id, d.doctype, d.docdesc, d.observationdate, d.status, d.docfilename, d.contenttype, d.reviewer, d.reviewdatetime FROM document d, ctl_document c "
+ "WHERE d.status=c.status AND d.status != 'D' AND c.document_no=d.document_no AND " + "c.module='demographic' AND c.module_id = " + demoNo;
! String attachQuery = "SELECT d.document_no, d.doccreator, d.source, d.responsible, d.program_id, d.doctype, d.docdesc, d.observationdate, d.status, d.docfilename, d.contenttype, d.reviewer, d.reviewdatetime FROM document d, consultdocs cd " +
"WHERE d.document_no = cd.document_no AND " + "cd.requestId = "+consultationId+" AND cd.doctype = 'D' AND cd.deleted IS NULL";
--- 247,254 ----
*/
public static ArrayList<EDoc> listDocs(String demoNo, String consultationId, boolean attached) {
! String sql = "SELECT DISTINCT d.document_no, d.doccreator, d.source, d.responsible, d.program_id, d.doctype, d.docdesc, d.observationdate, d.status, d.docfilename, d.contenttype, d.reviewer, d.reviewdatetime, d.appointment_no FROM document d, ctl_document c "
+ "WHERE d.status=c.status AND d.status != 'D' AND c.document_no=d.document_no AND " + "c.module='demographic' AND c.module_id = " + demoNo;
! String attachQuery = "SELECT d.document_no, d.doccreator, d.source, d.responsible, d.program_id, d.doctype, d.docdesc, d.observationdate, d.status, d.docfilename, d.contenttype, d.reviewer, d.reviewdatetime, d.appointment_no FROM document d, consultdocs cd " +
"WHERE d.document_no = cd.document_no AND " + "cd.requestId = "+consultationId+" AND cd.doctype = 'D' AND cd.deleted IS NULL";
***************
*** 268,271 ****
--- 269,274 ----
String temp = rsGetString(rs, "program_id");
if (temp != null && temp.length()>0) currentdoc.setProgramId(Integer.valueOf(temp));
+ temp = rsGetString(rs, "appointment_no");
+ if (temp != null && temp.length()>0) currentdoc.setAppointmentNo(Integer.valueOf(temp));
currentdoc.setType(rsGetString(rs, "doctype"));
currentdoc.setStatus(rsGetString(rs, "status").charAt(0));
***************
*** 290,293 ****
--- 293,298 ----
String temp = rsGetString(rs, "program_id");
if (temp != null && temp.length()>0) currentdoc.setProgramId(Integer.valueOf(temp));
+ temp = rsGetString(rs, "appointment_no");
+ if (temp != null && temp.length()>0) currentdoc.setAppointmentNo(Integer.valueOf(temp));
currentdoc.setType(rsGetString(rs, "doctype"));
currentdoc.setStatus(rsGetString(rs, "status").charAt(0));
***************
*** 320,324 ****
public static EDoc getEDocFromDocId(String docId){
String sql = "SELECT DISTINCT c.module, c.module_id, d.doccreator, d.source, d.responsible, d.program_id, "
! + "d.status, d.docdesc, d.docfilename, d.doctype, d.document_no, d.updatedatetime, d.contenttype, d.observationdate, d.reviewer, d.reviewdatetime " +
"FROM document d, ctl_document c WHERE "
+ " c.document_no=d.document_no AND c.document_no='" + docId + "'";
--- 325,329 ----
public static EDoc getEDocFromDocId(String docId){
String sql = "SELECT DISTINCT c.module, c.module_id, d.doccreator, d.source, d.responsible, d.program_id, "
! + "d.status, d.docdesc, d.docfilename, d.doctype, d.document_no, d.updatedatetime, d.contenttype, d.observationdate, d.reviewer, d.reviewdatetime, d.appointment_no " +
"FROM document d, ctl_document c WHERE "
+ " c.document_no=d.document_no AND c.document_no='" + docId + "'";
***************
*** 340,343 ****
--- 345,350 ----
String temp = rsGetString(rs, "program_id");
if (temp != null && temp.length()>0) currentdoc.setProgramId(Integer.valueOf(temp));
+ temp = rsGetString(rs, "appointment_no");
+ if (temp != null && temp.length()>0) currentdoc.setAppointmentNo(Integer.valueOf(temp));
currentdoc.setDateTimeStamp(rsGetString(rs, "updatedatetime"));
currentdoc.setFileName(rsGetString(rs, "docfilename"));
***************
*** 373,377 ****
// select publicDoc and sorting from static variables for this class i.e. sort=EDocUtil.SORT_OBSERVATIONDATE
// sql base (prefix) to avoid repetition in the if-statements
! String sql = "SELECT DISTINCT c.module, c.module_id, d.doccreator, d.source, d.responsible, d.program_id, d.status, d.docdesc, d.docfilename, d.doctype, d.document_no, d.updatedatetime, d.contenttype, d.observationdate, d.reviewer, d.reviewdatetime " +
"FROM document d, ctl_document c WHERE c.document_no=d.document_no AND c.module='" + module + "'";
// if-statements to select the where condition (suffix)
--- 380,384 ----
// select publicDoc and sorting from static variables for this class i.e. sort=EDocUtil.SORT_OBSERVATIONDATE
// sql base (prefix) to avoid repetition in the if-statements
! String sql = "SELECT DISTINCT c.module, c.module_id, d.doccreator, d.source, d.responsible, d.program_id, d.status, d.docdesc, d.docfilename, d.doctype, d.document_no, d.updatedatetime, d.contenttype, d.observationdate, d.reviewer, d.reviewdatetime, d.appointment_no " +
"FROM document d, ctl_document c WHERE c.document_no=d.document_no AND c.module='" + module + "'";
// if-statements to select the where condition (suffix)
***************
*** 408,411 ****
--- 415,420 ----
String temp = rsGetString(rs, "program_id");
if (temp != null && temp.length()>0) currentdoc.setProgramId(Integer.valueOf(temp));
+ temp = rsGetString(rs, "appointment_no");
+ if (temp != null && temp.length()>0) currentdoc.setAppointmentNo(Integer.valueOf(temp));
currentdoc.setDateTimeStamp(rsGetString(rs, "updatedatetime"));
currentdoc.setFileName(rsGetString(rs, "docfilename"));
***************
*** 433,437 ****
ArrayList<EDoc> list = new ArrayList();
//boolean matchedDemographics = true;
! String sql= "SELECT DISTINCT c.module, c.module_id, d.doccreator, d.source, d.responsible, d.program_id, d.status, d.docdesc, d.docfilename, d.doctype, d.document_no, d.updatedatetime, d.contenttype, d.observationdate FROM document d, ctl_document c WHERE c.document_no=d.document_no AND c.module='demographic' and doccreator = ? and responsible = ? and updatedatetime >= ? and updatedatetime <= ?";
if (unmatchedDemographics){
sql += " and c.module_id = -1 ";
--- 442,446 ----
ArrayList<EDoc> list = new ArrayList();
//boolean matchedDemographics = true;
! String sql= "SELECT DISTINCT c.module, c.module_id, d.doccreator, d.source, d.responsible, d.program_id, d.status, d.docdesc, d.docfilename, d.doctype, d.document_no, d.updatedatetime, d.contenttype, d.observationdate, d.appointment_no FROM document d, ctl_document c WHERE c.document_no=d.document_no AND c.module='demographic' and doccreator = ? and responsible = ? and updatedatetime >= ? and updatedatetime <= ?";
if (unmatchedDemographics){
sql += " and c.module_id = -1 ";
***************
*** 465,468 ****
--- 474,479 ----
String temp = rsGetString(rs, "program_id");
if (temp != null && temp.length()>0) currentdoc.setProgramId(Integer.valueOf(temp));
+ temp = rsGetString(rs, "appointment_no");
+ if (temp != null && temp.length()>0) currentdoc.setAppointmentNo(Integer.valueOf(temp));
currentdoc.setDateTimeStamp(rsGetString(rs, "updatedatetime"));
currentdoc.setFileName(rsGetString(rs, "docfilename"));
***************
*** 508,511 ****
--- 519,524 ----
String temp = rsGetString(rs, "program_id");
if (temp != null && temp.length()>0) currentdoc.setProgramId(Integer.valueOf(temp));
+ temp = rsGetString(rs, "appointment_no");
+ if (temp != null && temp.length()>0) currentdoc.setAppointmentNo(Integer.valueOf(temp));
currentdoc.setDateTimeStamp(rsGetString(rs, "updatedatetime"));
currentdoc.setContentType(rsGetString(rs, "contenttype"));
|