Develop a small outpatient management system using XForms and Ruby on Rails, part 2nd

Source: Internet
Author: User
Tags db2 db2 express db2 insert xform ruby on rails

Realize Patient Information xform

Brief introduction

Part 1th of this article series designs a WEB application that allows patients to enter information in a doctor's office. discussed how to create such an application using XForms, DB2 PureXML, and Ruby on Rails, and experimented with the use of these technologies. This is the 2nd part of the article, and we're starting to implement the application. We'll design the first XForm and build Ruby on Rails back-end from the table's one-way DB2 insert data. You'll see how to leverage XML throughout your application with these three technologies.

Prerequisite

This article assumes that readers have a certain understanding of XML and WEB applications. It's certainly helpful to have some of the three core technologies, XForms, DB2 PureXML, and Ruby on Rails in advance, but it's definitely not necessary. This article uses the Mozilla XForms 0.8.0.3 version plug-in. It provides XForms run-time support for all Mozilla browsers, such as Firefox. Another useful Mozilla plugin is the XForms Buddy, which provides the XForms debugger. This article is using the 0.5.6 version. IBM's DB2 database server is also required. This article uses DB2 EXPRESS-C version 9.5 to support Windows®, linux®, and UNIX® systems. Ruby on Rails is also required, and this article uses the Ruby 1.8.6 and Rails 1.2.5. The Mongrel WEB server used in conjunction with Rails is also used. You can install via Ruby Gems (just enter the gem install mongrel on the command line).

Patient Information

Part 1th discusses the XForms, DB2 PureXML, and Ruby on Rails used, which support the use of XML in the front-end and back-end of the application. One advantage of this design is that the XML data is placed at the core. The design of the XML data model determines how to implement the front-end based on XForms and how to retrieve data from DB2 using the back-end Ruby on Rails. Therefore, the development application should begin with the design of the XML data model.

XML Data Model

The application allows patients to enter information needed by doctors and other medical personnel. For example, the patient's name, insurance company, age, cooperative medical care payment amount, and of course, their symptoms. After you know this, listing 1 shows a typical example of a data model.

Listing 1. Typical example of patient information XML

<?xml version= "1.0" encoding= "UTF-8"?>
<Info>
<FirstName>John</FirstName>
<MiddleName>David</MiddleName>
<LastName>Smith</LastName>
<age>33</ age>
<Insurer>HealthCo</Insurer>
<Id>555-69-1212</Id>
<policyholder >true</PolicyHolder>
<Copay>10</Copay>
<symptoms>cough, fever</symptoms >
</Info>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.