source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/DBScripts/aggregator/aggregator.sql@ 507

Last change on this file since 507 was 507, checked in by George Lilly, 15 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 1.5 KB
Line 
1/*
2 Table creation script for the aggregation tables. These should be
3 loaded into the AGGREGATI0N schema. They are used when doing
4 aggregation of responses from multple systems that come in on separate
5 threads.
6
7 This script was intended to be run on MySQL.
8*/
9
10DROP TABLE IF EXISTS agg_transaction CASCADE;
11CREATE TABLE agg_transaction (
12 TransactionId VARCHAR(32) NOT NULL COMMENT 'This will be a UUID',
13 ServiceType VARCHAR(64) NOT NULL,
14 TransactionStartTime DATETIME COMMENT 'Format of YYYYMMDDHHMMSS');
15
16ALTER TABLE agg_transaction
17 ADD CONSTRAINT agg_transaction_pk PRIMARY KEY(TransactionId);
18
19DROP TABLE IF EXISTS agg_message_results CASCADE;
20CREATE TABLE agg_message_results (
21 MessageId VARCHAR(32) NOT NULL COMMENT 'This will be a UUID.',
22 TransactionId VARCHAR(32) NOT NULL COMMENT 'This will be a UUID. - Foreign Key to the agg_transaction table.',
23 MessageKey VARCHAR(1000) NOT NULL COMMENT 'This is the key used to tie the response to the original request.',
24 MessageOutTime DATETIME COMMENT 'This is the date/time when the outbound request was recorded. Format of YYYYMMDDHHMMSS',
25 ResponseReceivedTime DATETIME COMMENT 'This is the date/time when the response was recorded. Format of YYYYMMDDHHMMSS',
26 ResponseMessageType VARCHAR(100) COMMENT 'This is the name of the outer layer JAXB class for the response message.',
27 ResponseMessage LONGTEXT COMMENT 'The response message in XML - Based on marshalling using JAXB');
28
29ALTER TABLE agg_message_results
30 ADD CONSTRAINT agg_message_results_pk PRIMARY KEY (MessageId);
31
32
33
Note: See TracBrowser for help on using the repository browser.