SNOMED Documentation Search


 Other Documents
Skip to end of metadata
Go to start of metadata

Current Version - Under Revision

CREATE TABLE `sct2_refset_c` (

`id` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',

`effectiveTime` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',

`active` TINYINT NOT NULL DEFAULT 0,

`moduleId` BIGINT NOT NULL DEFAULT 0,

`refsetId` BIGINT NOT NULL DEFAULT 0,

`referencedComponentId` BIGINT NOT NULL DEFAULT 0,

`sctId1` BIGINT NOT NULL DEFAULT 0,

PRIMARY KEY (`id`,`effectiveTime`),

KEY `refset_c_id` (`refsetId`,`referencedComponentId`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Figure 10. Create Component Refset Table

Tip: Some of the approaches to optimization suggested elsewhere in the guide result in changes to this example schema. You may wish to consider these before implementing this schema.

LOAD DATA LOCAL INFILE '[path]der2_cRefset_[AdditionalInfo].txt'

INTO TABLE `sct2_refset_c`

LINES TERMINATED BY '\r\n' IGNORE 1 LINES

(@uid, `effectiveTime`, `active`, `moduleId`, `refsetId`, `referencedComponentId`, `sctId1`)

SET id=UNHEX(REPLACE(@uid,'-',''));

Figure 11. Import Component Refset File


Feedback