error deploying release endtb 2.1.2

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)

@swathivarkala can you please help me out with this?

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

@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);
1 Like

Hello @mseaton and @jmbabazi ,

Did PIH face the issue described above or related in deploying endTB release 2.1.2?

Hello @wasim,

We haven’t experienced this error. I think you are using MSF’s version. In the past did you use any of our deployments steps located here?

Do you think maybe its an issue of missing/mixing a past version?

Currently our wiki is not up to date since we are using version 2.3.2 (bahmni verison 0.89-193) but we will work on updating the wiki.

Thanks @jmbabazi!

Yes we have only been deploying endtb using the config and code in the endtb github repo (that James linked to above).

The “DWB-eHealth” repo may have divergences from the “endtb” line… (some of which we’ve merged into the “endtb” line)…

Take care, Mark

Thank you @jmbabazi and @mogoodrich

IRD deploys all its releases from bahmni endTB Wiki here

Each time there is a new release, we have upgraded it step by step. So, no we should not have any issue of missing/mixing versions.

I suspect the issue is with the migration scripts especially HepCTreatInit.xml as I pointed out above. I am not sure if there is a workaround that I can try if those scripts are not fixed in the repo.

Thanks @wasim, makes sense… I had thought that IRD was going to start using the version of endTB that we had set up in the new endTB github repo… that was the original intent, I think. I guess things didn’t end up that way though.

As @jmbabazi said, we are deploying a slightly different version.

Take care, Mark

Hi Sudhamsh,

In HepcTreatInitation.xml there is this statement:

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

Where is exactly the concept HTI, Hepatitis C study number being created?

In HepcTreatOutcome.xml there is a concept HTO, Hepatitis C study number but I am assuming this is different from HTI, Hepatitis C study number

Thanks in advance for your support.

Wasim