EMR and Device Integration

June 23, 2007

Biomedical/Bedside/ICU Device Integration

In the words of the guru Tim Gee – Medical Connectivity Consulting “Medical device integration is a critical (and an often overlooked) part of EMR planning. To be successful, any plan must take into account many more considerations beyond getting an HL7 feed into the EMR. Multiple stakeholders including nursing and clinical/biomedical engineering must be engaged. Putting together a successful long term plan requires negotiations across traditional hospital silos, and an in depth understanding of point-of-care workflows, medical device connectivity and device vendor offerings and product strategies”.

The benefits of automatic data collection (heart rate, invasive/non-invasive blood pressure, respiration rate, oxygen saturation, blood glucose, etc.) from acute care monitoring devices have become so obvious that all hospitals now require that their clinical information system (CIS), anesthesia information management system (AIMS), electronic medical records (EMR), electronic patient record system (EPR), or other hospital/healthcare information system (HIS) provide interfacing capabilities to biomedical devices – in order to ensure that key vital signs are stored in the Centralized Data Repository (CDR) – to track patient progress over time.

Patient monitoring systems are among the first to be integrated; because each HIS require at least basic patient vital sign collection. Integration with anesthesia devices is a must for any AIMS. Data collection from ventilation systems is required in most cases for ICU systems. Infusion device data integration is becoming increasingly requested in cases where CPOE systems are implemented.

But connecting to bedside medical devices and collecting data in your CIS or EPR is not as simple as it may seem. Device interface development is a specialized task that consumes resources and diverts attention away from core competencies. Competitive issues make obtaining device protocols difficult and sometimes impossible. Incomplete connectivity results in frustration and decreased efficiency of the hospital.

The various questions you need to have when integrating devices with a HIS are as below:

Categories of Medical Devices for Integration:

Vital Signs or Diagnostics devices
Infusion Pumps
Dialysis devices
Anesthesia machines
EKG and EEG devices
Endoscopy devices
Bedside devices
Oximeters with Patient Monitoring and Alarm Systems
Ultrasound devices
Stress testing devices

Type of Device Connectivity to the HIS


Format of Message feed from Device(s) to the HIS

HL7 format result messages with possible Images, etc across TCP/IP
Proprietary format messages across TCP/IP
Binary format data across USB or others

Format of Message feed to Device(s) from the HIS

HL7 format ADT messages across TCP/IP
Proprietary format messages across TCP/IP
Binary format data across USB or others

Frequency and Location of Device Data Feed to the HIS

Continuous (Periodic) Real-time – 1 message per minute or less
Manual (Aperiodic) or on-demand
Server-based – with storage for real-time data and polling-frequency options
Location:ICU or PACU
Timing Syncronization among all the connected systems is important

Grouping of Device Data in the HIS is based on:

Patient Chart sections
Department Needs and Security Roles
Common Device Parameters
Dependent Device Parameters
Device Monitoring and Asset Tracking
Display and Storage of the data – claims, clinical encounters, drug/pharmacy, lab, images – captured and mapped to a common format, possibly ASTM’s Continuity of Care Record (CCR).

Security Issues:

Caregivers need access to validate device data onto the patient chart
Audit trail and enterprise timestamps on device data
High speed secure network with firewalls to protect ePHI
FDA guidelines compliance
HIPAA guidelines compliance
JCAHO guidelines compliance
Legal guidelines compliance


Vital Signs mobile devices feed patient data to the EMR and a senior RN can review results before they are attached to the patients’ charts.
Infusion Pumps drug/fluid delivery tracking in EMR for long term critical care.
Enabling medical devices, such as infusion pumps, ECG machines and glucometers, to wirelessly send data from the ICU to a patient’s medical record or to a physician
Home care chronic disease monitoring systems that provide patient feedback, patient monitoring and alerts (to both patients and physicians) to the EMR.

Software for Device Integration with the HIS:

Capsule Technologie’ DataCaptor is a generic, third-party software + hardware suite that provides the most complete biomedical device connectivity solution available on the market. DataCaptor has the largest library of supported devices – more than 250 diverse bedside devices, advanced features, and easy integration with hospital information systems.

Stinger MedicalIntegriti – provides a secure and mobile method of transmitting patient vital signs wirelessly to the EMR.
Current Capsule Technologie – DataCaptor – OEM partners include (among other HIS vendors of all sizes)

Epic Systems (EpicCare) ,
Philips Medical Systems (CareVue Chart/IntelliVue through DeviceLink),
Eclipsys Corporation (Sunrise Clinical Manager) and
Surgical Information Systems (anesthesia software and surgical system).

Benefits of Device Integration:

As in several hospitals; the reasons for integrating devices is to automate the flow of data and interface it to the HIS application:
• To reduce transcription/documentation errors. Currently, nurses manually transcribe the data from scratch pads or from the devices onto the patient report resulting in problems like indecipherable handwriting, data in the wrong chart, vital signs written on scraps of paper (hands, scrub suits, etc.) that get forgotten, and then there is sometimes considerable lag between readings and reporting.
• To decrease documentation time. Significant increases in productivity can be gained by an interface that allows the nurse to validate rather than enter the data.
• To support quality data collection (charts, images, vitals) and to provide increased surveillance for critical patients – even when the care-provider is not present at the bedside. This allows for safe collection of data over time, thus providing a more accurate and valid history of patient progress.
• To increase patient safety. Safety is enhanced by decreasing data entry errors, and by allowing the nurse to review data collected when he/she is not present at the bedside. In addition the data can be captured at an increased frequency creating a more accurate depiction of the patient’s condition.
• To enable research and quality control. Data can be collected for future analysis by de-identifying patient demographics.
• To provide better patient care and more physician – patient contact time. A silent factor of a hospital’s revenue is quality of patient care. One of the chief drivers of quality of patient care is the quality of information provided efficiently to the Physicians though which they can make those critical decisions.
• To securely and quickly share assessment, diagnosis, treatment and patient progress data across facilities/RHIO (regions)/states thereby enabling the patient to be provided the best care anywhere.
• To reduce patient, physician and nurse stress and legal issues.
• To provide complete and comprehensive data on patient charts.
• To enable future devices to seamlessly connect to the existing EMR.
• To prevent errors in diagnosis, prescription and medication, by basing decisions on the entire patient history/allergies, the latest medications and the latest technology that are available to the patient and the care provider.
• Clinical (or Diagnostic) Decision Support Systems [ CDSS ] and Best Practice systems are more effective with a comprehensive and secure digital files (historical patient charts).
• To increase security and prevent tampering of Patient Records – since all data is digital and secured via layers of Role based security, by HIPAA and by Digital laws – the security is much more comprehensive than a system with voluminous paper records and difficult audit trails.
• Finally, to improve overall hospital throughput and patient hospital-visit time, success ratios and Improving Patient Efficiency Throughput.

I’ve linked the Capsule Technologie-DataCaptor architecture diagrams below to show the data flow between DataCaptor (the server), Concentrator (the ‘router’ or Terminal box), the bedside devices and the HIS and other systems.


Note:This article is based on personal experiences and public information gathered from websites including Medical Connectivity Consulting and Capsule Technologies and other medical device manufacturer’s web-sites. Thanks to these companies for this public information and this document is intended solely for personal reading and understanding of this technology and is not for any commercial gain.

Since PACS is a type of “Device Integrator”, the following is an addition to the above article:

Radiology RIS, PACS and the EMR Integration

The PACS – Picture Archiving and Communication System – is a filmless method of communicating and storing Xrays, CT/MRI/NM scans, and other radiographs that are verified by Radiologists after being acquired by the Xray, CT/MRI/NM machines and other variants used in the Radiology Department. Images may be acquired from a patient in slices and with 3D or 4D image reconstruction – the entire patients’ full body scan may be visualized on diagnostic quality workstations. Key images, Radiology reports and low resolution non-diagnostic images are provided for viewing on any screen – securely across the internet. If bandwidth permits – in certain cases – entire diagnostic quality images may be viewable, securely across the internet.

The RIS – Radiology Information System – enables “Radiology” patient scheduling, reporting/dictation, and image tracking to ensure that the PACS and the Radiology machines are effectively utilized and the patients’ structured reports are immediately available.

The EMR – Electronic Medical Records System or Hospital Information System – provides a “global” view or patient historical folder of the patients visits or encounters with his/her care providers. From a “Radiology” perspective – the EMR sends ADT/orders to a RIS and receives results including patient images and data from the PACS (via RIS) – thus enabling access to that patients Structured Reports in a single uniform location in the EMR. Thus, images can be integrated with the radiology report, and with other patient information systems’ (such as laboratory, pharmacy, cardiology, and nursing) reports, thereby providing a comprehensive folder on the patient.

