Author: Dale Sahlberg - 1 - 3270 DATA SCRUBBER

Review the data in the following fields - anything amiss?

DIAGNOSIS: Headache & fever PT LAST NAME: O'Reilly PT FIRST NAME: Jo Ann-Worley CITY: Miami/Dade CHIEF COMPLAINT: Hand + Elbow Burns

Do these interface messages create a headache for you?

TYPE TIME |---+----1----+----2----+----3----+----4----+----5----+----6-- G 08:42:21 ARKI20033: (A5Z0L2), TRANSACTION SKIPPED DURING ERROR PROCESSING TYPE TIME |---+----1----+----2----+----3----+----4----+----5----+----6-- G 08:04:21 ARKE20016: (J5X0S2), UNIDENTIFIABLE RTRNFILE TRANSACTION

Special characters ( @ # $ % & * + = : ; ? ) in a field can wreak havoc on interfaces and cause database problems.

Would it be nice to have a way to scrub away bad characters from your data? Well – there is good news!

Introducing: SCRUBBER

Scrubber removes bad characters ( ~ ! @ # $ % * ( ) + : ; ? ) from a field and can clean an entire sequence of fields before information goes to an interface or database.

Author: Dale Sahlberg - 2 -

HOW TO MAKE YOUR OWN SCRUBBER

A) Create these user fields -

B) Program a new member "SCRUB" into PRALC - Member = SCRUB ENTER EXPRESSION(S) -

C) Program a new member "SCRUB2" into PRALC - Member = SCRUB2 ENTER EXPRESSION(S) -

D) Make a tcl - $T = SCRUB STACK COMMAND DEFINITION - CONDITIONAL Author: Dale Sahlberg - 3 -

E) Build this tcl - $T = SCRUB2 STACK COMMAND DEFINITION - CONDITIONAL

F) Create a tcl - $T = SCRUB3 STACK COMMAND DEFINITION - CONDITIONAL

Load into this tcl the special characters to remove.

There is one literal that requires special processing to detect. This literal can show up in a name as in the following:

Author: Dale Sahlberg - 4 -

G) If you need to also check for the apostrophe ' as a bad character in a field, then include this field on the last screen in a pathway so the apostrophe can be defaulted into a variable for the SCRUBBER to check. USCRUBAP SCRUB APOSTROPHE 1 XF

The apostrophe ' (single quote) is used as a list delimiter as in the following list AND "USCRUBIN" IN ('!','@','#','$','%',';','=','?','/','\') so it cannot be coded as a literal value to check.

The system will generate a syntax error if you try to code: AND "USCRUBIN" IN (''')

However, a screen will allow the ' to be stored in a field as a value. This single character field can then be checked as a variable in the middle clause of the $T = SCRUB3 tcl. Place the field in an inconspicuous spot on a screen (header or footer) where the user will not accidentally key in that field and change the value.

Ensure that this field will always and only have the 'as a value.

When the USCRUBAP field displays, it will look like this:

H) Build this tcl - $T = SCRUB4 STACK COMMAND DEFINITION - CONDITIONAL Author: Dale Sahlberg - 5 -

I) Code a field specific tcl - $T = 0PTADDXA STACK COMMAND DEFINITION - CONDITIONAL

This example tcl is called the same name as the data field to be cleaned: OPTADDXA

Duplicate the logic in this tcl for as many fields as you want to clean, one tcl for each field.

TCL is recursive and returns the scrubbed data back to the original field after the clause.

Make sure all the field names and tcls are matched for each field you want to scrub.

Read the instructions in the tcl. Author: Dale Sahlberg - 6 -

J) Build a master control tcl - $T = SCRUBBER

Add the tcls for all the fields you want to clean, one tcl per field.

J) Add to a pathway - Insert the master control tcl into a pathway where it will automatically scrub the fields.

This code is presented “as is” and it is up to your hospital to thoroughly test it and verify the cleaned data before any implementation.

With SCRUBBER, there is a way now to scrub away bad characters.

Dale Sahlberg www.ecsahlberg.com/Help.html [email protected]