HL7 is a standard of medical information exchange. It will become an important trend for developing hospital information system in the future. However, this standard has not been widely used because most medical institutes are unable to encode and decode HL7 messages. Some products developed by medical information providers are very expensive and do not conform to the standard. This research applies the web services technology to develop the HL7 encoding and decoding software and provides all medical organizations using the open source through the Internet. In this paper, we will discuss the architecture and share our developing experience of the system. We have designed computer programs for implemented prototyping systems including (1) Database Management Subsystem (2) Data Interface Transformation Subsystem (3) HL7 Messages Generation Subsystem (4) Dynamic Services Exchange Subsystem, and (5) HL7 Messages Validation Subsystem. At present, the purpose of using HL7 information is mainly to notify the patient referral and disease report, and then hoping to offer the exchange of medical information, reducing the waste of medical resources, and promoting the quality of medical service.