Search This Blog

Friday, December 21, 2007

Implementing Healthcare Messaging with XML

At XML 2007, Marc de Graauw provided an overview of the national EHR
being set up in the Netherlands. It uses XML, HL7v3 and Web Services.
He takes a look at lessons learned and the pitfalls to be avoided:
(1) Schemas serve multiple masters -- design, validation, contract,
code generation. And those purposes don't play together well. Write
flat, simple Schemas. Those are understandable and generate
understandable code. Don't design Schemas for reuse. Use a simple
spreadsheet format instead as your baseline. And tweak your Schemas
with XSLT before generating code. After all, they're just XML. (2)
Use a layered approach. Anything beyond Celsius-to-Fahrenheit will not
be a monolithic Web Service. So anonymize payloads with 'xs:any' to
generate stubs and make Schema's which describe just one software layer.
This ensures reuse, and stacks nicely on top of the Internet stack...
(3) Make examples everywhere: hand-write XML messages, and use those
to develop and test services. XML based message exchanges are hard,
and documentation for them gets large. Example XML messages are required
to keep everyone sane. And make your messages wrong -- see how
applications handle all kinds of common mistakes. (4) Do a lot of
HTTP work: specify HTTP status codes, when to use which codes in
combination with higher level (SOAP, HL7v3) error codes. (5) Profile
the profiles! Don't simply use WS-I Basic Profile and Security Profile,
but write your own lean profiles -- skin them till only what's really
needed is left. Plenty of options means plenty of interoperability
problems... profiling possibilities on top of WS-ReliableMessaging
and WS-Security. More Information

No comments: