KB_SQL is a tool for retrieving and analyzing information. It was designed to query MUMPS databases, and it has a data definition, data manipulation, and data control language. MUMPS was released in 1966 to handle the “Big Data” flowing through the healthcare system. Although it is now arcane, it houses the health records of about 8 million veterans, and 180,000 medical professionals use it. InterSystems have developed an improved version of MUMPS called Cache. You can use KB_SQL with the native SQL Editor or within application programs. If you need to extract data from a MUMPS database, here are the steps you should take for KBSQL database extraction.

1. Start the SQL Editor

The way you load the SQL Editor depends on how the site admin sets up menus for user groups. You can invoke the editor from the command prompt or choose it from your user menu.

2. Create a New Query

Enter the name of the query through the Query Name window. If you enter lowercase or mixed case letters, they will be automatically converted to uppercase letters.

If your query does not exist, the Add New Query window will appear. Type Y to add a new query. You can copy text from an existing query or create an entirely new one.

3. Type in your SELECT Query

When the text window appears, the Edit menu option is highlighted. Press enter to move the cursor into the text area.

The text window is like a stripped-down word processor. It wraps your text at the end of the line and inserts what you type at the cursor location.

You may type your SQL commands in lowercase or uppercase letters. However, literal values are case-sensitive.

A simple query example is: SELECT * FROM Patients

4. Run Your Query

After you have typed your SELECT query, proofread it to correct any typos. To run it, press the Run menu option.

If your admin has configured the database to run queries in the background, a window will appear to ask you if you want to run your query in the background.

5. Choose the Location for Query Results

After preparing your query, KB_SQL asks you to choose where to send the output. You can set the output for the query results to screen, printer, or file.

If you send the output to the screen, use the SET SCROLL option to scroll through the results in pages. Type: SET SCROLL=YES.

If the device you choose has more than one mode, you will have a chance to select one in a separate window.

To send the output to a file, use the SET statement in the SQL Editor.

Remember that all SET statements must come at the beginning of the SQL command.

You write this statement before the SQL command,

SET FILE=’C:\PATIENTS.TXT’,FORMAT=’REPORT’

6. Exit the Query

Choose the Quit menu option to exit the query and go back to the window for query names. You can also exit the window by pressing the Skip menu option.

7. Close the Editor

To take your exit from the SQL Editor, press Skip on the menu bar.

That’s a simple procedure to extract data from a MUMPS database using KB_SQL. However, you will need more to handle the complex processes for extracting legacy data from an old M database.

Get Expert Assistance for KBSQL Database Extraction

Contact MediQuant at 844.286.8683 to schedule a free consultation now. We can help to extract both relational and non-relational data from MUMPS databases. Visit our contact page now to schedule a demo.

Benshep

About the Author: