What's your poison?

The National Poisons Centre needs easy-to-configure data kept up to date. Enter XML

Next time you feel ill from a spider-bite or adventurous eating, spare a thought for the NZ National Poisons Centre. This is a service unit within the Department of Preventative and Social Medicine at the University of Otago. The Poisons Centre has to provide high-availability, high-accuracy information for medical staff throughout the country. Due to the international nature of the problem, the NPC also provides this service to a number of countries in the Asia–Pacific region. It also has to coordinate the editorial contributions of toxicologists throughout the area.

The information is published on the website, which has just been completely reworked by Kognition, a software company specialising in Microsoft solutions. The previous system was written by Jade Corporation in 1998 and started publishing on the web in 2000, according to Dr John Fountain of the NPC. However, due to the dynamic nature of the data structures over time, the NPC felt they were spending too much restructuring the information rather than increasing their database of 88,000 compounds.

According to Chris Auld, the managing director of Kognition, the new application manages data with a combination of a .Net WinForms application and Microsoft InfoPath. While this does impose the need for Microsoft Office 2003 on all contributing editors' desktops, it does allow flexibility in the schema of information required against different hazardous material.

High-availability is guaranteed by providing a twin datacentre solution. Servers are based at the Kognition datacentre in Dunedin and a fail-over server is based at OneNet in Auckland. The servers are configured with Windows Server 2003 and SQL Server 2000.

The accuracy of the data is ensured by storing it in XML with tightly defined schema.

The application is designed using a three-tier architecture with SQL Server as the data tier and WinForms and InfoPath as the client tier, while the business tier is sited on the server exposed as web services. Because of the inherent security issues with web services, Auld says the team adopted a .Net library called Web Services Enhancements 2.0 (WSE). This simplifies the development and deployment of secure web services by enabling developers using Visual Studio .Net and the .Net Framework to more easily apply security policy as well as managing the retrieval and validation of security tokens. By standardising on web services for the middle tier, and exposing data as XML future reuse will be better provided for.

XSL Templates

Because of the importance of data accuracy and the specialised nature of the information, Auld’s team is attempting to pass control of the metadata over to the toxicologists at the NPC. This means that expert users can set up new schema and then implement two templates in InfoPath, one for editing and one for viewing (see use case diagram). The contributors must run Office2003 with InfoPath to maintain the data through the editing template while the public can use the other InfoPath template rendered as normal HTML. The InfoPath templates are stored as XSLT that is optimised for Internet Explorer. Kognition automatically post-processes the InfoPath views to clean them for a more uniform cross-browser presentation.

InfoPath is effectively an editor accessed from the client application. This also exposed another slight problem with InfoPath where real-time sharing of data and inter-program communication seem to be outside the design goals of InfoPath's current version. However, by getting the views to persist to the local disk and the WinForms application subscribing to file changes, they have been able to provide a very useable interface.

Data conversion

Because the problem domain demands highly accurate data, this presented a serious difficulty. The data has been accumulated over the last 20 years through first a Linc data entry system and then a Jade system. Much of it has been stored in document mode. By moving the data to a series of tightly defined schema, they are able to enforce higher integrity of the data. However, that did require significant complex parsing to move the data into the XML repository.

Quality control

With 50,000 lines of code and a distributed user base, bugs do need to be managed effectively. The team uses Gemini from Countersoft for issue tracking and they have built a web service interface so that their end users can report problems from within their client application. Kognition has also produced an interface to link its Subversion source control repository with CruiseControl.Net for continuous build integration. CruiseControl.Net is an open source .Net conversion of the widely used Cruise Control application developed by Thought Works. The role of release testing fell to the staff of the NPC. Oversight and internal quality checks were provided by Deloitte’s Dunedin office.

Overall, this project has used an innovative approach to InfoPath and XSL templates to provide a highly flexible solution to the community.

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags xslXML

More about Microsoft

Show Comments