Author: Dale Sahlberg- 1 -

GOLD – DATA KNIFE

Have you ever had the following issues with data?

ADMITTING DIAGNOSIS: _ COPD
PT COMPLAINT: _ Fever / REASON FOR EXAM: _
PT ADDRESS: _ 1839 Pine Street

The common problem with the fields above is a leading: _ space

A leading space in a field can cause interface problems – the receiving system cannot parse the data correctly.

A space is sometimes used to “skip” through a required field. ( Reason for Exam: _ )

If you use an edit REQ VALUENE ' ' that will stop one blank space.

What about valid data after a space? PT ADDRESS: _1839 Pine Street

You cannot simply put an edit of FIRST CHARACTER ALPHA on a field since the data might start with a number (1839).

Having the foreign system use special code to check for leading spaces or other bad characters becomes a complicated process that will cause a headache. The best time to correct that field is BEFORE it goes to the database / interface.

The GOLD VACCUM CLEANER can edit out all spaces, yet sometimes you only want the leading space removed and not all the spaces. Deleting all spaces in a field would result in: 1839PineStreet

In those circumstances you need a specialized tool, one that can slice off the leading space only.

GOLD has a function called TRIM that will automatically remove a leading space and leave only valid data in that field.

WHERE "0PTADDZ1" IS VALUED THEN {"0PTADDZ1" = TRIM("0PTADDZ1", 'FRONT', ' ') }

Before: PT ADDRESS: _ 1839 Pine Street

After: PT ADDRESS: 1839 Pine Street

"0PTADDZ1"  "0PTADDZ1" – the variable field (street) – pick your own field.
'FRONT'  Allowable values include BACK, FRONT, and BOTH (default value).
' '  Here is the space to check for. Value is in single quotes.

The TRIM function can also remove other bothersome characters as well. The drawback to this TRIM function is: you can only check for one value at a time.

In order to check for the 9 bad characters '@ #$%&/.!' you would need 9 lines of code:

1) WHERE "0PTADDZ1" IS VALUED THEN {"0PTADDZ1" = TRIM("0PTADDZ1", 'FRONT', '@') }

2) WHERE "0PTADDZ1" IS VALUED THEN {"0PTADDZ1" = TRIM("0PTADDZ1", 'FRONT', ' ') }

3) WHERE "0PTADDZ1" IS VALUED THEN {"0PTADDZ1" = TRIM("0PTADDZ1", 'FRONT', '#') }

/\

9) WHERE "0PTADDZ1" IS VALUED THEN {"0PTADDZ1" = TRIM("0PTADDZ1", 'FRONT', '!') }

Is there a better way to check a list of '@ #$%&/.!' at one time?

REASON FOR EXAM: # OF PLATELETS BELOW NORMAL

Would it be nice to be able to detect all leading bad characters and automatically remove them, leaving only clean data in that field?

Well – there is good news !!!

Introducing the new: GOLD DATA KNIFE

This special data knife can:

  • Trim the edges of excess fat from your field
  • Automatically discard that fat and leave just the fresh cut of data
  • Be easily carried to any place in the hospital system ( PA, PM, ORDERS, COR, EAD )
HOW TO GET YOUR OWN GOLD DATA KNIFE

A) Create a GUI controller -

B) Insert the following code in that controller -

"C0731" = '@ #$%&/.!'

"C0740" = 1

LOOP FROM 1 TO 9 {

"C0733" = SUBSTR("C0731", "C0740", 1)

WHERE "0PTADDZ1" IS VALUED

THEN {

"0PTADDZ1" = TRIM("0PTADDZ1", 'FRONT', "C0733") }

"C0740" = "C0740" + 1 }

Identify the field you want to check: WHERE "0PTADDZ1" IS VALUED  "0PTADDZ1"

Define the special characters in the list: "C0731" = '@ #$%&/.!'

Match the loop count with the number of characters chosen for the list:

"C0731" = '@ #$%&/.!'  counted 9 members including the space after the @

"C0740" = 1

LOOP FROM 1 TO 9 {  9

C) Select that controller and attach it to the NEXT or OK button -

Here is an example of all the bad characters '@ #$%&/.!' being loaded at once to test the system:

After the data knife runs, the ADDRESS has clean information:

The controller’s actions are immediate.

The most amazing part of the cleanup is: you can see the actual change take place in that address field before the screen closes!

Suppose this small data knife is still not enough for your monster slab of data

that needs trimming all the way around …

then step right up to a more powerful

DATA POWER SAW

This power saw can quickly cut bad characters from the front or back or BOTH sides of the field!

Powerful 1050 watt universal motor that runs on standard hospital GOLD systems

Bevel cuts from 0º to 180º - cut data from the front or back

Compact & lightweight code for easy transportation

Comes with 4" 304CR diamond GOLD logic blade

Lightweight components for rigidity & strength

Easy to use ON/OFF trigger switch

ORDER COMMENTS: Send the packed blood unit stat! (exclamation point)

REASON FOR EXAM: Below normal creatinine clearance. (ending period)

DIETARY COMMENTS: Can you include some butter with that bread? (question mark)

Just change the code to:

"C0731" = '@ #$?&/.!'

"C0740" = 1

LOOP FROM 1 TO 9 {

"C0733" = SUBSTR("C0731", "C0740", 1)

WHERE "0PTADDZ1" IS VALUED

THEN {

"0PTADDZ1" = TRIM("0PTADDZ1", 'BACK', "C0733") }

"C0740" = "C0740" + 1 }

To check both leading and trailing, use:

'BOTH'  Allowable values include BACK, FRONT, and BOTH (default value).

Now you can stop bad characters from getting to your interface.

Isn’t that exciting news ?!

By putting these edits in a controller on the REVISE PT DATA screen, you can ensure all the fields from each “option” screen are clean before the is completed.