Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Summary

This table provides information regarding the relationships of the values of their measures and the footnotes that need to be associated with them. This table links both the 'measures' table and the 'entity_values' table to the 'footnotes' table.

This table uses all five fields to create a concatenated key to keep track of unique entries. These five fields are measure_identity_iddate_startdate_end, and footnote_id. Duplications can exist in this table for any of these fields, but all five can never be exact matches.

 

Table Creation

CREATE TABLE IF NOT EXISTS `footnotes_values` (
`measure_id` int(11) NOT NULL,
`entity_id` bigint(20) unsigned NOT NULL,
`date_start` date NOT NULL,
`date_end` date NOT NULL,
`footnote_id` int(11) NOT NULL,
`batch_id` varchar(64) DEFAULT NULL,
UNIQUE KEY `footnote_id` (`measure_id`,`entity_id`,`date_start`,`date_end`,`footnote_id`),
KEY `footnotes_ibfk2` (`footnote_id`),
KEY `footnotes_batch` (`batch_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


ALTER TABLE `footnotes_values`
ADD CONSTRAINT `footnotes_ibfk2` FOREIGN KEY (`footnote_id`) REFERENCES `footnotes` (`footnote_id`) ON DELETE CASCADE,
ADD CONSTRAINT `footnotes_values_ibfk1` FOREIGN KEY (`measure_id`, `entity_id`, `date_start`, `date_end`) REFERENCES `entity_values` (`measure_id`, `entity_id`, `date_start`, `date_end`) ON DELETE CASCADE;

 

Fields

fieldtypeattributesnotesexample
measure_idint(11)NOT NULLProvided by Pellucid, links to measures01234560
entity_idbigint(20)UNSIGNED NOT NULLProvided by Pellucid, links to entity_hospitals or entity_ascs01234567890
date_startdateNOT NULLSame as field in entity_values, YYYY-MM-DD2009-01-01
date_enddateNOT NULLSame as field in entity_values, YYYY-MM-DD2009-12-31
footnote_idint(11)NOT NULLProvided by Pellucid, links to footnotes2456
batch_id   varchar(64) 
DEFAULT NULL  
  • No labels