-- MySQL dump 10.11
--
-- Host: localhost    Database: aggregator
-- ------------------------------------------------------
-- Server version	5.0.51b-community-nt

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Current Database: `aggregator`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `aggregator` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `aggregator`;

--
-- Table structure for table `agg_message_results`
--

DROP TABLE IF EXISTS `agg_message_results`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `agg_message_results` (
  `MessageId` varchar(32) NOT NULL COMMENT 'This will be a UUID.',
  `TransactionId` varchar(32) NOT NULL COMMENT 'This will be a UUID. - Foreign Key to the agg_transaction table.',
  `MessageKey` varchar(1000) NOT NULL COMMENT 'This is the key used to tie the response to the original request.',
  `MessageOutTime` datetime default NULL COMMENT 'This is the date/time when the outbound request was recorded.  Format of YYYYMMDDHHMMSS',
  `ResponseReceivedTime` datetime default NULL COMMENT 'This is the date/time when the response was recorded.  Format of YYYYMMDDHHMMSS',
  `ResponseMessageType` varchar(100) default NULL COMMENT 'This is the name of the outer layer JAXB class for the response message.',
  `ResponseMessage` longtext COMMENT 'The response message in XML - Based on marshalling using JAXB',
  PRIMARY KEY  (`MessageId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `agg_message_results`
--

LOCK TABLES `agg_message_results` WRITE;
/*!40000 ALTER TABLE `agg_message_results` DISABLE KEYS */;
/*!40000 ALTER TABLE `agg_message_results` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `agg_transaction`
--

DROP TABLE IF EXISTS `agg_transaction`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `agg_transaction` (
  `TransactionId` varchar(32) NOT NULL COMMENT 'This will be a UUID',
  `ServiceType` varchar(64) NOT NULL,
  `TransactionStartTime` datetime default NULL COMMENT 'Format of YYYYMMDDHHMMSS',
  PRIMARY KEY  (`TransactionId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `agg_transaction`
--

LOCK TABLES `agg_transaction` WRITE;
/*!40000 ALTER TABLE `agg_transaction` DISABLE KEYS */;
/*!40000 ALTER TABLE `agg_transaction` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Current Database: `assigningauthoritydb`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `assigningauthoritydb` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `assigningauthoritydb`;

--
-- Table structure for table `assigningauthoritytohomecommunitymapping`
--

DROP TABLE IF EXISTS `assigningauthoritytohomecommunitymapping`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `assigningauthoritytohomecommunitymapping` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `assigningauthorityid` varchar(45) NOT NULL,
  `homecommunityid` varchar(45) NOT NULL,
  PRIMARY KEY  (`id`,`assigningauthorityid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `assigningauthoritytohomecommunitymapping`
--

LOCK TABLES `assigningauthoritytohomecommunitymapping` WRITE;
/*!40000 ALTER TABLE `assigningauthoritytohomecommunitymapping` DISABLE KEYS */;
INSERT INTO `assigningauthoritytohomecommunitymapping` VALUES (1,'1.1','1.2.3.4.55.500'),(2,'1.2','1.2.3.4.55.501'),(3,'1.3','2.16.840.1.113883.3.200'),(4,'1.4','2.16.840.1.113883.3.198'),(5,'1.5','2.16.840.1.113883.3.184');
/*!40000 ALTER TABLE `assigningauthoritytohomecommunitymapping` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Current Database: `auditrepo`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `auditrepo` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `auditrepo`;

--
-- Table structure for table `auditrepository`
--

DROP TABLE IF EXISTS `auditrepository`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `auditrepository` (
  `id` bigint(20) NOT NULL auto_increment,
  `timestamp` datetime default NULL,
  `eventId` bigint(20) NOT NULL,
  `userId` varchar(100) default NULL,
  `participationTypeCode` smallint(6) default NULL,
  `participationTypeCodeRole` smallint(6) default NULL,
  `participationIDTypeCode` varchar(100) default NULL,
  `receiverPatientId` varchar(100) default NULL,
  `senderPatientId` varchar(100) default NULL,
  `communityId` varchar(255) default NULL,
  `messageType` varchar(100) NOT NULL,
  `message` blob,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `UQ_eventlog_id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `auditrepository`
--

LOCK TABLES `auditrepository` WRITE;
/*!40000 ALTER TABLE `auditrepository` DISABLE KEYS */;
INSERT INTO `auditrepository` VALUES (1,'2009-02-20 13:18:44',0,'Alexandra Rodriquez',1,1,'2','65456^^^&2.16.840.1.113883.3.192&ISO',NULL,'2.16.840.1.113883.3.192','logAdhocQueryRequest','<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><AuditMessage xmlns=\"http://nhinc.services.com/schema/auditmessage\"><EventIdentification EventOutcomeIndicator=\"0\" EventDateTime=\"2009-02-20T18:18:44.671Z\" EventActionCode=\"E\"><EventID codeSystemName=\"DCM\" codeSystem=\"Query\" displayName=\"Query\" code=\"DCM\"/></EventIdentification><ActiveParticipant NetworkAccessPointTypeCode=\"2\" NetworkAccessPointID=\"192.168.101.137\" UserIsRequestor=\"true\" UserName=\"Alexandra Rodriquez\" UserID=\"Alexandra Rodriquez\"/><AuditSourceIdentification AuditSourceID=\"2.16.840.1.113883.3.192\" AuditEnterpriseSiteID=\"Cleveland Clinic\"/><ParticipantObjectIdentification ParticipantObjectTypeCodeRole=\"1\" ParticipantObjectTypeCode=\"1\" ParticipantObjectID=\"65456\"><ParticipantObjectIDTypeCode code=\"2\"/><ParticipantObjectQuery>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxBZGhvY1F1ZXJ5UmVxdWVzdCB4bWxucz0idXJuOm9hc2lzOm5hbWVzOnRjOmVieG1sLXJlZ3JlcDp4c2Q6cXVlcnk6My4wIiB4bWxuczpuczI9InVybjpvYXNpczpuYW1lczp0YzplYnhtbC1yZWdyZXA6eHNkOnJpbTozLjAiIHhtbG5zOm5zMz0idXJuOm9hc2lzOm5hbWVzOnRjOmVieG1sLXJlZ3JlcDp4c2Q6cnM6My4wIiB4bWxuczpuczQ9InVybjpvYXNpczpuYW1lczp0YzplYnhtbC1yZWdyZXA6eHNkOmxjbTozLjAiIG1heFJlc3VsdHM9Ii0xIiBzdGFydEluZGV4PSIwIiBmZWRlcmF0aW9uPSI/IiBmZWRlcmF0ZWQ9ImZhbHNlIiBjb21tZW50PSI/IiBpZD0iPyI+PFJlc3BvbnNlT3B0aW9uIHJldHVybkNvbXBvc2VkT2JqZWN0cz0iZmFsc2UiIHJldHVyblR5cGU9IlJlZ2lzdHJ5T2JqZWN0Ii8+PG5zMjpBZGhvY1F1ZXJ5IHN0YXR1cz0iPyIgb2JqZWN0VHlwZT0iPyIgbGlkPSI/IiBob21lPSI/IiBpZD0iPyIvPjwvQWRob2NRdWVyeVJlcXVlc3Q+</ParticipantObjectQuery></ParticipantObjectIdentification></AuditMessage>'),(2,'2009-02-20 13:19:38',0,'Phillip Kirkman',1,1,'2','989898^^^&2.16.840.1.113883.3.185&ISO',NULL,'2.16.840.1.113883.3.185','logAdhocQueryResponse','<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><AuditMessage xmlns=\"http://nhinc.services.com/schema/auditmessage\"><EventIdentification EventOutcomeIndicator=\"0\" EventDateTime=\"2009-02-20T18:19:38.906Z\" EventActionCode=\"E\"><EventID codeSystemName=\"DCM\" codeSystem=\"Query\" displayName=\"Query\" code=\"DCM\"/></EventIdentification><ActiveParticipant NetworkAccessPointTypeCode=\"2\" NetworkAccessPointID=\"192.168.101.137\" UserIsRequestor=\"true\" UserName=\"Phillip Kirkman\" UserID=\"Phillip Kirkman\"/><AuditSourceIdentification AuditSourceID=\"2.16.840.1.113883.3.185\"/><ParticipantObjectIdentification ParticipantObjectTypeCodeRole=\"1\" ParticipantObjectTypeCode=\"1\" ParticipantObjectID=\"989898\"><ParticipantObjectIDTypeCode code=\"2\"/><ParticipantObjectQuery>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxBZGhvY1F1ZXJ5UmVzcG9uc2UgeG1sbnM9InVybjpvYXNpczpuYW1lczp0YzplYnhtbC1yZWdyZXA6eHNkOnF1ZXJ5OjMuMCIgeG1sbnM6bnMyPSJ1cm46b2FzaXM6bmFtZXM6dGM6ZWJ4bWwtcmVncmVwOnhzZDpyaW06My4wIiB4bWxuczpuczM9InVybjpvYXNpczpuYW1lczp0YzplYnhtbC1yZWdyZXA6eHNkOnJzOjMuMCIgeG1sbnM6bnM0PSJ1c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z48L25zMjpOYW1lPjwvbnMyOkNsYXNzaWZpY2F0aW9uPjxuczI6RXh0ZXJuYWxJZGVudGlmaWVyIHZhbHVlPSInMTIzNF5eXiZhbXA7MS4xJmFtcDtJU08nIiBpZGVudGlmaWNhdGlvblNjaGVtZT0idXJuOnV1aWQ6NThhNmY4NDEtODdiMy00YTNlLTkyZmQtYThmZmVmZjk4NDI3IiByZWdpc3RyeU9iamVjdD0idXJuOnV1aWQ6YzkxYWMwZTItYjUzNy00M2ZlLWI1YTEtZTk0ZGIwNzlhY2YyIiBpZD0iIj48bnMyOk5hbWU+PG5zMjpMb2NhbGl6ZWRTdHJpbmcgdmFsdWU9IlhEU0RvY3VtZW50RW50cnkucGF0aWVudElkIi8+PC9uczI6TmFtZT48L25zMjpFeHRlcm5hbElkZW50aWZpZXI+PG5zMjpFeHRlcm5hbElkZW50aWZpZXIgdmFsdWU9IjExMTExMTExMSIgaWRlbnRpZmljYXRpb25TY2hlbWU9InVybjp1dWlkOjJlODJjMWY2LWEwODUtNGM3Mi05ZGEzLTg2NDBhMzJlNDJhYiIgcmVnaXN0cnlPYmplY3Q9InVybjp1dWlkOmM5MWFjMGUyLWI1MzctNDNmZS1iNWExLWU5NGRiMDc5YWNmMiIgaWQ9IiI+PG5zMjpOYW1lPjxuczI6TG9jYWxpemVkU3RyaW5nIHZhbHVlPSJYRFNEb2N1bWVudEVudHJ5LnVuaXF1ZUlkIi8+PC9uczI6TmFtZT48L25zMjpFeHRlcm5hbElkZW50aWZpZXI+PC9uczI6RXh0cmluc2ljT2JqZWN0PjwvbnMyOlJlZ2lzdHJ5T2JqZWN0TGlzdD48L0FkaG9jUXVlcnlSZXNwb25zZT4=</ParticipantObjectQuery></ParticipantObjectIdentification></AuditMessage>'),(3,'2009-02-20 13:20:05',0,'Alexandra Rodriquez',1,1,'2','65456^^^&2.16.840.1.113883.3.192&ISO',NULL,'2.16.840.1.113883.3.192','logAdhocQueryRequest','<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><AuditMessage xmlns=\"http://nhinc.services.com/schema/auditmessage\"><EventIdentification EventOutcomeIndicator=\"0\" EventDateTime=\"2009-02-20T18:20:05.000Z\" EventActionCode=\"E\"><EventID codeSystemName=\"DCM\" codeSystem=\"Query\" displayName=\"Query\" code=\"DCM\"/></EventIdentification><ActiveParticipant NetworkAccessPointTypeCode=\"2\" NetworkAccessPointID=\"192.168.101.137\" UserIsRequestor=\"true\" UserName=\"Alexandra Rodriquez\" UserID=\"Alexandra Rodriquez\"/><AuditSourceIdentification AuditSourceID=\"2.16.840.1.113883.3.192\" AuditEnterpriseSiteID=\"Cleveland Clinic\"/><ParticipantObjectIdentification ParticipantObjectTypeCodeRole=\"1\" ParticipantObjectTypeCode=\"1\" ParticipantObjectID=\"65456\"><ParticipantObjectIDTypeCode code=\"2\"/><ParticipantObjectQuery>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxBZGhvY1F1ZXJ5UmVxdWVzdCB4bWxucz0idXJuOm9hc2lzOm5hbWVzOnRjOmVieG1sLXJlZ3JlcDp4c2Q6cXVlcnk6My4wIiB4bWxuczpuczI9InVybjpvYXNpczpuYW1lczp0YzplYnhtbC1yZWdyZXA6eHNkOnJpbTozLjAiIHhtbG5zOm5zMz0idXJuOm9hc2lzOm5hbWVzOnRjOmVieG1sLXJlZ3JlcDp4c2Q6cnM6My4wIiB4bWxuczpuczQ9InVybjpvYXNpczpuYW1lczp0YzplYnhtbC1yZWdyZXA6eHNkOmxjbTozLjAiIG1heFJlc3VsdHM9Ii0xIiBzdGFydEluZGV4PSIwIiBmZWRlcmF0aW9uPSI/IiBmZWRlcmF0ZWQ9ImZhbHNlIiBjb21tZW50PSI/IiBpZD0iPyI+PFJlc3BvbnNlT3B0aW9uIHJldHVybkNvbXBvc2VkT2JqZWN0cz0iZmFsc2UiIHJldHVyblR5cGU9IlJlZ2lzdHJ5T2JqZWN0Ii8+PG5zMjpBZGhvY1F1ZXJ5IHN0YXR1cz0iPyIgb2JqZWN0VHlwZT0iPyIgbGlkPSI/IiBob21lPSI/IiBpZD0iPyIvPjwvQWRob2NRdWVyeVJlcXVlc3Q+</ParticipantObjectQuery></ParticipantObjectIdentification></AuditMessage>'),(4,'2009-02-22 12:44:52',0,'mfranklin',1,1,'2','1000000008^^^&2.16.840.1.113883.3.198&ISO',NULL,'2.16.840.1.113883.3.198','logRetrieveDocumentSetRequest','<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><AuditMessage xmlns=\"http://nhinc.services.com/schema/auditmessage\"><EventIdentification EventOutcomeIndicator=\"0\" EventDateTime=\"2009-02-22T17:44:52.593Z\" EventActionCode=\"E\"><EventID codeSystemName=\"DCM\" codeSystem=\"Retrieve\" displayName=\"Retrieve\" code=\"DCM\"/></EventIdentification><ActiveParticipant NetworkAccessPointTypeCode=\"2\" NetworkAccessPointID=\"172.16.100.12\" UserIsRequestor=\"true\" UserName=\"MARK FRANKLIN\" UserID=\"mfranklin\"/><AuditSourceIdentification AuditSourceID=\"2.16.840.1.113883.3.198\" AuditEnterpriseSiteID=\"Federal - DoD\"/><ParticipantObjectIdentification ParticipantObjectTypeCodeRole=\"1\" ParticipantObjectTypeCode=\"1\" ParticipantObjectID=\"1000000008^^^&amp;2.16.840.1.113883.3.198&amp;ISO\"><ParticipantObjectIDTypeCode code=\"2\"/><ParticipantObjectQuery>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxuczQ6UmV0cmlldmVEb2N1bWVudFNldFJlcXVlc3QgeG1sbnM9InVybjpvYXNpczpuYW1lczp0YzplYnhtbC1yZWdyZXA6eHNkOnJpbTozLjAiIHhtbG5zOm5zMj0idXJuOm9hc2lzOm5hbWVzOnRjOmVieG1sLXJlZ3JlcDp4c2Q6cnM6My4wIiB4bWxuczpuczM9InVybjpvYXNpczpuYW1lczp0YzplYnhtbC1yZWdyZXA6eHNkOmxjbTozLjAiIHhtbG5zOm5zND0idXJuOmloZTppdGk6eGRzLWI6MjAwNyIgeG1sbnM6bnM1PSJ1cm46b2FzaXM6bmFtZXM6dGM6ZWJ4bWwtcmVncmVwOnhzZDpxdWVyeTozLjAiPjxuczQ6RG9jdW1lbnRSZXF1ZXN0PjxuczQ6SG9tZUNvbW11bml0eUlkPnVybjpvaWQ6MS4xPC9uczQ6SG9tZUNvbW11bml0eUlkPjxuczQ6UmVwb3NpdG9yeVVuaXF1ZUlkPjE8L25zNDpSZXBvc2l0b3J5VW5pcXVlSWQ+PG5zNDpEb2N1bWVudFVuaXF1ZUlkPjEyMzQ8L25zNDpEb2N1bWVudFVuaXF1ZUlkPjwvbnM0OkRvY3VtZW50UmVxdWVzdD48L25zNDpSZXRyaWV2ZURvY3VtZW50U2V0UmVxdWVzdD4=</ParticipantObjectQuery></ParticipantObjectIdentification></AuditMessage>');
/*!40000 ALTER TABLE `auditrepository` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Current Database: `docrepository`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `docrepository` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `docrepository`;

--
-- Table structure for table `document`
--

DROP TABLE IF EXISTS `document`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `document` (
  `documentid` int(11) NOT NULL,
  `DocumentUniqueId` varchar(64) NOT NULL,
  `DocumentTitle` varchar(128) default NULL,
  `authorPerson` varchar(64) default NULL,
  `authorInstitution` varchar(64) default NULL,
  `authorRole` varchar(64) default NULL,
  `authorSpecialty` varchar(64) default NULL,
  `AvailabilityStatus` varchar(64) default NULL,
  `ClassCode` varchar(64) default NULL,
  `ClassCodeScheme` varchar(64) default NULL,
  `ClassCodeDisplayName` varchar(64) default NULL,
  `ConfidentialityCode` varchar(64) default NULL,
  `ConfidentialityCodeScheme` varchar(64) default NULL,
  `ConfidentialityCodeDisplayName` varchar(64) default NULL,
  `CreationTime` datetime default NULL COMMENT 'Date format expected: MM/dd/yyyy.HH:mm:ss',
  `FormatCode` varchar(64) default NULL,
  `FormatCodeScheme` varchar(64) default NULL,
  `FormatCodeDisplayName` varchar(64) default NULL,
  `PatientId` varchar(64) default NULL COMMENT 'Format of HL7 2.x CX',
  `ServiceStartTime` datetime default NULL COMMENT 'Format of YYYYMMDDHHMMSS',
  `ServiceStopTime` datetime default NULL COMMENT 'Format of YYYYMMDDHHMMSS',
  `Status` varchar(64) default NULL,
  `Comments` varchar(256) default NULL,
  `Hash` varchar(1028) default NULL COMMENT 'Might be better to derive',
  `FacilityCode` varchar(64) default NULL,
  `FacilityCodeScheme` varchar(64) default NULL,
  `FacilityCodeDisplayName` varchar(64) default NULL,
  `IntendedRecipientPerson` varchar(128) default NULL COMMENT 'Format of HL7 2.x XCN',
  `IntendedRecipientOrganization` varchar(128) default NULL COMMENT 'Format of HL7 2.x XON',
  `LanguageCode` varchar(64) default NULL,
  `LegalAuthenticator` varchar(128) default NULL COMMENT 'Format of HL7 2.x XCN',
  `MimeType` varchar(32) default NULL,
  `ParentDocumentId` varchar(64) default NULL,
  `ParentDocumentRelationship` varchar(64) default NULL,
  `PracticeSetting` varchar(64) default NULL,
  `PracticeSettingScheme` varchar(64) default NULL,
  `PracticeSettingDisplayName` varchar(64) default NULL,
  `Size` int(11) default NULL,
  `SourcePatientId` varchar(128) default NULL COMMENT 'Format of HL7 2.x CX',
  `Pid3` varchar(128) default NULL,
  `Pid5` varchar(128) default NULL,
  `Pid7` varchar(128) default NULL,
  `Pid8` varchar(128) default NULL,
  `Pid11` varchar(128) default NULL,
  `TypeCode` varchar(64) default NULL,
  `TypeCodeScheme` varchar(64) default NULL,
  `TypeCodeDisplayName` varchar(64) default NULL,
  `DocumentUri` varchar(128) default NULL COMMENT 'May derive this value',
  `RawData` blob,
  `Persistent` int(11) NOT NULL,
  PRIMARY KEY  (`documentid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `document`
--

LOCK TABLES `document` WRITE;
/*!40000 ALTER TABLE `document` DISABLE KEYS */;
/*!40000 ALTER TABLE `document` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `eventcode`
--

DROP TABLE IF EXISTS `eventcode`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `eventcode` (
  `eventcodeid` int(11) NOT NULL,
  `documentid` int(11) NOT NULL COMMENT 'Foriegn key to document table',
  `EventCode` varchar(64) default NULL,
  `EventCodeScheme` varchar(64) default NULL,
  `EventCodeDisplayName` varchar(64) default NULL,
  PRIMARY KEY  (`eventcodeid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `eventcode`
--

LOCK TABLES `eventcode` WRITE;
/*!40000 ALTER TABLE `eventcode` DISABLE KEYS */;
/*!40000 ALTER TABLE `eventcode` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Current Database: `patientcorrelationdb`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `patientcorrelationdb` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `patientcorrelationdb`;

--
-- Table structure for table `correlatedidentifiers`
--

DROP TABLE IF EXISTS `correlatedidentifiers`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `correlatedidentifiers` (
  `correlationId` int(10) unsigned NOT NULL auto_increment,
  `PatientAssigningAuthorityId` varchar(45) NOT NULL,
  `PatientId` varchar(45) NOT NULL,
  `CorrelatedPatientAssigningAuthorityId` varchar(45) NOT NULL,
  `CorrelatedPatientId` varchar(45) NOT NULL,
  PRIMARY KEY  (`correlationId`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `correlatedidentifiers`
--

LOCK TABLES `correlatedidentifiers` WRITE;
/*!40000 ALTER TABLE `correlatedidentifiers` DISABLE KEYS */;
INSERT INTO `correlatedidentifiers` VALUES (1,'AA1','MRN-1','AA2','MRN-2'),(2,'2.16.840.1.113883.4.1','123456789','2.16.840.1.113883.3.198','D123401'),(3,'2.16.840.1.113883.3.200','500000000','2.16.840.1.113883.3.192','1018'),(4,'2.16.840.1.113883.3.200','500000000','2.16.840.1.113883.4.1','123456789');
/*!40000 ALTER TABLE `correlatedidentifiers` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2009-02-22 21:44:12
