-- Project Name : 救急外傷
-- Date/Time    : 2011/12/02 19:54:54
-- Author       : tro
-- RDBMS Type   : MySQL
-- Application  : A5:SQL Mk-2

-- 検査治療デフォルト
drop table default_diagnosis_therapeutic_plan cascade;

create table default_diagnosis_therapeutic_plan (
  default_diagnosis_therapeutic_plan_id INT not null comment '検査治療デフォルトID'
  , name VARCHAR(64) not null comment '対処名'
  , input_diagnosis_therapeutic_plan_id INT comment '検査治療インプットID'
  , kind VARCHAR(24) comment '種類'
  , emergency_injury_diagnosis_id INT comment '診断名ID'
  , serious_level INT comment '緊急度'
  , constraint default_diagnosis_therapeutic_plan_PKC primary key (default_diagnosis_therapeutic_plan_id)
) comment '検査治療デフォルト' engine=innodb default charset=utf8;

-- 検査治療インプット
drop table input_diagnosis_therapeutic_plan cascade;

create table input_diagnosis_therapeutic_plan (
  input_diagnosis_therapeutic_plan_id INT not null comment '検査治療インプットID'
  , kind VARCHAR(24) not null comment '種類'
  , label VARCHAR(64) not null comment 'ラベル名'
  , input_type VARCHAR(12) not null comment '入力タイプ'
  , name VARCHAR(64) not null comment 'NAME属性'
  , value VARCHAR(64) not null comment 'VALUE属性'
  , constraint input_diagnosis_therapeutic_plan_PKC primary key (input_diagnosis_therapeutic_plan_id,kind)
) comment '検査治療インプット' engine=innodb default charset=utf8;
