Archive for the 'GUI' Category

Microsoft Health Common User Interface (CUI) v1.3

Last year I looked at the MSCUI. Along with the v1.3 release is a glimpse into the future. The user experience is greatly enhanced with the use of Silverlight 2.0. Check out the Patient Journey Demonstrator (you’ll need to install Silverlight first):

Patient Chart

Bill Crounse has a good overview and links here.

The UI busy and complex, but there seems to be an intuitive consistency to the madness. Besides the slick look, one of the great things about Silverlight (and WPF) are the transition animations that makes using the controls a feel-good experience.

Most of the Silverlight/WPF demos I’ve seen are photo/video mashup types of applications. The MSCUI clinical workflow and patient record demos give you a much better appreciation for how this UI technology can be put to effective use.

I still think the MSCUI Design Guidance documents are the key to success. Everybody goes gaga over the cool graphics and animations, but these requirements need to drive the use of the technology.

UPDATE (9/11/08): MSCUI R1.5 is now live.

A .NET code sample: Real-time data streaming and control.

This is a follow-up to the Developing a real-time data flow and control model with WCF post. My original plan was to write a full-fledged article on this. I’ve gotten some requests for the code, but it does not appear that I’m going to have time to complete the article in the near future. So I thought I’d just give a brief description here of what I’ve done so far and provide the code as is.

Please Note: The description provided is very brief and only meant as an overview. None of the implementation details are included here. It’s not a very complicated project. If you have some VS2005 development experience and are willing to dig into the code, you shouldn’t have a problem figuring it all out. Working through this code would provide a good first tutorial on developing with WCF. Some set-up is required (service installation) and is described below.


I originally conceived of this project because of some questions I’d heard from real-time C/C++ developers. They wanted to know about migrating from MFC/VC++ to .NET managed code. The primary concern was about the use of legacy device level code and how to manage future mixed development projects.

So my first thought was to demonstrate how easy straight forward it is to incorporate COM components into managed code with .NET wrappers. There are already many good articles on integrating old Win32 projects into .NET. e.g. Do you COM? Dealing with Legacy Projects. This project is a concrete example of how that can be done.

It also illustrates a model of the type of real-time data streaming and control typically required by a physiological monitor.

To extend that model, I wanted to show how WCF could be used as a network transport for that same data stream. Hence the previous post. The addition of a WCF client application that provided a real-time display of the data stream was only logical.

There are a number of directions that I had planned on taking this project, but that will have to wait for another day. I’m sure that you’ll come up with your own ideas along with numerous improvements.

The Code:

The download (below) is a Visual Studio 2005 solution, called RealTimeTemplate, with 6 projects (one is C++, all the rest are C#). Here is a diagram of the projects and their relationship. The horizontal arrows show the data flow as described above.

Real-time Template Components

The projects are:

  • SineWaveGenerator: This is a C++ COM component that generates buffers of multi-channel sine waves.
  • SineWaveGenerator.Test: The NUnit test functions for SineWaveGenerator
  • SineWaveWCFLib: This is the WCF server component.
  • SineWaveWCFServer: This the Windows service that hosts the WCF service (SineWaveWCFLib).
  • SineWaveWCFService.Test: The NUnit tests functions for SineWaveWCFService.
  • RealTimeDisplayWinForm: This is the Windows Form class, and WCF client, that controls and displays the sine wave data provided by the service. The graphical display is done using the ZedGraph library.

Here is what the Windows Form looks like when the application is running.

Real-time Template WinForm

Service Installation:

In order to run the sine wave display application, you’ll first have to install and start the SineWaveWCFService.

  1. Build the solution in Debug configuration.
  2. Execute the InstallSineWaveWCFService.bat in SineWaveWCFService\bin\Debug. The service can be un-installed with the UninstallSineWaveWCFService.bat script.
  3. Run the Windows Services Manager (services.msc) and Start SineWaveWCFService.
  4. Run the RealTimeDisplayWinForm project. Use the Add button to add sine wave displays.

The source code can be downloaded here: (210K)


Kernel Object Namespace and Vista

Just a quick development note:

According to Kernel Object Namespaces objects can have one of three predefined prefixes — ‘Local\’, ‘Global\’, or ‘Session\’. For Win2K/XP I’ve always used the ‘Local\’ prefix, which works fine. My primary use is with a Mutex to determine that a single instance of an application is running (like here). I also use the Mutex from a system service to discover if a GUI application is available for messaging. When trying to run the some code on Vista I found that the ‘Local\’ namespace does not work when Mutex.OpenExisting() is called from a the system service which is owned by a different user (from the same user, it works fine). So it appears that the ‘Local\’ prefix in Vista has a different behavior for the client session namespace than it does in Win2K/XP.

I searched around for a solution, but was unable to find a definitive answer. I did find a post about the Private Object Namespace which alludes to Vista kernel changes, but that’s all. Here’s what I determined empirically:


The NO entries in the table mean that the namespace did not work. So, it appears that in order to support all three Windows versions I’d have to use the ‘Global\’ namespace. This is not a good solution. Unless I find another way, I’ll have to determine the OS version and select the appropriate namespace at runtime (‘Session\’ for Vista, ‘Local\’ for Win2K/XP).

First Look: Microsoft Health Common User Interface (CUI)

My initial impression is that the current implementation of the Microsoft Health CUI (v1.0.114.000) is strong on depth and weak on breadth. Because of the limited number of components available this software is too early in its implementation of be of much use in a real product. For example, the first thing I would need is a ‘PatientGrid’ component, which doesn’t exist yet. This is just the first CTP, so missing features are be to expected.

Here are the component lists for WinForms and Web applications:

CUI WinForm Components CUI Web Components

The design guidance documents are the most impressive aspect of this project. Each control has its own complete document that includes sections like ‘How to Use the Design Guidance’ and ‘How Not to Use the Design Guidance’. The higher level terminology and accessibility guidance documents are equally as comprehensive. As a software developer that has had to work from ambiguous requirements specifications, nothing is left to the imagination here. The requirements for some components (e.g. AddressLabel) are written to UK specifications, but that’s be expected since CUI is being developed there.

The Visual Studio integration is good and the source code for the individual components appear to be well constructed and documented.

The CUI Roadmap isn’t very specific, but I like the design guidance driven approach. All of the up-front design work makes me think of my previous post on Agile development. The CUI Delivery Lifecycle is described as iterative, but I doubt it’s actually being developed using one of the Agile methodologies. In any case, I’ll continue to watch the progress of this project and look forward to future releases. It could be my excuse to actually use (instead of just playing with) WPF someday!



Twitter Updates