Update of /cvsroot/oscarmcmaster/oscar_mcmaster/web/demographic
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv27594
Modified Files:
demographiccontrol.jsp demographiceditdemographic.jsp
demographicupdatearecord.jsp
Log Message:
ID: 3108108 -- Roster Date is an inactive field on the demographic screen.
--Changed SQL for a new roster field.
--enabled roster date on demographic edit screen
--Added logic to process roster field from edit demographic screen
Index: demographiccontrol.jsp
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/demographic/demographiccontrol.jsp,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** demographiccontrol.jsp 8 Oct 2010 14:24:53 -0000 1.67
--- demographiccontrol.jsp 12 Nov 2010 20:41:27 -0000 1.68
***************
*** 98,102 ****
{"search_detail", "select * from demographic where demographic_no=?"},
{"search_detail_ptbr", "select * from demographic d left outer join demographic_ptbr dptbr on dptbr.demographic_no = d.demographic_no where d.demographic_no=?"},
! {"update_record", "update demographic set last_name=?,first_name=?,address=?,city=?,province=?,postal=?,phone=?,phone2=?,email=?,pin=?,year_of_birth=?,month_of_birth=?,date_of_birth=?,hin=?,ver=?,roster_status=?,patient_status=?,chart_no=?,provider_no=?,sex=?,pcn_indicator=?,hc_type=?,family_doctor=?,country_of_origin=?,newsletter=?,sin=?,title=?,official_lang=?,spoken_lang=?,lastUpdateUser=?,lastUpdateDate=now(),date_joined=?,end_date=?,eff_date=?,hc_renew_date=? where demographic_no=?"},
{"update_record_ptbr", "update demographic_ptbr set cpf=?,rg=?,chart_address=?,marriage_certificate=?,birth_certificate=?,marital_state=?,partner_name=?,father_name=?,mother_name=?,district=?,address_no=?,complementary_address=? where demographic_no=?"},
{"archive_record", "insert into demographicArchive (select * from demographic where demographic_no=?)" },
--- 98,102 ----
{"search_detail", "select * from demographic where demographic_no=?"},
{"search_detail_ptbr", "select * from demographic d left outer join demographic_ptbr dptbr on dptbr.demographic_no = d.demographic_no where d.demographic_no=?"},
! {"update_record", "update demographic set last_name=?,first_name=?,address=?,city=?,province=?,postal=?,phone=?,phone2=?,email=?,pin=?,year_of_birth=?,month_of_birth=?,date_of_birth=?,hin=?,ver=?,roster_status=?,patient_status=?,chart_no=?,provider_no=?,sex=?,pcn_indicator=?,hc_type=?,family_doctor=?,country_of_origin=?,newsletter=?,sin=?,title=?,official_lang=?,spoken_lang=?,lastUpdateUser=?,lastUpdateDate=now(),date_joined=?,end_date=?,eff_date=?,hc_renew_date=?,roster_date=? where demographic_no=?"},
{"update_record_ptbr", "update demographic_ptbr set cpf=?,rg=?,chart_address=?,marriage_certificate=?,birth_certificate=?,marital_state=?,partner_name=?,father_name=?,mother_name=?,district=?,address_no=?,complementary_address=? where demographic_no=?"},
{"archive_record", "insert into demographicArchive (select * from demographic where demographic_no=?)" },
Index: demographicupdatearecord.jsp
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/demographic/demographicupdatearecord.jsp,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** demographicupdatearecord.jsp 8 Oct 2010 14:28:03 -0000 1.57
--- demographicupdatearecord.jsp 12 Nov 2010 20:41:27 -0000 1.58
***************
*** 93,97 ****
param[29]=(String)session.getAttribute("user");
! java.sql.Date [] dtparam = new java.sql.Date[4];
String yearTmp=StringUtils.trimToNull(request.getParameter("date_joined_year"));
--- 93,97 ----
param[29]=(String)session.getAttribute("user");
! java.sql.Date [] dtparam = new java.sql.Date[5];
String yearTmp=StringUtils.trimToNull(request.getParameter("date_joined_year"));
***************
*** 142,146 ****
dtparam[3]=null;
}
!
int []intparam=new int[] {Integer.parseInt(request.getParameter("demographic_no"))};
--- 142,159 ----
dtparam[3]=null;
}
!
! yearTmp=StringUtils.trimToNull(request.getParameter("roster_date_year"));
! monthTmp=StringUtils.trimToNull(request.getParameter("roster_date_month"));
! dayTmp=StringUtils.trimToNull(request.getParameter("roster_date_day"));
!
! if( yearTmp != null && monthTmp!=null && dayTmp!=null )
! {
! dtparam[4]=MyDateFormat.getSysDate(yearTmp+'-'+monthTmp+'-'+dayTmp);
! }
! else
! {
! dtparam[4]=null;
! }
!
int []intparam=new int[] {Integer.parseInt(request.getParameter("demographic_no"))};
Index: demographiceditdemographic.jsp
===================================================================
RCS file: /cvsroot/oscarmcmaster/oscar_mcmaster/web/demographic/demographiceditdemographic.jsp,v
retrieving revision 1.158
retrieving revision 1.159
diff -C2 -d -r1.158 -r1.159
*** demographiceditdemographic.jsp 12 Nov 2010 17:14:50 -0000 1.158
--- demographiceditdemographic.jsp 12 Nov 2010 20:41:27 -0000 1.159
***************
*** 1095,1099 ****
<span class="label"><bean:message
key="demographic.demographiceditdemographic.DateJoined" />:</span>
! <span class="info"><%=MyDateFormat.getMyStandardDate(apptMainBean.getString(rs,"hc_renew_date"))%></span>
</li>
<li><span class="label"><bean:message
--- 1095,1099 ----
<span class="label"><bean:message
key="demographic.demographiceditdemographic.DateJoined" />:</span>
! <span class="info"><%=MyDateFormat.getMyStandardDate(apptMainBean.getString(rs,"roster_date"))%></span>
</li>
<li><span class="label"><bean:message
***************
*** 1964,1970 ****
key="demographic.demographiceditdemographic.DateJoined" />: </b></td>
<td align="left">
! <input disabled="disabled" type="text" name="" size="4" maxlength="4" value="">
! <input disabled="disabled" type="text" name="" size="2" maxlength="2" value="">
! <input disabled="disabled" type="text" name="" size="2" maxlength="2" value="">
</td>
</tr>
--- 1964,1989 ----
key="demographic.demographiceditdemographic.DateJoined" />: </b></td>
<td align="left">
! <%
! // Put 0 on the left on dates
! // Year
! decF.applyPattern("0000");
!
! GregorianCalendar rosterDateCal=new GregorianCalendar();
! String rosterDateYear="";
! String rosterDateMonth="";
! String rosterDateDay="";
! if (demographic.getRosterDate()!=null){
! rosterDateCal.setTime(demographic.getRosterDate());
! rosterDateYear = decF.format(rosterDateCal.get(GregorianCalendar.YEAR));
! // Month and Day
! decF.applyPattern("00");
! rosterDateMonth = decF.format(rosterDateCal.get(GregorianCalendar.MONTH)+1);
! rosterDateDay = decF.format(rosterDateCal.get(GregorianCalendar.DAY_OF_MONTH));
! }
! %>
!
! <input type="text" name="roster_date_year" size="4" maxlength="4" value="<%=rosterDateYear%>">
! <input type="text" name="roster_date_month" size="2" maxlength="2" value="<%=rosterDateMonth%>">
! <input type="text" name="roster_date_day" size="2" maxlength="2" value="<%=rosterDateDay%>">
</td>
</tr>
|