Tuesday, October 29, 2013

X-Mouse or Focus-Follow-Mouse on Windows 7

I started using Windows 7 only because my Windows XP machine's harddisk was failing on me. My new machine came with Windows 7 installed. After some tweaking the settings I could not find a way to enable the Focus-Follow-Mouse-Without-Raising-Windows behaviour I was used to. On Windows XP I used Tweak UI to enable this, but that doesnot exist for Windows 7. Turned out the following C# Console Application does the trick!

For more info look at the SystemParametersInfo function documentation at MSDN.

using System.Runtime.InteropServices;

namespace SPI
{
    class Program
    {
        [DllImport("user32", CharSet = CharSet.Auto)]
        public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, bool pvParam, uint fuWinIni);

        /// Determines whether active window tracking (activating the window the mouse is on) is on or off. The pvParam parameter must point
        /// to a BOOL variable that receives TRUE for on, or FALSE for off.
        /// Windows NT, Windows 95:  This value is not supported.
        public const uint SPI_GETACTIVEWINDOWTRACKING = 0x1000;
        /// Sets active window tracking (activating the window the mouse is on) either on or off. Set pvParam to TRUE for on or FALSE for off.
        /// Windows NT, Windows 95:  This value is not supported.
        public const uint SPI_SETACTIVEWINDOWTRACKING = 0x1001;
        /// Determines whether windows activated through active window tracking will be brought to the top. The pvParam parameter must point
        /// to a BOOL variable that receives TRUE for on, or FALSE for off.
        /// Windows NT, Windows 95:  This value is not supported.
        public const uint SPI_GETACTIVEWNDTRKZORDER = 0x100C;
        /// Determines whether or not windows activated through active window tracking should be brought to the top. Set pvParam to TRUE
        /// for on or FALSE for off.
        /// Windows NT, Windows 95:  This value is not supported.
        public const uint SPI_SETACTIVEWNDTRKZORDER = 0x100D;

        static void Main(string[] args)
        {
            // set mouse to x-mouse behaviour, focus on window under mouse without raising the window to top
            bool enable = true;
            bool disable = false;
            SystemParametersInfo(SPI_SETACTIVEWINDOWTRACKING, 0, enable, 0);
            SystemParametersInfo(SPI_SETACTIVEWNDTRKZORDER, 0, disable, 0);
        }
    }
}

Thursday, October 3, 2013

Everybody does Detailed Clinical Models

... and they don't even know it ;-)

DCM is like a closet where you can organize your clothes, metadata about a Clinical Model in. It is not restrictive, just gives guidance on good practices and information you have (or should have).
Forms of Clinical Models that cover parts of that metadata are: IMH Clinical Elements, OpenEHR/13606 Archetypes, Clinical Content Models, HL7 v3 Templates, BioSHaRE, BRIDGE and even Spreadsheets (used often). Normally when implemented in an EHR or Clinical Research Applications there will also be some Standard Operating Procedure (SOP).
DCM is about organizing (documenting) all relevant metadata or references, e.g. SOP, data elements/structure, coding, use, mis-use, constraints/validation, business rules, derivation, etc. But it does not force you to document this.
There are multiple ways to document this. You could use a metadata tool, UML, spreadsheet, Mindmaps, EHR system, OpenClinica, Archetype Modeling Workbench, XML Editor, etc.
What the DCM Standard (ISO13972) and UML Styleguide do is give you guidance on how to use UML for Clinical Models. It tells you where to put the metadata such as author and status and which metadata should be registered with the model and which with a model repository were you store the model.

Archetype Modeling Language
Currently there is an initiative working toward an official OMG UML Profile for this called the Archetype Modeling Language (AML). Here we combine the efforts from OpenEHR, the DCM UML Styleguide, ISO11179 Metadata Registry, DoD/VA FHIM, Clinical Information Modeling Initiative and HL7 v3 in a form that can accommodate, but not replace, all.
The goal of AML is to be able to express Clinical Models in UML, and also to be able to generate downstream artifacts, such as ADL files. It will also enable other views of the model for specific stakeholders, e.g. mindmaps, spreadsheets, documents.
AML will also enable to import models defined in other forms, and the result will be a consistent view of those models, so that you can compare them.
Currently we are working on prototyping the profile in MDHT and Sparx Enterprise Architect. The OMG process is rigid (needs to be), and it is volunteer work, so work is slow :-(