Set up Oracle

These instructions assume that you are using an Oracle database and guide you through the following tasks:

Note. When you create and access the database tables, be aware of the following issues:

Complete the following steps:

  1. Create a database called PATSDB.
  2. Open a new document in a text editor, copy and paste the following script, which creates the PATIENTS table, into the document, name the file patients_create_tables_oracle.sql and save the file.
    DROP TABLE "PATIENTS";
    CREATE TABLE "PATIENTS" (
        "DEVICEID" VARCHAR(50) NOT NULL PRIMARY KEY,
        "PATIENTID" VARCHAR(50) NOT NULL
    );
            
  3. In a command window that you have opened to access your database, move to the folder that contains patients_create_tables_oracle.sql and enter the following command:
    sqlplus <uid>/<password> @patients_create_tables_oracle.sql

    Wait for the script to finish running. If you are running the script for the first time, the following message is displayed:

    ORA-00942: table or view does not exist
    Ignore this message. The message is displayed because the script attempts to remove the existing table, PATIENTS, before it creates a new table, but if you have not run the script before, the table does not exist.

Back to Setting up the patient identifier database