Developing Sun Master Patient Indexes

Step 6: Define Master Index User Code Lists

If you specified a value for theconstraint-by and user-code elements of a field, you must define the user code values for those fields. Below is a sample insert statement for the sbyn_user_code table.Sun Master Patient Index provides this sample in a database script you can customize.

insert into sbyn_user_code (code_list, code, descr, format, input_mask, value_mask) values (’AUXIDDEF’, ’CC’, ’CREDIT CARD’, ’[0-9]{16}’, ’DDDD-DDDD-DDDD-DDDD’, ’DDDD^DDDD^DDDD^DDDD’);

To learn more about the sbyn_user_code table, see Master Index Database Table Description for sbyn_user_code. Complete Step 5: Define Master Index Code Lists before beginning this step.

ProcedureTo Define a User Code List

  1. In the Projects window, expand the Database node and then double-click the Create User Code Data file.

    The file opens in the NetBeans editor.

  2. Use the above sample to define a value for the user code drop-down list and the required format for the dependent fields.

  3. Repeat the above step for each drop-down list value and type (for example you might have one list for credit cards and another for postal codes and their corresponding cities).

  4. Save and close the file.

  5. Continue to Step 7: Create Custom Master Index Database Scripts or to Step 8: Create the Master Index Database Structure if you do not need to create any custom database scripts.