Set up Oracle
These instructions assume that you are using an Oracle database and guide you
through the following tasks:
-
Create a database called PATSDB
-
Create a table, PATIENTS, to store the patient and device associations
Note. When you create and access the database tables, be aware of the
following issues:
-
When you run the script that creates the table in the database, the user
identifier from which you run the script determines the database schema name.
For example, if your user identifier is
USERID,
the fully qualified name of the PATIENTS table is USERID.PATIENTS.
-
Configure your pattern instance to use the same user identifier to access the
database that you used when you created the database and tables, include the
schema name in the configuration. For example,
Database.USERID.PATIENTS.
Complete the following steps:
-
Create a database called PATSDB.
-
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
);
-
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