Integrated
Surgical Environment
Manage activities of Surgical
Division in Hospitals.
To
develop a software application that can be used in hospitals to manage the
activities of the Surgical Division like package building, surgeryscheduling
and tracking surgical equipments.
1. Acegi Security
2. Eclipse 3.2 IDE for development, debugging.
3. JBoss-4.0.4.GA as the web server.
4. SVN version control for versioning and code delivery.
5. Ant for our build and remote deploy.
6. Programming Language: Java (jdk 1.5)
7. JSF for Front end presentation
8. PostgreSQL8.1 as the database
9. Hibernate 3 as the persistence layer
Following are the major
requirements that we had to meet while developing this project:
Ø
Technical Requirements
1.
Develop the project as
a Java /J2EE based application.
2.
Application should run
in a J2EE complaint Application Server.
3.
Application should
support any JDBC complaint database.
4.
Develop the console
based on Java Server Framework (JSF).
5.
Implement user security
in the application.
Ø
Functional Requirements
1.
Project includes
four main sections.
a.
Setup section
including the Administrative Components.
b.
Packages section
managing the package building process and bundling equipments in the packages.
c.
Surgeries section
managing the surgeryscheduling process and associating packages to the
surgeries.
d.
Search Section
provides different options like search based on OperationRooms, Packages and
Equipments.
2.
Provide features to
perform CRUD (Create, Read, Update, and Delete), SelectALL, Sorting, and
Pagination in all the sections.
Following are the
solutions that we implemented to meet the requirements of the project
Ø
Technical Solutions
1.
We developed the
application using Java (jdk 1.5).
2.
Deployed the
application in J2EE Application Server,
JBoss. (jboss-4.0.4.GA).
3.
Hibernate 3 is used
as the persistence layer so the application works with any JDBC complaint database.
4.
At the time of
development we used PostgreSQL8.1 as the database.
5.
We used JSF Framework
MyFaces1.1.4 and Tomahawk-1.1.3 to develop the Front End Presentation.
6.
We used Acegi
Security with Spring Framework to implement the user security for the
application.
Ø
Functionality Implementation
1. SetupSection
Setup section is used to manage the master
data, which is used by the other sections. LeftMenu in the Figure 1 shows the
functionality provided in the setup section. Setup Section provides the feature
to authenticate operation rooms to a user.

Figure 1
Client side email validation as shown in Figure 1 is done using the Tomahawk
component t:validateEmail as shown in the below code.
<td width="55%"
valign="middle">
<t:inputText id="email"
value="#{level1.level1Model.email}" styleClass="string" >
<t:validateEmail message="Invalid email address"/>
</t:inputText>
</td>
Client side
validation for PhoneNumber and PostalCode as shown in Figure 1 is done using the component t:validateDoubleRange
as shown in the below code.
<td width="55%"
valign="middle">
<t:inputText id="phone"
value="#{level1.level1Model.phone}" styleClass="string"
>
<f:validateDoubleRange/>
</t:inputText>
</td>

Figure 2
Custom validation is done using the validator attribute in the <t:inputText
component. As shown in the Figure 2, if the user enters space for the required
field and click on create button, it displays the error message.
<td width="55%"
valign="middle">
<t:inputText id="name"
value="#{equipment.equipmentModel.name}"
validator="#{equipment.equipmentModel.validateRequiredFields}"
required="true" styleClass="string" />
</td>
Figure 3 shows the entire common features provided for
each section.
The table that shows the listing of company records is
rendered using Tomahawk t:datatable component.

Figure 3
We used css files to apply styles for the components
throughout the application. Rendering alternate columns of datatable component
in different styles is achieved by defining two style classes in the css file
and configured both of them in the columnClasses attribute of the datatable.
<t:dataTable id="data"
headerClass="tableHeader"
columnClasses="tableColumnOdd, tableColumnEven"
var="row" width="100%"
value="#{level1.results}"
preserveDataModel="true"
rows="#{level1.page.rowsPerPage}"
sortColumn="#{level1.page.sort}"
sortAscending="#{level1.page.ascending}"
preserveSort="true">
Figure 3 shows the company records sorted in the
descending order of CompanyName. Below code shows how sorting functionality is
achieved for each column of the datatable. The outputText that displays the
heading of each column is surrounded by a t:commandSortHeader component
<t:column>
<f:facet
name="header">
<t:commandSortHeader
columnName="name" arrow="true" >
<t:outputText
value="CompanyName" styleClass="topsubmenu"/>
</t:commandSortHeader>
</f:facet>
<t:outputText
value="#{row.name}"/>
</t:column>
When user clicks on the column heading ‘CompanyName’,
the value of the attribute ‘columnName’ in the commandSortHeader gets assigned
to the ManagedBean property which is mapped to the attribute ‘sortColumn’ of dataTable.
Pagination is implemented through the Action Event
Handling feature of JSF. Pagination gives option to navigate through the
different pages of listing like First page, Previous Page, Next page and Last
Page. User can directly visit any page by giving the page number and click the
‘Go’ option. User can set the number of records per page and the default is
given as 10.
Figure 3 shows Add, Edit and Delete options. SelectALL
link will select all the listed records and can be used for selecting all the
records together.
2. Packages Section
Packages section lets the user to create PackageTemplate and Packages.
PackageTemplate is used as the template to create the concrete instances of
Package. PackageTemplate gets associated to SurgeryTemplate. Packages get
associated to ScheduledSurgeries.

