error deploying release endtb 2.1.2

endtb
Tags: #<Tag:0x00007efda8e12f38>

(Wasim Khan) #1

Hi,

I am upgrading bahmni 2.1.2 from 2.1.1 on our test instance. I am getting an error while running liquibase migrations. Log is attached. To summarise, the error says that “Column ‘concept_id’ cannot be null, while executing stored procedure add_concept_set_members”.

Can anyone please guide me how to resolve this issue?

erro_log_2_1_2.txt (7.7 KB)


(Wasim Khan) #2

@swathivarkala can you please help me out with this?


(sudhamsh kandukuri) #3

Hi Wasim

The error is from this changeset which is called from liquibase.xml file here

The error talks about no value for concept3_id under the changeset of ‘ENDTB-201807021248’ the value of this concept3_id variable is set in the changeset file which is called here

I see from the migrations of HepcTreatOutcome.xml file is not run before running HepcTreatInitation.xml hence the error


(Wasim Khan) #4

@sudhamsh I am deploying following instructions from here

Am I right in assuming that anyone who tries to deploy endtb 2.1.2 from the above link will face the same issue? If yes, then this <changeSet id=“ENDTB-201807021248” author=“Sudhamsh”> needs to be fixed, right?

What I believe is causing the issue is that when executing stored procedure add_concept_set_members for @concept3_id is found to be null, because if you see there is no

set @concept3_id=concept_id 

statement present. Perhaps the following statement:

select concept_id into @child3_concept_id from concept_view where concept_full_name = 'HTI, Hepatitis C study number';

should change to

        select concept_id into @concept3_id from concept_view where concept_full_name = 'HTI, Hepatitis C study number';

following is some part of changeset for reference:

 <changeSet id="ENDTB-201807021248" author="Sudhamsh">
<sql>
    call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'HTI, Has the patient started DAA treatment?', 'Has the patient started DAA treatment?', 'Coded','Misc', FALSE);
    set @concept1_id = @concept_id;
    call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'HTI, Has the patient signed a consent form for the Hepatitis C Study?', 'Consent for Hepatitis C Study signed?' , 'Coded','Misc', FALSE);
    set @concept2_id = @concept_id;
    select concept_id into @child3_concept_id from concept_view where concept_full_name = 'HTI, Hepatitis C study number';
    call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'HTI, DAA treatment start date:', 'DAA treatment start date:', 'Date','Misc', FALSE);
    set @concept4_id = @concept_id;
    call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'HTI, Reason to start DAA at this time (chose all those that apply)', 'Reason to start DAA at this time (chose all those that apply)', 'Coded','Misc', FALSE);
    set @concept5_id = @concept_id;
    call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'HTI, Other reasons to start DAA', 'Other reasons to start DAA', 'Text','Misc', FALSE);
    set @concept6_id = @concept_id;
    call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'HTI, Reason that DAA was not given during the study period', 'Reason that DAA was not given during the study period', 'Coded','Misc', FALSE);
    set @concept7_id = @concept_id;
    call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, 'HTI, Other reason not to start DAA during study period', 'Other reason not to start DAA during study period', 'Text','Misc', FALSE);
    set @concept8_id = @concept_id;
    call add_concept(@concept_id, @concept_name_short_id, @concept_name_full_id, "Hep C Treatment Initiation Template", "Hep C Treatment Initiation", 'N/A', "Misc", TRUE);

    call add_concept_set_members (@concept_id,@concept1_id,1);
    call add_concept_set_members (@concept_id,@concept2_id,2);
    call add_concept_set_members (@concept_id,@concept3_id,3);