Skip to main content

Enhanced Debugging for Healthcare Business Hosts

You can add debugging messages to the message trace for most of the healthcare business hosts. These built-in healthcare business hosts start with the prefix HS.

The business operation HS.Util.Trace.OperationsOpens in a new tab adds special messages to the Interoperability message trace from the internals of a healthcare business host. You can then use the Interoperability message trace options to view the messages and see how the data is being processed within the business host. For more information about using Interoperability message trace, see Viewing, Searching, and Managing Messages.

To enable enhanced debugging of healthcare business hosts:

  1. Add HS.Util.Trace.Operations to your production.

  2. Go to the Settings tab of the healthcare business host in your production.

  3. In the Development and Debugging section, select a debugging level from the TraceOperations drop-down list.

    Debugging levels are:

    • *ERRORSONLY* — Shows only $$$HSTRACEERROR events in the message trace.

    • *MINIMAL* — Shows both $$$HSTRACEERROR and $$$HSTRACEMIN issues in the message trace. $$$HSTRACEMIN includes IHE messages that are generated by the operation.

    • *FULL* — Shows all $$$HSTRACE, $$$HSTRACEMIN, and $$$HSTRACEERROR issues in the message trace.

    • Any other value — Same as *FULL*

    • no value — Disables message tracing for the business host.

While full trace operation debugging is very useful during development and testing, the option should be turned off or minimized in a production environment, as it will slow your production due to the added processing and reporting time incurred for routine messages.

Adding Debugging Messages from Custom Code

You can also use these enhanced debugging messages in custom code. If you create a business host that extends HS.HC.Util.Trace.HelperOpens in a new tab, you can use one of the $$$HSTRACE macros to output debugging messages to the message trace. Invoke the macro as follows:

$$$HSTRACEERROR(<comment>,<list of variable names>,<variable1>,<variable2>,...)

$$$HSTRACEMIN(<comment>,<list of variable names>,<variable1>,<variable2>,...)

$$$HSTRACE(<comment>,<list of variable names>,<variable1>,<variable2>,...)

where <comment> is an explanatory text string, <list of variable names> is a comma-separated list of variable names or expression descriptions (enclosed in quotes), and the rest of the arguments are the values of those variables or expressions. For example:

$$$HSTRACE("HTML Stream","size,stream",tPushDocument.HTMLData.Size,tPushDocument.HTMLData)
FeedbackOpens in a new tab