Key Features of a good PACS System are:

  • Modules for comparison study of prior patient images, along with similar cases
  • Modules for Computer Aided Detection using Clinical Decision Support Systems and Key Facets
  • Excellent Data Compression Techniques to ensure effective network utilization and high speed transfers of quality images to workstations and other systems.
  • Excellent EMR Integration based on IHE Integration Profiles, standard HL7, standard DICOM and the support for secure,high-speed access to patient images via internet
  • Standard Security Features along with audit trails and Integration with RIS and EMR security.
  • Modules for 3D and 4D reconstruction of CT slices, Image Enhancement and Quality Printing
  • Immediate availability of Images on network or CD/DVD for quick diagnosis and review by remote Radiologists/experts.
  • Excellent Short Term Storage with very low retrieval time latencies.
  • Excellent Long Term Storage with decent retrieval time latencies and predictable data recovery.
  • Excellent RIS Integration.
  • Extensively tested and successfully working in other hospitals for 2 years at least.
  • Multiple vendor modality Integration features.
  • Downtime plan with Disaster Recovery Support.
  • Easy Upgrade-ability of hardware/storage to ensure almost infinite storage based on hospital need
  • Support for Patient De-Identification and Reporting off the PACS/RIS for data analysis.

Now that you have (selected) the PACS and RIS systems, here is the list of questions you should have regarding integration with the EMR:

EMR and RIS/PACS Integration Issues:

  • RIS/PACS features and limitations
  • Modality support for DMWL (Digital Modality Worklist – ensuring correct patient scans at modality)
  • Key Data Mappings between the RIS, PACS and EMR (eg. Study-DateTime, PatientID,Provider, Study Status, Accession number, etc.)
  • Department Workflow changes (Types of Orders, Downtime Orders, Unsolicited Results, Billing, etc.)
  • Data being displayed in the Modality Worklist and when does this worklist get updated?
  • Historical data import, cut-off dates, access policies to legacy data, etc
  • Security, User access and integrating the PACS/RIS users with the EMR users to enable secure web access to images.

The above article is based on personal experience and is not for any commercial gain.

Automated Workflow Environments and EMR

October 30, 2006

Well, we work in the next era of software development, not only designing applications, but also developing systems that communicate with each other, thus participating in a workflow.

Automating this workflow through the seamless integration of these apps is a task that challenges many of the industries that we work in.

Automated Workflow Environments are those systems where multiple systems contribute and communicate to enable a network of these apps to actually solve complex problems very efficiently, with no human interaction. You can call them Digital Ecosystems.

You can construct workflow nets to describe the complex problems that these systems efficiently solve. Workflow nets, a subclass of Petri nets, are known as attractive models for analyzing complex business processes. Because of their good theoretical foundation, Petri nets have been used successfully to model and analyze processes from many domains, like for example, software and business processes. A Petri net is a directed graph with two kinds of nodes – places and transitions – where arcs connect ‘a place’ to ‘a transition’ or a transition to a place. Each place can contain zero, one or more tokens. The state of a Petri net is determined by the distribution of tokens over places. A transition can fire if each of its inputs contains tokens. If the transition fires, i.e. it executes, it takes one token from each input place and puts it on each output place.

In a hospital environment, for example, the processes involved, show a complex and dynamic behavior, which is difficult to control. The workflow net which models such a complex process provides a good insight into it, and due to its formal representation, offers techniques for improved control.

Workflows are case oriented, which means that each activity executed in the workflow corresponds to a case. In a hospital domain, a case corresponds with a patient and an activity corresponds with a medical activity. The process definition of a workflow assumes that a partial order or sequence exists between activities, which establish which activities have to be executed in what order. Referring to the Petri net formalism, workflow activities are modeled as transitions and the causal dependencies between activities are modeled as places and arcs. The routing in a workflow assumes four kind of routing constructs: sequential, parallel, conditional and iterative routing. These constructs basically define the route taken by ‘tokens’ in this workflow.

Well, enough theory, how does this apply?

Think of this in practical terms using the example of a EMR* or CPR* System or HIS* System:
• A patient arrives at a hospital for a consultation or particular set of exams or procedures.
• The patient is registered, if new to the hospital. A visit or encounter record is created in the Patient Chart (EMR) – with vitals, allergies, current meds and insurance details.
• The physician examines the patient and orders labs, diagnostic exams or prescription medications for the patient possibly using a handheld CPOE*
• The patient is scheduled for the exams in the RIS – radiology info system or LIS – laboratory info system or HIS (hospital info system)
• The RIS or LIS or HIS sends notifications to the Radiology and/or Cardiology and/or Lab or other Departments in the hospital through HL7 messages for the various workflows.
• The various systems in these departments will then send HL7 or DICOM or proprietary messages to get the devices or modalities, updated with the patient data (prior history, etc.)
• The patient is then taken around by the nurses to the required modalities in the exam/LAB areas to perform the required activities.
• The patient finishes the hospital activities while the diagnosis continues and the entire data gathered is coalesced and stored in rich structured report or multimedia formats in the various repositories – resulting in a summary patient encounter/visit record in the Electronic Patient Record in the EMR database.
• There could also be other workflows triggered – pharmacy, billing,.
• The above is just the scenario for an OUTPATIENT, there are other workflows for INPATIENT – ED/ICU/other patients.

