Hospital Medical Scan Scheduler

Project Description

The problem

A large Singapore based hospital required to automate the scheduling of appointments for medical scans of patients. There were over eighty different scans possible in the hospital. The patient scan request is sent as a HL7 message over the TCP/IP network from different points in the hospital. These requests would need to be fulfilled based on a complex set of rules that cater to availability of equipment, Doctors, staff, maintenance time outs, preferred timing slots by the patient, priority and urgency of the scan etc. An appointment slot that satisfied all the constraints has to be found and the appointment would need to be packaged as a HL7 message and sent back to the requesting application.

Solution
A Windows service was developed to continuously listen to, process and send incoming and outgoing HL7 messages. The multi-threaded service receives, acknowledges, parses, validates, stores, processes, creates and sends HL7 messages. This includes the interface to the database, network communication and the appointment scheduling business logic. A rule engine was developed that catered to the complex set of rules the hospital had. It also allowed easy configuration, addition and deletion of rules. To demonstrate that the robust rule engine could take care of several permutations and combinations, a simulator was built to simulate the hospital systems that will send HL7 messages to this service. This was used to exhaustively test the service to ensure that it can process ~400 medical scan appointment requests per hour. The system was designed using standard design patterns to ensure that the code was well structured.

Environment

Windows XP / Windows Vista / Windows 7

Microsoft Visual C# 2008, .NET framework 3.5

Microsoft SQL Server 2008

Microsoft SqlMetal Code Generation tool for database communication

Microsoft Sandcastle Documentation tool to generate HTML help files from XML files

Back to Top