- Import Sample Data
- Enter Sample Data
- Navigating Sample Data
- Edit or Delete Sample Data
- Import From The Logs
One of the most useful features of the Iguana Translator is the ability to work with sample message data while you write or edit the mapping script. You can quickly navigate through many sample messages to test your code against different message types, and against messages with missing and/or invalid data. This enables you to ensure that your script is doing exactly what you want it to do.
The Sample Data screen allows you to add, delete and manually edit the sample data currently loaded into a Translator instance. This immediate access gives you the power to customize the sample messages being passed through your code, giving you more control over the type of testing performed.
To open the Sample Data screen, simply click the Sample Data hyperlink in the Translator toolbar:
Import Sample Data [top]
You can import new sample data, at any time, for your script to work with.
- Click the Sample Data link, at the top left of the Editor toolbar:
- The sample data management screen opens, click the Import button to load a data file:
- Click Browse to choose the data file, and then click Import:
- Use the arrow buttons to scroll through the sample data messages:
- Click the “Back to: Script” link to return to the mapping script.
- Use the navigation controls to scroll through the sample messages in the Translator Editor:
Enter Sample Data [top]
The Sample Data Management screen also allows you to create sample data messages from scratch!
To enter data:
- Click the Add button:
- Enter or paste your sample message:
- To convert all line endings to CR, select CR from the EOL Type listbox and click Convert.
Note: You can also select just the line(s) you want to convert.
- To add CRLF at the end of line 8, select CRLF from the EOL Type listbox and press the Enter key.
- The message is now in HL7 format:
- You can also (optionally) give your new message a name for easier lookup later.
- Click Save to create the message and append it to the sample data as the active message (in this case the 283rd message):
Navigating Sample Data [top]
There are two ways to navigate through the sample data.
The first method is to scroll through messages using the arrows in the toolbar Navigation control:
The second method is to click the Go To Message button:
Then enter the number of the message that you want to select and click Go:
Tip: Annotations and data dialogs are synchronized with script and data changes, when you navigate through sample data the annotations and dialogs are updated in real time.
Edit or Delete Sample Data [top]
You can edit or delete any sample message that you have imported into your script.
To edit a message:
- Select the message to edit using the Navigation buttons:
- Then click the Edit Message button to edit the current message in a floating window:
Note: Editor annotations and data changes are synchronized.
- Alternatively click the Sample Data link and choose a message from the Sample Data screen:
- Use the Message Editor to make your changes:
- Save your changes to return to the script with the edited message as the active sample message.
To delete a message:
- Click the Sample Data link and check the message(s) to delete in the Sample Data screen:
- Then click Delete button:
Import From The Logs [top]
From the Iguana Translator window, you can import sample message(s) from the Iguana log files.
- Click the Go To Message button in the navigation control:
- Then click Add From Logs:
- Fill out search information to locate the message that you want to import:
- In the Search Text field, type filter text to match messages
- From the list box, select the channel through which the messages were sent
- You can also filter by date and time
- Click Search to display the matching messages:
- Click the message that you want to import:
- The message is added to the sample data for the script, and becomes the currently selected message in the Editor.
Tip: You can also use the Logs screen to select a message to be imported:
This method is very useful for debugging processing errors. When you see an error in the log you simply choose the offending message and import it directly into the desired channel.