The key problems in this ‘Automated Workflow Environment’ are:

• Accurate Patient Identification and Portability to ensure that the Patient Identity is unique across multiple systems/departments and maybe hospitals. The Patient Identity key is also essential to Integrating Patient healthcare across clinics, hospitals, regions(RHIO) and states.
• Support for Barcode/RFID on Patient Wrist Bands, Prescriptions/Medications, Billing (using MRN, Account Number, Order Number,Visit Number), etc to enable automation and quick and secure processing.
• Quick Patient data retrieval and support for parallel transactions
Audits and Logs for tracking access to this system
• Support for PACS, Emergency care, Chronic care (ICU / PACU), Long Term care, Periodic visits, point of care charting, meds administration, vital signs data acquisition, alarm notification, surveillance for patient monitors, smart IV pumps, ventilators and other care areas – treatment by specialists in off-site clinics, etc.
• Support for Care Plans, Order sets and Templates, results’ tracking and related transactions.
• Quick vital sign results and diagnostic reporting
• Effective display of specialty content – diagnostic/research images, structured “rich” multimedia reports.
Secure and efficient access to this data from the internet
Removal of paper documentation and effective transcription
SSO-Single Sign On, Security roles and Ease of use for the various stakeholders – here, the patient, the RN, physician, specialist, IT support etc.
Seamless integration with current workflows and support for updates to hospital procedures
Modular deployment of new systems and processes – long term roadmap and strategies to prevent costly upgrades or vendor changes.
HIPAA, JCAHO and Legal compliance – which has an entire set of guidelines – privacy, security being the chief one.
• Efficient standardized communication between the different systems either via “standard” HL7 or DICOM or CCOW or proprietary.
• Support for a High speed Fiber network system for high resolution image processing systems like MRI, X-Ray, CT-SCAN, etc.
• A high speed independent network for real time patient monitoring systems and devices
• Guaranteed timely Data storage and recovery with at least 99.9999% visible uptime
• Original Patient data available for at least 7 years and compliance with FDA rules.
Disaster recovery compliance and responsive Performance under peak conditions.
• Optimized data storage ensuring low hardware costs
Plug ‘n’ Play of new systems and medical devices into the network, wireless communication among vital signs devices and servers, etc.
Location tracking of patients and devices (RFID based) and Bed Tracking in the hospital
Centralized viewing of the entire set of Patient data – either by a patient or his/her physician
Multi-lingual user interface possibilities (in future?)
Correction of erroneous data and merging of Patient records.
Restructuring existing hospital workflows and processes so that this entire automated workflow environment works with a definite ROI and within a definite time period!
• Integration with billing, insurance and other financial systems related to the care charges.
Future proof and support for new technologies like Clinical Decision Support (CDSS) – again a long term roadmap is essential.

ROI: How does a hospital get returns on this IT investment?

  1. Minimization of errors – medication or surgical – and the associated risks
  2. Electronic trail of patient case history available to patient, insurance and physicians
  3. Reduced documentation and improvement in overall efficiency and throughput
  4. Patient Referrals from satellite clinics who can use the EMR’s external web links to document on patients – thus providing a continuous electronic report
  5. Possible pay-per-use by external clinics – to use EMR charting facilities
  6. Remote specialist consultation
  7. Efficient Charges, Billing and quicker settlements
  8. Better Clinical Decision Support – due to an electronic database of past treatments
  9. In the long term, efficiency means cheaper insurance which translates to volume income
  10. Better compliance of standards – HIPAA, privacy requirements, security
  11. Reduced workload due to Process Improvement across departments – ED, Obstetrics/Gynecology, Oncology/Radiology, Orthopedic, Cardiovascular, Pediatrics, Internal Medicine, Urology, General Surgery, Ophthalmology, General/family practice, Dermatology, Psychiatry
  12. Improved Healthcare with Proactive Patient Care due to CDSS
  13. Quality of Patient Care: A silent factor of a hospital’s revenue is quality of patient care. One of the chief drivers of quality of patient care is the quality of information provided efficiently to the Physicians though which they can make those critical decisions

Now, the big picture becomes clear.

Doesn’t the above set of requirements apply to any domain? This analysis need not be applicable only to a hospital domain, the same is true for a Biotech domain (where orders are received, data is processed, analyzed, and the processed data is presented or packaged). Similarly a Manufacturing Domain, Banking domain or Insurance Domain etc.

The need is for core engine software – based on EDI (Electronic Data Interchange) – that integrate and help in the Process Re-Engineering of these mini workflows securely and effectively and using common intersystem communication formats like X-12 or HL7 messages.

These Workflow Engines would be the hearts of the digital world!

*EMR – Electronic Medical Record
*CPR – Computerized Patient Record
*CDSS – Clinical Decision Support
*RHIO – Regional Health Information Organization
*CPOE – computerized physician order entry

Some of the information presented here is thanks to research papers and articles at:
*Common Framework for health information networks
*Discovery of Workflow Models for Hospital Data
*Healthcare workflow
*CCOW-IHE Integration Profiles
*Hospital Network Management Best Practices
*12 Consumer Values for your wall

What about the latest IT trends and their applications in healthcare?

We already know about Google Earth and Google Hybrid Maps and the advantages of Web 2.0
The next best thing is to search the best shopping deal or the best real estate by area and on a hybrid map – this recombinant web application reuse technique is called a mashup or heat map.
Mashups have applications in possibly everything from Healthcare to Manufacturing.
Omnimedix is developing and deploying a nationwide data mashup – Dossia, a secure, private, independent network for capturing medical information, providing universal access to this data along with an authentication system for delivery to patients and consumers.

Click on the below links to see the current ‘best in class mash ups
*After hours Emergency Doctors SMS After hours Emergency Doctors SMS system – Transcribes voicemail into text and sends SMS to doctors. A similar application can be used for Transcription Mashup (based on Interactive Voice Response – IVR): Amazon Mturk, StrikeIron Global SMS and Voice XML
* Calendar with Messages Listen to your calendar + leave messages too Mashup (based on IVR): 30 Boxes based on Voxeo , Google Calendar
* http://www.neighboroo.com/ – Housing/Climate/Jobs/Schools
* Visual Classifieds Browser – Search Apartments, visually
* http://www.trulia.com/ – Real Estate/Home pricing
* http://www.rentometer.com/ – Rent comparison
* http://realestatefu.mashfu.com/ – Real Estate Statistical Analysis
* http://www.housingmaps.com/ – Rent/Real Estate/Home pricing – linked to Craigslist
* http://virtualtourism.blogspot.com/ – Google Maps + Travel Videos
* http://www.coverpop.com/wheeloflunch/ – Wheel of Zip Code based restaurants
* More sample links at this site (unofficial Google mashup tracker) http://googlemapsmania.blogspot.com/ includes some mentionable sites :
* latest news from India by map http://www.mibazaar.com/news/
* read news by the map – slightly slow http://lab.news.com.au/maps/v01
* view news from Internet TV by map – http://5tvs.com/internet-tv-maps/news/
* see a place in 360 http://www.seevirtual360.com/Map.aspx

What’s on the wish list ? Well, a worldwide mashup for real estate, shopping, education, healthcare will do just fine. Read on to try out YOUR sample…
OpenKapow: The online mashup builder community that lets you easily make mashups. Use their visual scripting environment to create intelligent software Robots that can make mashups from any site with or without an API.
In the words of Dion HinchCliffe, “Mashups are still new and simple, just like PCs were 20 years ago. The tools are barely there, but the potential is truly vast as hundreds of APIs are added to the public Web to build out of”.
Don also covers the architecture and types of Mashups here with an update on recombinant web apps

Keep up to date on web2.0 at http://blog.programmableweb.com/

Will Silverlight and simplified vector based graphics and workflow based – xml language – XAML be the replacement for Flash and JavaFX?

Well, the technology is promising and many multimedia content web application providers including News channels have signed up for Microsoft SilverLight “WPF/E” due to the light weight browser based viewer streaming “DVD” quality video based on the patented VC-1 video codec.

Microsoft® Silverlight™ Streaming by Windows Live™ is a companion service for Silverlight that makes it easier for developers and designers to deliver and scale rich interactive media apps (RIAs) as part of their Silverlight applications. The service offers web designers and developers a free and convenient solution for hosting and streaming cross-platform, cross-browser media experiences and rich interactive applications that run on Windows™ XP+ and Mac OS 10.4+.

The only problem is LINUX is left out from this since the Mono Framework has not yet evolved sufficiently.

So, the new way to develop your AJAX RIA “multimedia web application” is – design the UI with an Artist in Adobe Illustrator and mashup with your old RSS, LINQ, JSON, XML-based Web services, REST and WCF Services to deliver a richer scalable web application.

Migrating to ASP.NET 2.0 — Its backward compatible

October 21, 2005

Here are my investigations based on MSDN and a running site at Microsoft since Aug 2005 with better performance than before:

· Because of the way that the .NET Framework is designed, you can deploy the 2.0 framework without disrupting a current installation of the 1.0 or 1.1 frameworks.

