Implementing the search for XForms by doctors and patients
Brief introduction
So far, we have created a DB2 database and three XForms to help patients and nurses manage patient data. By using Ruby on Rails as a processing interface, patients can add new records to the database and update the information later. So the nurse can view and modify the information appropriately and approve the input when the patient is able to diagnose and treat it.
This is the last part of this series that will create a new view and controller for physicians and two new forms for the view. The first form allows doctors to view patient records entered by a patient and approved by a nurse, and to increase new information in the diagnosis and treatment process. Then develop a form for doctors and nurses to search for patient information by last name.
Prerequisite
This article assumes that readers are basically familiar with XML and WEB applications. Of course, the three core technologies that have dabbled in XForms, DB2 PureXML, and Ruby on Rails are helpful, but not necessary. This article uses the Mozilla XForms plugin 0.8.0.3. It provides XForms run-time support for all Mozilla browsers, such as Firefox. Another useful Mozilla plugin is the XForms Buddy, which provides an xforms debugger. This article is using the 0.5.6 version. IBM's DB2 database server is also required. This paper adopts DB2 express-c 9.5. Support for Windows®, linux®, and UNIX® systems. Ruby on Rails is also required. This article uses the Ruby 1.8.6 and Rails 1.2.5. This article also uses Rails to use the Mongrel Web server. You can install via Ruby Gems (just enter the gem install mongrel on the command line).
Doctor Visits XForm
The aim of Doctor XForm (doctorpatient.xhtml) is to have doctors see the same patient information that nurses see in kiosk and approved views. On this basis, the XForm also need to allow doctors to enter information on the diagnosis and treatment of patients. So, in addition to a few differences, the Doctorpatient form and the Triagepatient form are very similar, as shown in Listing 1. Name the file doctorpatient.xhtml and save it to the public folder.