Overview

The EDITS Runtime Debugger is a tool developed to help technical support staff find out why an Edit performs in a particular way with real-world data.

This utility can be used with any runtime metafile (.RMF) and data file, such as an export file to transmit to a central registry. You can look up a particular case, run the Edit against the case, and see exactly what happened. This is a very useful tool for figuring out why a particular case failed an Edit... or didn't when you thought it should!

The EDITS Runtime Debugger requires EDITS Engine (EDITS40.dll) v4.0.1.0 or later.


Running EditDebugger

The EDITS Runtime Debugger

This help file was last updated 01/08/2010

Running EDITS Runtime Debugger

When you first launch the EDITS Runtime Debugger, you'll see this:

Open RMF

Click the button in the lower left corner and navigate to a runtime metafile (.RMF).

Note: The metafile must be v4.0, generated by EditWriter v4.0.

Select Record Layout, Edit Set and Edit

Using the selection boxes at the top of the form, choose the Record Layout that matches the format of your data file, the Edit Set containing the Edit you want to debug, and the Edit.

Note 1: When you select an Edit Set, the Edits collection will be updated to hold only the Edits within that Edit Set.

Note 2: When you select an Edit, the Edit Description panel in the lower right corner will update with the explanation of the Edit, and what it seeks to achieve. This information is particularly helpful to users who are not erudite in the EDITS Language.

Open Data File

Navigate to an ASCII flat file that conforms to the format described by the Record Layout you selected, and open it.

Run Edit

After the Edit has run, the display will look like this:

See Sizing Display Areas, Understanding Results and Case Data for detailed information about this display.


Sizing Display Areas

All of the panels can be made taller/shorter, wider/narrower. Between each pair of panels is a "splitter" bar. Grab the bar with your mouse and drag it to resize the panels. For example:

The results of the Edit appears on the Notes/Results tab in the lower right panel.

If it's the Case Data you want to see, select that tab in the lower right panel, and then resize the window to show more of the data.

For more information about the Case Data panel, go here.


Understanding Results

Variables

As you move the highlight bar through the Executing Logic window, the contents of the Variables panel will update to reflect the value of all declared variables as of that line in the source code:

Watch the Variables window as you move up and down in the Executing Logic window to see when values change.

The display is different when the line of code selected is within a processing loop (that is, inside a while(...), do..while(...), or for(;;) loop):

The while() loop in this Edit is evaluating each character of the Addr at DX--No & Street, which you can see in the Fields panel is 5412 MURCHISON DRIVE. The first (zero'th) iteration through this loop, the variable searchchar is assigned the first character in the address: 5. The next iteration, it is assigned the second character: 4, and so on.

Each Loop Iteration section shows the value of all declared variables as of the selected line of code within the loop, and how those values changed for each iteration of the loop.

Executing Logic

The Executing Logic window displays each line of code that was executed. (The line numbers correspond to the line numbers in the EditWriter logic editor.) If the Edit returned before all of the code was processed, then the Executing Logic window will not show all of the code for the Edit. Consider these two cases:

Edit RETURNs on Early Condition

This Edit is verifying that the Date of Diagnosis does not precede the Date of Birth. This case passes the Edit at code line 7.

Edit Processes to the End

However, this next case shows a Date of Diagnosis that is earlier than Birth Date, and no override has been set. It processes much more of the Edit before concluding that it has not passed the Edit.

Executing Logic Font Color Coding

When the Engine processes a line of Edit code, it is displayed in the Executing Logic window in black font.

When code is not executed (that is, a controlling condition is false), that code is displayed in gray font.

How The Edit Looks to the Engine

The Engine is not interpreting human-readable source code. Instead, it is processing a binary version of the code. For example, the column on the left is what the Engine sees; the column on the right is what the author of the Edit wrote.

IN05t_idx,N05t_jdx;
               //
 1: int t_idx, t_jdx;

N05t_idx=U017;
                    //
 2: t_idx = 7;

N05t_jdx=U0210;
                   //
 3: t_jdx = 10;

HN05t_str[U0211];
                 //
 4: char t_str[11];

Mo(N05t_str,\"10abcdefghij); // 6: strcpy(t_str, "abcdefghij");

B 53(N05t_idx<N05t_jdx) // 8: while (t_idx < t_jdx)

{
                                 //
 9: {

N05t_str[N05t_idx]='X';
           //10:
    t_str[t_idx] = 'X';

N05t_idx=N05t_idx+U011;
           //11:
    t_idx = t_idx +1;

}
                                 //13:
 }

Mh(N05t_str);
                     //15:
 save_text(t_str);

DQ;
                               //18:
 return fail;

The thing about the binary version is that comments and white space are not preserved. So everything breaks onto the correct line, but it all runs flush left. This can make reading the display in the Executing Logic window a bit more difficult. Note that the Test Bench Debugger in EditWriter is able to draw upon the author's original source code, and can display the logic preserving the indents.

Fields

This panel displays just those fields that are referenced by the selected Edit, and the values in those fields as taken from the selected Case Data.

Notes/Results

Any messages or results generated by the Engine during processing of this Edit will be displayed in this panel.


Case Data

The Case Data tab displays the data for the selected case, with fields in the order determined by the selected Record Layout:

You can use the edit control with the up/down arrows to move through the case file a record at a time. The name of the patient and the Accession/Sequence number will be displayed as you move along.

You can also type in a number to jump to the record at a particular row in the case data file.

Or you can search for a particular case by name and/or Accession/Sequence number, by clicking on the Find Case button. This opens a little dialog:

If your case data file contains multiple patients named SNOW WHITE, you can remove the checkmark from the Begin search at top of data file to find each instance of the name.

And here she is, at record # 190: