Permalink
Browse files

Added patches and table def for for #375 adding diagnosis

  • Loading branch information...
mddejong committed Oct 5, 2018
1 parent 1c194a4 commit 5b12e0b3c3a7e18f64bdc13605372f9c92769abe
@@ -34,7 +34,7 @@ class Gems_Versions
* This means that future patches for will be loaded,
* but that previous patches are ignored.
*/
return 62;
return 63;
}
/**
View
@@ -1400,4 +1400,19 @@ UPDATE gems__respondent2org
-- PATCH: Add memory to gems__token_attempts
ALTER TABLE gems__token_attempts
ADD gta_activated boolean null default 0 AFTER gta_datetime;
ADD gta_activated boolean null default 0 AFTER gta_datetime;
-- GEMS VERSION: 63
-- PATCH: Extend structure of Episodes of care
ALTER TABLE gems__episodes_of_care
ADD gec_diagnosis_data text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null
AFTER gec_diagnosis;
ALTER TABLE gems__episodes_of_care
ADD gec_extra_data text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null
AFTER gec_diagnosis_data;
-- PATCH: Add diagnosis to appoointments
ALTER TABLE gems__appointments
ADD gap_diagnosis_code varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null
AFTER gap_id_location;
@@ -30,6 +30,8 @@ CREATE TABLE if not exists gems__appointments (
gap_id_activity bigint unsigned null references gems__agenda_activities (gaa_id_activity),
gap_id_procedure bigint unsigned null references gems__agenda_procedures (gapr_id_procedure),
gap_id_location bigint unsigned null references gems__locations (glo_id_location),
gap_diagnosis_code varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null
references gems__agenda_diagnoses (gad_diagnosis_code),
gap_subject varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null,
gap_comment TEXT CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null,
@@ -21,6 +21,8 @@ CREATE TABLE if not exists gems__episodes_of_care (
gec_comment text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null,
gec_diagnosis varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null,
gec_diagnosis_data text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null,
gec_extra_data text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null,
gec_changed timestamp not null default current_timestamp on update current_timestamp,
gec_changed_by bigint unsigned not null,

0 comments on commit 5b12e0b

Please sign in to comment.