To configure a 1.x application’s script map to use the .NET Framework version 2.0

  • On the Start menu, click Run.
  • In the Open box, type inetmgr and click OK.
  • In Internet Information Services (IIS) Manager, expand the local computer, and then expand Web Sites.
  • Select the target Web site that is running in the .NET Framework version 1.x.
  • Right-click the name of the virtual directory for the Web site, and then click Properties.
    The Properties dialog box appears.
  • In the ASP.NET version selection list, choose the .NET Framework version 2.0.
    Click OK.
  • Navigate to a page in your application and confirm that your application runs as expected.

· If you are planning on using ASP.NET 2.0 on a production site, you will need to acquire the Microsoft Visual Studio 2005 Beta 2 Go-Live license (Nov 2005 is the final release of VS .NET 2005, so this may change) http://lab.msdn.microsoft.com/ or http://msdn2.microsoft.com/ . Basically, Microsoft does not offer support for the pre-release products.
· ASP.NET 2.0 and ASP.NET 1.1 Applications can live on the same IIS Server: By default, your 1.x applications will continue to use the 1.x framework. However, you will have to configure your converted/new applications (web sites/virtual directories) to use the 2.0 framework.
· Requirements for hosting ASP.NET 2.0 Apps:
o Internet Information Services (IIS) version 5.0 or later. To access the features of ASP.NET, IIS with the latest security updates must be installed prior to installing the .NET Framework. (So you can run ASP.NET 2.0 apps on old boxes with IIS5-Win 2000 Server)
o ASP.NET is supported only on the following platforms: Microsoft Windows 2000 Professional (Service Pack 3 recommended), Microsoft Windows 2000 Server (Service Pack 3 recommended), Microsoft Windows XP Professional, and Microsoft Windows Server 2003 family.
o Microsoft Data Access Components 2.8; is recommended. This is for applications that use data access.
o Supported Operating Systems: Windows 2000; Windows 98; Windows 98 Second Edition; Windows ME; Windows Server 2003; Windows XP. Make sure you have the latest service pack and critical updates for the version of Windows that you are running. To find recent security updates, visit Windows Update.
o You must also be running Microsoft Internet Explorer 5.01 or later for all installations of the .NET Framework. Install Internet Explorer 6.0 Service Pack 1.

Here’s what we gain:
New Features in ASP.NET 2.0
· Master pages are a new feature introduced in ASP.NET 2.0 to help you reduce development time for Web applications by defining a single location to maintain a consistent look and feel in a site. Master pages allow you to design a template that can be used to generate a common layout for many pages in the application.
· Content pages (I call them business logic sub-pages) are attached to a master-page and define content for any ContentPlaceHolder controls in the master page. The content page contains controls that reference the controls in the master page through the ContentPlaceHolder ID. The content pages and the master page combine to form a single response.
· Nested Master Pages: In certain instances, master pages must be nested to achieve increased control over site layout and style. For example, your company may have a Web site that has a constant header and footer for every page, but your accounting department has a slightly different template than your IT department.
· Overriding Master Pages: Although the goal of master pages is to create a constant look and feel for all of the pages in your application, there may be situations when you need to override certain content on a specific page. To override content in a content page, you can simply use a content control.
· Themes and Skins: ASP.NET 2.0 rectifies the issue of using CSS and inline styles in ASP.NET 1.1 pages, through the use of themes and skins, which are applied uniformly across every page and control in a Web site.A skin is a set of properties and templates that can be used to standardize the size, font, and other characteristics of controls on a page. Themes are similar to CSS style sheets in that both themes and style sheets define a set of common attributes that apply to any page where the theme or style sheet is applied.
· Security: Managing User Info with Profiles and Login Controls: The membership provider and login controls in ASP.NET 2.0 provide a unified way of managing user information. ASP.NET 2.0 offers new login controls to help create and manage user accounts without writing any code.The ASP.NET 2.0 profile features allow you to define, save, and retrieve information associated with any user that visits your Web site. In a traditional ASP application, you would have to develop your own code to gather the data about the user, store it in session during the user’s session, and save it to some persistent data store when the user leaves the Web site.
· Localizaton. Enabling globalization and localization in Web sites today is difficult, requiring large amounts of custom code and resources. ASP.NET 2.0 and Visual Studio 2005 provide tools and infrastructure to easily build Localizable site including the ability to auto-detect incoming locale’s and display the appropriate locale based UI. Visual Studio 2005 includes built-in tools to dynamically generate resource files and localization references. Together, building localized applications becomes a simple and integrated part of the development experience.
· 64-Bit Support. ASP.NET 2.0 is now 64-bit enabled, meaning it can take advantage of the full memory address space of new 64-bit processors and servers. Developers can simply copy existing 32-bit ASP.NET applications onto a 64-bit ASP.NET 2.0 server and have them automatically be JIT compiled and executed as native 64-bit applications (no source code changes or manual re-compile are required).
· Caching Improvements. ASP.NET 2.0 also now includes automatic database server cache invalidation. This powerful and easy-to-use feature allows developers to aggressively output cache database-driven page and partial page content within a site and have ASP.NET automatically invalidate these cache entries and refresh the content whenever the back-end database changes. Developers can now safely cache time-critical content for long periods without worrying about serving visitors stale data.
· Web Parts: Web Parts are modular components that can be included and arranged by the user to create a productive interface that is not cluttered with unnecessary details. The user can:
o Choose which parts to display.
o Configure the parts in any order or arrangement.
o Save the view from one Web session to the next.
o Customize the look of certain Web Parts.
· Better Development Environment: ASP.NET 2.0 continues in the footsteps of ASP.NET 1.x by providing a scalable, extensible, and configurable framework for Web application development. The core architecture of ASP.NET has changed to support a greater variety of options for compilation and deployment. As a developer, you will also notice that many of your primary tasks have been made easier by new controls, new wizards, and new features in Visual Studio 2005. Finally, ASP.NET 2.0 expands the palette of options even further by introducing revolutionary new controls for personalization, themes and skins, and master pages. All of these enhancements build on the ASP.NET 1.1 framework to provide an even better set of options for Web development within the .NET Framework.
· Last but not the least there’s a host of new language features that reduce code lines in .NET 2.0: What’s New in the C# 2.0 Language and Compiler
With the release of Visual Studio 2005, the C# language has been updated to version 2.0, which supports the following new features:
o Generics
Generic types are added to the language to enable programmers to achieve a high level of code reuse and enhanced performance for collection classes. Generic types can differ only by arity. Parameters can also be forced to be specific types. For more information, see Generic Type Parameters.

o Iterators
Iterators make it easier to dictate how a foreach loop will iterate over a collection’s contents.

o Partial Classes
Partial type definitions allow a single type, such as a class, to be split into multiple files. The Visual Studio designer uses this feature to separate its generated code from user code.

o Nullable Types
Nullable types allow a variable to contain a value that is undefined. Nullable types are useful when working with databases and other data structures that may contain elements that contain no specific values.

o Anonymous Methods
It is now possible to pass a block of code as a parameter. Anywhere a delegate is expected, a code block can be used instead: there is no need to define a new method.

o Namespace alias qualifier
The namespace alias qualifier (::) provides more control over accessing namespace members. The global :: alias allows access the root namespace that may be hidden by an entity in your code.

o Static Classes
Static classes are a safe and convenient way of declaring a class containing static methods that cannot be instantiated. In C# version 1.2 you would have defined the class constructor as private to prevent the class being instantiated.

o External Assembly Alias
Reference different versions of the same component, contained in the same assembly, with this expanded use of the extern keyword.

o Property Accessor Accessibility
It is now possible to define different levels of accessibility for the get and set accessors on properties.

o Covariance and Contravariance in Delegates
The method passed to a delegate may now have greater flexibility in its return type and parameters.

o How to: Declare, Instantiate, and Use a Delegate
Method group conversion provides a simplified syntax for declaring delegates.

o Fixed Size Buffers
In an unsafe code block, it is now possible to declare fixed-size structures with embedded arrays.

o Friend Assemblies
Assemblies can provide access to non-public types to other assemblies.

o Inline warning control
The #pragma warning directive may be used to disable and enable certain compiler warnings.

o volatile
The volatile keyword can now be applied to IntPtr and UIntPtr.

Thanks to the various links by Microsoft for the above info.

.NET memory and performance improvement

January 17, 2005

Now that you have finished your .NET Application, the memory bogs you down?

Limiting memory usage of .NET applications is a requirement that often arises in programs that allocate and use large amounts of memory. The garbage collected environment that the CLR offers means that memory that is used to perform some calculation then discarded is not immediately collected once it is no longer needed, and application memory usage can become quite high in some situations. Rather than wait for all available memory to be exhausted before performing a full garbage collection, there are scenarios where preserving memory for other processes is a higher priority than the raw speed of the memory-intensive .NET application.

Well, there is a COM API RequestVirtualMemLimit to be called after overriding to prevent your application from hogging all the memory and waiting for the last instant for the GC to start freeing off memory. To the CLR, a failed RequestVirtualMemLimit call will appear the same as Windows running out of memory and returning a NULL pointer for a VirtualAlloc request. Rather than simply refusing to allocate any further memory, a gentler and more effective technique is to allow a small memory increase so exception objects can be successfully created, and an OutOfMemory exception can gracefully thrown and handled by managed code. If memory cannot be allocated for exception objects, the runtime will terminate without giving exception handlers a chance to execute, which will rarely be the desired behaviour.

Therefore, to place an effective cap on memory usage, an object implementing IGCHostControl needs to be provided to the runtime.

But the problem, is the “chicken and egg” problem. The ICorConfiguration interface, which is implemented by CorRuntimeHost, has a method called SetGCHostControl that allows an IGCHostControl-implementing object to be provided to the runtime. Unfortunately, it is not possible to retrieve an ICorConfiguration reference after the runtime has started. The QueryInterface logic of CorRuntimeHost fails throws an error when a request for ICorConfiguration is made, and the ICorRuntimeHost::GetConfiguration method, which returns a ICorConfiguration reference, fails when it is called post-startup. When certain hosting functionality is only available before the runtime is started, it is impossible to use the functionality from managed code. Managed code can never execute before the runtime starts, and if the functionality is required, as it is with the memory capping functions, the only option is to explicitly host the runtime using unmanaged code.
Read on at http://www.dotnetperformance.com/downloads/hosting.doc .
Thanks to the author for this insight into unmanaged code advantages in a managed world.

Looking forward to a better managed C++ in .NET 2.0

Should 4+1Views based Architecture be a standard for High Level Design documents

October 7, 2004

The template and details are at:


“To describe a software architecture, we use a model composed of multiple views or perspectives. In order to eventually address large and challenging architectures, the model we propose is made up of five main views

  • The logical view, which is the object model of the design (when an object-oriented design method isused),
  • the process view, which captures the concurrency, availability, performance and synchronization aspects of the design,
  • the physical view, which describes the mapping(s) of the software onto the hardware and reflects its distributed aspect,
  • the development view, which describes the static organization of the software in its development environment.
  • The description of an architecture—the decisions made—can be organized around these four views, and then illustrated by a few selected use cases, or scenarios which become a fifth view.”

Thanks to the Author – Philippe Kruchten – and IEEE for this invaluable experience paper.

Testing SSL on Win Server 2003/IIS6

October 6, 2004

Hi there,

Been busy with lots of work with .NET Remoting Performance Testing and stuff.

Found something interesting so here goes.

There’s a nice easy way to test your IIS6 – SSL performance, install the free SelfSSL Certificate(SelfSSL Version 1.0) from the IIS Resource Kit (http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&displaylang=en) . Its very easy to use (that’s what we look for right?) . Check out http://www.visualwin.com/SelfSSL/ for detailed directions on how to get your site into https (for testing only).

The following very useful (performance, analysis and deployment) tools are also available in the IIS6 Resource Kit package :

  • IISCertDeploy.vbs Version 1.0
  • Log Parser Version 2.1
  • Metabase Explorer Version 1.6
  • Permissions Verifier Version 1.0
  • Web Capacity Analysis Tool Version 5.2

Thanks to Microsoft and the authors of the http://www.visualwin.com/ site on which there is lots of other interesting info. on Win 2003 and IIS6.

Nice article on Unit Test Patterns

September 30, 2004

Think you know all the patterns in Unit Testing, think again, here are the various Unit Testing Patterns.

Unit Testing Patterns

Pass/Fail Patterns

  • The Simple-Test Pattern
  • The Code-Path Pattern
  • The Parameter-Range Pattern

Data Driven Test Patterns

  • The Simple-Test-Data Pattern
  • The Data-Transformation-Test Pattern

Data Transaction Patterns

  • The Simple-Data-I/O Pattern
  • The Constraint-Data Pattern
  • The Rollback Pattern

Collection Management Patterns

  • The Collection-Order Pattern
  • The Enumeration Pattern
  • The Collection-Constraint Pattern
  • The Collection-Indexing Pattern

Performance Patterns

  • The Performance-Test Pattern

Process Patterns

  • The Process-Sequence Pattern
  • The Process-State Pattern
  • The Process-Rule Pattern

Simulation Patterns

  • Mock-Object Pattern
  • The Service-Simulation Pattern
  • The Bit-Error-Simulation Pattern
  • The Component-Simulation Pattern

Multithreading Patterns

  • The Signalled Pattern
  • The Deadlock-Resolution Pattern

Stress-Test Patterns

  • The Bulk-Data-Stress-Test Pattern
  • The Resource-Stress-Test Pattern
  • The Loading-Test Pattern

Presentation Layer Patterns

  • The View-State Test Pattern
  • The Model-State Test Pattern

Read on at Advanced Unit Testing: Patterns by Marc Clifton

Thanks to the author for this material on Unit Testing.