Summary
There are multiple attribute tables that exist in Pellucid. Each links to a different table. Each attributes table holds attributes for hospitalstheir respective entities. Attribute is the key type and value is the value of the attribute (e.g. designation, emergency).
Attributes are pieces of useful information that are stored for an entity that have the potential to change constantly. As such, they are stored in their own table, and not kept as identifying/detailed information in the table with the entity itself. An example of an attribute could be bed count, as the amount of beds devoted to a specific unit of a hospital or entity can change regularly.
The attributes tables are as follows:
- entity_asc_attributes
- entity_calculation_attributes
- entity_clinic_attributes
- entity_geography_attributes
- entity_home_health_attributes
- entity_hospital_attributes
- ntity_mco_attributes
- entity_ascnursing_home_attributes
- entity_calculationphysician_attributes
- entity_practice_geography attributes
- entity_system_attributes
These child tables are specific to the parent entity table they are associated with.
Table Creation
DROP TABLE IF EXISTS `hospital_attributes`;
CREATE TABLE hospital_attributes (
`attribute_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`entity_id` bigint(20) unsigned NOT NULL,
`attribute` varchar(255) NOT NULL,
`value` varchar(255) DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`source` varchar(64) DEFAULT NULL,
PRIMARY KEY (`attribute_id`),
KEY `entity_id` (`entity_id`),
CONSTRAINT `hospital_attributes_ibfk_1` FOREIGN KEY (`entity_id`) REFERENCES `entity_hospitals` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Field Information
`attribute_id` unique ID that identifies each attribute
`entity_id` ID number that indicates an entity or asc. Links to the entity_hospitals or entity_ascs tables
`attribute` descriptors identifying the type of attribute associated with the entity
`value` the value of the attribute
`created` the date and time the row was created in YYYY-MM-DD HH:MM:SS format
`modified` the date and time the row was last edited in YYYY-MM-DD HH:MM:SS format
Fieldsfield type attributes notes example attribute_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT Provided by Pellucid 1234567 entity_id BIGINT(20) UNSIGNED NOT NULL Provided by Pellucid, links to entities 987654321 attribute VARCHAR(255) NOT NULL Determined by IPRO aa_md value VARCHAR(255) DEFAULT NULL Determined by IPRO emergency created timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' The date and time the row was created 2010-09-16 09:15:36 modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP The date and time the row was edited 2010-09-16 09:15:36 source VARCHAR(64) DEFAULT NULL The source of the attributes data abc1
PRIMARY KEY (`attribute_id`)
KEY `entity_id` (`entity_id`)
CONSTRAINT `hospital_attributes_ibfk_1` FOREIGN KEY (`entity_id`) REFERENCES `entity_hospitals` (`entity_id`) ON DELETE CASCADE
NotesSome of the attributes tables will also have a source associated with them. This is a VARCHAR field that allows us to identify where the data is coming from
The attribute_id is the primary key and is unique to the table, but can be used multiple times in different attributes tables. As such, it differs from the entity_id that is specifically designed to be unique across multiple tables.
DROP TABLE IF EXISTS `hospital_attributes`;
CREATE TABLE hospital_attributes (
`attribute_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`entity_id` bigint(20) unsigned NOT NULL,
`attribute` varchar(255) NOT NULL,
`value` varchar(255) DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
`source` varchar(64) DEFAULT NULL,
PRIMARY KEY (`attribute_id`),
KEY `entity_id` (`entity_id`),
CONSTRAINT `hospital_attributes_ibfk_1` FOREIGN KEY (`entity_id`) REFERENCES `entity_hospitals` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
`attribute_id` unique ID that identifies each attribute
`entity_id` ID number that indicates an entity or asc. Links to the entity_hospitals or entity_ascs tables
`attribute` descriptors identifying the type of attribute associated with the entity
`value` the value of the attribute
`created` the date and time the row was created in YYYY-MM-DD HH:MM:SS format
`modified` the date and time the row was last edited in YYYY-MM-DD HH:MM:SS format
Fieldsfield type attributes notes example attribute_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT Provided by Pellucid 1234567 entity_id BIGINT(20) UNSIGNED NOT NULL Provided by Pellucid, links to entities 987654321 attribute VARCHAR(255) NOT NULL Determined by IPRO aa_md value VARCHAR(255) DEFAULT NULL Determined by IPRO emergency created timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' The date and time the row was created 2010-09-16 09:15:36 modified timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP The date and time the row was edited 2010-09-16 09:15:36 source VARCHAR(64) DEFAULT NULL The source of the attributes data abc1
PRIMARY KEY (`attribute_id`)
KEY `entity_id` (`entity_id`)
CONSTRAINT `hospital_attributes_ibfk_1` FOREIGN KEY (`entity_id`) REFERENCES `entity_hospitals` (`entity_id`) ON DELETE CASCADE
NotesSome of the attributes tables will also have a source associated with them. This is a VARCHAR field that allows us to identify where the data is coming from
The attribute_id is the primary key and is unique to the table, but can be used multiple times in different attributes tables. As such, it differs from the entity_id that is specifically designed to be unique across multiple tables.
field | type | attributes | notes | example |
---|---|---|---|---|
attribute_id | INT(11) | UNSIGNED NOT NULL AUTO_INCREMENT | Provided by Pellucid | 1234567 |
entity_id | BIGINT(20) | UNSIGNED NOT NULL | Provided by Pellucid, links to entities | 987654321 |
attribute | VARCHAR(255) | NOT NULL | Determined by IPRO | aa_md |
value | VARCHAR(255) | DEFAULT NULL | Determined by IPRO | emergency |
created | timestamp | NOT NULL DEFAULT '0000-00-00 00:00:00' | The date and time the row was created | 2010-09-16 09:15:36 |
modified | timestamp | NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP | The date and time the row was edited | 2010-09-16 09:15:36 |
source | VARCHAR(64) | DEFAULT NULL | The source of the attributes data | abc1 |
PRIMARY KEY (`attribute_id`)
KEY `entity_id` (`entity_id`)
CONSTRAINT `hospital_attributes_ibfk_1` FOREIGN KEY (`entity_id`) REFERENCES `entity_hospitals` (`entity_id`) ON DELETE CASCADE
Some of the attributes tables will also have a source associated with them. This is a VARCHAR field that allows us to identify where the data is coming from
The attribute_id is the primary key and is unique to the table, but can be used multiple times in different attributes tables. As such, it differs from the entity_id that is specifically designed to be unique across multiple tables.