SlideShare ist ein Scribd-Unternehmen logo
1 von 120
Downloaden Sie, um offline zu lesen
0
2014
4/25/2014
Chris Worledge Portfolio
1
Contents:
Website (HTML, CSS, JavaScript) Page 2
Desktop Application (VB.NET) Page 5
Clinical Research Page 7
Simulated Practice Page 12
Spring Web Application Development Page 15
ASP.Net Web Application Page 46
JQuery Page 55
JSon Page 64
Database (MS SQL) Page 68
Shell STEP Programme Page 78
Application Design
Table-Top Restaurant Information System (VB.Net) Page 103
Desktop Restaurant Administration System (Java) Page 106
Web Application: Technical Support Ordering (JSP) Page 115
2
Gardening Delights Website
3
4
5
Desktop Service Dept. Utility
6
7
A Practical Protocol for Dialysate Flow Rate Selection.
Background:
Dialysate flow rates are often standardised as unit policy, due to the lack of a selection protocol.
Some units opt for the factory default setting, following the rationale that they have little
information to justify altering it. Other units opt for maximum rate, as they are aware this can be
beneficial to some patients.
Following the ‘factory default setting’ policy will result in some patients receiving less dialysis than
they could benefit from, whilst following the ‘maximum rate for all’ policy increases costs without
delivering benefit for all.
Most variable parameters of haemodialysis are specified in the dialysis prescription, and the only
obstacle to using this policy for dialysate flow rate, appears to be the lack of a protocol to follow.
Method of Study:
It was proposed that a study to determine the circumstances where high dialysate flow resulted in
significant improvement in clearance could be performed by measuring clearance periodically during
treatment (using a non-invasive sodium dialysance comparison technique)-1
and comparing this with
blood water flow to give a clearance efficiency figure-percentage of blood water cleared of urea. In
order to separate diffusive and convective clearance, it would be necessary to record ultrafiltration
rate as well.
Volunteers established on dialysis for at least three months were recruited from a maintenance
haemodialysis population, without restrictions around age, nature of access, or any other factors.
The minimum data set required for each scenario was calculated (for p<0.01) to be 120, and four
scenarios were investigated, Both high flux and low flux with dialysate flow rates of 500ml/min and
800ml/min, requiring at least 480 treatments to be monitored. As dialyser performance and blood
chemistry alter during treatment, the data was collected every twenty-five minutes and mean figures
calculated.
As effective blood water flow would be diminished by recirculation, a correction factor was applied.
Analysis:
Blood water flow was calculated using a plasma water fraction figure obtained by subtracting total
protein from plasma volume (Fp), and a fixed red blood cell water fraction figure of 0.72 (Fr).
Haematocrit (HCT) expressed as a decimal was also used in the formula:
Qbw = Qb [Fp + HCT(Fr – Fp)]
The clearance (K), effective blood flow, and ultrafiltration rate were recorded every twenty-five
minutes throughout the treatment. This is the minimum measurement interval available on the
measuring method utilised.
Blood water flow was adjusted for recirculation, using the total recirculation figure obtained from a
blood temperature module on the dialysis machine utilising temperature bolus dilution monitoring-3
,
in the formula:
Corrected QBW = Apparent QBW X [100- Recirc/100]
Diffusive clearance was separated from total clearance by calculating the U.F. rate per minute and
dividing by two-6
, then subtracting from total clearance, to leave diffusive clearance.
K(Diff) = K – U.F./120
8
The clearance efficiency (K(Diff) / Corrected QBW) was plotted against the corrected blood
water flow, and the resulting plots at different dialysate flow rates were compared.
Low Flux Dialyser Results:
A comparison of the two curves expressed as percentage improvement ({[C.E. (800) – C.E. (500)]/C.E.
(500)} X 100)
Indicates significant advantage to higher dialysate flow, when higher corrected blood water flows are
available.
0
10
20
30
40
50
60
70
80
90
100
0 50 100 150 200 250 300
CorrC.E.
Corr B.W.F.
Low Flux 500ml/min
0
10
20
30
40
50
60
70
80
90
100
0 50 100 150 200 250 300
Corr.C.E.
Corr B.W.F.
Low Flux 800ml/min
0
5
10
15
20
25
0 100 200 300
Clearanceimprovement(%)
Corrected blood water flow (ml/min)
Low flux
9
High Flux Dialyser Results:
The same comparison yeilds a very similar result;
Discussion:
The small differences between the two plots of improvement are unlikely to indicate anything more
than bias resulting from the initial high flux dialyser patient cohort being small. When the study was
started, most patients were on low flux dialysis, but as new guidelines were adopted this situation
changed.
The selection of 500ml/min as a common dialysate flow rate was based on the use of less efficient
dialysers, and assumed a blood flow rate of 200ml/min. The argument was that two-and-a-half times
blood flow would be easily adequate dialysate flow, as there was a limit to solute transfer rate
consequential to the membrane and fluid barrier resistances (combined, these are referred to as the
mass transfer function, KOA).
0
20
40
60
80
100
0 50 100 150 200 250 300
CorrC.E.(%)
Corr B.W.F.(ml/min)
High Flux 500ml/min
0
20
40
60
80
100
0 50 100 150 200 250 300
CorrC.E.(%)
Corr B.W.F. (ml/min)
High Flux 800ml/min
0
5
10
15
20
25
0 50 100 150 200 250 300
ClearanceImprovement(%)
Corr. B.W.F.ml/min
High flux
10
Alan S. Michaels published the formula that describes dialyser solute flux, in 1966. It is:
CB - CD
J = tD + tM + tB
-7
DD kDM DB
The denominator is KOA, and was often described as the limiting factor to urea clearance, whilst the
numerator is diffusion gradient, and has largely been ignored. Mass transfer coefficients have
increased significantly over the past forty years, making the effect of dialysate flow rate more
significant for those presenting significant solute mass for removal. This is dependant on blood water
flow rate, as the urea is dissolved within the blood water, and the blood water must circulate around
the body to take up urea from the interstitial fluid, before being presented for further dialysis, hence
the need to correct for recirculation.
An active spreadsheet was produced, which requires effective blood flow and recirculation figures
from the machine, and haematocrit and total protein form blood results. This spreadsheet then
produces a figure for corrected blood water flow, which can be compared with a fixed guide figure to
determine appropriate dialysate flow rate selection.
Haematocrit Total
Protein
Plasma
Water
Blood
Water
Blood
Flow
Total
Recirculation
Correction Corrected
Blood
Water
Flow
(Decimal) (g/l) (Decimal) (ml/min) (ml/min) (%) (ml/min)
Conclusions:
Today’s dialysers tend to be larger and more porous than previously, and venous access is improving.
These factors contribute to a change in requirements from dialysis machines, with increased
dialysate flow being beneficial to those with higher blood water flows.
Utilisation of an active spreadsheet negates the requirement for complex calculation, allowing many
to select dialysate flows appropriately.
References:
1 Nephrology Dialysis Transplantation 2001 Vol. 16 Pages 1053-8
Accuracy and safety of online clearance monitoring based on conductivity variation.
Uwe Kuhlmann, Rainer Goldau, Nader Samadi, Thomas Graf, Malte Gross, Giancarlo Orlandini, Harold
Lange.
2 Nephrology Dialysis Transplantation 1996 vol. 11 pages 2023-30
Ionic Dialysance as a Method for On-line Monitoring of Delivered Dialysis Without Blood Sampling.
C. Manzoni, S. Di Fillipo, M. Corti, F. Locatelli
3 Nephrology Dialysis Transplantation 199 vol.14 pages 376-83
Validation of haemodialysis recirculation and access blood flow measured by thermodilution
Daniel Schneditz, Erjun Wang, Nathan W. Levin..
4 American Journal of Kidney Diseases 35(1) pages 105-11 Jan 2000
In vivo effects of dialysate flow rate on Kt/V in maintenance hemodialysis patients.
11
Hauk M., Kuhlmann M.K., Riegel W., Kohler H.
5 Kidney International 51(6) pages 2013-7 Jun 1997
Hemodialyzer mass transfer-area coefficients for urea increase at high dialysate flow rates.
Leypoldt J.K., Cheung A.K., Agodoa L.Y., Daugirdas J.T., Greene T., Keshaviah P.R.
6 The International Journal Of Artificial Organs vol. 7 no. 5 1984 pages 263-268
In vitro study of combined convection-diffusion mass transfer in hemodialysers. B.B. Gupta and
M.Y.Jaffrin.
7 American Society of Artificial Organs 1966 vol. 12 pages 387-392
Operating Parameters And Performance Criteria For Hemodialyzers And Other Membrane Separation
Devices. Alan S. Michaels
8 International Journal of Artificial Organs 1993 vol. 16 no. 8 pages 585-91
A Model for Non-invasive Estimation of in vivo Dialyzer Performances and Patient’s Conductivity
During Hemodialysis..
T. Petitclerc, N. Goux, A.L. Reynier, B.Bene
9 American Journal of Kidney Diseases 2001 vol. 37 no. 2 pages 316-20
Increasing Dialysate Flow Rate Increases Dialyzer Urea Mass Transfer-Area Coefficients During
Clinical Use.
Rosemary Ouseph MD, Richard A. Ward PhD.
12
The use of simulated practice as a tool in clinical training is becoming increasingly popular.
Motivation arises in part from the public commentary on changing academic requirements in nursing,
and also from empirical evidence from the use of simulation training in other demanding
environments, notably aviation.
It has been suggested in the media that nursing and midwifery students studying to degree level may
result in practitioners who are more academic than practical and so better suited to submission of
essays; reports etc. than dealing with the needs of their patients. If this is addressed along with the
changing attitude towards learning on real patients (with modern technology there is less need for
this approach), it is apparent that simulated practice should be more prominent in the University
curricula than previously.
Other stimuli are recognition of different learning styles, and the verbose Chinese proverb “Not
hearing is not as good as hearing, hearing is not as good as seeing, seeing is not as good as mentally
knowing, mentally knowing is not as good as acting; true learning continues up to the point that
action comes forth.” Xún Zǐ (310 – 237 B.C.), which is frequently translated as “I hear and I forget; I
see and I remember; I do and I understand.” It is also attributed to Confucius.
The outcomes identified in Mosby’s Nursing Suite indicate both improved preparedness for practice
from experiencing multi-professional working, and improved retention of learning. Maginnis
describes the advantages of actual clinical practice, but the greater opportunity to prepare students
in a safe education environment before moving to a hostile clinical environment which may be
remote from educational support.
It is necessary for participants to immerse themselves in the scenario as if it were real (Wilford),
where the successful activity can boost confidence whilst difficulty may diminish confidence (Byrne).
The view was that it not only allowed the participants to get a taste of practical skills, but helped
them to form new thought processes around planning and critical review. This is an area which
should be introduced early in courses in a non-traumatic way. A low-fidelity simulation (injection;
urine testing; N.G. tube aspirant pH etc.) may be followed up with questions such as “How do you
think that went?”; “What could you do to improve on the way things went on future occasions?”;
“How could things be better organised to make the procedure run more smoothly?”. This would
represent an early introduction to the critical reflection and discussion of debriefing.
The Harvard medical school article describes debriefing as “a crucial step in clarifying and
consolidating insights and lessons from simulations.”
13
Kolb’s experiential learning cycle is cited in John M. O’Donnell’s presentation to demonstrate the
place of debriefing in simulated practice
, where debriefing forms the Reflective
Observation element. It is reasoned (Dreifuerst) that debriefing encourages a framework to develop
in the students mind to relate experiences and identify positive and negative aspects, allowing the
formation of ideas which may inspire innovation and higher level practice.
The ratio of questions to statements should be around 3:1 and the debriefing should last around
twice as long as the scenario, although students may need encouragement to participate
(Overstreet).
Three phases are described (Arafeh), Reaction; Analysis; and Summary. Of these, Analysis is
considered the most significant. Poor outcomes may be linked to errors in the participant’s mental
frameworks, which may be corrected in debriefing to allow the participant better understanding of
how to achieve their objectives, or even re-evaluate those objectives.
It is important that simulation and debriefing are distinct from practise of skills for assessment such
as OSCE’s
Technology and scenario design can play an important role in the simulation activity, but debriefing
effectively makes all the difference to the student experience.
Bibliography and References:
Arafeh Julie M. R., MSN, RN; Hansen Sara Snyder, MSN, RN;Nichols Amy, EdD, RN Debriefing in
Simulated-Based Learning. Facilitating a Reflective Discussion J Perinat Neonat Nurs Vol. 24, No.
4, pp. 302–309 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins
Byrne A J, Blagrove M T, McDougall S J P ; Dynamic confidence during simulated clinical tasks.
Postgrad Med J 2005;81:785–788.
14
Cant Robyn P, Cooper Simon J; The benefits of debriefing as formative feedback in nurse
education http://www.ajan.com.au/Vol29/29-1_Cant.pdf
Dreifuerst Kristina Thomas; The essentials of debriefing in simulation learning: a concept analysis
Nursing Education Perspectives March/April 2009
Fanning Ruth M., Gaba David M.; The Role of Debriefing in Simulation-Based Learning. Society for
Simulation in Healthcare, vol. 2, Number 2, Summer 2007
Maginnis C, Croxon L ; Transfer of learning to the nursing clinical practice setting. The International
Electronic Journal of Rural and Remote Health Research, education, practice and policy. 8th
April 2010
Mosby’s Nursing Suite. 9th
March 2011
http://confidenceconnected.com/connect/article/filling_the_gap_clinical_simulations_prepare_stud
ents_for_the_nursing_/ Accessed 1st
March 2012
O’Donnell John M.; Debriefing in Simulation Education: Using a Structured and Supported Model.
Overstreet Maria L.; "The Current Practice of Nursing Clinical Simulation Debriefing: A Multiple Case
Study. " PhD diss., University of Tennessee, 2009.
http://trace.tennessee.edu/utk_graddiss/627
No Author Named: Debriefing Assessment for Simulation in Healthcare
http://www.harvardmedsim.org/debriefing-assesment-simulation-healthcare.php
Wilford Amanda, Doyle Thomas J.’ Integrating simulation training into the nursing curriculum
http://www.fondacomedical.com/clinical_papers/Integratingsimulationtraining.pdf
You may like to look at this http://nursingstandard.rcnpublishing.co.uk/archive/article-an-evaluation-
of-simulated-clinical-practice-for-adult-branch-students {I haven’t seen it as I am not a registered
user}
15
Spring Web Application Development
FHSC Clinical Skills Equipment database schema
Equipment
Specification
Location
Item
Borrowers
Loans
Room
Skills
Equipme
nt/Skill
Pictures
16
Equipment Specification:
CatalogueNumber{PK}
esName
esManufacturer
esDescription
esManual
Pictures:
CatalogueNumber(from Equipment Specification) {Dual attribute PK with Index}
Index(to store multiple views of an item)
Either the picture as an OLE object; or the picture file name
Equipment/Skill:
EqSkillNumber{PK}
CatalogueNumber(from Equipment Specification)
SkillNumber(From Skills)
Skills:
SkillNumber{PK}
Description
Location:
SiteID{PK}
SiteName&Address
Room:
RoomNumber{PK}
SiteID(From Location)
RoomName
Item:
ItemNumber{PK}
CatalogueNumber(from Equipment Specification)
RoomNumber(from Room)
Loaned? (Y/N)
Loans:
ItemNumber(from Item){Dual Attribute PK with LoanDate}
BorrowerNumber(from Borrower)
LoanDate
ExpectedReturnDate
ActualReturnDate
17
Borrowers:
BorrowerNumber{PK}
Contact Name
email
Organisation Name
Address
Telephone Number
These Fields will be integers:
CatalogueNumber
EqSkillNumber
SkillNumber
ItemNumber
BorrowerNumber
Everything else will be character strings (including RoomNumber as we will need to put the building
pre-fix to avoid duplicates (WHB004)), except the dates in Loans.
18
SecondApp Code
Index.jsp
<%@page contentType="text/html"pageEncoding="UTF-8"%>
19
<!DOCTYPE HTML PUBLIC "-//W3C//DTDHTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<%-- Redirectedbecause we can'tsetthe welcome page toa virtual URL. --%>
<c:redirecturl="/hello.jsp"/>
Include.jsp
<%--
Document : include
Createdon : 27-Jun-2012, 12:02:34
Author : cw45
--%>
<%@page contentType="text/html"pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ page session="false"%>
<%@ taglibprefix="c"uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglibprefix="fmt"uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglibprefix="spring"uri="http://www.springframework.org/tags"%>
<head>
<linkrel="stylesheet"href="<spring:url value='themes/style.css'/>"type="text/css">
</head>
Hello.jsp
<%--
Document : hello
Created on : 27-Jun-2012, 12:00:00
Author : cw45
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/include.jsp" %>
20
<html>
<head><img src="<spring:url value='Jpegs/FacLogo.jpg'/>" align="right" width="323" height="132"
alt="Faculty Logo"/>
<title><fmt:message key="title"/></title></head>
<body>
<h1><fmt:message key="heading1"/><br><fmt:message key="heading2"/></h1>
<p><fmt:message key="greeting"/><c:outvalue="${model.now}"/></p>
<h3>Equipment</h3>
<p><c:forEach items="${model.Equipment}" var="equip">
<c:out value="${equip.esCatalogueNumber}"/><i><c:out value="${equip.esName}"/></i><i><img
src="<spring:url value="Jpegs/${equip.pic1}"/>"/></i><i><imgsrc="<spring:url
value="Jpegs/${equip.pic2}"/>"/></i><i><imgsrc="<spring:url
value="Jpegs/${equip.pic3}"/>"/></i><i><imgsrc="<spring:url
value="Jpegs/${equip.pic4}"/>"/></i><i><imgsrc="<spring:url
value="Jpegs/${equip.pic5}"/>"/></i><br><i><c:outvalue="${equip.esDescription}"/></i><br>
</c:forEach></p>
<br>
<a href="<c:url value="manufacturersearch.htm"/>">SearchbyManufacturer</a>
<br>
21
</body>
</html>
Manufacturersearch.jsp
<%--
Document : manufacturersearch
Createdon : 06-Sep-2012, 14:40:51
Author : cw45
--%>
<%@page contentType="text/html"pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<%@ taglibprefix="form"uri="http://www.springframework.org/tags/form"%>
<html>
<head>
<title><fmt:message key="title"/></title>
<style>
.error { color:red;}
</style>
</head>
<body>
<h1><fmt:message key="manufacturersearch.heading"/></h1>
<p><form:formmethod="post"commandName="manufacturerSearch">
<table width="95%"bgcolor="f8f8ff"border="0"cellspacing="0"cellpadding="5">
<tr>
<td align="right"width="20%">Name of Manufacturer:</td>
<td width="20%">
<form:inputpath="name"/>
</td>
<td width="60%">
22
<form:errorspath="name"cssClass="error"/>
</td>
</tr>
</table>
<br>
<inputtype="submit"align="center"value="Execute">
</form:form>
<a href="<c:url value="hello.htm"/>">Home</a>
</p></body>
</html>
EquipmentSpecification.java
package secondapp.domain;
importjava.io.Serializable;
/**
*
* @author cw45
*/
publicclassEquipmentSpecificationimplementsSerializable {
private StringesName;
private StringesDescription;
private StringesManufacturer;
private IntegeresCatalogueNumber;
private Stringpic1;
23
private Stringpic2;
private Stringpic3;
private Stringpic4;
private Stringpic5;
publicStringgetesName() {
returnesName;
}
publicvoidsetesName(StringesName) {
this.esName =esName;
}
publicStringgetesDescription(){
returnesDescription;
}
publicvoidsetesDescription(StringesDescription) {
this.esDescription=esDescription;
24
}
publicStringgetesManufacturer() {
returnesManufacturer;
}
publicvoidsetesManufacturer(StringesManufacturer){
this.esManufacturer=esManufacturer;
}
publicIntegergetesCatalogueNumber() {
returnesCatalogueNumber;
}
publicvoidsetesCatalogueNumber(IntegeresCatalogueNumber) {
this.esCatalogueNumber=esCatalogueNumber;
}
publicStringgetpic1() {
25
returnpic1;
}
publicvoidsetpic1(Stringpic1) {
this.pic1= pic1;
}
publicStringgetpic2() {
returnpic2;
}
publicvoidsetpic2(Stringpic2) {
this.pic2= pic2;
}
publicStringgetpic3() {
returnpic3;
}
publicvoidsetpic3(Stringpic3) {
26
this.pic3= pic3;
}
publicStringgetpic4() {
returnpic4;
}
publicvoidsetpic4(Stringpic4) {
this.pic4= pic4;
}
publicStringgetpic5() {
returnpic5;
}
publicvoidsetpic5(Stringpic5) {
this.pic5= pic5;
}
publicStringtoString() {
27
StringBuilderbuffer=newStringBuilder();
buffer.append("Catalogue Number:"+ esCatalogueNumber+";");
buffer.append("Name:"+ esName + ";");
buffer.append("FileName:"+ pic1 + ";");
buffer.append("FileName:"+ pic2 + ";");
buffer.append("FileName:"+ pic3 + ";");
buffer.append("FileName:"+ pic4 + ";");
buffer.append("FileName:"+ pic5 + ";");
buffer.append("Description:"+ esDescription+";");
returnbuffer.toString();
}
}
EquipmentSpecificationManager.java
package secondapp.service;
importjava.io.Serializable;
importjava.util.List;
importsecondapp.domain.EquipmentSpecification;
28
/**
*
* @author cw45
*/
publicinterface EquipmentSpecificationManagerextendsSerializable{
publicvoidincreaseesDescription(Stringaddition);
publicvoidseteSpecs(List<EquipmentSpecification>eSpecs);
publicList<EquipmentSpecification>geteSpecs();
}
SimpleEquipmentSpecificationManager.java
package secondapp.service;
importjava.util.ArrayList;
importjava.util.List;
importsecondapp.domain.EquipmentSpecification;
importsecondapp.repository.EquipmentDao;
/**
*
* @author cw45
*/
publicclassSimpleEquipmentSpecificationManagerimplementsEquipmentSpecificationManager{
//private List<EquipmentSpecification>eSpecs;
private EquipmentDaoequipmentDao;
publicvoidseteSpecs(List<EquipmentSpecification>eSpecs) {
//this.eSpecs=eSpecs;
}
publicList<EquipmentSpecification>geteSpecs() {
//returneSpecs;
returnequipmentDao.getEquipmentList();
}
publicvoidincreaseesDescription(Stringaddition) {
29
if (equipmentDao!=null) {
/*for(EquipmentDaoeSpec: equipmentDao) {
EquipmentSpecificationnewesDescription=eSpec.getEquipmentList();
eSpec.setEquipmentList(newesDescription);
}*/
}
}
}
ManufacturerSearch.java
package secondapp.service;
importorg.apache.commons.logging.Log;
importorg.apache.commons.logging.LogFactory;
/**
*
* @author cw45
*/
publicclassManufacturerSearch{
/** Loggerfor thisclassand subclasses*/
protectedfinal Loglogger= LogFactory.getLog(getClass());
private Stringname;
publicvoidsetName(Stringi) {
name = i;
logger.info("Name setto"+ i);
}
publicStringgetName() {
returnname;
}
}
HelloController.java
package secondapp.web;
30
importorg.springframework.web.servlet.mvc.Controller;
importorg.springframework.web.servlet.ModelAndView;
importjavax.servlet.ServletException;
importjavax.servlet.http.HttpServletRequest;
importjavax.servlet.http.HttpServletResponse;
importorg.apache.commons.logging.Log;
importorg.apache.commons.logging.LogFactory;
importjava.io.IOException;
importjava.util.Map;
importjava.util.HashMap;
importjava.util.Date;
importsecondapp.service.EquipmentSpecificationManager;
/**
*
* @author cw45
*/
publicclass HelloControllerimplementsController{
protectedfinal Loglogger= LogFactory.getLog(getClass());
private EquipmentSpecificationManagerequipmentSpecificationManager;
publicModelAndViewhandleRequest(HttpServletRequestrequest,HttpServletResponseresponse)
throwsServletException,IOException{
Stringnow= (newDate()).toString();
logger.info("Returninghelloviewwith"+ now);
Map<String,Object>myModel = new HashMap<String,Object>();
myModel.put("now",now);
myModel.put("Equipment",this.equipmentSpecificationManager.geteSpecs());
returnnewModelAndView("hello","model",myModel);
}
publicvoidsetEquipmentSpecificationManager(EquipmentSpecificationManager
equipmentSpecificationManager) {
31
this.equipmentSpecificationManager=equipmentSpecificationManager;
}
}
ManufacturerSearchFormController.java
package secondapp.web;
importorg.springframework.web.servlet.mvc.SimpleFormController;
importorg.springframework.web.servlet.ModelAndView;
importorg.springframework.web.servlet.view.RedirectView;
importjavax.servlet.ServletException;
importjavax.servlet.http.HttpServletRequest;
importorg.apache.commons.logging.Log;
importorg.apache.commons.logging.LogFactory;
importsecondapp.service.EquipmentSpecificationManager;
importsecondapp.service.ManufacturerSearch;
/**
*
* @author cw45
*/
publicclassManufacturerSearchFormControllerextendsSimpleFormController{
/** Logger forthisclass andsubclasses*/
protectedfinal Loglogger= LogFactory.getLog(getClass());
private EquipmentSpecificationManagerequipmentspecificationManager;
publicModelAndViewonSubmit(Objectcommand)
throwsServletException{
Stringname = ((ManufacturerSearch) command).getName();
logger.info("Manufactureris"+ name + ".");
equipmentspecificationManager.increaseesDescription(name);
logger.info("returningfromPriceIncreaseFormview to"+ getSuccessView());
returnnewModelAndView(newRedirectView(getSuccessView()));
}
32
protectedObjectformBackingObject(HttpServletRequestrequest)throwsServletException{
ManufacturerSearchmanufacturerSearch=new ManufacturerSearch();
manufacturerSearch.setName("ThingsandLimbs");
returnmanufacturerSearch;
}
publicvoidsetEquipmentSpecificationManager(EquipmentSpecificationManager
equipmentspecificationManager) {
this.equipmentspecificationManager=equipmentspecificationManager;
}
publicEquipmentSpecificationManagergetEquipmentSpecificationManager(){
returnequipmentspecificationManager;
}
}
EquipmentDao.java
package secondapp.repository;
importjava.util.List;
importsecondapp.domain.EquipmentSpecification;
/**
*
* @author cw45
*/
publicinterface EquipmentDao{
publicList<EquipmentSpecification>getEquipmentList();
publicvoidsaveEquipment(EquipmentSpecificationequip);
}
JdbcEquipmentDao.java
package secondapp.repository;
importjava.sql.ResultSet;
33
importjava.sql.SQLException;
importjava.util.List;
importorg.apache.commons.logging.Log;
importorg.apache.commons.logging.LogFactory;
importorg.springframework.jdbc.core.namedparam.MapSqlParameterSource;
importorg.springframework.jdbc.core.simple.ParameterizedRowMapper;
importorg.springframework.jdbc.core.simple.SimpleJdbcDaoSupport;
importsecondapp.domain.EquipmentSpecification;
/**
*
* @author cw45
*/
publicclassJdbcEquipmentDaoextendsSimpleJdbcDaoSupportimplementsEquipmentDao{
/** Loggerfor thisclassand subclasses*/
publicList<EquipmentSpecification>equipo;
protectedfinal Loglogger= LogFactory.getLog(getClass());
publicList<EquipmentSpecification>getEquipmentList() {
logger.info("Gettingequipment!");
34
List<EquipmentSpecification>equipment=getSimpleJdbcTemplate().query(
"selectDISTINCTtblEquipmentSpecification.esCatalogueNumber,tblEquipmentSpecification.esName,
tblEquipmentSpecification.esManufacturer,tblEquipmentSpecification.esDescription,(Select
tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=1AND
tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic1,(Select
tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=2AND
tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic2,(Select
tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=3AND
tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic3,(Select
tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=4AND
tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic4,(Select
tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=5AND
tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic5FROM
tblEquipmentSpecificationLEFTOUTER JointblPicturesON
tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber",
newEquipmentMapper());
returnequipment;
}
publicvoidsetEquipmentList(List<EquipmentSpecification>equList){
equipo=equList;
}
publicvoidsaveEquipment(EquipmentSpecificationequip) {
logger.info("Savingproduct:"+ equip.getesName());
intcount= getSimpleJdbcTemplate().update(
35
"update productssetesDescription=:esDescription,esName =:esName where esCatalogueNumber=
:esCatalogueNumber",
newMapSqlParameterSource().addValue("Name",equip.getesName())
.addValue("esCatalogueNumber",equip.getesCatalogueNumber())
.addValue("esName",equip.getesName()));
logger.info("Rowsaffected:"+ count);
}
private staticclass EquipmentMapperimplementsParameterizedRowMapper<EquipmentSpecification>{
publicEquipmentSpecificationmapRow(ResultSetrs,introwNum) throwsSQLException{
EquipmentSpecificationequip=new EquipmentSpecification();
equip.setesCatalogueNumber(rs.getInt("esCatalogueNumber"));
equip.setesName(rs.getString("esName"));
equip.setpic1(rs.getString("pic1"));
equip.setpic2(rs.getString("pic2"));
equip.setpic3(rs.getString("pic3"));
equip.setpic4(rs.getString("pic4"));
36
equip.setpic5(rs.getString("pic5"));
equip.setesDescription(rs.getString("esDescription"));
equip.setesManufacturer(rs.getString("esManufacturer"));
returnequip;
}
}
}
Web.XML
<?xml version="1.0"encoding="UTF-8"?>
<web-appversion="3.0"xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-
app_3_0.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>secondapp</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>2</load-on-startup>
37
</servlet>
<servlet-mapping>
<servlet-name>secondapp</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>redirect.jsp</welcome-file>
</welcome-file-list>
<jsp-config>
<taglib>
<taglib-uri>/spring</taglib-uri>
<taglib-location>/WEB-INF/tld/spring-form.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>
SecondApp-Servlet.XML
<?xml version="1.0"encoding="UTF-8"?>
<beansxmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<!-- the applicationcontextdefinitionforthe secondappDispatcherServlet -->
<bean name="/hello.htm"class="secondapp.web.HelloController">
<propertyname="EquipmentSpecificationManager"ref="EquipmentSpecificationManager"/></bean>
<bean name="themeSource"
38
class="org.springframework.ui.context.support.ResourceBundleThemeSource"/>
<bean id="messageSource"class="org.springframework.context.support.ResourceBundleMessageSource">
<propertyname="basename"value="messages"/>
</bean>
<bean name="/manufacturersearch.htm"class="secondapp.web.ManufacturerSearchFormController">
<propertyname="sessionForm"value="true"/>
<propertyname="commandName"value="manufacturerSearch"/>
<propertyname="commandClass"value="secondapp.service.ManufacturerSearch"/>
<propertyname="formView"value="manufacturersearch"/>
<propertyname="successView"value="hello.htm"/>
<propertyname="EquipmentSpecificationManager"ref="EquipmentSpecificationManager"/>
</bean>
<bean id="viewResolver"class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<propertyname="viewClass"value="org.springframework.web.servlet.view.JstlView"></property>
<propertyname="prefix"value="/WEB-INF/jsp/"></property>
<propertyname="suffix"value=".jsp"></property>
</bean>
</beans>
applicationContext.XML
<?xml version="1.0"encoding="UTF-8"?>
<beansxmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-
aop-3.0.xsd
http://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-
3.0.xsd">
39
<!-- the parentapplicationcontextdefinitionforthe secondappapplication -->
<bean id="equipmentspecificationManager"
class="secondapp.service.SimpleEquipmentSpecificationManager">
<propertyname="equipmentDao"ref="equipmentDao"/>
</bean>
<bean id="equipmentDao"class="secondapp.repository.JdbcEquipmentDao">
<propertyname="dataSource" ref="dataSource"/>
</bean>
<bean id="dataSource"class="org.apache.commons.dbcp.BasicDataSource"destroy-method="close">
<propertyname="driverClassName"value="${jdbc.driverClassName}"/>
<propertyname="url"value="${jdbc.url}"/>
</bean>
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<propertyname="locations">
<list>
<value>classpath:jdbc.properties</value>
</list>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<propertyname="dataSource"ref="dataSource"/>
</bean>
<!--aop:config>
<aop:advisorpointcut="execution(**..EquipmentSpecificationManager.*(..))"advice-ref="txAdvice"/>
</aop:config>
<tx:advice id="txAdvice">
<tx:attributes>
<tx:methodname="save*"/>
40
<tx:methodname="*"read-only="true"/>
</tx:attributes>
</tx:advice-->
<!--beanid="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:location="/WEB-INF/jdbc.properties"/>
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource"
p:driverClassName="${jdbc.driverClassName}"
p:url="${jdbc.url}"
p:username="${jdbc.username}"
p:password="${jdbc.password}"/-->
<!-- ADD PERSISTENCESUPPORTHERE (jpa,hibernate,etc) -->
</beans>
messages.properties
title=SecondApplication
heading=Hello::SecondApplication
greeting=Greetings,itisnow
manufacturersearch.heading=ManufacturerSearch::SecondApplication
Jdbc.properties
jdbc.driverClassName=net.sourceforge.jtds.jdbc.driver
jdbc.url=jdbc:jtds:sqlserver://cam-i-ap17:1433/fhsce_skills;useNTLMv2=true;domain=ANGLIA.LOCAL[ondbo]
<beanid="dataSource"class="org.apache.commons.dbcp.BasicDataSource"destroy-method="close">
<propertyname="driverClassName"value="${jdbc.driverClassName}"/>
<propertyname="url"value="${jdbc.url}"/>
41
The Clinical SkillsFacilitiesinCambridge,Chelmsford,andPeterboroughare under-utiliseddue toinadequate
information.
I orderfor an academicto prepare fora skillssession,orfora lessonplanwithresource requirementslisttobe
createditwouldbe necessaryforthemto have accessto informationonall available options.Thisshould
include locationandusage detailstoallow the mostappropriate equipmenttobe specifiedundereach
circumstance.
A documentoutliningthese requirementswasproducedinApril 2012
The Requirementfora Clinical SkillsEquipmentDatabase
The Facultyof Health,Social Care, andEducationhas a range of clinical skillslaboratoriesspreadoverthe
three differentcampuses,Rivermead;VictoriaHouse (due tomove toYoungStreet);andGuildHouse.These
are equippedwitharange of differentsimulationandpractise deviceswhichallowforsimulatedpractice;
objective structuredclinical examinations(OSCE’s),andgeneral skillsteaching.
42
In orderto effectivelymanage thisvaluable resource arequirementforamulti-facettedandflexible
SharePointwebapplicationhasbeenidentified.Academicstaff willneedtobe able toeasilyidentifythe
nature;location;viewpicturesandinformationresourcesof appropriate Clinical SkillsEquipmenttofacilitate
theirteaching,butnotinputnewequipment,administrateloansetc.These roleswouldbe limitedtothe
technical staff withinthe Clinical Skillsareas.Ease of updating,includinglinkstoadditionalresourcessuchas
videodemonstrations,isanessential elementof thisresource,whichappearsnottohave beenunderstoodby
IT Services.
By definitionClinicalSkillsisafluidenvironmentwhere bestpractice guidelinesfrequentlychange,and
available technologyalters.The needfordevelopmentactivitytobe underthe control of the service is
apparent,especiallyasthe developmentwill needtobe informedandprioritisedbasedonknowledge from
withinthe Faculty.Itshouldnotbe conductedbysomeone withoutClinicalSkillsknowledge.There hasbeen
suggestionbyITServicesthattheytake overthe project,eventhoughthere have beendiscussionson-going
since July2011, duringwhichthe intentiontodevelopthe systemin-house hasalwaysbeenmade apparent.
The discussionswere necessaryaspartway throughthe developmentprocessthe Facultydeveloperidentified
an error inthe configurationof the SharePointServerimplementationrenderingitunusableasadvisedby
Microsoft.The suggestionthatIT Servicestake overcontradictsthe following:
http://www.informit.com/articles/article.aspx?p=23953&seqNum=5
ThirteenOrganizational Structure Mistakes
1. Combiningsoftware developmentandoperationsinto a single organization.
The job of operationsistokeepapplicationsupandrunning.The easiest waytodothisisto neverchange
anything.Combiningdevelopmentandoperationsintoasingle organizationhasthe natural tendencytostifle
innovation.Software developmentorganizationsshouldbe separatedfromoperationstoallow newand
modifiedapplicationstobe developedasrequiredtosupportthe businessneedsof the company.
The requirementsfromITServices:
1) To provide adevelopmentenvironmentinwhichtoworkwithinthe Clinical SkillsLaboratories.
2) A correctlyconfiguredServerimplementationof NetBeansandMSSQLset-upinwhichto run.
3) Necessaryinformationsuchasfile structures/paths.
4) Such supportas isnecessarytoachieve the statedoutcomesexpediently.
Work has beenslowedbylackof widespreadunderstandingof the importance of thisactivitytoensure an
improvedstudentexperience andmake muchbetteruse of available resources.
Whilstitcan be seenthatsome progresshasbeenmade ona webapplicationonthe Springframework(with
itsextensivelibrarymakingaveryflexible and highperformance systemachievableatmodestcost) there is
still arounda monthsworkto completionof all the differentfunctions,suchasuserdefinedsearchesanddata
entrypagesto ensure the systemremainscurrent.
43
44
45
46
ASP.Net
We would like to prepare a very simple .NET web application (2-3 pages) demonstrating some of his skills, he
should be mindful to cover one or all of the following elements;
- Clean, simple web front end (use of tools like Twitter Bootstrap are advised)
o Attention to detail expected
- Complete simple tasks:
o Add/read data from SQL database or TXT file
o Work with ASP.net list controls to display results
o Compute a simple total
- We sometimes recommend a simple expenses application
o Add an expense receipt with name and value
o Read all expenses to a list, calculating the total value
- Clean code, no rip-off of sample sites
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
47
<div class="jumbotron">
<h1>This application is to assist in the management of travel costs</h1>
<p class="lead"></p>
</div>
<div class="row">
<div class="col-md-4">
<h2>Submit a request for travel expenses</h2>
<p>
You can add a travel expense submission by pressing "Submit".
</p>
<p>
<a class="btn btn-default" href="Submit">Submit &raquo;</a>
</p>
</div>
<div class="col-md-4">
<h2>Statistical information</h2>
<p>
"Review" allows you to view the different journey lengths and costs. It also
provides totals, and an average cost per mile.
</p>
<p>
<a class="btn btn-default" href="Review">Review &raquo;</a>
</p>
</div>
<div class="col-md-4">
<h2>Overview</h2>
<p>
The "Table of Expenses" displays the full database table.
</p>
<p>
<a class="btn btn-default" href="TableDisplay">Table of Expenses &raquo;</a>
</p>
</div>
</div>
</asp:Content>
<%@ Page Title="Expense Request" Language="C#" MasterPageFile="~/Site.Master"
AutoEventWireup="true" CodeFile="Submit.aspx.cs" Inherits="Submit" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<h2><%: Title %>.</h2>
<h3>Your expense submission page.</h3>
<p>Use this area to provide information on your travel costs.</p>
<div class="row">
<asp:Label ID="NameLabel" runat="server" Text="Your Name"
ForeColor="#000099"></asp:Label>
<asp:TextBox ID="NameBox" runat="server"></asp:TextBox>
48
<asp:Label ID="DateLabel" runat="server" Text="Submission Date"
ForeColor="#000099"></asp:Label>
<asp:TextBox inputtype="date" ID="DateBox" runat="server" Text='<%#
date %>'></asp:TextBox>
<asp:Label ID="DistLabel" runat="server" Text="Distance Travelled"
ForeColor="#000099"></asp:Label>
<asp:TextBox ID="DistBox" runat="server"></asp:TextBox>
<asp:Label ID="CostLabel" runat="server" Text="Amount Claimed"
ForeColor="#000099"></asp:Label>
<asp:TextBox ID="CostBox" runat="server"></asp:TextBox>
<p><br><br /></p>
</div>
<div class="row">
<asp:Label ID="labelMessage" runat="server" Text=""></asp:Label>
<asp:Button ID="buttonSubmit" runat="server" Text="Submit Claim"
OnClick="ButtonSubmit_Click" />
</div>
</asp:Content>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Configuration;
public partial class Submit : Page
{
public String date;
protected void Page_Load(object sender, EventArgs e)
{
date = DateTime.Today.ToString("dd/MM/yyyy");
DataBind();//adds today's date to the submit date field
}
protected void ButtonSubmit_Click(object sender, EventArgs e)
{
string name = "";
string date = "";
string dist = "";//to take the values from the page
string cost = "";
string query = "";
49
string connection ="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=|DataDirectory|Expenses.mdb";
//General validation of the values in the text fields
if (string.IsNullOrWhiteSpace(NameBox.Text))
{
labelMessage.Text = "Please enter your name";
return;
}
if (string.IsNullOrWhiteSpace(DateBox.Text))
{
labelMessage.Text = "Please enter your travel date";
return;
}
DateTime dateValue;
if (!DateTime.TryParse(DateBox.Text, out dateValue))
{
labelMessage.Text = "Sorry I don't understand your travel date. Please use
dd/mm/yyyy format.";
return;
}
if (string.IsNullOrWhiteSpace(DistBox.Text))
{
labelMessage.Text = "Please enter a distance.";
return;
}
int intValue;
if (!int.TryParse(DistBox.Text, out intValue))
{
labelMessage.Text = "Please enter a whole number in distance box.";
return;
}
if (string.IsNullOrWhiteSpace(CostBox.Text))
{
labelMessage.Text = "Please enter the cost.";
return;
}
double doubleValue;
if (!double.TryParse(CostBox.Text, out doubleValue))
{
labelMessage.Text = "Please enter a decimal number in cost box (pounds and
pence).";
return;
}
date = DateBox.Text.ToString();
dist = DistBox.Text.ToString();
cost = CostBox.Text.ToString();//take in the validated values
name = NameBox.Text.ToString();
//use ADO/DAO to apply the data to the database
query = "INSERT INTO Travel values (TravelDate, Distance, Cost,
StaffName)";//Partial string
OleDbConnection conn = new OleDbConnection(connection);
50
OleDbCommand insertCommand = new OleDbCommand(query, conn);//Partial insert
command
insertCommand.Parameters.Add("TravelDate", OleDbType.DBDate);//add the data label
and type
insertCommand.Parameters["TravelDate"].Value = date;//add the value, associating
it with the label
insertCommand.Parameters.Add("Distance", OleDbType.Integer);
insertCommand.Parameters["Distance"].Value = dist;
insertCommand.Parameters.Add("Cost", OleDbType.Double);
insertCommand.Parameters["Cost"].Value = cost;
insertCommand.Parameters.Add("StaffName", OleDbType.VarChar);
insertCommand.Parameters["StaffName"].Value = name;
conn.Open();
insertCommand.ExecuteNonQuery();
conn.Close();
labelMessage.Text = "Your request has been submitted.";
}
}
<%@ Page Title="Table of Travel Expenses" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true" CodeFile="TableDisplay.aspx.cs" Inherits="TableDisplay" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:SqlDataSource ID="SqlDataSource1" Runat="server"
SelectCommand="SELECT TravelDate, Distance, Cost, StaffName FROM Travel ORDER BY TravelDate"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" />
<h2><%: Title %>.</h2>
<h3>The Source of the Breakdown on the Review Page.</h3>
<p>This page displays all available information.</p>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" BackColor="#CCFFFF" BorderColor="#990033" GridLines="Horizontal"
CellSpacing="20" HorizontalAlign="Center" Width="609px">
51
<Columns>
<asp:BoundField DataField="TravelDate" HeaderText="TravelDate"
SortExpression="TravelDate" DataFormatString='{0:dd-MMM-yyyy}' />
<asp:BoundField DataField="Distance" HeaderText="Distance"
SortExpression="Distance" />
<asp:BoundField DataField="Cost" HeaderText="Cost (£)" SortExpression="Cost" />
<asp:BoundField DataField="StaffName" HeaderText="StaffName"
SortExpression="StaffName" />
</Columns>
</asp:GridView>
</asp:Content>
public partial class TableDisplay : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public IQueryable<TravelExpense> Get_TravelExpenses()
{
TravelExpenseContext db = new TravelExpenseContext();
var query = db.TravelExpenses;
return query;
}
}
<%@ Page Title="Review of Costs" Language="C#" MasterPageFile="~/Site.Master"
AutoEventWireup="true" CodeFile="Review.aspx.cs" Inherits="Contact" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<h2><%: Title %>.</h2>
<h3>A depiction of costs for different journeys</h3>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
52
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT
[Distance], [Cost] FROM [Travel]"></asp:SqlDataSource>
<div class="col-md-4">
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource2">
<AlternatingItemTemplate>
<tr style="background-color: #FAFAD2; color: #284775;">
<td>
<asp:Label ID="DistanceLabel" runat="server" Text='<%#
Eval("Distance") %>' />
</td>
<td>
<asp:Label ID="CostLabel" runat="server" Text='<%# Eval("Cost") %>' />
</td>
</tr>
</AlternatingItemTemplate>
<EditItemTemplate>
<tr style="background-color: #FFCC66; color: #000080;">
<td>
<asp:Button ID="UpdateButton" runat="server" CommandName="Update"
Text="Update" />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Cancel" />
</td>
<td>
<asp:TextBox ID="DistanceTextBox" runat="server" Text='<%#
Bind("Distance") %>' />
</td>
<td>
<asp:TextBox ID="CostTextBox" runat="server" Text='<%#
Bind("Cost") %>' />
</td>
</tr>
</EditItemTemplate>
<EmptyDataTemplate>
<table runat="server" style="background-color: #FFFFFF;border-collapse:
collapse;border-color: #999999;border-style:none;border-width:1px;">
<tr>
<td>No data was returned.</td>
</tr>
</table>
</EmptyDataTemplate>
<InsertItemTemplate>
<tr style="">
<td>
<asp:Button ID="InsertButton" runat="server" CommandName="Insert"
Text="Insert" />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Clear" />
</td>
<td>
<asp:TextBox ID="DistanceTextBox" runat="server" Text='<%#
Bind("Distance") %>' />
</td>
<td>
<asp:TextBox ID="CostTextBox" runat="server" Text='<%#
Bind("Cost") %>' />
</td>
</tr>
</InsertItemTemplate>
<ItemTemplate>
<tr style="background-color: #FFFBD6; color: #333333;">
<td>
<asp:Label ID="DistanceLabel" runat="server" Text='<%#
Eval("Distance") %>' />
</td>
<td>
<asp:Label ID="CostLabel" runat="server" Text='<%# Eval("Cost") %>' />
53
</td>
</tr>
</ItemTemplate>
<LayoutTemplate>
<table runat="server">
<tr runat="server">
<td runat="server">
<table id="itemPlaceholderContainer" runat="server" border="1"
style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-
style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
<tr runat="server" style="background-color: #FFFBD6; color:
#333333;">
<th runat="server">Distance</th>
<th runat="server">Cost (£)</th>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</td>
</tr>
<tr runat="server">
<td runat="server" style="text-align: center;background-color: #FFCC66;
font-family: Verdana, Arial, Helvetica, sans-serif;color: #333333"></td>
</tr>
</table>
</LayoutTemplate>
<SelectedItemTemplate>
<tr style="background-color: #FFCC66; font-weight: bold;color: #000080;">
<td>
<asp:Label ID="DistanceLabel" runat="server" Text='<%#
Eval("Distance") %>' />
</td>
<td>
<asp:Label ID="CostLabel" runat="server" Text='<%# Eval("Cost") %>' />
</td>
</tr>
</SelectedItemTemplate>
</asp:ListView>
</div>
<div class="row">
<div class="col-md-6">
<h2>The total mileage covered by staff in this period is <%# tDist %> miles, and
the cost was £<%# tCost %>.<br>
<br />This results in an average travel cost of <%# avMiles %> pence/mile.
</h2>
</div>
</div>
<p>
&nbsp;</p>
</asp:Content>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Configuration;
public partial class Contact : Page
{
54
public string tCost = "";//accessible from the page
public string tDist = "";
public string avMiles = "";
protected void Page_Load(object sender, EventArgs e)
{
bool test1;
bool test2;
double num1 = 0;
int num2 = 0;
object totalDist;//recievers for the two vaules
object totalCost;
double simpleCost = 0;//average per mile
string distance = "SELECT Sum(Distance) FROM Travel";
string cost = "SELECT Sum(Cost) FROM Travel";
//ADO/DAO to retrieve the data from the table
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=|DataDirectory|Expenses.mdb");
OleDbCommand distCmd = new OleDbCommand(distance, conn);
OleDbCommand costCmd = new OleDbCommand(cost, conn);
conn.Open();
OleDbDataReader distReader = distCmd.ExecuteReader();
if (distReader.HasRows)
{
while (distReader.Read())
{
totalDist = distReader.GetValue(0);//The value of the first (and only)
item in the reader
tDist = totalDist.ToString();
}
}
OleDbDataReader costReader = costCmd.ExecuteReader();
if (costReader.HasRows)
{
while (costReader.Read())
{
totalCost = costReader.GetValue(0);
tCost = totalCost.ToString();
}
}
test1 = double.TryParse(tCost, out num1);//Check the values are of the correct
type
test2 = int.TryParse(tDist, out num2);
if (test1 == true && test2 == true)
{
simpleCost = Math.Round((double.Parse(tCost) * 100 / int.Parse(tDist)),
2);//Calculate cost per mile in pence
avMiles = simpleCost.ToString();//value for page
}
conn.Close();
DataBind();//apply to page
}
}
55
JQuery
Dear Chris,
Thank you for your recent application for a developer role with the Web Team here at City University
London.
I am pleased to tell you that you have been successful in progressing to the next round of recruitment.
We would like you to complete a short assessment of your technical skills, which you can find at the
following GitHub repository:
https://github.com/CityUniversityLondon/developer-assessment
It should take no more than an hour or two. The deadline is 9 am on Tuesday, 6th May, at which time
we will select candidates for interview.
If you have any questions in the meantime, please contact us on this email address
(webteam.jobs@city.ac.uk).
Thanks.
--
Tom Waddington, Web Development Manager
City University London
56
57
My work: The first three pic show the revised page with examples of individually selected images.
58
59
The final pic is the result of pressing the button which displays the images in turn for four second
each.
60
/********************************************
To display the images in a lightbox, individually
and sequencially.
Written by Chris Worledge using inspiration
from Barebones Lightbox Template
by Kyle Schaeffer
*********************************************/
// Display the lightbox
function lightbox(imageUrl) {
// jQuery wrapper (optional, for compatibility only)
(function($) {
// Add lightbox/shadow <div/>'s if not previously added
if($('#lightbox').size() == 0){
var theLightbox = $('<div id="lightbox"/>');
var theShadow = $('<div id="lightbox-shadow"/>');
$(theShadow).click(function(e){
closeLightbox();
});
$('body').append(theShadow);
$('body').append(theLightbox);
}
// Remove any previously added content
$('#lightbox').empty();
// Insert HTML content
if(imageUrl != null){//Find the chosen image, and apply it to the lightbox
$('#lightbox').append('<img class="thumbnail" src="' + imageUrl + '">');
}
// Move the lightbox to the current window top + 100px
$('#lightbox').css('top', $(window).scrollTop() + 100 + 'px');
// Display the lightbox
$('#lightbox-shadow').fadeIn('fast', function(){
$('#lightbox').fadeIn('fast');
});
})(jQuery); // End jQuery wrapper
}
// Close the lightbox
function closeLightbox(){
61
// jQuery wrapper (optional, for compatibility only)
(function($) {
stopSequence();//This stops the rolling display
// Hide lightbox/shadow <div/>'s
$('#lightbox').hide();
$('#lightbox-shadow').fadeOut('slow');
// Remove contents of lightbox
$('#lightbox').empty();
})(jQuery); // End jQuery wrapper
}
var wait = 0;//It has to be here for two function to use it
function autobrowse() {
// jQuery wrapper (optional, for compatibility only)
(function($) {
var i = 0;
changeLightBox(i);//Display the fiirst image before the pause
i++;
wait = setInterval(function(){sequence()},4000);
function sequence(){
changeLightBox(i);//Sequence through with 4 secong pause
if (i==19)
i=0;
else i++;
}
})(jQuery); // End jQuery wrapper
}
function stopSequence() {
clearInterval(wait);//Otherwise you can't stop it!
}
function changeLightBox(i){
// jQuery wrapper (optional, for compatibility only)
(function($) {
switch(i)//To select each picture in turn
{
case 0:
lightbox('i/sass/01_tn.jpg');
break;
case 1:
lightbox('i/sass/02_tn.jpg');
break;
62
case 2:
lightbox('i/sass/03_tn.jpg');
break;
case 3:
lightbox('i/sass/04_tn.jpg');
break;
case 4:
lightbox('i/sass/05_tn.jpg');
break;
case 5:
lightbox('i/sems/01_tn.jpg');
break;
case 6:
lightbox('i/sems/02_tn.jpg');
break;
case 7:
lightbox('i/sems/03_tn.jpg');
break;
case 8:
lightbox('i/sems/04_tn.jpg');
break;
case 9:
lightbox('i/sems/05_tn.jpg');
break;
case 10:
lightbox('i/shs/01_tn.jpg');
break;
case 11:
lightbox('i/shs/02_tn.jpg');
break;
case 12:
lightbox('i/shs/03_tn.jpg');
break;
case 13:
lightbox('i/shs/04_tn.jpg');
break;
case 14:
lightbox('i/shs/05_tn.jpg');
break;
case 15:
lightbox('i/soi/01_tn.jpg');
break;
case 16:
lightbox('i/soi/02_tn.jpg');
break;
case 17:
lightbox('i/soi/03_tn.jpg');
break;
case 18:
lightbox('i/soi/04_tn.jpg');
break;
63
case 19:
lightbox('i/soi/05_tn.jpg');
break;
default:
return;
}
})(jQuery); // End jQuery wrapper
}
64
JSon
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN" "http:www.w3.org/TR/xhtml1-
transitional.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title>
65
Translate text to numbers
</title>
<script language="JavaScript" src="textToNumbers.js">
</script>
<link rel=stylesheet href="style1.css" type"text/css">
</head>
<p div id="acer">
A little demo of converting text to a sum number. Place the text in the first
text area below and press the Translate button. The text is read and numbers added together.
The result is displayed in the second text box.
<textarea ID="Area">
Enter text here...
</textarea>
<p style="position:absolute; top:380px;" FORM>
<INPUT TYPE="button" Style="background:#AACCFF; cursor:hand;" Value="Translate"
onClick="dispTot()">
<INPUT TYPE="Text" Name="Result" ID="Result">
<INPUT TYPE="button" Style="background:#AACCFF; cursor:hand;" Value="Test Text"
onClick="add(text2num('one two three fourteen'))">
</FORM>
var Small = {
'zero': 0,
'one': 1,
'two': 2,
'three': 3,
'four': 4,
'five': 5,
'six': 6,
'seven': 7,
'eight': 8,
'nine': 9,
66
'ten': 10,
'eleven': 11,
'twelve': 12,
'dozen': 12,
'thirteen': 13,
'fourteen': 14,
'fifteen': 15,
'sixteen': 16,
'seventeen': 17,
'eighteen': 18,
'nineteen': 19,
'twenty': 20,
'score': 20,
'thirty': 30,
'forty': 40,
'fifty': 50,
'sixty': 60,
'seventy': 70,
'eighty': 80,
'ninety': 90
};
var Magnitude = {
'hundred': 100,
'thousand': 1000,
'million': 1000000,
'billion': 1000000000,
'trillion': 1000000000000
};
var a, g, n;
function feach(str) {
if (str != "and"){//ignores 'and' to allow for a hundred and twenty thousand etc.
var x = Small[str];
if (x != null) {
g = g + x;//always add the small numbers(up to ninety)
}
var y = Magnitude[str];
if (y != null){
if (g == 0){
g = y;//if the text was 'a hundred' we would add the hundred
}
else{
g = g * y;//if it was four hundred we would multiply the
hundred
67
}
}
if (x == null && y == null){
n = n + g;//when we hit a non number word we add the value to
the total
g = 0;
}
}
}
function text2num(txt) {
a = txt.toString().split(/[s-]+/);//creates an array of words from the text
g = 0;
n = 0;
m = "flush";
a.forEach(feach);//iterates through the array testing if each word is a number etc
feach(m);//ensures the final values are added to the total
return n;//sends the total back
}
function test(){
return "test";//just for testing
}
function add(text){
var TheTextBox = document.getElementById("Result");
TheTextBox.value = text;//adds the total to the textbox
}
function dispTot() {
var description = document.getElementById("Area");
var t = description.value;//gets the text from the textbox
var txt = t.toLowerCase();//in case of capitals
var r = text2num(txt);//gets the total
add(r);
}
68
Database
Clinic
PK C_Name
C_Address1
C_Address2
C_Town_City
C_Postcode
C_Telephone_No
Hospital
PK H_Name
H_Address1
H_Address2
H_Town_City
H_Postcode
H_Telephone_No
Staff
PK StName
Staff_Type
stPassword
FK1 Clinic_Name
Patient
PK Medical_Reg_No
PaPassword
Surname
Forename
DateOfBirth
P_Telephone_No
P_Address1
P_Address2
P_Town_City
P_Postcode
FK1 C_Name
Consultant
PK ConName
FK1 Hospital
Special_Interest
Appointment
PK Appointment_No
FK1 Doctor
Date
Time
FK2 Medical_Reg_No
Medical_Record
PK MedicalRecordNo
FK1 Appointment_No
Symptoms
Diagnosis
Prescription_Item
PK,FK1 Prescription_No
PK Item_No
Drug
Dose
Frequency
Length
Prescription
PK Prescription_No
FK1 MedicalRecordNo
Prescribing_Authority
Prescribe_Date
Referral
PK,FK1 MedicalRecordNo
PK,FK2 ConName
LetterDate
69
A list of all patients registered with one of the clinics on the system:
Go
alter procedure PiratePractisePatients
AS
Select Patient.Forenames+' '+ Patient.Surname as PiratePractisePatients,
Convert(VARCHAR, DateOfBirth, 106) as BirthDate From Patient
Where Clinic_Name = 'Pirate Practise'
go
Execute PiratePractisePatients
A list of patients seen by a particular GP in the past 3 days:
Go
Alter procedure DrPalantinesThreeDays
AS
Select Distinct Patient.Forenames+' '+ Patient.Surname as
Patients_seeing_Dr_Palintine_2ndto4th_December From Patient, Appointment
Where Patient.Medical_Reg_No = Appointment.Medical_Reg_No
AND Appointment.AppDate Between '12-02-2008' And '12-04-2008'
AND Appointment.Doctor = 'Dr Palintine'
go
Execute DrPalantinesThreeDays
Appointment
Appointment_no
Doctor
AppDate
AppTime
Medical_Reg_No
Clinic
C_Name
C_Address1
C_Address2
C_Town_City
C_Postcode
C_Telephone_No
Consultant
ConName
Hospital
Special_Interest
Hospital
H_Name
H_Address1
H_Address2
H_Town_City
H_Postcode
Medical_Record
MedicalRecordNo
Appointment_no
Symptoms
Diagnosis
Patient
Medical_Reg_No
PaPassword
Surname
Forenames
DateOfBirth
Clinic_Name
P_Telephone_No
P_Address1
P_Address2
P_Town_City
P_Postcode
Prescription
Prescription_No
MedicalRecordNo
Prescribing_Authority
Prescribing_Date
Prescription_Item
Prescription_No
Item_No
Drug
Dose
Freq
CourseLength
Referral
referralNo
MedicalRecordNo
ConName
LetterDate
Staff
StName
Staff_Type
stPassword
Clinic_Name
70
An appointment list for a GP for the following day:
Go
Alter procedure DrAntonTomorrow
AS
Select Appointment.Appointment_no as Dr_Anton_5_12_08,
Convert( VARCHAR,Appointment.AppTime,108) as Time, Patient.Forenames+' '+
Patient.Surname as Patients
From Appointment, Patient
Where Appointment.Doctor = 'Dr Anton'
And Appointment.AppDate = '12-05-2008'
And Appointment.Medical_Reg_No = Patient.Medical_Reg_No
go
Execute DrAntonTomorrow
71
A full medical report for a particular patient with at least 3
appointments, 2 prescriptions, and a referral.
use 0408183_assignment
go
IF OBJECT_ID ('appointmentcount', 'V') IS NOT NULL
DROP VIEW appointmentcount ;
GO
CREATE VIEW appointmentcount AS
select Patient.Medical_Reg_No, count(Appointment.Appointment_no) as
NumOfApp
from Patient, Appointment
where Patient.Medical_Reg_No = Appointment.Medical_Reg_No
group by Patient.Medical_Reg_No
go
IF OBJECT_ID ('prescriptioncount', 'V') IS NOT NULL
DROP VIEW prescriptioncount ;
GO
Create view prescriptioncount AS
select Patient.Medical_Reg_No, count(Prescription.Prescription_No) as
NumOfPresc
from Patient, Appointment, Medical_Record, Prescription
WHERE Patient.Medical_Reg_No = Appointment.Medical_Reg_No and
Appointment.Appointment_no = Medical_Record.Appointment_no and
Medical_Record.MedicalRecordNo = Prescription.MedicalRecordNo
group by Patient.Medical_Reg_No
go
IF OBJECT_ID ('referralcount', 'V') IS NOT NULL
DROP VIEW referralcount ;
GO
Create view referralcount AS
select Patient.Medical_Reg_No, count(Referral.ConName) as NumOfRef
from Patient, Appointment, Medical_Record, Referral
WHERE Patient.Medical_Reg_No = Appointment.Medical_Reg_No and
Appointment.Appointment_no = Medical_Record.Appointment_no and
Medical_Record.MedicalRecordNo = Referral.MedicalRecordNo
group by Patient.Medical_Reg_No
go
DECLARE curMultipleApp3Pres2Ref1 CURSOR FOR
select appointmentcount.NumOfApp, prescriptioncount.NumOfPresc,
referralcount.NumOfRef, appointmentcount.Medical_Reg_No
from appointmentcount, prescriptioncount, referralcount
Where appointmentcount.Medical_Reg_No = prescriptioncount.Medical_Reg_No
and
prescriptioncount.Medical_Reg_No = referralcount.Medical_Reg_No
DECLARE @numOfAppID Int
DECLARE @numOfPresID int
Declare @numOfRefID int
Declare @patientID nvarchar(8)
open curMultipleApp3Pres2Ref1
FETCH NEXT FROM curMultipleApp3Pres2Ref1 INTO
@numOfAppID, @numOfPresID, @numOfRefID,@patientID
WHILE @@Fetch_Status = 0
BEGIN
SET NOCOUNT ON;
if @numOfAppID >2 and @numOfPresID>1 and @numOfRefID>0
SELECT Patient.Medical_Reg_No, Patient.Forenames, Patient.Surname,
Appointment.Doctor, Convert(VARCHAR, Appointment.AppDate, 106) as Seen,
72
Medical_Record.Symptoms, Medical_Record.Diagnosis, Prescription_Item.Drug,
Referral.ConName
FROM Patient, Appointment, Prescription, Prescription_Item, Medical_Record
Left OUTER JOIN Referral
ON Medical_Record.MedicalRecordNo = Referral.MedicalRecordNo
WHERE Patient.Medical_Reg_No = Appointment.Medical_Reg_No and
Appointment.Appointment_no = Medical_Record.Appointment_no and
Medical_Record.MedicalRecordNo = Prescription.MedicalRecordNo and
Prescription.Prescription_No = Prescription_Item.Prescription_No and
Patient.Medical_Reg_No = @patientID
FETCH NEXT FROM curMultipleApp3Pres2Ref1 INTO
@numOfAppID, @numOfPresID, @numOfRefID,@patientID
END
CLOSE curMultipleApp3Pres2Ref1
DEALLOCATE curMultipleApp3Pres2Ref1
Go
Database Administrators Plan
Server and Database Security and User Administration:
Appropriate firewall and anti-virus software would be essential both on servers and all client
machines.
Server and database security will be achieved through identification of users and determination of
their needs. A patient will only have access via a web application, which will require them to enter
their user name and login password. This will be used to identify the records they may access,
which will be related to their Medical Registration Number, giving them access to their own
appointment and medical information. It is likely that only recent information would be made
available on-line as too much information without the knowledge to comprehend its significance
should be avoided. Requests for full information would be addressed by providing access to it
within the surgery, with appropriate counselling/advise provided to avoid confusion.
Staff will be split into three groups.
Administrative staff will be able to book appointments for patients who telephone, so must have
rights to patient and appointment tables in their entirety. This will also give them access to
produce appointment schedules for doctors. They will need access to referral information to
produce referral letters, this will include Medical Record and Prescription information. A subgroup
of administrators could be given these additional access rights at individual clinic management
discretion.
73
Medical staff will be able to view and add data in all tables, with labelling from their login
information applied to the diagnosis, prescription and referral data. Editing of input information
will be limited to pre-submission forms in the application. The database proper will not allow
editing of submitted data.
Nurses will have the same viewing rights as doctors, but will not be allowed to add diagnosis,
prescription, or referral.
All in clinic users will be authenticated using windows authentication and access rights determined
by their login category. External access via a web application will be managed by providing view s
for each patient including the information they are entitled to view, with application for
appointment as their only data entry option. A simple stored procedure applying the login identity
to a query to create/update the view will gather all the available information. the query can be
limited to go back a particular period of time as deemed appropriate.
New users would be applied to the windows server systemand their login group would act as the
indicator of the rights to be applied in the SQL server database system. Individual requirements
could be accomodated by creating bespoke groups as required, with access priveliges adjustable
down to individual column level. This may be necessary for columns such as password.
Stored procedures would be employed to provide specific information of interest to a user group
without having to provide them with access to all the source data.
A systemof recording e-mail addresses and e-mailing somebody a password if they forget it is
commonly used. It would be unwise to use the e-mail address as the user ID as other people will
know somebody's e-mail address and they may be neighbours who share the same doctors
surgery/clinic.
Administration priveliges would be guarded, as the potential for catastrophe is considerable. If
there are not two members of staff suitably qualified to accept these responsibilities a reciprical
arrangement where another administrator is co-opted as stand-in in the event of holiday or
sickness absence would be instigated. Both parties would benefit from mutual support, and this
may extend to a network offering forum advice as well as absence cover.
Servers would be physically secured to prevent malicious damage or theft.
74
Database Settings and Configurations:
The database will be set up to store log file seperate to data files to improve efficiency. A
prediction of data volume over time would be necessary to determine storage requirements. Auto
creation and update of statistics could be employed although auto update is to be replaced by
scheduled update in the maintenance schedule, but auto shrinking may be avoided as it would
impact performance and may not be necessary. Full recovery model would be employed to
minimise the risk of loosing data in the event of failure. Checksum page damage option will detect
pages to be repaired in the event of a database recovery.
Storing related tables on different discs will allow them to be accessed simultaneously. This is
achieved by placing them in different filegroups and specifying the locations of these filegroups on
different disks. This activity would be incompatible with a server employing a striped RAID option.
It is becoming more common for clinical databases to store images of patients to act as memory
triggers to clinicians reviewing cases in the patients absence. This requires more storage space and
may reduce performance of the server, but may improve the performance of the activity by
improving the clinician understanding of the situation. The balance is likely to be struck in favour
of this approach, which would require a record of consent to be maintained.
The systemis intended as a distributed system with a wide area network divided at each clinic into
local area networks. The systemmanagement server will be located at one clinic, and a mirroring
server at a second location. In the event of an integrity check failure of the systemmanagement
server, the mirror server would be employed whilst recovery was implemented. This approach
would ensure continuous availability of the system. It would be necessary to encrypt data for
transmission between locations and a private link would be preferable to sending data over the
internet.
Regular audit activity would include random activity investigation, as well as specific activity
trailing, this would include consideration of data source and modification altering. Error correction
would generally be acchieved by addition of correction information maintaining the original
entries to allow monitoring. For example a medical record could only be edited prior to submission,
but would not be available for editing post submission. All such submissions would be labelled
with the user information, client machine identification, date and time, to allow audit trailing.
A log of record updates would be employed to assist in recovery in the event of failure or fallover.
Record locking would be relatively straightforward as patient medical record information would be
inaccessable during consultation, but would not be required legitimately by a third party under
these circumstances.
75
Start up procedures would not be employed frequently as the servers would generally run
continuously to provide patient access out of hours.
Management of Indexes and Views:
In order to identify indexes it would be necessary to identify common activities which involve
searches and design indexes based on the most prevelant parameters. As clustered indexes are
limited to one per table and are especially effective, these would be targeted at the largest volume
of activity. In the absence of available information, it would be necessary to monitor activity to
determine requirements. Should clustered indexes be applied erroneously, they may be altered
when this becomes apparent as they do not alter the data.
It is likely that data related to each clinic would be indexed to prevent search of all data when
clinic specific information is required.
The Database Engine Tuning Advisor provides information on optimisation of indexes. This
information would be considered and action taken where considered prudent.
Views may be created to combine related columns from different tables as well as to filter or
select data to improve its relevance. Since the range of data may be restricted it is important to
consider the effect that any omission may have on the users perspective. Whilst the search for
efficiency is laudible, it must not be achieved by compromising integrity. Hence data must not be
seperated from related data without this being apparent to the user. This topic could be discussed
in greater detail, but in the context of this activity it will be sufficient to indicate that the author is
aware that inappropriate filtering could have disasterous consequences, so any activity which may
cause radical consequences should be based on complete information and not selective views.
By creating indexes on views to improve performance, the views become stored objects rather
than virtual tables. This requires careful consideration as to its impact on performance, but may be
the realistic approach where much activity is occuring on views. The first index created must be
clustered.
Views may be used to screen out information which is outside the requirements of the user, so as
to avoid compromising sensitive information unnecessarily. This would facilitate compliance with
the data protection act which covers data distribution as well as data storage. Updates of views
would be based on triggers responding to addition of data.
The use of horizontal security, where views are limited to specific rows, would be employed to
give patients access to their data without access to that of other patients.
76
Database Maintenance Including Database Backup, Integrity Check,
Database Shrinking, Indexes and Statistics Maintenance and
Maintenance Scheduling:
A documented maintenance plan would be employed which would include backup, integrity check,
shrinking, and index and statistics maintenance. Regular manual monitoring of aspects such as
available storage space should also be scheduled and documented.
In order to determine the backup activity for a given database it is necessary to compare the
consequence of risk, with the cost of alleviating it. Since the database availability is ensured by
mirroring it is unlikely that the practises could justify additional resources for further backup, so it
is likely that the mirroring activity would be considered sufficient backup to cope with failure as
the two servers would be located on different sites. An option with reasonable costs would be to
purchase an external hard drive and use it for daily full backup out of normal surgery hours
augmented with periodic differential backup. This activity should be accomplished at both sites to
guard against fire etc. This activity would be documented in a seperate log.
Constraints are employed to limit opportunity for submission of erroneous data, however it is
important to avoid prevention of legitimate activity by poorly defined constraints. It is necessary
to employ a continual user feedback approach to ensure the system is not creating inefficiency.
Both formal and informal communication should be employed to optimise design parameters. The
successful compromise of limiting inappropriate data entry with allowing trouble free use would
improve the outcome of integrity checking.
Shrinking would be employed cautiously as it will impact performance. The data volume involved
and the availability of economical high volume storage media, would limit the requirement of this
activity. Thresholds for shrinking activity would relate to current storage space, and upgrade of
this space would be considered periodically.
Index and statistics information is used by thedatabase engine to inform it of routes to particular
data.
Reorganising and rebuilding indexes would have significant impact on performance if conducted
infrequently. By scheduling these as frequently out-of-hours activities their impact will diminish as
less alteration will occur on each occasion. This approach will avoid sudden and unanticipated
alterations in performance which can be disconcerting for users.
Statistics must be kept current in conjunction with indexes as they will interact and also affect
performance. The automatic updating may be employed, but scheduled updates are a preferred
77
alternative as they are more complete and reliable. These activities should also be sceduled to
avoid impacting on performance during periods of high demand. All statistics should be updated
not just column or index statistics.
The performance monitor would also be utilised frequently to highlight an performance
bottleknecks and inform their resolution.
78
STEPproject report:
Enhancement of Bluetooth link for wireless headset use with amateur radio.
Company; RPF Communications.
Student; Chris Worledge.
79
Contents
Background: Page 67
Detail: Page 68
Project plan: Page 68
Project Progression: Page 70
Results: Page 71
Learning outcomes: Page 71
Recommendations: Page 72
Appendix: example code Page 73
Schematic Page 80
Skills Tracker Reports Page 81
Example e-mails Page 87
80
Background:
Chris Worledge has just completed the second year of BSc (hons) Computer Science at Anglia
Ruskin University. Having no car meant the working day started and ended with an eight mile
bicycle ride which meant he was the brightest employee first thing in the morning, and was able to
improve his fitness over the eight weeks noticeably.
RPF Technical services is a small company with four full time staff engaged in bespoke design work
for other manufacturers. It has a daughter company called RPF Communications with no
additional staff.
RPF Communications currently market a range of devices to support amateur radio enthusiasts.
One of these devices allows the use of wireless headsets (as used with mobile telephones) using
Bluetooth® technology.
The project aim was to provide an enhancement to this functionality, allowing high quality
headsets to be fully utilised, extending the frequency response beyond that of telephone quality
speech systems.
81
Detail:
The product currently marketed to provide wireless headset operation is called the Talksafe. The
required enhancement was to increase the frequency range of the audio signal to take full
advantage of the capacity of a high-fidelity headset. This implies a name of “Wide Audio Range
Talksafe”, which provides a unique selling point in its quirky acronym Wart.
XYP4372 Wart
The Bluetooth® standard communication link is called SCO (synchronous connection-oriented link)
but this has the telephone quality audio range. To provide the quality enhancement required it
was necessary to change the link type employed to eSCO (enhanced synchronous connection-
oriented link).
New hardware was to be designed using a device that RPF had no prior experience of. It was
hoped that the use of this device would provide greater control and flexibility than the one
employed previously. The chip-set employed in this device was manufactured by the same
company as the one in the previous device so it was assumed that there would be little difficulty in
the translation process.
Following design of the hardware it would be possible to design code that complimented it
precisely.
The advantages to RPF would be an enhancement of their product range which had not been
achieved previously due to lack of available effort, and the introduction of an alternative to their
previous Bluetooth® device which it was expected would be more flexible.
The advantages to the author would be an opportunity to revisit the workplace after the second
year of degree study in order to put context to some of the learning, an opportunity to produce C
code in a real work environment, and material to stimulate ideas for the third year major project.
Project plan:
The intention was to design the hardware first and pass this to others to be manufactured. The
software could then be written to compliment the hardware design, and the two married to
enable testing and modification to improve the final outcome.
A diagram of the project plan is depicted on the next page.
82
This plan did not seem optimistic for the time scale of the project.
Read
background
information
Design
hardware
Hardware
productio
n
Write code
changes
Compile
and build
binary file
Apply binary file
to hardware
The previous hardware design and general
information relevant to usage, along with a
requirements specification document which
was discussed for clarification.
Debug and
improve.
A minimal requirement concerning function and
performance was included in the requirements
specification.
Reference was made to previous design.
The board was
etched and
some
components
applied.
Comprehending a large
volume of dispersed code.
Altering link type,
responding to buttons, and
illuminating indicators.
Respond to
compiler errors.
Address any
shortcomings and
enhance performance.
Install the
software on the
flash memory
Read
background
information
83
Project Progression:
A meeting was held in the first week, after the requirements specification had been absorbed. This
served to limit some of the less practical aspects and clarify precisely what was required. As the
author had not designed electronics for twenty years, and the technology had changed
considerably over that time, the hardware design represented a stimulating mental challenge. It
was completed over two-and-a-half weeks with a lot of the time consumed learning to use the
schematic and p.c.b. layout application “Easy PC” which was less ‘easy-peasy’ than hoped!
The design was modified in line with company policy and the author was disappointed not to be
consulted on this at all. The p.c.b. layout was passed to a colleague for etching, and when this was
done, some components were added.
The background reading on the code was extensive and challenging, as the existing code was
spread amongst over 300 files and consisted of around half a million lines. The chosen language of
C being new to the author enhanced this challenge. Once the layout and function had been
absorbed the task was accomplished over a couple of weeks, and following some revision based
on discussion with colleagues it was compiled in half a day. This surprised some colleagues who
had anticipated this activity being more time consuming.
The next stage of installing the binary files on the flash memory and debugging proved an
insurmountable hurdle within the timeframe. The chipset manufacturers supplied a P.C.
application for compiling, building the binary files, and debugging, but its efficacy proved limited.
Although it gave the impression of adequate progress, any attempt at debugging produced
communication error messages. This scenario was discussed at length with the chip-set
manufacturers technical support staff, who were unable to provide explanation. Being directed to
the U.S. support in Texas added complication and delay, but this was overcome after a few more
e-mails.
84
The first stage in addressing this problem was to alter the format of the link library as it was
constructed by the IDE as a linked list, and the chip-set required a mapped array. The company
Technical Director accomplished this as it was beyond the experience of the author. The result of
this activity gave the appearance that the problem had been resolved, but on closer inspection
this was not the case. A repetition of this scenario took until the end of the project, so at the time
of writing the project was incomplete.
Results:
Although it was disappointing to leave the project incomplete the experience was both
worthwhile and enjoyable. An introduction into a different area of work activity was combined
with the opportunity to interact with a group of motivated people. The experience of this work
will undoubtedly enhance both the remaining study and employability of the author.
Learning outcomes:
The experience of coding in a ‘real world’ environment has provided context to what had
previously only been explored academically. An up-to-date view of current work trends will be
useful in targeting study effort as well as future employment application. Success in code
production on a large code volume project has given the author confidence in his programming
ability. Translation of learning to a different language and structure demonstrated their flexibility.
An introduction to new technologies, both electronic components and applications was
appreciated.
85
Recommendations:
The problem of incompatibility between the IDE output and the chipset may be related to the
release level of the chipset. The release employed is numbered 3 whilst the current one is 5. This
may mean that the current release of the IDE is aimed at use with the current release of the
chipset, although continuing production of previous releases should be supported. The only device
that would respond to the code was on a development board which had different switch and
indicator configuration, making it difficult to test the software on it. This device on a suitably
designed board would be another option which should be considered.
86
Appendix:
Examples of revised code and the author’s electronics design are provided
CSRStackConnectionconnection.h
/*!
@brief Synchronous packet types.
*/
typedef enum
{
sync_hv1 = 0x0001,
sync_hv2 = 0x0002,
sync_hv3 = 0x0004,
sync_all_sco = sync_hv3 | sync_hv2 | sync_hv1,
sync_ev3 = 0x0008,
sync_ev4 = 0x0010,
sync_ev5 = 0x0020,
sync_all_esco = sync_ev5 | sync_ev4 | sync_ev3,
sync_2ev3 = 0x0040,
sync_3ev3 = 0x0080,
sync_2ev5 = 0x0100,
sync_3ev5 = 0x0200,
sync_all_edr_esco = sync_3ev5 | sync_2ev5 | sync_3ev3 | sync_2ev3,
sync_all_pkt_types = sync_all_edr_esco | sync_all_esco | sync_all_sco
} sync_pkt_type;
/*!
@brief Synchronous connection link type.
*/
typedef enum
{
sync_link_unknown,
sync_link_sco,
sync_link_esco
} sync_link_type;
/*!
@brief Message received due to a call to ConnectionSyncConnect or
ConnectionSyncResponse.
*/
typedef struct
{
hci_status status; /*!< Indicates the success or failure of the
connection attempt. */
sync_link_type link_type; /*!< Specifies whether a SCO or eSCO
packet type was obtained. */
Sink audio_sink; /*!< The Synchronous connection sink. */
uint32 rx_bandwidth; /*!< Receive bandwidth. */
uint32 tx_bandwidth; /*!< Transmit bandwith. */
uint8 sco_handle; /*!< Link Manager SCO Handle. */
} CL_DM_SYNC_CONNECT_CFM_T;
/*!
@brief Message received due to a call to ConnectionGetLinkQuality.
*/
typedef struct
{
hci_status status; /*!< HCI status code.*/
uint8 link_quality; /*!< The link quality setting.*/
Sink sink; /*!< The sink.*/
87
} CL_DM_LINK_QUALITY_CFM_T;
CSRTest APP and API & HeilLink:
AudioGate.c
void AudioGate_SCOConnectIND Line 330
void AudioGate_SCOConnectIND(PTASK pTask,AGHFP_AUDIO_CONNECT_IND_T *pData)
{ PTASK pPeerTask;
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + Find the associated task */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
pPeerTask=Task_FindByAddr(&pData->bpAddress);
if ( pPeerTask!=NULL && State_IsReady(pPeerTask) &&
pPeerTask->Role.Peer.Flags.boLinkEnable )
{ AghfpAudioConnectResponse(pPeerTask->Role.Gateway.pProfile,
TRUE,sync_all_esco,NULL);
}
else
{ AghfpAudioConnectResponse(pPeerTask->Role.Gateway.pProfile,
FALSE,sync_all_esco,NULL);
}
}
void AudioGate_SCOConnectCFM Line 351
void AudioGate_SCOConnectCFM(PTASK pTask,AGHFP_AUDIO_CONNECT_CFM_T *pData)
{ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
switch ( pData->status )
{ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + Successful audio connection. */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
case aghfp_audio_connect_success:
DEBUG_MSG( (" SCO Open") );
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + Save SCO link pointer, even if we disconnect later */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
pTask->Role.Gateway.pSCOSink=pData->audio_sink;
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + Only allowing eSCO connections */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
if ( pData->link_type==sync_link_esco )
{ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
headset.c
void Headset_SCOConnectIND Line 346
void Headset_SCOConnectIND(PTASK pTask)
{ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + Currently always allow connection */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
HfpAudioConnectResponse(pTask->Role.Headset.pProfile,
TRUE,sync_all_esco,NULL);
}
void Headset_SCOConnectCFM Line 357
void Headset_SCOConnectCFM(PTASK pTask,HFP_AUDIO_CONNECT_CFM_T *pData)
{ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
switch ( pData->status )
{ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + Successful audio connection. */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
case hfp_audio_connect_success:
88
DEBUG_MSG( (" Success") );
pTask->Role.Headset.pSCOSink=pData->audio_sink;
pTask->Role.Headset.eLinkType=pData->link_type;
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + Only allowing eSCO connections */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
if ( pTask->Role.Headset.eLinkType!=sync_link_esco )
{ break;
}
void Headset_SCOConnectCFM Line 398
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + Bump to next connect sub-state */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
State_Change(pTask,TaskState_Connect);
pTask->Role.Headset.boLinkActive=TRUE;
PioSet(3, 1)//
break;
Line 449
void Headset_SCODisconnectIND(PTASK pTask)
{ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + For when the link is no longer required + */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
pTask->Role.Headset.pSCOSink=NULL;
pTask->Role.Headset.boLinkActive=FALSE;
State_SetMain(pTask,TaskState_Disconnect);
PioSet(3, 0);//Extinguish paired LED
}
State.c
void State_Peer_Connect
Line 679
if ( !pTask->Role.Peer.Flags.boIncoming )
{ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + If not incomming then ... */
/* + Sends a AGHFP_AUDIO_CONNECT_CFM message */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
AghfpAudioConnect(pTask->Role.Gateway.pProfile,
sync_all_esco, NULL);
}
CSRstackconnectiondm_sync
/* Default parameters for a synchronous connection. Configured to obtain best
SCO link possible.
NOTE: It's not possible to currently have both SCO and eSCO packet types in
the same request
due to the way the firmware works. */
static const sync_config_params default_sync_config_params =
{
1600UL * params->tx_packet_length, /* tx_bandwidth */
1600UL * params->rx_packet_length, /* rx_bandwidth */
0xFF, /* max_latency */
sync_air_coding_cvsd, /* voice_settings */
sync_retx_disabled, /* retx_effort */
sync_all_esco /* packet_type */
};
HeilLink/Headset.c/line 351
HfpAudioConnectResponse(pTask->Role.Headset.pProfile,
TRUE,sync_all_esco,NULL);
368
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* + Only allowing eSCO connections */
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio
Chris worledgeportfolio

Weitere ähnliche Inhalte

Was ist angesagt?

CRRT basic principal by Wael Nasri
CRRT basic principal by Wael NasriCRRT basic principal by Wael Nasri
CRRT basic principal by Wael Nasriwael nasri
 
Dr osama elshahat crrt
Dr osama elshahat crrtDr osama elshahat crrt
Dr osama elshahat crrtFarragBahbah
 
Goal Directed Fluid Therapy: Fact, Fiction, Findings and the Future
Goal Directed Fluid Therapy: Fact, Fiction, Findings and the FutureGoal Directed Fluid Therapy: Fact, Fiction, Findings and the Future
Goal Directed Fluid Therapy: Fact, Fiction, Findings and the FutureNC Association of Nurse Anesthetists
 
Human erythrocyte filterability at low driving pressure version 7.1
Human erythrocyte filterability at low driving pressure   version 7.1Human erythrocyte filterability at low driving pressure   version 7.1
Human erythrocyte filterability at low driving pressure version 7.1Shay Ginsbourg
 
5-MEO-DALT produces short-lived psychedelic effects
5-MEO-DALT produces short-lived psychedelic effects5-MEO-DALT produces short-lived psychedelic effects
5-MEO-DALT produces short-lived psychedelic effectsBRC SHOP
 
HDMICS PFF Koutsiaris 2005
HDMICS PFF Koutsiaris 2005HDMICS PFF Koutsiaris 2005
HDMICS PFF Koutsiaris 2005Koutsiaris Aris
 
New blood draw device evaluated for hemolysis
New blood draw device evaluated for hemolysis New blood draw device evaluated for hemolysis
New blood draw device evaluated for hemolysis haidar Ali
 
accurate monitoring of intravascular fluid volume
accurate monitoring of intravascular fluid volumeaccurate monitoring of intravascular fluid volume
accurate monitoring of intravascular fluid volumePhilip Binkley MD, MPH
 
Blood conservation strategy
Blood conservation strategyBlood conservation strategy
Blood conservation strategyVinodh Natarajan
 
Assessment of cardiac contractility using langendorff apparatus connected to ...
Assessment of cardiac contractility using langendorff apparatus connected to ...Assessment of cardiac contractility using langendorff apparatus connected to ...
Assessment of cardiac contractility using langendorff apparatus connected to ...dina merzeban
 
Frederic Michard - Perioperative Fluid Management - IFAD 2012
Frederic Michard - Perioperative Fluid Management - IFAD 2012Frederic Michard - Perioperative Fluid Management - IFAD 2012
Frederic Michard - Perioperative Fluid Management - IFAD 2012International Fluid Academy
 
The menagerie of monitoring tools by Professor Jean-Louis Teboul
The menagerie of monitoring tools by Professor Jean-Louis TeboulThe menagerie of monitoring tools by Professor Jean-Louis Teboul
The menagerie of monitoring tools by Professor Jean-Louis TeboulCICM 2019 Annual Scientific Meeting
 
02 tuong phan
02 tuong phan02 tuong phan
02 tuong phanDuy Quang
 
Hemodialysis orders part 1
Hemodialysis orders part 1Hemodialysis orders part 1
Hemodialysis orders part 1JAFAR ALSAID
 
Priming fluid and hemodilution
Priming fluid and hemodilutionPriming fluid and hemodilution
Priming fluid and hemodilutionManu Jacob
 
Indian j anaesth60119-6203009_171350
Indian j anaesth60119-6203009_171350Indian j anaesth60119-6203009_171350
Indian j anaesth60119-6203009_171350Arthi Rajasankar
 

Was ist angesagt? (19)

CRRT basic principal by Wael Nasri
CRRT basic principal by Wael NasriCRRT basic principal by Wael Nasri
CRRT basic principal by Wael Nasri
 
Dr osama elshahat crrt
Dr osama elshahat crrtDr osama elshahat crrt
Dr osama elshahat crrt
 
Goal Directed Fluid Therapy: Fact, Fiction, Findings and the Future
Goal Directed Fluid Therapy: Fact, Fiction, Findings and the FutureGoal Directed Fluid Therapy: Fact, Fiction, Findings and the Future
Goal Directed Fluid Therapy: Fact, Fiction, Findings and the Future
 
Human erythrocyte filterability at low driving pressure version 7.1
Human erythrocyte filterability at low driving pressure   version 7.1Human erythrocyte filterability at low driving pressure   version 7.1
Human erythrocyte filterability at low driving pressure version 7.1
 
5-MEO-DALT produces short-lived psychedelic effects
5-MEO-DALT produces short-lived psychedelic effects5-MEO-DALT produces short-lived psychedelic effects
5-MEO-DALT produces short-lived psychedelic effects
 
Optimization parameters in Countercurrent Chromatography
Optimization parameters in Countercurrent ChromatographyOptimization parameters in Countercurrent Chromatography
Optimization parameters in Countercurrent Chromatography
 
HDMICS PFF Koutsiaris 2005
HDMICS PFF Koutsiaris 2005HDMICS PFF Koutsiaris 2005
HDMICS PFF Koutsiaris 2005
 
New blood draw device evaluated for hemolysis
New blood draw device evaluated for hemolysis New blood draw device evaluated for hemolysis
New blood draw device evaluated for hemolysis
 
accurate monitoring of intravascular fluid volume
accurate monitoring of intravascular fluid volumeaccurate monitoring of intravascular fluid volume
accurate monitoring of intravascular fluid volume
 
Blood conservation strategy
Blood conservation strategyBlood conservation strategy
Blood conservation strategy
 
Assessment of cardiac contractility using langendorff apparatus connected to ...
Assessment of cardiac contractility using langendorff apparatus connected to ...Assessment of cardiac contractility using langendorff apparatus connected to ...
Assessment of cardiac contractility using langendorff apparatus connected to ...
 
Frederic Michard - Perioperative Fluid Management - IFAD 2012
Frederic Michard - Perioperative Fluid Management - IFAD 2012Frederic Michard - Perioperative Fluid Management - IFAD 2012
Frederic Michard - Perioperative Fluid Management - IFAD 2012
 
The menagerie of monitoring tools by Professor Jean-Louis Teboul
The menagerie of monitoring tools by Professor Jean-Louis TeboulThe menagerie of monitoring tools by Professor Jean-Louis Teboul
The menagerie of monitoring tools by Professor Jean-Louis Teboul
 
02 tuong phan
02 tuong phan02 tuong phan
02 tuong phan
 
Elution methods in Countercurrent Chromatography
Elution methods in Countercurrent ChromatographyElution methods in Countercurrent Chromatography
Elution methods in Countercurrent Chromatography
 
Hemodialysis orders part 1
Hemodialysis orders part 1Hemodialysis orders part 1
Hemodialysis orders part 1
 
Priming fluid and hemodilution
Priming fluid and hemodilutionPriming fluid and hemodilution
Priming fluid and hemodilution
 
Indian j anaesth60119-6203009_171350
Indian j anaesth60119-6203009_171350Indian j anaesth60119-6203009_171350
Indian j anaesth60119-6203009_171350
 
Apheresis
ApheresisApheresis
Apheresis
 

Ähnlich wie Chris worledgeportfolio

The Dose of Renal Replacement Therapy.pptx
The Dose of Renal Replacement Therapy.pptxThe Dose of Renal Replacement Therapy.pptx
The Dose of Renal Replacement Therapy.pptxvipin kauts
 
Towards improving HD efficiency .. HD membranes update - prof. Hesham Elsayed
Towards improving HD efficiency .. HD membranes update - prof. Hesham ElsayedTowards improving HD efficiency .. HD membranes update - prof. Hesham Elsayed
Towards improving HD efficiency .. HD membranes update - prof. Hesham ElsayedMNDU net
 
Development of an Axial Flow Left Ventricular Assist Device (LVAD) from Incep...
Development of an Axial Flow Left Ventricular Assist Device (LVAD) from Incep...Development of an Axial Flow Left Ventricular Assist Device (LVAD) from Incep...
Development of an Axial Flow Left Ventricular Assist Device (LVAD) from Incep...tmhsweb
 
Dr hesham elsayed hd adequacy and dose optimization
Dr hesham elsayed   hd adequacy and dose optimizationDr hesham elsayed   hd adequacy and dose optimization
Dr hesham elsayed hd adequacy and dose optimizationFarragBahbah
 
36433 Topic HA W9 R1Number of Pages 1 (Double Spaced)N.docx
36433 Topic HA W9 R1Number of Pages 1 (Double Spaced)N.docx36433 Topic HA W9 R1Number of Pages 1 (Double Spaced)N.docx
36433 Topic HA W9 R1Number of Pages 1 (Double Spaced)N.docxrhetttrevannion
 
Value Analysis Committee Presentation - PleuraFlow® ACT® System
Value Analysis Committee Presentation - PleuraFlow® ACT® SystemValue Analysis Committee Presentation - PleuraFlow® ACT® System
Value Analysis Committee Presentation - PleuraFlow® ACT® SystemPaul Molloy
 
Basic principles of hemodialysis final
Basic principles of hemodialysis finalBasic principles of hemodialysis final
Basic principles of hemodialysis finalFarragBahbah
 
Advanced in hemodialysis and biocompatbility chaken pmk
Advanced in hemodialysis and biocompatbility chaken pmkAdvanced in hemodialysis and biocompatbility chaken pmk
Advanced in hemodialysis and biocompatbility chaken pmkCHAKEN MANIYAN
 
Crrt minia-final-2018
Crrt minia-final-2018Crrt minia-final-2018
Crrt minia-final-2018FarragBahbah
 
James F. Lincoln Gold Award Winner 2010
James F. Lincoln Gold Award Winner 2010James F. Lincoln Gold Award Winner 2010
James F. Lincoln Gold Award Winner 2010Lily Truong
 
A1 Project Poster 2016-General Template
A1 Project Poster 2016-General TemplateA1 Project Poster 2016-General Template
A1 Project Poster 2016-General TemplateXianqi Yuan
 
Comparison of transfusion requirements between open and robotic assisted lapa...
Comparison of transfusion requirements between open and robotic assisted lapa...Comparison of transfusion requirements between open and robotic assisted lapa...
Comparison of transfusion requirements between open and robotic assisted lapa...anemo_site
 
Dialysis dose prescription (the basics) dr ujjawal
Dialysis dose prescription (the basics) dr ujjawalDialysis dose prescription (the basics) dr ujjawal
Dialysis dose prescription (the basics) dr ujjawalUjjawal Roy
 
Rrt in icu dr said khamis zagazig april 2018 latest
Rrt in  icu dr said khamis zagazig april 2018 latestRrt in  icu dr said khamis zagazig april 2018 latest
Rrt in icu dr said khamis zagazig april 2018 latestFarragBahbah
 
Hemodialysis orders part ii
Hemodialysis orders part iiHemodialysis orders part ii
Hemodialysis orders part iiJAFAR ALSAID
 
Renal Replacement Therapy: modes and evidence
Renal Replacement Therapy: modes and evidenceRenal Replacement Therapy: modes and evidence
Renal Replacement Therapy: modes and evidenceMohd Saif Khan
 

Ähnlich wie Chris worledgeportfolio (20)

The Dose of Renal Replacement Therapy.pptx
The Dose of Renal Replacement Therapy.pptxThe Dose of Renal Replacement Therapy.pptx
The Dose of Renal Replacement Therapy.pptx
 
Towards improving HD efficiency .. HD membranes update - prof. Hesham Elsayed
Towards improving HD efficiency .. HD membranes update - prof. Hesham ElsayedTowards improving HD efficiency .. HD membranes update - prof. Hesham Elsayed
Towards improving HD efficiency .. HD membranes update - prof. Hesham Elsayed
 
Development of an Axial Flow Left Ventricular Assist Device (LVAD) from Incep...
Development of an Axial Flow Left Ventricular Assist Device (LVAD) from Incep...Development of an Axial Flow Left Ventricular Assist Device (LVAD) from Incep...
Development of an Axial Flow Left Ventricular Assist Device (LVAD) from Incep...
 
Dr hesham elsayed hd adequacy and dose optimization
Dr hesham elsayed   hd adequacy and dose optimizationDr hesham elsayed   hd adequacy and dose optimization
Dr hesham elsayed hd adequacy and dose optimization
 
36433 Topic HA W9 R1Number of Pages 1 (Double Spaced)N.docx
36433 Topic HA W9 R1Number of Pages 1 (Double Spaced)N.docx36433 Topic HA W9 R1Number of Pages 1 (Double Spaced)N.docx
36433 Topic HA W9 R1Number of Pages 1 (Double Spaced)N.docx
 
Value Analysis Committee Presentation - PleuraFlow® ACT® System
Value Analysis Committee Presentation - PleuraFlow® ACT® SystemValue Analysis Committee Presentation - PleuraFlow® ACT® System
Value Analysis Committee Presentation - PleuraFlow® ACT® System
 
Basic principles of hemodialysis final
Basic principles of hemodialysis finalBasic principles of hemodialysis final
Basic principles of hemodialysis final
 
Advanced in hemodialysis and biocompatbility chaken pmk
Advanced in hemodialysis and biocompatbility chaken pmkAdvanced in hemodialysis and biocompatbility chaken pmk
Advanced in hemodialysis and biocompatbility chaken pmk
 
Crrt minia-final-2018
Crrt minia-final-2018Crrt minia-final-2018
Crrt minia-final-2018
 
Crrt domyat-final
Crrt domyat-finalCrrt domyat-final
Crrt domyat-final
 
CRRT .pdf
CRRT .pdfCRRT .pdf
CRRT .pdf
 
James F. Lincoln Gold Award Winner 2010
James F. Lincoln Gold Award Winner 2010James F. Lincoln Gold Award Winner 2010
James F. Lincoln Gold Award Winner 2010
 
A1 Project Poster 2016-General Template
A1 Project Poster 2016-General TemplateA1 Project Poster 2016-General Template
A1 Project Poster 2016-General Template
 
Comparison of transfusion requirements between open and robotic assisted lapa...
Comparison of transfusion requirements between open and robotic assisted lapa...Comparison of transfusion requirements between open and robotic assisted lapa...
Comparison of transfusion requirements between open and robotic assisted lapa...
 
fluidmgmt-a balanced approach
fluidmgmt-a balanced approachfluidmgmt-a balanced approach
fluidmgmt-a balanced approach
 
Dialysis dose prescription (the basics) dr ujjawal
Dialysis dose prescription (the basics) dr ujjawalDialysis dose prescription (the basics) dr ujjawal
Dialysis dose prescription (the basics) dr ujjawal
 
Rrt in icu dr said khamis zagazig april 2018 latest
Rrt in  icu dr said khamis zagazig april 2018 latestRrt in  icu dr said khamis zagazig april 2018 latest
Rrt in icu dr said khamis zagazig april 2018 latest
 
SPECTROPHOTOMETRIC MEASUREMENT OF SOLUBILITY TEST TURBIDITY AS AN IMPROVED DI...
SPECTROPHOTOMETRIC MEASUREMENT OF SOLUBILITY TEST TURBIDITY AS AN IMPROVED DI...SPECTROPHOTOMETRIC MEASUREMENT OF SOLUBILITY TEST TURBIDITY AS AN IMPROVED DI...
SPECTROPHOTOMETRIC MEASUREMENT OF SOLUBILITY TEST TURBIDITY AS AN IMPROVED DI...
 
Hemodialysis orders part ii
Hemodialysis orders part iiHemodialysis orders part ii
Hemodialysis orders part ii
 
Renal Replacement Therapy: modes and evidence
Renal Replacement Therapy: modes and evidenceRenal Replacement Therapy: modes and evidence
Renal Replacement Therapy: modes and evidence
 

Kürzlich hochgeladen

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Kürzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Chris worledgeportfolio

  • 2. 1 Contents: Website (HTML, CSS, JavaScript) Page 2 Desktop Application (VB.NET) Page 5 Clinical Research Page 7 Simulated Practice Page 12 Spring Web Application Development Page 15 ASP.Net Web Application Page 46 JQuery Page 55 JSon Page 64 Database (MS SQL) Page 68 Shell STEP Programme Page 78 Application Design Table-Top Restaurant Information System (VB.Net) Page 103 Desktop Restaurant Administration System (Java) Page 106 Web Application: Technical Support Ordering (JSP) Page 115
  • 4. 3
  • 5. 4
  • 7. 6
  • 8. 7 A Practical Protocol for Dialysate Flow Rate Selection. Background: Dialysate flow rates are often standardised as unit policy, due to the lack of a selection protocol. Some units opt for the factory default setting, following the rationale that they have little information to justify altering it. Other units opt for maximum rate, as they are aware this can be beneficial to some patients. Following the ‘factory default setting’ policy will result in some patients receiving less dialysis than they could benefit from, whilst following the ‘maximum rate for all’ policy increases costs without delivering benefit for all. Most variable parameters of haemodialysis are specified in the dialysis prescription, and the only obstacle to using this policy for dialysate flow rate, appears to be the lack of a protocol to follow. Method of Study: It was proposed that a study to determine the circumstances where high dialysate flow resulted in significant improvement in clearance could be performed by measuring clearance periodically during treatment (using a non-invasive sodium dialysance comparison technique)-1 and comparing this with blood water flow to give a clearance efficiency figure-percentage of blood water cleared of urea. In order to separate diffusive and convective clearance, it would be necessary to record ultrafiltration rate as well. Volunteers established on dialysis for at least three months were recruited from a maintenance haemodialysis population, without restrictions around age, nature of access, or any other factors. The minimum data set required for each scenario was calculated (for p<0.01) to be 120, and four scenarios were investigated, Both high flux and low flux with dialysate flow rates of 500ml/min and 800ml/min, requiring at least 480 treatments to be monitored. As dialyser performance and blood chemistry alter during treatment, the data was collected every twenty-five minutes and mean figures calculated. As effective blood water flow would be diminished by recirculation, a correction factor was applied. Analysis: Blood water flow was calculated using a plasma water fraction figure obtained by subtracting total protein from plasma volume (Fp), and a fixed red blood cell water fraction figure of 0.72 (Fr). Haematocrit (HCT) expressed as a decimal was also used in the formula: Qbw = Qb [Fp + HCT(Fr – Fp)] The clearance (K), effective blood flow, and ultrafiltration rate were recorded every twenty-five minutes throughout the treatment. This is the minimum measurement interval available on the measuring method utilised. Blood water flow was adjusted for recirculation, using the total recirculation figure obtained from a blood temperature module on the dialysis machine utilising temperature bolus dilution monitoring-3 , in the formula: Corrected QBW = Apparent QBW X [100- Recirc/100] Diffusive clearance was separated from total clearance by calculating the U.F. rate per minute and dividing by two-6 , then subtracting from total clearance, to leave diffusive clearance. K(Diff) = K – U.F./120
  • 9. 8 The clearance efficiency (K(Diff) / Corrected QBW) was plotted against the corrected blood water flow, and the resulting plots at different dialysate flow rates were compared. Low Flux Dialyser Results: A comparison of the two curves expressed as percentage improvement ({[C.E. (800) – C.E. (500)]/C.E. (500)} X 100) Indicates significant advantage to higher dialysate flow, when higher corrected blood water flows are available. 0 10 20 30 40 50 60 70 80 90 100 0 50 100 150 200 250 300 CorrC.E. Corr B.W.F. Low Flux 500ml/min 0 10 20 30 40 50 60 70 80 90 100 0 50 100 150 200 250 300 Corr.C.E. Corr B.W.F. Low Flux 800ml/min 0 5 10 15 20 25 0 100 200 300 Clearanceimprovement(%) Corrected blood water flow (ml/min) Low flux
  • 10. 9 High Flux Dialyser Results: The same comparison yeilds a very similar result; Discussion: The small differences between the two plots of improvement are unlikely to indicate anything more than bias resulting from the initial high flux dialyser patient cohort being small. When the study was started, most patients were on low flux dialysis, but as new guidelines were adopted this situation changed. The selection of 500ml/min as a common dialysate flow rate was based on the use of less efficient dialysers, and assumed a blood flow rate of 200ml/min. The argument was that two-and-a-half times blood flow would be easily adequate dialysate flow, as there was a limit to solute transfer rate consequential to the membrane and fluid barrier resistances (combined, these are referred to as the mass transfer function, KOA). 0 20 40 60 80 100 0 50 100 150 200 250 300 CorrC.E.(%) Corr B.W.F.(ml/min) High Flux 500ml/min 0 20 40 60 80 100 0 50 100 150 200 250 300 CorrC.E.(%) Corr B.W.F. (ml/min) High Flux 800ml/min 0 5 10 15 20 25 0 50 100 150 200 250 300 ClearanceImprovement(%) Corr. B.W.F.ml/min High flux
  • 11. 10 Alan S. Michaels published the formula that describes dialyser solute flux, in 1966. It is: CB - CD J = tD + tM + tB -7 DD kDM DB The denominator is KOA, and was often described as the limiting factor to urea clearance, whilst the numerator is diffusion gradient, and has largely been ignored. Mass transfer coefficients have increased significantly over the past forty years, making the effect of dialysate flow rate more significant for those presenting significant solute mass for removal. This is dependant on blood water flow rate, as the urea is dissolved within the blood water, and the blood water must circulate around the body to take up urea from the interstitial fluid, before being presented for further dialysis, hence the need to correct for recirculation. An active spreadsheet was produced, which requires effective blood flow and recirculation figures from the machine, and haematocrit and total protein form blood results. This spreadsheet then produces a figure for corrected blood water flow, which can be compared with a fixed guide figure to determine appropriate dialysate flow rate selection. Haematocrit Total Protein Plasma Water Blood Water Blood Flow Total Recirculation Correction Corrected Blood Water Flow (Decimal) (g/l) (Decimal) (ml/min) (ml/min) (%) (ml/min) Conclusions: Today’s dialysers tend to be larger and more porous than previously, and venous access is improving. These factors contribute to a change in requirements from dialysis machines, with increased dialysate flow being beneficial to those with higher blood water flows. Utilisation of an active spreadsheet negates the requirement for complex calculation, allowing many to select dialysate flows appropriately. References: 1 Nephrology Dialysis Transplantation 2001 Vol. 16 Pages 1053-8 Accuracy and safety of online clearance monitoring based on conductivity variation. Uwe Kuhlmann, Rainer Goldau, Nader Samadi, Thomas Graf, Malte Gross, Giancarlo Orlandini, Harold Lange. 2 Nephrology Dialysis Transplantation 1996 vol. 11 pages 2023-30 Ionic Dialysance as a Method for On-line Monitoring of Delivered Dialysis Without Blood Sampling. C. Manzoni, S. Di Fillipo, M. Corti, F. Locatelli 3 Nephrology Dialysis Transplantation 199 vol.14 pages 376-83 Validation of haemodialysis recirculation and access blood flow measured by thermodilution Daniel Schneditz, Erjun Wang, Nathan W. Levin.. 4 American Journal of Kidney Diseases 35(1) pages 105-11 Jan 2000 In vivo effects of dialysate flow rate on Kt/V in maintenance hemodialysis patients.
  • 12. 11 Hauk M., Kuhlmann M.K., Riegel W., Kohler H. 5 Kidney International 51(6) pages 2013-7 Jun 1997 Hemodialyzer mass transfer-area coefficients for urea increase at high dialysate flow rates. Leypoldt J.K., Cheung A.K., Agodoa L.Y., Daugirdas J.T., Greene T., Keshaviah P.R. 6 The International Journal Of Artificial Organs vol. 7 no. 5 1984 pages 263-268 In vitro study of combined convection-diffusion mass transfer in hemodialysers. B.B. Gupta and M.Y.Jaffrin. 7 American Society of Artificial Organs 1966 vol. 12 pages 387-392 Operating Parameters And Performance Criteria For Hemodialyzers And Other Membrane Separation Devices. Alan S. Michaels 8 International Journal of Artificial Organs 1993 vol. 16 no. 8 pages 585-91 A Model for Non-invasive Estimation of in vivo Dialyzer Performances and Patient’s Conductivity During Hemodialysis.. T. Petitclerc, N. Goux, A.L. Reynier, B.Bene 9 American Journal of Kidney Diseases 2001 vol. 37 no. 2 pages 316-20 Increasing Dialysate Flow Rate Increases Dialyzer Urea Mass Transfer-Area Coefficients During Clinical Use. Rosemary Ouseph MD, Richard A. Ward PhD.
  • 13. 12 The use of simulated practice as a tool in clinical training is becoming increasingly popular. Motivation arises in part from the public commentary on changing academic requirements in nursing, and also from empirical evidence from the use of simulation training in other demanding environments, notably aviation. It has been suggested in the media that nursing and midwifery students studying to degree level may result in practitioners who are more academic than practical and so better suited to submission of essays; reports etc. than dealing with the needs of their patients. If this is addressed along with the changing attitude towards learning on real patients (with modern technology there is less need for this approach), it is apparent that simulated practice should be more prominent in the University curricula than previously. Other stimuli are recognition of different learning styles, and the verbose Chinese proverb “Not hearing is not as good as hearing, hearing is not as good as seeing, seeing is not as good as mentally knowing, mentally knowing is not as good as acting; true learning continues up to the point that action comes forth.” Xún Zǐ (310 – 237 B.C.), which is frequently translated as “I hear and I forget; I see and I remember; I do and I understand.” It is also attributed to Confucius. The outcomes identified in Mosby’s Nursing Suite indicate both improved preparedness for practice from experiencing multi-professional working, and improved retention of learning. Maginnis describes the advantages of actual clinical practice, but the greater opportunity to prepare students in a safe education environment before moving to a hostile clinical environment which may be remote from educational support. It is necessary for participants to immerse themselves in the scenario as if it were real (Wilford), where the successful activity can boost confidence whilst difficulty may diminish confidence (Byrne). The view was that it not only allowed the participants to get a taste of practical skills, but helped them to form new thought processes around planning and critical review. This is an area which should be introduced early in courses in a non-traumatic way. A low-fidelity simulation (injection; urine testing; N.G. tube aspirant pH etc.) may be followed up with questions such as “How do you think that went?”; “What could you do to improve on the way things went on future occasions?”; “How could things be better organised to make the procedure run more smoothly?”. This would represent an early introduction to the critical reflection and discussion of debriefing. The Harvard medical school article describes debriefing as “a crucial step in clarifying and consolidating insights and lessons from simulations.”
  • 14. 13 Kolb’s experiential learning cycle is cited in John M. O’Donnell’s presentation to demonstrate the place of debriefing in simulated practice , where debriefing forms the Reflective Observation element. It is reasoned (Dreifuerst) that debriefing encourages a framework to develop in the students mind to relate experiences and identify positive and negative aspects, allowing the formation of ideas which may inspire innovation and higher level practice. The ratio of questions to statements should be around 3:1 and the debriefing should last around twice as long as the scenario, although students may need encouragement to participate (Overstreet). Three phases are described (Arafeh), Reaction; Analysis; and Summary. Of these, Analysis is considered the most significant. Poor outcomes may be linked to errors in the participant’s mental frameworks, which may be corrected in debriefing to allow the participant better understanding of how to achieve their objectives, or even re-evaluate those objectives. It is important that simulation and debriefing are distinct from practise of skills for assessment such as OSCE’s Technology and scenario design can play an important role in the simulation activity, but debriefing effectively makes all the difference to the student experience. Bibliography and References: Arafeh Julie M. R., MSN, RN; Hansen Sara Snyder, MSN, RN;Nichols Amy, EdD, RN Debriefing in Simulated-Based Learning. Facilitating a Reflective Discussion J Perinat Neonat Nurs Vol. 24, No. 4, pp. 302–309 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Byrne A J, Blagrove M T, McDougall S J P ; Dynamic confidence during simulated clinical tasks. Postgrad Med J 2005;81:785–788.
  • 15. 14 Cant Robyn P, Cooper Simon J; The benefits of debriefing as formative feedback in nurse education http://www.ajan.com.au/Vol29/29-1_Cant.pdf Dreifuerst Kristina Thomas; The essentials of debriefing in simulation learning: a concept analysis Nursing Education Perspectives March/April 2009 Fanning Ruth M., Gaba David M.; The Role of Debriefing in Simulation-Based Learning. Society for Simulation in Healthcare, vol. 2, Number 2, Summer 2007 Maginnis C, Croxon L ; Transfer of learning to the nursing clinical practice setting. The International Electronic Journal of Rural and Remote Health Research, education, practice and policy. 8th April 2010 Mosby’s Nursing Suite. 9th March 2011 http://confidenceconnected.com/connect/article/filling_the_gap_clinical_simulations_prepare_stud ents_for_the_nursing_/ Accessed 1st March 2012 O’Donnell John M.; Debriefing in Simulation Education: Using a Structured and Supported Model. Overstreet Maria L.; "The Current Practice of Nursing Clinical Simulation Debriefing: A Multiple Case Study. " PhD diss., University of Tennessee, 2009. http://trace.tennessee.edu/utk_graddiss/627 No Author Named: Debriefing Assessment for Simulation in Healthcare http://www.harvardmedsim.org/debriefing-assesment-simulation-healthcare.php Wilford Amanda, Doyle Thomas J.’ Integrating simulation training into the nursing curriculum http://www.fondacomedical.com/clinical_papers/Integratingsimulationtraining.pdf You may like to look at this http://nursingstandard.rcnpublishing.co.uk/archive/article-an-evaluation- of-simulated-clinical-practice-for-adult-branch-students {I haven’t seen it as I am not a registered user}
  • 16. 15 Spring Web Application Development FHSC Clinical Skills Equipment database schema Equipment Specification Location Item Borrowers Loans Room Skills Equipme nt/Skill Pictures
  • 17. 16 Equipment Specification: CatalogueNumber{PK} esName esManufacturer esDescription esManual Pictures: CatalogueNumber(from Equipment Specification) {Dual attribute PK with Index} Index(to store multiple views of an item) Either the picture as an OLE object; or the picture file name Equipment/Skill: EqSkillNumber{PK} CatalogueNumber(from Equipment Specification) SkillNumber(From Skills) Skills: SkillNumber{PK} Description Location: SiteID{PK} SiteName&Address Room: RoomNumber{PK} SiteID(From Location) RoomName Item: ItemNumber{PK} CatalogueNumber(from Equipment Specification) RoomNumber(from Room) Loaned? (Y/N) Loans: ItemNumber(from Item){Dual Attribute PK with LoanDate} BorrowerNumber(from Borrower) LoanDate ExpectedReturnDate ActualReturnDate
  • 18. 17 Borrowers: BorrowerNumber{PK} Contact Name email Organisation Name Address Telephone Number These Fields will be integers: CatalogueNumber EqSkillNumber SkillNumber ItemNumber BorrowerNumber Everything else will be character strings (including RoomNumber as we will need to put the building pre-fix to avoid duplicates (WHB004)), except the dates in Loans.
  • 20. 19 <!DOCTYPE HTML PUBLIC "-//W3C//DTDHTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ include file="/WEB-INF/jsp/include.jsp"%> <%-- Redirectedbecause we can'tsetthe welcome page toa virtual URL. --%> <c:redirecturl="/hello.jsp"/> Include.jsp <%-- Document : include Createdon : 27-Jun-2012, 12:02:34 Author : cw45 --%> <%@page contentType="text/html"pageEncoding="UTF-8"%> <!DOCTYPE html> <%@ page session="false"%> <%@ taglibprefix="c"uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglibprefix="fmt"uri="http://java.sun.com/jsp/jstl/fmt"%> <%@ taglibprefix="spring"uri="http://www.springframework.org/tags"%> <head> <linkrel="stylesheet"href="<spring:url value='themes/style.css'/>"type="text/css"> </head> Hello.jsp <%-- Document : hello Created on : 27-Jun-2012, 12:00:00 Author : cw45 --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <%@ include file="/WEB-INF/jsp/include.jsp" %>
  • 21. 20 <html> <head><img src="<spring:url value='Jpegs/FacLogo.jpg'/>" align="right" width="323" height="132" alt="Faculty Logo"/> <title><fmt:message key="title"/></title></head> <body> <h1><fmt:message key="heading1"/><br><fmt:message key="heading2"/></h1> <p><fmt:message key="greeting"/><c:outvalue="${model.now}"/></p> <h3>Equipment</h3> <p><c:forEach items="${model.Equipment}" var="equip"> <c:out value="${equip.esCatalogueNumber}"/><i><c:out value="${equip.esName}"/></i><i><img src="<spring:url value="Jpegs/${equip.pic1}"/>"/></i><i><imgsrc="<spring:url value="Jpegs/${equip.pic2}"/>"/></i><i><imgsrc="<spring:url value="Jpegs/${equip.pic3}"/>"/></i><i><imgsrc="<spring:url value="Jpegs/${equip.pic4}"/>"/></i><i><imgsrc="<spring:url value="Jpegs/${equip.pic5}"/>"/></i><br><i><c:outvalue="${equip.esDescription}"/></i><br> </c:forEach></p> <br> <a href="<c:url value="manufacturersearch.htm"/>">SearchbyManufacturer</a> <br>
  • 22. 21 </body> </html> Manufacturersearch.jsp <%-- Document : manufacturersearch Createdon : 06-Sep-2012, 14:40:51 Author : cw45 --%> <%@page contentType="text/html"pageEncoding="UTF-8"%> <!DOCTYPE html> <%@ include file="/WEB-INF/jsp/include.jsp"%> <%@ taglibprefix="form"uri="http://www.springframework.org/tags/form"%> <html> <head> <title><fmt:message key="title"/></title> <style> .error { color:red;} </style> </head> <body> <h1><fmt:message key="manufacturersearch.heading"/></h1> <p><form:formmethod="post"commandName="manufacturerSearch"> <table width="95%"bgcolor="f8f8ff"border="0"cellspacing="0"cellpadding="5"> <tr> <td align="right"width="20%">Name of Manufacturer:</td> <td width="20%"> <form:inputpath="name"/> </td> <td width="60%">
  • 23. 22 <form:errorspath="name"cssClass="error"/> </td> </tr> </table> <br> <inputtype="submit"align="center"value="Execute"> </form:form> <a href="<c:url value="hello.htm"/>">Home</a> </p></body> </html> EquipmentSpecification.java package secondapp.domain; importjava.io.Serializable; /** * * @author cw45 */ publicclassEquipmentSpecificationimplementsSerializable { private StringesName; private StringesDescription; private StringesManufacturer; private IntegeresCatalogueNumber; private Stringpic1;
  • 24. 23 private Stringpic2; private Stringpic3; private Stringpic4; private Stringpic5; publicStringgetesName() { returnesName; } publicvoidsetesName(StringesName) { this.esName =esName; } publicStringgetesDescription(){ returnesDescription; } publicvoidsetesDescription(StringesDescription) { this.esDescription=esDescription;
  • 26. 25 returnpic1; } publicvoidsetpic1(Stringpic1) { this.pic1= pic1; } publicStringgetpic2() { returnpic2; } publicvoidsetpic2(Stringpic2) { this.pic2= pic2; } publicStringgetpic3() { returnpic3; } publicvoidsetpic3(Stringpic3) {
  • 27. 26 this.pic3= pic3; } publicStringgetpic4() { returnpic4; } publicvoidsetpic4(Stringpic4) { this.pic4= pic4; } publicStringgetpic5() { returnpic5; } publicvoidsetpic5(Stringpic5) { this.pic5= pic5; } publicStringtoString() {
  • 28. 27 StringBuilderbuffer=newStringBuilder(); buffer.append("Catalogue Number:"+ esCatalogueNumber+";"); buffer.append("Name:"+ esName + ";"); buffer.append("FileName:"+ pic1 + ";"); buffer.append("FileName:"+ pic2 + ";"); buffer.append("FileName:"+ pic3 + ";"); buffer.append("FileName:"+ pic4 + ";"); buffer.append("FileName:"+ pic5 + ";"); buffer.append("Description:"+ esDescription+";"); returnbuffer.toString(); } } EquipmentSpecificationManager.java package secondapp.service; importjava.io.Serializable; importjava.util.List; importsecondapp.domain.EquipmentSpecification;
  • 29. 28 /** * * @author cw45 */ publicinterface EquipmentSpecificationManagerextendsSerializable{ publicvoidincreaseesDescription(Stringaddition); publicvoidseteSpecs(List<EquipmentSpecification>eSpecs); publicList<EquipmentSpecification>geteSpecs(); } SimpleEquipmentSpecificationManager.java package secondapp.service; importjava.util.ArrayList; importjava.util.List; importsecondapp.domain.EquipmentSpecification; importsecondapp.repository.EquipmentDao; /** * * @author cw45 */ publicclassSimpleEquipmentSpecificationManagerimplementsEquipmentSpecificationManager{ //private List<EquipmentSpecification>eSpecs; private EquipmentDaoequipmentDao; publicvoidseteSpecs(List<EquipmentSpecification>eSpecs) { //this.eSpecs=eSpecs; } publicList<EquipmentSpecification>geteSpecs() { //returneSpecs; returnequipmentDao.getEquipmentList(); } publicvoidincreaseesDescription(Stringaddition) {
  • 30. 29 if (equipmentDao!=null) { /*for(EquipmentDaoeSpec: equipmentDao) { EquipmentSpecificationnewesDescription=eSpec.getEquipmentList(); eSpec.setEquipmentList(newesDescription); }*/ } } } ManufacturerSearch.java package secondapp.service; importorg.apache.commons.logging.Log; importorg.apache.commons.logging.LogFactory; /** * * @author cw45 */ publicclassManufacturerSearch{ /** Loggerfor thisclassand subclasses*/ protectedfinal Loglogger= LogFactory.getLog(getClass()); private Stringname; publicvoidsetName(Stringi) { name = i; logger.info("Name setto"+ i); } publicStringgetName() { returnname; } } HelloController.java package secondapp.web;
  • 31. 30 importorg.springframework.web.servlet.mvc.Controller; importorg.springframework.web.servlet.ModelAndView; importjavax.servlet.ServletException; importjavax.servlet.http.HttpServletRequest; importjavax.servlet.http.HttpServletResponse; importorg.apache.commons.logging.Log; importorg.apache.commons.logging.LogFactory; importjava.io.IOException; importjava.util.Map; importjava.util.HashMap; importjava.util.Date; importsecondapp.service.EquipmentSpecificationManager; /** * * @author cw45 */ publicclass HelloControllerimplementsController{ protectedfinal Loglogger= LogFactory.getLog(getClass()); private EquipmentSpecificationManagerequipmentSpecificationManager; publicModelAndViewhandleRequest(HttpServletRequestrequest,HttpServletResponseresponse) throwsServletException,IOException{ Stringnow= (newDate()).toString(); logger.info("Returninghelloviewwith"+ now); Map<String,Object>myModel = new HashMap<String,Object>(); myModel.put("now",now); myModel.put("Equipment",this.equipmentSpecificationManager.geteSpecs()); returnnewModelAndView("hello","model",myModel); } publicvoidsetEquipmentSpecificationManager(EquipmentSpecificationManager equipmentSpecificationManager) {
  • 32. 31 this.equipmentSpecificationManager=equipmentSpecificationManager; } } ManufacturerSearchFormController.java package secondapp.web; importorg.springframework.web.servlet.mvc.SimpleFormController; importorg.springframework.web.servlet.ModelAndView; importorg.springframework.web.servlet.view.RedirectView; importjavax.servlet.ServletException; importjavax.servlet.http.HttpServletRequest; importorg.apache.commons.logging.Log; importorg.apache.commons.logging.LogFactory; importsecondapp.service.EquipmentSpecificationManager; importsecondapp.service.ManufacturerSearch; /** * * @author cw45 */ publicclassManufacturerSearchFormControllerextendsSimpleFormController{ /** Logger forthisclass andsubclasses*/ protectedfinal Loglogger= LogFactory.getLog(getClass()); private EquipmentSpecificationManagerequipmentspecificationManager; publicModelAndViewonSubmit(Objectcommand) throwsServletException{ Stringname = ((ManufacturerSearch) command).getName(); logger.info("Manufactureris"+ name + "."); equipmentspecificationManager.increaseesDescription(name); logger.info("returningfromPriceIncreaseFormview to"+ getSuccessView()); returnnewModelAndView(newRedirectView(getSuccessView())); }
  • 33. 32 protectedObjectformBackingObject(HttpServletRequestrequest)throwsServletException{ ManufacturerSearchmanufacturerSearch=new ManufacturerSearch(); manufacturerSearch.setName("ThingsandLimbs"); returnmanufacturerSearch; } publicvoidsetEquipmentSpecificationManager(EquipmentSpecificationManager equipmentspecificationManager) { this.equipmentspecificationManager=equipmentspecificationManager; } publicEquipmentSpecificationManagergetEquipmentSpecificationManager(){ returnequipmentspecificationManager; } } EquipmentDao.java package secondapp.repository; importjava.util.List; importsecondapp.domain.EquipmentSpecification; /** * * @author cw45 */ publicinterface EquipmentDao{ publicList<EquipmentSpecification>getEquipmentList(); publicvoidsaveEquipment(EquipmentSpecificationequip); } JdbcEquipmentDao.java package secondapp.repository; importjava.sql.ResultSet;
  • 35. 34 List<EquipmentSpecification>equipment=getSimpleJdbcTemplate().query( "selectDISTINCTtblEquipmentSpecification.esCatalogueNumber,tblEquipmentSpecification.esName, tblEquipmentSpecification.esManufacturer,tblEquipmentSpecification.esDescription,(Select tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=1AND tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic1,(Select tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=2AND tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic2,(Select tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=3AND tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic3,(Select tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=4AND tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic4,(Select tblPictures.picLinkFromtblPicturesWhere tblPictures.picIndex=5AND tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber) ASpic5FROM tblEquipmentSpecificationLEFTOUTER JointblPicturesON tblEquipmentSpecification.esCatalogueNumber=tblPictures.picEsCatalogueNumber", newEquipmentMapper()); returnequipment; } publicvoidsetEquipmentList(List<EquipmentSpecification>equList){ equipo=equList; } publicvoidsaveEquipment(EquipmentSpecificationequip) { logger.info("Savingproduct:"+ equip.getesName()); intcount= getSimpleJdbcTemplate().update(
  • 36. 35 "update productssetesDescription=:esDescription,esName =:esName where esCatalogueNumber= :esCatalogueNumber", newMapSqlParameterSource().addValue("Name",equip.getesName()) .addValue("esCatalogueNumber",equip.getesCatalogueNumber()) .addValue("esName",equip.getesName())); logger.info("Rowsaffected:"+ count); } private staticclass EquipmentMapperimplementsParameterizedRowMapper<EquipmentSpecification>{ publicEquipmentSpecificationmapRow(ResultSetrs,introwNum) throwsSQLException{ EquipmentSpecificationequip=new EquipmentSpecification(); equip.setesCatalogueNumber(rs.getInt("esCatalogueNumber")); equip.setesName(rs.getString("esName")); equip.setpic1(rs.getString("pic1")); equip.setpic2(rs.getString("pic2")); equip.setpic3(rs.getString("pic3")); equip.setpic4(rs.getString("pic4"));
  • 37. 36 equip.setpic5(rs.getString("pic5")); equip.setesDescription(rs.getString("esDescription")); equip.setesManufacturer(rs.getString("esManufacturer")); returnequip; } } } Web.XML <?xml version="1.0"encoding="UTF-8"?> <web-appversion="3.0"xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web- app_3_0.xsd"> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>secondapp</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>2</load-on-startup>
  • 38. 37 </servlet> <servlet-mapping> <servlet-name>secondapp</servlet-name> <url-pattern>*.htm</url-pattern> </servlet-mapping> <session-config> <session-timeout> 30 </session-timeout> </session-config> <welcome-file-list> <welcome-file>redirect.jsp</welcome-file> </welcome-file-list> <jsp-config> <taglib> <taglib-uri>/spring</taglib-uri> <taglib-location>/WEB-INF/tld/spring-form.tld</taglib-location> </taglib> </jsp-config> </web-app> SecondApp-Servlet.XML <?xml version="1.0"encoding="UTF-8"?> <beansxmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <!-- the applicationcontextdefinitionforthe secondappDispatcherServlet --> <bean name="/hello.htm"class="secondapp.web.HelloController"> <propertyname="EquipmentSpecificationManager"ref="EquipmentSpecificationManager"/></bean> <bean name="themeSource"
  • 39. 38 class="org.springframework.ui.context.support.ResourceBundleThemeSource"/> <bean id="messageSource"class="org.springframework.context.support.ResourceBundleMessageSource"> <propertyname="basename"value="messages"/> </bean> <bean name="/manufacturersearch.htm"class="secondapp.web.ManufacturerSearchFormController"> <propertyname="sessionForm"value="true"/> <propertyname="commandName"value="manufacturerSearch"/> <propertyname="commandClass"value="secondapp.service.ManufacturerSearch"/> <propertyname="formView"value="manufacturersearch"/> <propertyname="successView"value="hello.htm"/> <propertyname="EquipmentSpecificationManager"ref="EquipmentSpecificationManager"/> </bean> <bean id="viewResolver"class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <propertyname="viewClass"value="org.springframework.web.servlet.view.JstlView"></property> <propertyname="prefix"value="/WEB-INF/jsp/"></property> <propertyname="suffix"value=".jsp"></property> </bean> </beans> applicationContext.XML <?xml version="1.0"encoding="UTF-8"?> <beansxmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring- aop-3.0.xsd http://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx- 3.0.xsd">
  • 40. 39 <!-- the parentapplicationcontextdefinitionforthe secondappapplication --> <bean id="equipmentspecificationManager" class="secondapp.service.SimpleEquipmentSpecificationManager"> <propertyname="equipmentDao"ref="equipmentDao"/> </bean> <bean id="equipmentDao"class="secondapp.repository.JdbcEquipmentDao"> <propertyname="dataSource" ref="dataSource"/> </bean> <bean id="dataSource"class="org.apache.commons.dbcp.BasicDataSource"destroy-method="close"> <propertyname="driverClassName"value="${jdbc.driverClassName}"/> <propertyname="url"value="${jdbc.url}"/> </bean> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <propertyname="locations"> <list> <value>classpath:jdbc.properties</value> </list> </property> </bean> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <propertyname="dataSource"ref="dataSource"/> </bean> <!--aop:config> <aop:advisorpointcut="execution(**..EquipmentSpecificationManager.*(..))"advice-ref="txAdvice"/> </aop:config> <tx:advice id="txAdvice"> <tx:attributes> <tx:methodname="save*"/>
  • 41. 40 <tx:methodname="*"read-only="true"/> </tx:attributes> </tx:advice--> <!--beanid="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" p:location="/WEB-INF/jdbc.properties"/> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" p:username="${jdbc.username}" p:password="${jdbc.password}"/--> <!-- ADD PERSISTENCESUPPORTHERE (jpa,hibernate,etc) --> </beans> messages.properties title=SecondApplication heading=Hello::SecondApplication greeting=Greetings,itisnow manufacturersearch.heading=ManufacturerSearch::SecondApplication Jdbc.properties jdbc.driverClassName=net.sourceforge.jtds.jdbc.driver jdbc.url=jdbc:jtds:sqlserver://cam-i-ap17:1433/fhsce_skills;useNTLMv2=true;domain=ANGLIA.LOCAL[ondbo] <beanid="dataSource"class="org.apache.commons.dbcp.BasicDataSource"destroy-method="close"> <propertyname="driverClassName"value="${jdbc.driverClassName}"/> <propertyname="url"value="${jdbc.url}"/>
  • 42. 41 The Clinical SkillsFacilitiesinCambridge,Chelmsford,andPeterboroughare under-utiliseddue toinadequate information. I orderfor an academicto prepare fora skillssession,orfora lessonplanwithresource requirementslisttobe createditwouldbe necessaryforthemto have accessto informationonall available options.Thisshould include locationandusage detailstoallow the mostappropriate equipmenttobe specifiedundereach circumstance. A documentoutliningthese requirementswasproducedinApril 2012 The Requirementfora Clinical SkillsEquipmentDatabase The Facultyof Health,Social Care, andEducationhas a range of clinical skillslaboratoriesspreadoverthe three differentcampuses,Rivermead;VictoriaHouse (due tomove toYoungStreet);andGuildHouse.These are equippedwitharange of differentsimulationandpractise deviceswhichallowforsimulatedpractice; objective structuredclinical examinations(OSCE’s),andgeneral skillsteaching.
  • 43. 42 In orderto effectivelymanage thisvaluable resource arequirementforamulti-facettedandflexible SharePointwebapplicationhasbeenidentified.Academicstaff willneedtobe able toeasilyidentifythe nature;location;viewpicturesandinformationresourcesof appropriate Clinical SkillsEquipmenttofacilitate theirteaching,butnotinputnewequipment,administrateloansetc.These roleswouldbe limitedtothe technical staff withinthe Clinical Skillsareas.Ease of updating,includinglinkstoadditionalresourcessuchas videodemonstrations,isanessential elementof thisresource,whichappearsnottohave beenunderstoodby IT Services. By definitionClinicalSkillsisafluidenvironmentwhere bestpractice guidelinesfrequentlychange,and available technologyalters.The needfordevelopmentactivitytobe underthe control of the service is apparent,especiallyasthe developmentwill needtobe informedandprioritisedbasedonknowledge from withinthe Faculty.Itshouldnotbe conductedbysomeone withoutClinicalSkillsknowledge.There hasbeen suggestionbyITServicesthattheytake overthe project,eventhoughthere have beendiscussionson-going since July2011, duringwhichthe intentiontodevelopthe systemin-house hasalwaysbeenmade apparent. The discussionswere necessaryaspartway throughthe developmentprocessthe Facultydeveloperidentified an error inthe configurationof the SharePointServerimplementationrenderingitunusableasadvisedby Microsoft.The suggestionthatIT Servicestake overcontradictsthe following: http://www.informit.com/articles/article.aspx?p=23953&seqNum=5 ThirteenOrganizational Structure Mistakes 1. Combiningsoftware developmentandoperationsinto a single organization. The job of operationsistokeepapplicationsupandrunning.The easiest waytodothisisto neverchange anything.Combiningdevelopmentandoperationsintoasingle organizationhasthe natural tendencytostifle innovation.Software developmentorganizationsshouldbe separatedfromoperationstoallow newand modifiedapplicationstobe developedasrequiredtosupportthe businessneedsof the company. The requirementsfromITServices: 1) To provide adevelopmentenvironmentinwhichtoworkwithinthe Clinical SkillsLaboratories. 2) A correctlyconfiguredServerimplementationof NetBeansandMSSQLset-upinwhichto run. 3) Necessaryinformationsuchasfile structures/paths. 4) Such supportas isnecessarytoachieve the statedoutcomesexpediently. Work has beenslowedbylackof widespreadunderstandingof the importance of thisactivitytoensure an improvedstudentexperience andmake muchbetteruse of available resources. Whilstitcan be seenthatsome progresshasbeenmade ona webapplicationonthe Springframework(with itsextensivelibrarymakingaveryflexible and highperformance systemachievableatmodestcost) there is still arounda monthsworkto completionof all the differentfunctions,suchasuserdefinedsearchesanddata entrypagesto ensure the systemremainscurrent.
  • 44. 43
  • 45. 44
  • 46. 45
  • 47. 46 ASP.Net We would like to prepare a very simple .NET web application (2-3 pages) demonstrating some of his skills, he should be mindful to cover one or all of the following elements; - Clean, simple web front end (use of tools like Twitter Bootstrap are advised) o Attention to detail expected - Complete simple tasks: o Add/read data from SQL database or TXT file o Work with ASP.net list controls to display results o Compute a simple total - We sometimes recommend a simple expenses application o Add an expense receipt with name and value o Read all expenses to a list, calculating the total value - Clean code, no rip-off of sample sites <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
  • 48. 47 <div class="jumbotron"> <h1>This application is to assist in the management of travel costs</h1> <p class="lead"></p> </div> <div class="row"> <div class="col-md-4"> <h2>Submit a request for travel expenses</h2> <p> You can add a travel expense submission by pressing "Submit". </p> <p> <a class="btn btn-default" href="Submit">Submit &raquo;</a> </p> </div> <div class="col-md-4"> <h2>Statistical information</h2> <p> "Review" allows you to view the different journey lengths and costs. It also provides totals, and an average cost per mile. </p> <p> <a class="btn btn-default" href="Review">Review &raquo;</a> </p> </div> <div class="col-md-4"> <h2>Overview</h2> <p> The "Table of Expenses" displays the full database table. </p> <p> <a class="btn btn-default" href="TableDisplay">Table of Expenses &raquo;</a> </p> </div> </div> </asp:Content> <%@ Page Title="Expense Request" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Submit.aspx.cs" Inherits="Submit" %> <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> <h2><%: Title %>.</h2> <h3>Your expense submission page.</h3> <p>Use this area to provide information on your travel costs.</p> <div class="row"> <asp:Label ID="NameLabel" runat="server" Text="Your Name" ForeColor="#000099"></asp:Label> <asp:TextBox ID="NameBox" runat="server"></asp:TextBox>
  • 49. 48 <asp:Label ID="DateLabel" runat="server" Text="Submission Date" ForeColor="#000099"></asp:Label> <asp:TextBox inputtype="date" ID="DateBox" runat="server" Text='<%# date %>'></asp:TextBox> <asp:Label ID="DistLabel" runat="server" Text="Distance Travelled" ForeColor="#000099"></asp:Label> <asp:TextBox ID="DistBox" runat="server"></asp:TextBox> <asp:Label ID="CostLabel" runat="server" Text="Amount Claimed" ForeColor="#000099"></asp:Label> <asp:TextBox ID="CostBox" runat="server"></asp:TextBox> <p><br><br /></p> </div> <div class="row"> <asp:Label ID="labelMessage" runat="server" Text=""></asp:Label> <asp:Button ID="buttonSubmit" runat="server" Text="Submit Claim" OnClick="ButtonSubmit_Click" /> </div> </asp:Content> using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.OleDb; using System.Data.SqlClient; using System.Configuration; public partial class Submit : Page { public String date; protected void Page_Load(object sender, EventArgs e) { date = DateTime.Today.ToString("dd/MM/yyyy"); DataBind();//adds today's date to the submit date field } protected void ButtonSubmit_Click(object sender, EventArgs e) { string name = ""; string date = ""; string dist = "";//to take the values from the page string cost = ""; string query = "";
  • 50. 49 string connection ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|Expenses.mdb"; //General validation of the values in the text fields if (string.IsNullOrWhiteSpace(NameBox.Text)) { labelMessage.Text = "Please enter your name"; return; } if (string.IsNullOrWhiteSpace(DateBox.Text)) { labelMessage.Text = "Please enter your travel date"; return; } DateTime dateValue; if (!DateTime.TryParse(DateBox.Text, out dateValue)) { labelMessage.Text = "Sorry I don't understand your travel date. Please use dd/mm/yyyy format."; return; } if (string.IsNullOrWhiteSpace(DistBox.Text)) { labelMessage.Text = "Please enter a distance."; return; } int intValue; if (!int.TryParse(DistBox.Text, out intValue)) { labelMessage.Text = "Please enter a whole number in distance box."; return; } if (string.IsNullOrWhiteSpace(CostBox.Text)) { labelMessage.Text = "Please enter the cost."; return; } double doubleValue; if (!double.TryParse(CostBox.Text, out doubleValue)) { labelMessage.Text = "Please enter a decimal number in cost box (pounds and pence)."; return; } date = DateBox.Text.ToString(); dist = DistBox.Text.ToString(); cost = CostBox.Text.ToString();//take in the validated values name = NameBox.Text.ToString(); //use ADO/DAO to apply the data to the database query = "INSERT INTO Travel values (TravelDate, Distance, Cost, StaffName)";//Partial string OleDbConnection conn = new OleDbConnection(connection);
  • 51. 50 OleDbCommand insertCommand = new OleDbCommand(query, conn);//Partial insert command insertCommand.Parameters.Add("TravelDate", OleDbType.DBDate);//add the data label and type insertCommand.Parameters["TravelDate"].Value = date;//add the value, associating it with the label insertCommand.Parameters.Add("Distance", OleDbType.Integer); insertCommand.Parameters["Distance"].Value = dist; insertCommand.Parameters.Add("Cost", OleDbType.Double); insertCommand.Parameters["Cost"].Value = cost; insertCommand.Parameters.Add("StaffName", OleDbType.VarChar); insertCommand.Parameters["StaffName"].Value = name; conn.Open(); insertCommand.ExecuteNonQuery(); conn.Close(); labelMessage.Text = "Your request has been submitted."; } } <%@ Page Title="Table of Travel Expenses" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="TableDisplay.aspx.cs" Inherits="TableDisplay" %> <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" Runat="Server"> <asp:SqlDataSource ID="SqlDataSource1" Runat="server" SelectCommand="SELECT TravelDate, Distance, Cost, StaffName FROM Travel ORDER BY TravelDate" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" /> <h2><%: Title %>.</h2> <h3>The Source of the Breakdown on the Review Page.</h3> <p>This page displays all available information.</p> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" BackColor="#CCFFFF" BorderColor="#990033" GridLines="Horizontal" CellSpacing="20" HorizontalAlign="Center" Width="609px">
  • 52. 51 <Columns> <asp:BoundField DataField="TravelDate" HeaderText="TravelDate" SortExpression="TravelDate" DataFormatString='{0:dd-MMM-yyyy}' /> <asp:BoundField DataField="Distance" HeaderText="Distance" SortExpression="Distance" /> <asp:BoundField DataField="Cost" HeaderText="Cost (£)" SortExpression="Cost" /> <asp:BoundField DataField="StaffName" HeaderText="StaffName" SortExpression="StaffName" /> </Columns> </asp:GridView> </asp:Content> public partial class TableDisplay : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } public IQueryable<TravelExpense> Get_TravelExpenses() { TravelExpenseContext db = new TravelExpenseContext(); var query = db.TravelExpenses; return query; } } <%@ Page Title="Review of Costs" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Review.aspx.cs" Inherits="Contact" %> <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> <h2><%: Title %>.</h2> <h3>A depiction of costs for different journeys</h3> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
  • 53. 52 ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT [Distance], [Cost] FROM [Travel]"></asp:SqlDataSource> <div class="col-md-4"> <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource2"> <AlternatingItemTemplate> <tr style="background-color: #FAFAD2; color: #284775;"> <td> <asp:Label ID="DistanceLabel" runat="server" Text='<%# Eval("Distance") %>' /> </td> <td> <asp:Label ID="CostLabel" runat="server" Text='<%# Eval("Cost") %>' /> </td> </tr> </AlternatingItemTemplate> <EditItemTemplate> <tr style="background-color: #FFCC66; color: #000080;"> <td> <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" /> <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" /> </td> <td> <asp:TextBox ID="DistanceTextBox" runat="server" Text='<%# Bind("Distance") %>' /> </td> <td> <asp:TextBox ID="CostTextBox" runat="server" Text='<%# Bind("Cost") %>' /> </td> </tr> </EditItemTemplate> <EmptyDataTemplate> <table runat="server" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;"> <tr> <td>No data was returned.</td> </tr> </table> </EmptyDataTemplate> <InsertItemTemplate> <tr style=""> <td> <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" /> <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" /> </td> <td> <asp:TextBox ID="DistanceTextBox" runat="server" Text='<%# Bind("Distance") %>' /> </td> <td> <asp:TextBox ID="CostTextBox" runat="server" Text='<%# Bind("Cost") %>' /> </td> </tr> </InsertItemTemplate> <ItemTemplate> <tr style="background-color: #FFFBD6; color: #333333;"> <td> <asp:Label ID="DistanceLabel" runat="server" Text='<%# Eval("Distance") %>' /> </td> <td> <asp:Label ID="CostLabel" runat="server" Text='<%# Eval("Cost") %>' />
  • 54. 53 </td> </tr> </ItemTemplate> <LayoutTemplate> <table runat="server"> <tr runat="server"> <td runat="server"> <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border- style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;"> <tr runat="server" style="background-color: #FFFBD6; color: #333333;"> <th runat="server">Distance</th> <th runat="server">Cost (£)</th> </tr> <tr id="itemPlaceholder" runat="server"> </tr> </table> </td> </tr> <tr runat="server"> <td runat="server" style="text-align: center;background-color: #FFCC66; font-family: Verdana, Arial, Helvetica, sans-serif;color: #333333"></td> </tr> </table> </LayoutTemplate> <SelectedItemTemplate> <tr style="background-color: #FFCC66; font-weight: bold;color: #000080;"> <td> <asp:Label ID="DistanceLabel" runat="server" Text='<%# Eval("Distance") %>' /> </td> <td> <asp:Label ID="CostLabel" runat="server" Text='<%# Eval("Cost") %>' /> </td> </tr> </SelectedItemTemplate> </asp:ListView> </div> <div class="row"> <div class="col-md-6"> <h2>The total mileage covered by staff in this period is <%# tDist %> miles, and the cost was £<%# tCost %>.<br> <br />This results in an average travel cost of <%# avMiles %> pence/mile. </h2> </div> </div> <p> &nbsp;</p> </asp:Content> using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.OleDb; using System.Data.SqlClient; using System.Configuration; public partial class Contact : Page {
  • 55. 54 public string tCost = "";//accessible from the page public string tDist = ""; public string avMiles = ""; protected void Page_Load(object sender, EventArgs e) { bool test1; bool test2; double num1 = 0; int num2 = 0; object totalDist;//recievers for the two vaules object totalCost; double simpleCost = 0;//average per mile string distance = "SELECT Sum(Distance) FROM Travel"; string cost = "SELECT Sum(Cost) FROM Travel"; //ADO/DAO to retrieve the data from the table OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|Expenses.mdb"); OleDbCommand distCmd = new OleDbCommand(distance, conn); OleDbCommand costCmd = new OleDbCommand(cost, conn); conn.Open(); OleDbDataReader distReader = distCmd.ExecuteReader(); if (distReader.HasRows) { while (distReader.Read()) { totalDist = distReader.GetValue(0);//The value of the first (and only) item in the reader tDist = totalDist.ToString(); } } OleDbDataReader costReader = costCmd.ExecuteReader(); if (costReader.HasRows) { while (costReader.Read()) { totalCost = costReader.GetValue(0); tCost = totalCost.ToString(); } } test1 = double.TryParse(tCost, out num1);//Check the values are of the correct type test2 = int.TryParse(tDist, out num2); if (test1 == true && test2 == true) { simpleCost = Math.Round((double.Parse(tCost) * 100 / int.Parse(tDist)), 2);//Calculate cost per mile in pence avMiles = simpleCost.ToString();//value for page } conn.Close(); DataBind();//apply to page } }
  • 56. 55 JQuery Dear Chris, Thank you for your recent application for a developer role with the Web Team here at City University London. I am pleased to tell you that you have been successful in progressing to the next round of recruitment. We would like you to complete a short assessment of your technical skills, which you can find at the following GitHub repository: https://github.com/CityUniversityLondon/developer-assessment It should take no more than an hour or two. The deadline is 9 am on Tuesday, 6th May, at which time we will select candidates for interview. If you have any questions in the meantime, please contact us on this email address (webteam.jobs@city.ac.uk). Thanks. -- Tom Waddington, Web Development Manager City University London
  • 57. 56
  • 58. 57 My work: The first three pic show the revised page with examples of individually selected images.
  • 59. 58
  • 60. 59 The final pic is the result of pressing the button which displays the images in turn for four second each.
  • 61. 60 /******************************************** To display the images in a lightbox, individually and sequencially. Written by Chris Worledge using inspiration from Barebones Lightbox Template by Kyle Schaeffer *********************************************/ // Display the lightbox function lightbox(imageUrl) { // jQuery wrapper (optional, for compatibility only) (function($) { // Add lightbox/shadow <div/>'s if not previously added if($('#lightbox').size() == 0){ var theLightbox = $('<div id="lightbox"/>'); var theShadow = $('<div id="lightbox-shadow"/>'); $(theShadow).click(function(e){ closeLightbox(); }); $('body').append(theShadow); $('body').append(theLightbox); } // Remove any previously added content $('#lightbox').empty(); // Insert HTML content if(imageUrl != null){//Find the chosen image, and apply it to the lightbox $('#lightbox').append('<img class="thumbnail" src="' + imageUrl + '">'); } // Move the lightbox to the current window top + 100px $('#lightbox').css('top', $(window).scrollTop() + 100 + 'px'); // Display the lightbox $('#lightbox-shadow').fadeIn('fast', function(){ $('#lightbox').fadeIn('fast'); }); })(jQuery); // End jQuery wrapper } // Close the lightbox function closeLightbox(){
  • 62. 61 // jQuery wrapper (optional, for compatibility only) (function($) { stopSequence();//This stops the rolling display // Hide lightbox/shadow <div/>'s $('#lightbox').hide(); $('#lightbox-shadow').fadeOut('slow'); // Remove contents of lightbox $('#lightbox').empty(); })(jQuery); // End jQuery wrapper } var wait = 0;//It has to be here for two function to use it function autobrowse() { // jQuery wrapper (optional, for compatibility only) (function($) { var i = 0; changeLightBox(i);//Display the fiirst image before the pause i++; wait = setInterval(function(){sequence()},4000); function sequence(){ changeLightBox(i);//Sequence through with 4 secong pause if (i==19) i=0; else i++; } })(jQuery); // End jQuery wrapper } function stopSequence() { clearInterval(wait);//Otherwise you can't stop it! } function changeLightBox(i){ // jQuery wrapper (optional, for compatibility only) (function($) { switch(i)//To select each picture in turn { case 0: lightbox('i/sass/01_tn.jpg'); break; case 1: lightbox('i/sass/02_tn.jpg'); break;
  • 63. 62 case 2: lightbox('i/sass/03_tn.jpg'); break; case 3: lightbox('i/sass/04_tn.jpg'); break; case 4: lightbox('i/sass/05_tn.jpg'); break; case 5: lightbox('i/sems/01_tn.jpg'); break; case 6: lightbox('i/sems/02_tn.jpg'); break; case 7: lightbox('i/sems/03_tn.jpg'); break; case 8: lightbox('i/sems/04_tn.jpg'); break; case 9: lightbox('i/sems/05_tn.jpg'); break; case 10: lightbox('i/shs/01_tn.jpg'); break; case 11: lightbox('i/shs/02_tn.jpg'); break; case 12: lightbox('i/shs/03_tn.jpg'); break; case 13: lightbox('i/shs/04_tn.jpg'); break; case 14: lightbox('i/shs/05_tn.jpg'); break; case 15: lightbox('i/soi/01_tn.jpg'); break; case 16: lightbox('i/soi/02_tn.jpg'); break; case 17: lightbox('i/soi/03_tn.jpg'); break; case 18: lightbox('i/soi/04_tn.jpg'); break;
  • 65. 64 JSon <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN" "http:www.w3.org/TR/xhtml1- transitional.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html> <head> <title>
  • 66. 65 Translate text to numbers </title> <script language="JavaScript" src="textToNumbers.js"> </script> <link rel=stylesheet href="style1.css" type"text/css"> </head> <p div id="acer"> A little demo of converting text to a sum number. Place the text in the first text area below and press the Translate button. The text is read and numbers added together. The result is displayed in the second text box. <textarea ID="Area"> Enter text here... </textarea> <p style="position:absolute; top:380px;" FORM> <INPUT TYPE="button" Style="background:#AACCFF; cursor:hand;" Value="Translate" onClick="dispTot()"> <INPUT TYPE="Text" Name="Result" ID="Result"> <INPUT TYPE="button" Style="background:#AACCFF; cursor:hand;" Value="Test Text" onClick="add(text2num('one two three fourteen'))"> </FORM> var Small = { 'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9,
  • 67. 66 'ten': 10, 'eleven': 11, 'twelve': 12, 'dozen': 12, 'thirteen': 13, 'fourteen': 14, 'fifteen': 15, 'sixteen': 16, 'seventeen': 17, 'eighteen': 18, 'nineteen': 19, 'twenty': 20, 'score': 20, 'thirty': 30, 'forty': 40, 'fifty': 50, 'sixty': 60, 'seventy': 70, 'eighty': 80, 'ninety': 90 }; var Magnitude = { 'hundred': 100, 'thousand': 1000, 'million': 1000000, 'billion': 1000000000, 'trillion': 1000000000000 }; var a, g, n; function feach(str) { if (str != "and"){//ignores 'and' to allow for a hundred and twenty thousand etc. var x = Small[str]; if (x != null) { g = g + x;//always add the small numbers(up to ninety) } var y = Magnitude[str]; if (y != null){ if (g == 0){ g = y;//if the text was 'a hundred' we would add the hundred } else{ g = g * y;//if it was four hundred we would multiply the hundred
  • 68. 67 } } if (x == null && y == null){ n = n + g;//when we hit a non number word we add the value to the total g = 0; } } } function text2num(txt) { a = txt.toString().split(/[s-]+/);//creates an array of words from the text g = 0; n = 0; m = "flush"; a.forEach(feach);//iterates through the array testing if each word is a number etc feach(m);//ensures the final values are added to the total return n;//sends the total back } function test(){ return "test";//just for testing } function add(text){ var TheTextBox = document.getElementById("Result"); TheTextBox.value = text;//adds the total to the textbox } function dispTot() { var description = document.getElementById("Area"); var t = description.value;//gets the text from the textbox var txt = t.toLowerCase();//in case of capitals var r = text2num(txt);//gets the total add(r); }
  • 69. 68 Database Clinic PK C_Name C_Address1 C_Address2 C_Town_City C_Postcode C_Telephone_No Hospital PK H_Name H_Address1 H_Address2 H_Town_City H_Postcode H_Telephone_No Staff PK StName Staff_Type stPassword FK1 Clinic_Name Patient PK Medical_Reg_No PaPassword Surname Forename DateOfBirth P_Telephone_No P_Address1 P_Address2 P_Town_City P_Postcode FK1 C_Name Consultant PK ConName FK1 Hospital Special_Interest Appointment PK Appointment_No FK1 Doctor Date Time FK2 Medical_Reg_No Medical_Record PK MedicalRecordNo FK1 Appointment_No Symptoms Diagnosis Prescription_Item PK,FK1 Prescription_No PK Item_No Drug Dose Frequency Length Prescription PK Prescription_No FK1 MedicalRecordNo Prescribing_Authority Prescribe_Date Referral PK,FK1 MedicalRecordNo PK,FK2 ConName LetterDate
  • 70. 69 A list of all patients registered with one of the clinics on the system: Go alter procedure PiratePractisePatients AS Select Patient.Forenames+' '+ Patient.Surname as PiratePractisePatients, Convert(VARCHAR, DateOfBirth, 106) as BirthDate From Patient Where Clinic_Name = 'Pirate Practise' go Execute PiratePractisePatients A list of patients seen by a particular GP in the past 3 days: Go Alter procedure DrPalantinesThreeDays AS Select Distinct Patient.Forenames+' '+ Patient.Surname as Patients_seeing_Dr_Palintine_2ndto4th_December From Patient, Appointment Where Patient.Medical_Reg_No = Appointment.Medical_Reg_No AND Appointment.AppDate Between '12-02-2008' And '12-04-2008' AND Appointment.Doctor = 'Dr Palintine' go Execute DrPalantinesThreeDays Appointment Appointment_no Doctor AppDate AppTime Medical_Reg_No Clinic C_Name C_Address1 C_Address2 C_Town_City C_Postcode C_Telephone_No Consultant ConName Hospital Special_Interest Hospital H_Name H_Address1 H_Address2 H_Town_City H_Postcode Medical_Record MedicalRecordNo Appointment_no Symptoms Diagnosis Patient Medical_Reg_No PaPassword Surname Forenames DateOfBirth Clinic_Name P_Telephone_No P_Address1 P_Address2 P_Town_City P_Postcode Prescription Prescription_No MedicalRecordNo Prescribing_Authority Prescribing_Date Prescription_Item Prescription_No Item_No Drug Dose Freq CourseLength Referral referralNo MedicalRecordNo ConName LetterDate Staff StName Staff_Type stPassword Clinic_Name
  • 71. 70 An appointment list for a GP for the following day: Go Alter procedure DrAntonTomorrow AS Select Appointment.Appointment_no as Dr_Anton_5_12_08, Convert( VARCHAR,Appointment.AppTime,108) as Time, Patient.Forenames+' '+ Patient.Surname as Patients From Appointment, Patient Where Appointment.Doctor = 'Dr Anton' And Appointment.AppDate = '12-05-2008' And Appointment.Medical_Reg_No = Patient.Medical_Reg_No go Execute DrAntonTomorrow
  • 72. 71 A full medical report for a particular patient with at least 3 appointments, 2 prescriptions, and a referral. use 0408183_assignment go IF OBJECT_ID ('appointmentcount', 'V') IS NOT NULL DROP VIEW appointmentcount ; GO CREATE VIEW appointmentcount AS select Patient.Medical_Reg_No, count(Appointment.Appointment_no) as NumOfApp from Patient, Appointment where Patient.Medical_Reg_No = Appointment.Medical_Reg_No group by Patient.Medical_Reg_No go IF OBJECT_ID ('prescriptioncount', 'V') IS NOT NULL DROP VIEW prescriptioncount ; GO Create view prescriptioncount AS select Patient.Medical_Reg_No, count(Prescription.Prescription_No) as NumOfPresc from Patient, Appointment, Medical_Record, Prescription WHERE Patient.Medical_Reg_No = Appointment.Medical_Reg_No and Appointment.Appointment_no = Medical_Record.Appointment_no and Medical_Record.MedicalRecordNo = Prescription.MedicalRecordNo group by Patient.Medical_Reg_No go IF OBJECT_ID ('referralcount', 'V') IS NOT NULL DROP VIEW referralcount ; GO Create view referralcount AS select Patient.Medical_Reg_No, count(Referral.ConName) as NumOfRef from Patient, Appointment, Medical_Record, Referral WHERE Patient.Medical_Reg_No = Appointment.Medical_Reg_No and Appointment.Appointment_no = Medical_Record.Appointment_no and Medical_Record.MedicalRecordNo = Referral.MedicalRecordNo group by Patient.Medical_Reg_No go DECLARE curMultipleApp3Pres2Ref1 CURSOR FOR select appointmentcount.NumOfApp, prescriptioncount.NumOfPresc, referralcount.NumOfRef, appointmentcount.Medical_Reg_No from appointmentcount, prescriptioncount, referralcount Where appointmentcount.Medical_Reg_No = prescriptioncount.Medical_Reg_No and prescriptioncount.Medical_Reg_No = referralcount.Medical_Reg_No DECLARE @numOfAppID Int DECLARE @numOfPresID int Declare @numOfRefID int Declare @patientID nvarchar(8) open curMultipleApp3Pres2Ref1 FETCH NEXT FROM curMultipleApp3Pres2Ref1 INTO @numOfAppID, @numOfPresID, @numOfRefID,@patientID WHILE @@Fetch_Status = 0 BEGIN SET NOCOUNT ON; if @numOfAppID >2 and @numOfPresID>1 and @numOfRefID>0 SELECT Patient.Medical_Reg_No, Patient.Forenames, Patient.Surname, Appointment.Doctor, Convert(VARCHAR, Appointment.AppDate, 106) as Seen,
  • 73. 72 Medical_Record.Symptoms, Medical_Record.Diagnosis, Prescription_Item.Drug, Referral.ConName FROM Patient, Appointment, Prescription, Prescription_Item, Medical_Record Left OUTER JOIN Referral ON Medical_Record.MedicalRecordNo = Referral.MedicalRecordNo WHERE Patient.Medical_Reg_No = Appointment.Medical_Reg_No and Appointment.Appointment_no = Medical_Record.Appointment_no and Medical_Record.MedicalRecordNo = Prescription.MedicalRecordNo and Prescription.Prescription_No = Prescription_Item.Prescription_No and Patient.Medical_Reg_No = @patientID FETCH NEXT FROM curMultipleApp3Pres2Ref1 INTO @numOfAppID, @numOfPresID, @numOfRefID,@patientID END CLOSE curMultipleApp3Pres2Ref1 DEALLOCATE curMultipleApp3Pres2Ref1 Go Database Administrators Plan Server and Database Security and User Administration: Appropriate firewall and anti-virus software would be essential both on servers and all client machines. Server and database security will be achieved through identification of users and determination of their needs. A patient will only have access via a web application, which will require them to enter their user name and login password. This will be used to identify the records they may access, which will be related to their Medical Registration Number, giving them access to their own appointment and medical information. It is likely that only recent information would be made available on-line as too much information without the knowledge to comprehend its significance should be avoided. Requests for full information would be addressed by providing access to it within the surgery, with appropriate counselling/advise provided to avoid confusion. Staff will be split into three groups. Administrative staff will be able to book appointments for patients who telephone, so must have rights to patient and appointment tables in their entirety. This will also give them access to produce appointment schedules for doctors. They will need access to referral information to produce referral letters, this will include Medical Record and Prescription information. A subgroup of administrators could be given these additional access rights at individual clinic management discretion.
  • 74. 73 Medical staff will be able to view and add data in all tables, with labelling from their login information applied to the diagnosis, prescription and referral data. Editing of input information will be limited to pre-submission forms in the application. The database proper will not allow editing of submitted data. Nurses will have the same viewing rights as doctors, but will not be allowed to add diagnosis, prescription, or referral. All in clinic users will be authenticated using windows authentication and access rights determined by their login category. External access via a web application will be managed by providing view s for each patient including the information they are entitled to view, with application for appointment as their only data entry option. A simple stored procedure applying the login identity to a query to create/update the view will gather all the available information. the query can be limited to go back a particular period of time as deemed appropriate. New users would be applied to the windows server systemand their login group would act as the indicator of the rights to be applied in the SQL server database system. Individual requirements could be accomodated by creating bespoke groups as required, with access priveliges adjustable down to individual column level. This may be necessary for columns such as password. Stored procedures would be employed to provide specific information of interest to a user group without having to provide them with access to all the source data. A systemof recording e-mail addresses and e-mailing somebody a password if they forget it is commonly used. It would be unwise to use the e-mail address as the user ID as other people will know somebody's e-mail address and they may be neighbours who share the same doctors surgery/clinic. Administration priveliges would be guarded, as the potential for catastrophe is considerable. If there are not two members of staff suitably qualified to accept these responsibilities a reciprical arrangement where another administrator is co-opted as stand-in in the event of holiday or sickness absence would be instigated. Both parties would benefit from mutual support, and this may extend to a network offering forum advice as well as absence cover. Servers would be physically secured to prevent malicious damage or theft.
  • 75. 74 Database Settings and Configurations: The database will be set up to store log file seperate to data files to improve efficiency. A prediction of data volume over time would be necessary to determine storage requirements. Auto creation and update of statistics could be employed although auto update is to be replaced by scheduled update in the maintenance schedule, but auto shrinking may be avoided as it would impact performance and may not be necessary. Full recovery model would be employed to minimise the risk of loosing data in the event of failure. Checksum page damage option will detect pages to be repaired in the event of a database recovery. Storing related tables on different discs will allow them to be accessed simultaneously. This is achieved by placing them in different filegroups and specifying the locations of these filegroups on different disks. This activity would be incompatible with a server employing a striped RAID option. It is becoming more common for clinical databases to store images of patients to act as memory triggers to clinicians reviewing cases in the patients absence. This requires more storage space and may reduce performance of the server, but may improve the performance of the activity by improving the clinician understanding of the situation. The balance is likely to be struck in favour of this approach, which would require a record of consent to be maintained. The systemis intended as a distributed system with a wide area network divided at each clinic into local area networks. The systemmanagement server will be located at one clinic, and a mirroring server at a second location. In the event of an integrity check failure of the systemmanagement server, the mirror server would be employed whilst recovery was implemented. This approach would ensure continuous availability of the system. It would be necessary to encrypt data for transmission between locations and a private link would be preferable to sending data over the internet. Regular audit activity would include random activity investigation, as well as specific activity trailing, this would include consideration of data source and modification altering. Error correction would generally be acchieved by addition of correction information maintaining the original entries to allow monitoring. For example a medical record could only be edited prior to submission, but would not be available for editing post submission. All such submissions would be labelled with the user information, client machine identification, date and time, to allow audit trailing. A log of record updates would be employed to assist in recovery in the event of failure or fallover. Record locking would be relatively straightforward as patient medical record information would be inaccessable during consultation, but would not be required legitimately by a third party under these circumstances.
  • 76. 75 Start up procedures would not be employed frequently as the servers would generally run continuously to provide patient access out of hours. Management of Indexes and Views: In order to identify indexes it would be necessary to identify common activities which involve searches and design indexes based on the most prevelant parameters. As clustered indexes are limited to one per table and are especially effective, these would be targeted at the largest volume of activity. In the absence of available information, it would be necessary to monitor activity to determine requirements. Should clustered indexes be applied erroneously, they may be altered when this becomes apparent as they do not alter the data. It is likely that data related to each clinic would be indexed to prevent search of all data when clinic specific information is required. The Database Engine Tuning Advisor provides information on optimisation of indexes. This information would be considered and action taken where considered prudent. Views may be created to combine related columns from different tables as well as to filter or select data to improve its relevance. Since the range of data may be restricted it is important to consider the effect that any omission may have on the users perspective. Whilst the search for efficiency is laudible, it must not be achieved by compromising integrity. Hence data must not be seperated from related data without this being apparent to the user. This topic could be discussed in greater detail, but in the context of this activity it will be sufficient to indicate that the author is aware that inappropriate filtering could have disasterous consequences, so any activity which may cause radical consequences should be based on complete information and not selective views. By creating indexes on views to improve performance, the views become stored objects rather than virtual tables. This requires careful consideration as to its impact on performance, but may be the realistic approach where much activity is occuring on views. The first index created must be clustered. Views may be used to screen out information which is outside the requirements of the user, so as to avoid compromising sensitive information unnecessarily. This would facilitate compliance with the data protection act which covers data distribution as well as data storage. Updates of views would be based on triggers responding to addition of data. The use of horizontal security, where views are limited to specific rows, would be employed to give patients access to their data without access to that of other patients.
  • 77. 76 Database Maintenance Including Database Backup, Integrity Check, Database Shrinking, Indexes and Statistics Maintenance and Maintenance Scheduling: A documented maintenance plan would be employed which would include backup, integrity check, shrinking, and index and statistics maintenance. Regular manual monitoring of aspects such as available storage space should also be scheduled and documented. In order to determine the backup activity for a given database it is necessary to compare the consequence of risk, with the cost of alleviating it. Since the database availability is ensured by mirroring it is unlikely that the practises could justify additional resources for further backup, so it is likely that the mirroring activity would be considered sufficient backup to cope with failure as the two servers would be located on different sites. An option with reasonable costs would be to purchase an external hard drive and use it for daily full backup out of normal surgery hours augmented with periodic differential backup. This activity should be accomplished at both sites to guard against fire etc. This activity would be documented in a seperate log. Constraints are employed to limit opportunity for submission of erroneous data, however it is important to avoid prevention of legitimate activity by poorly defined constraints. It is necessary to employ a continual user feedback approach to ensure the system is not creating inefficiency. Both formal and informal communication should be employed to optimise design parameters. The successful compromise of limiting inappropriate data entry with allowing trouble free use would improve the outcome of integrity checking. Shrinking would be employed cautiously as it will impact performance. The data volume involved and the availability of economical high volume storage media, would limit the requirement of this activity. Thresholds for shrinking activity would relate to current storage space, and upgrade of this space would be considered periodically. Index and statistics information is used by thedatabase engine to inform it of routes to particular data. Reorganising and rebuilding indexes would have significant impact on performance if conducted infrequently. By scheduling these as frequently out-of-hours activities their impact will diminish as less alteration will occur on each occasion. This approach will avoid sudden and unanticipated alterations in performance which can be disconcerting for users. Statistics must be kept current in conjunction with indexes as they will interact and also affect performance. The automatic updating may be employed, but scheduled updates are a preferred
  • 78. 77 alternative as they are more complete and reliable. These activities should also be sceduled to avoid impacting on performance during periods of high demand. All statistics should be updated not just column or index statistics. The performance monitor would also be utilised frequently to highlight an performance bottleknecks and inform their resolution.
  • 79. 78 STEPproject report: Enhancement of Bluetooth link for wireless headset use with amateur radio. Company; RPF Communications. Student; Chris Worledge.
  • 80. 79 Contents Background: Page 67 Detail: Page 68 Project plan: Page 68 Project Progression: Page 70 Results: Page 71 Learning outcomes: Page 71 Recommendations: Page 72 Appendix: example code Page 73 Schematic Page 80 Skills Tracker Reports Page 81 Example e-mails Page 87
  • 81. 80 Background: Chris Worledge has just completed the second year of BSc (hons) Computer Science at Anglia Ruskin University. Having no car meant the working day started and ended with an eight mile bicycle ride which meant he was the brightest employee first thing in the morning, and was able to improve his fitness over the eight weeks noticeably. RPF Technical services is a small company with four full time staff engaged in bespoke design work for other manufacturers. It has a daughter company called RPF Communications with no additional staff. RPF Communications currently market a range of devices to support amateur radio enthusiasts. One of these devices allows the use of wireless headsets (as used with mobile telephones) using Bluetooth® technology. The project aim was to provide an enhancement to this functionality, allowing high quality headsets to be fully utilised, extending the frequency response beyond that of telephone quality speech systems.
  • 82. 81 Detail: The product currently marketed to provide wireless headset operation is called the Talksafe. The required enhancement was to increase the frequency range of the audio signal to take full advantage of the capacity of a high-fidelity headset. This implies a name of “Wide Audio Range Talksafe”, which provides a unique selling point in its quirky acronym Wart. XYP4372 Wart The Bluetooth® standard communication link is called SCO (synchronous connection-oriented link) but this has the telephone quality audio range. To provide the quality enhancement required it was necessary to change the link type employed to eSCO (enhanced synchronous connection- oriented link). New hardware was to be designed using a device that RPF had no prior experience of. It was hoped that the use of this device would provide greater control and flexibility than the one employed previously. The chip-set employed in this device was manufactured by the same company as the one in the previous device so it was assumed that there would be little difficulty in the translation process. Following design of the hardware it would be possible to design code that complimented it precisely. The advantages to RPF would be an enhancement of their product range which had not been achieved previously due to lack of available effort, and the introduction of an alternative to their previous Bluetooth® device which it was expected would be more flexible. The advantages to the author would be an opportunity to revisit the workplace after the second year of degree study in order to put context to some of the learning, an opportunity to produce C code in a real work environment, and material to stimulate ideas for the third year major project. Project plan: The intention was to design the hardware first and pass this to others to be manufactured. The software could then be written to compliment the hardware design, and the two married to enable testing and modification to improve the final outcome. A diagram of the project plan is depicted on the next page.
  • 83. 82 This plan did not seem optimistic for the time scale of the project. Read background information Design hardware Hardware productio n Write code changes Compile and build binary file Apply binary file to hardware The previous hardware design and general information relevant to usage, along with a requirements specification document which was discussed for clarification. Debug and improve. A minimal requirement concerning function and performance was included in the requirements specification. Reference was made to previous design. The board was etched and some components applied. Comprehending a large volume of dispersed code. Altering link type, responding to buttons, and illuminating indicators. Respond to compiler errors. Address any shortcomings and enhance performance. Install the software on the flash memory Read background information
  • 84. 83 Project Progression: A meeting was held in the first week, after the requirements specification had been absorbed. This served to limit some of the less practical aspects and clarify precisely what was required. As the author had not designed electronics for twenty years, and the technology had changed considerably over that time, the hardware design represented a stimulating mental challenge. It was completed over two-and-a-half weeks with a lot of the time consumed learning to use the schematic and p.c.b. layout application “Easy PC” which was less ‘easy-peasy’ than hoped! The design was modified in line with company policy and the author was disappointed not to be consulted on this at all. The p.c.b. layout was passed to a colleague for etching, and when this was done, some components were added. The background reading on the code was extensive and challenging, as the existing code was spread amongst over 300 files and consisted of around half a million lines. The chosen language of C being new to the author enhanced this challenge. Once the layout and function had been absorbed the task was accomplished over a couple of weeks, and following some revision based on discussion with colleagues it was compiled in half a day. This surprised some colleagues who had anticipated this activity being more time consuming. The next stage of installing the binary files on the flash memory and debugging proved an insurmountable hurdle within the timeframe. The chipset manufacturers supplied a P.C. application for compiling, building the binary files, and debugging, but its efficacy proved limited. Although it gave the impression of adequate progress, any attempt at debugging produced communication error messages. This scenario was discussed at length with the chip-set manufacturers technical support staff, who were unable to provide explanation. Being directed to the U.S. support in Texas added complication and delay, but this was overcome after a few more e-mails.
  • 85. 84 The first stage in addressing this problem was to alter the format of the link library as it was constructed by the IDE as a linked list, and the chip-set required a mapped array. The company Technical Director accomplished this as it was beyond the experience of the author. The result of this activity gave the appearance that the problem had been resolved, but on closer inspection this was not the case. A repetition of this scenario took until the end of the project, so at the time of writing the project was incomplete. Results: Although it was disappointing to leave the project incomplete the experience was both worthwhile and enjoyable. An introduction into a different area of work activity was combined with the opportunity to interact with a group of motivated people. The experience of this work will undoubtedly enhance both the remaining study and employability of the author. Learning outcomes: The experience of coding in a ‘real world’ environment has provided context to what had previously only been explored academically. An up-to-date view of current work trends will be useful in targeting study effort as well as future employment application. Success in code production on a large code volume project has given the author confidence in his programming ability. Translation of learning to a different language and structure demonstrated their flexibility. An introduction to new technologies, both electronic components and applications was appreciated.
  • 86. 85 Recommendations: The problem of incompatibility between the IDE output and the chipset may be related to the release level of the chipset. The release employed is numbered 3 whilst the current one is 5. This may mean that the current release of the IDE is aimed at use with the current release of the chipset, although continuing production of previous releases should be supported. The only device that would respond to the code was on a development board which had different switch and indicator configuration, making it difficult to test the software on it. This device on a suitably designed board would be another option which should be considered.
  • 87. 86 Appendix: Examples of revised code and the author’s electronics design are provided CSRStackConnectionconnection.h /*! @brief Synchronous packet types. */ typedef enum { sync_hv1 = 0x0001, sync_hv2 = 0x0002, sync_hv3 = 0x0004, sync_all_sco = sync_hv3 | sync_hv2 | sync_hv1, sync_ev3 = 0x0008, sync_ev4 = 0x0010, sync_ev5 = 0x0020, sync_all_esco = sync_ev5 | sync_ev4 | sync_ev3, sync_2ev3 = 0x0040, sync_3ev3 = 0x0080, sync_2ev5 = 0x0100, sync_3ev5 = 0x0200, sync_all_edr_esco = sync_3ev5 | sync_2ev5 | sync_3ev3 | sync_2ev3, sync_all_pkt_types = sync_all_edr_esco | sync_all_esco | sync_all_sco } sync_pkt_type; /*! @brief Synchronous connection link type. */ typedef enum { sync_link_unknown, sync_link_sco, sync_link_esco } sync_link_type; /*! @brief Message received due to a call to ConnectionSyncConnect or ConnectionSyncResponse. */ typedef struct { hci_status status; /*!< Indicates the success or failure of the connection attempt. */ sync_link_type link_type; /*!< Specifies whether a SCO or eSCO packet type was obtained. */ Sink audio_sink; /*!< The Synchronous connection sink. */ uint32 rx_bandwidth; /*!< Receive bandwidth. */ uint32 tx_bandwidth; /*!< Transmit bandwith. */ uint8 sco_handle; /*!< Link Manager SCO Handle. */ } CL_DM_SYNC_CONNECT_CFM_T; /*! @brief Message received due to a call to ConnectionGetLinkQuality. */ typedef struct { hci_status status; /*!< HCI status code.*/ uint8 link_quality; /*!< The link quality setting.*/ Sink sink; /*!< The sink.*/
  • 88. 87 } CL_DM_LINK_QUALITY_CFM_T; CSRTest APP and API & HeilLink: AudioGate.c void AudioGate_SCOConnectIND Line 330 void AudioGate_SCOConnectIND(PTASK pTask,AGHFP_AUDIO_CONNECT_IND_T *pData) { PTASK pPeerTask; /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + Find the associated task */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ pPeerTask=Task_FindByAddr(&pData->bpAddress); if ( pPeerTask!=NULL && State_IsReady(pPeerTask) && pPeerTask->Role.Peer.Flags.boLinkEnable ) { AghfpAudioConnectResponse(pPeerTask->Role.Gateway.pProfile, TRUE,sync_all_esco,NULL); } else { AghfpAudioConnectResponse(pPeerTask->Role.Gateway.pProfile, FALSE,sync_all_esco,NULL); } } void AudioGate_SCOConnectCFM Line 351 void AudioGate_SCOConnectCFM(PTASK pTask,AGHFP_AUDIO_CONNECT_CFM_T *pData) { /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ switch ( pData->status ) { /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + Successful audio connection. */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ case aghfp_audio_connect_success: DEBUG_MSG( (" SCO Open") ); /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + Save SCO link pointer, even if we disconnect later */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ pTask->Role.Gateway.pSCOSink=pData->audio_sink; /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + Only allowing eSCO connections */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ if ( pData->link_type==sync_link_esco ) { /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ headset.c void Headset_SCOConnectIND Line 346 void Headset_SCOConnectIND(PTASK pTask) { /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + Currently always allow connection */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ HfpAudioConnectResponse(pTask->Role.Headset.pProfile, TRUE,sync_all_esco,NULL); } void Headset_SCOConnectCFM Line 357 void Headset_SCOConnectCFM(PTASK pTask,HFP_AUDIO_CONNECT_CFM_T *pData) { /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ switch ( pData->status ) { /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + Successful audio connection. */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ case hfp_audio_connect_success:
  • 89. 88 DEBUG_MSG( (" Success") ); pTask->Role.Headset.pSCOSink=pData->audio_sink; pTask->Role.Headset.eLinkType=pData->link_type; /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + Only allowing eSCO connections */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ if ( pTask->Role.Headset.eLinkType!=sync_link_esco ) { break; } void Headset_SCOConnectCFM Line 398 /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + Bump to next connect sub-state */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ State_Change(pTask,TaskState_Connect); pTask->Role.Headset.boLinkActive=TRUE; PioSet(3, 1)// break; Line 449 void Headset_SCODisconnectIND(PTASK pTask) { /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + For when the link is no longer required + */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ pTask->Role.Headset.pSCOSink=NULL; pTask->Role.Headset.boLinkActive=FALSE; State_SetMain(pTask,TaskState_Disconnect); PioSet(3, 0);//Extinguish paired LED } State.c void State_Peer_Connect Line 679 if ( !pTask->Role.Peer.Flags.boIncoming ) { /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + If not incomming then ... */ /* + Sends a AGHFP_AUDIO_CONNECT_CFM message */ /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ AghfpAudioConnect(pTask->Role.Gateway.pProfile, sync_all_esco, NULL); } CSRstackconnectiondm_sync /* Default parameters for a synchronous connection. Configured to obtain best SCO link possible. NOTE: It's not possible to currently have both SCO and eSCO packet types in the same request due to the way the firmware works. */ static const sync_config_params default_sync_config_params = { 1600UL * params->tx_packet_length, /* tx_bandwidth */ 1600UL * params->rx_packet_length, /* rx_bandwidth */ 0xFF, /* max_latency */ sync_air_coding_cvsd, /* voice_settings */ sync_retx_disabled, /* retx_effort */ sync_all_esco /* packet_type */ }; HeilLink/Headset.c/line 351 HfpAudioConnectResponse(pTask->Role.Headset.pProfile, TRUE,sync_all_esco,NULL); 368 /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* + Only allowing eSCO connections */