Figure 4
Add Equipment link provided in the package listing table
shown in Figure 4 directs the user to the page shown in Figure 5 where user can
add equipments to the package.
This page lists all the available equipments in the
package and the quantity of each equipment. User can change the equipment and
quantity by clicking on the edit link.

Figure 5
When the user clicks on the Add equipment Button, it
will add one more row in the listing, with save option as shown in Figure 6.

Figure 6
3.
Surgeries Section
Surgeries section lets the user to create SurgeryTemplates and
ScheduledSurgeries. SurgeryTemplate is a template that can be used to schedule
concrete surgeries.

Figure 7
ScheduledSurgeries section shown in Figure 7 lets the
user to schedule a surgery. Associate Package link can be used to associate
package to a Surgery. Packages shown in green color in Figure 8 are already
associated to the surgery.

Figure 8
Already associated packages are given an option to
deassociate itself from the sugery. Once a package is associated to one
surgery, that package won’t be listed when user clicks on the AssociatePackage
link for another surgery.
Choose cabinet link given for each package lets the user
to assign a cabinet for that package in the shelfs present in the operation
room.
Add equipments link given for the packages lets the user
to add more equipments to the package.
Calendar object shown in the Figure 9 is rendered using
the Tomahawk component t:inputCalendar

Figure 9
The following code renders the Calendar object as a
popup when user clicks on the button displayed near the textbox.
<t:inputCalendar id="scheduledDate" renderAsPopup="true"value="#{scheduledSurgeries.scheduledSurgeriesModel.scheduledDate}"/>
4.
Shelf Display
When a user logins, the system lists all the operation
rooms assigned to that user. User can select any of the room and can view the
shelf in that room. If the user is authenticated only to one room, it directly
displays the shelf in that room when the user logins.
Shelf in an operation room is displayed as shown in
Figure 10.

Figure 10
In the Figure 10, two types of cabinets are shown. B2,
C3, D4 are cabinets having packages in it. Rest of the cabinets is without any
package.
The shelf is displayed using Tomahawk t:datatable
component. In all the listings seen before, number of columns is static, only
the number of rows changes. But in this
scenario, the number of columns is also dynamic.
Rendering the dynamic columns is achieved by using
t:columns component inside the datatable.
Following code is used to display either of the two
images in each column using the rendered option of the component t: graphicImage.
<t:graphicImage value="#{request.contextPath}/images/withpackage.jpg"
rendered="#{shelfDisplay.shelfColumnValue.flag}"/>
<t:graphicImage value="#{request.contextPath}/images/withoutpackage.jpg"
rendered="#{!shelfDisplay.shelfColumnValue.flag}"/>
When user clicks on the link given on the cabinet, it
will display all the packages present in that cabinet as shown in Figure 11.

Figure 11
When user clicks on the link given on any package, it
will list all the equipments present in that package as shown in Figure 12. The
breadcrumb trail provided on the top of the listing will keep the user in track
of the location of the equipment in the following order Room->shelf->cabinet->package

Figure 12
When the user clicks on the link provided on each
equipment, it will show the other occurrences of the equipment. It will list
the room name and the cabinet name where that equipment is found as shown in
Figure 13.

Figure 13
When the user click on the link provided on the cabinet,
it will list the packages in that cabinet that contains the selected equipment
as shown in Figure 14.

Figure 14
Search Packages
Search Packages section shown in Figure 15 helps the
user to track packages based on the surgerytype and surgeon. When user selects
the search options and clicks on the search button, it lists all the packages
that matches the criteria selected by the user as shown in Figure 16.

Figure 15

Figure 16
Link provided on the packages in Figure 16 helps the
user to view the equipments present in that package as explained in the
ShelfDisplay section.
Search Equipment
Search equipment section shown in Figure 17 helps the
user to track equipment present in the shelfs of the operation rooms.

Figure 17
When user enters the equipment name and clicks on the search button, it lists all the rooms where that equipment is present as shown in Figure 18. The search will be done only among the rooms that are authenticated to that user.

Figure 18
When user clicks on any room, it will display the shelf
of that room. In the shelf shown in figure 19, packages present in the cabinets
A2, B2, C2 contain the equipments that the user searched. D4 contains packages
with some other equipment. The other cabinets contain no packages.

Figure 19
When the user clicks on the link provided on the cabinet
having the equipment, will display the packages in which the searched equipment
is present.