Skip to content

Commit

Permalink
CNDE-1805 Fix missing cd_desc_txt
Browse files Browse the repository at this point in the history
  • Loading branch information
sveselev committed Oct 10, 2024
1 parent f624fff commit 3d64deb
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,11 @@ databaseChangeLog:
changes:
- sqlFile:
path: 017-sp_d_labtest_result_postprocessing-001.sql
splitStatements: false
splitStatements: false
- changeSet:
id: 51
author: liquibase
changes:
- sqlFile:
path: 017-create_nrt_observation-004.sql
splitStatements: false
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,4 @@ IF EXISTS (SELECT 1 FROM sysobjects WHERE name = 'nrt_observation' and xtype = '
ADD ctrl_cd_display_form varchar(20);
END;

IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE Name = N'obs_domain_cd_st_1' AND Object_ID = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD obs_domain_cd_st_1 varchar(20);

END;
IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE Name = N'processing_decision_cd' AND Object_ID = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD processing_decision_cd varchar(20);

END;

IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE Name = N'cd' AND Object_ID = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD cd varchar(50);
END;

IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE Name = N'shared_ind' AND Object_ID = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD shared_ind char(1);
END;

END;
Original file line number Diff line number Diff line change
@@ -1,34 +1,5 @@
IF EXISTS (SELECT 1 FROM sysobjects WHERE name = 'nrt_observation' and xtype = 'U')
BEGIN
IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE name = N'ctrl_cd_display_form' AND object_id = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD ctrl_cd_display_form varchar(20);
END;

IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE name = N'obs_domain_cd_st_1' AND object_id = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD obs_domain_cd_st_1 varchar(20);
END;

IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE name = N'processing_decision_cd' AND object_id = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD processing_decision_cd varchar(20);
END;

IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE name = N'cd' AND object_id = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD cd varchar(50);
END;

IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE name = N'shared_ind' AND object_id = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD shared_ind char(1);
END;

IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE name = N'status_cd' AND object_id = Object_ID(N'nrt_observation'))
BEGIN
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
IF EXISTS (SELECT 1 FROM sysobjects WHERE name = 'nrt_observation' and xtype = 'U')
BEGIN

IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE Name = N'cd_desc_txt' AND Object_ID = Object_ID(N'nrt_observation'))
BEGIN
ALTER TABLE nrt_observation
ADD cd_desc_txt varchar(1000);

This comment has been minimized.

Copy link
@upasanapattnaik-eq

upasanapattnaik-eq Oct 10, 2024

Collaborator

I think we can try renaming here instead.

END;

END;
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Observation {
private String obsDomainCdSt1;

@Column(name = "cd_desc_txt")
private String cdDescText;
private String cdDescTxt;

@Column(name = "record_status_cd")
private String recordStatusCd;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class ObservationReporting {
private String ctrlCdDisplayForm;
private String processingDecisionCd;
private String cd;
private String cdDescTxt;
private String sharedInd;

private String statusCd;
Expand Down

0 comments on commit 3d64deb

Please sign in to comment.