We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

problems with CRF upload

Good day,
I have following error, while trying to upload new CRF. There is a part of communicate in Polish that can be translated +/- like that ERROR: empty value in column "item_id" violates restictions of required value.
I can see on the CRFs list one CRF, that has no version at all.
I would be grateful for any help.
Kind regards,
Daniel
INSERT INTO CRF_VERSION (NAME,DESCRIPTION, CRF_ID, STATUS_ID,DATE_CREATED,OWNER_ID,REVISION_NOTES,OC_OID) VALUES ('2','v2',191,1,NOW(),2,'Wersja2','F_MP2810323334_2')
INSERT INTO SECTION (CRF_VERSION_ID,STATUS_ID,LABEL, TITLE, INSTRUCTIONS, SUBTITLE, PAGE_NUMBER_LABEL,ORDINAL, PARENT_ID, OWNER_ID, DATE_CREATED,BORDERS) VALUES ((SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191),1,'32-34','Pages 32-34', '', '','',1,0,2,NOW(),0)
INSERT INTO RESPONSE_SET (LABEL, OPTIONS_TEXT, OPTIONS_VALUES, RESPONSE_TYPE_ID, VERSION_ID) VALUES ('text', E'text','text',(SELECT RESPONSE_TYPE_ID From RESPONSE_TYPE Where NAME='text'),(SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191))
The following error was returned from the database: BŁĄD: pusta wartość w kolumnie "item_id" narusza ograniczenie wymaganej wartości using the following query: INSERT INTO ITEM_FORM_METADATA (CRF_VERSION_ID, RESPONSE_SET_ID,ITEM_ID,SUBHEADER,HEADER,LEFT_ITEM_TEXT,RIGHT_ITEM_TEXT,PARENT_ID,SECTION_ID,ORDINAL,PARENT_LABEL,COLUMN_NUMBER,PAGE_NUMBER_LABEL,question_number_label,REGEXP,REGEXP_ERROR_MSG,REQUIRED,DEFAULT_VALUE,RESPONSE_LAYOUT,WIDTH_DECIMAL, show_item) VALUES ((SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191),(SELECT RESPONSE_SET_ID FROM RESPONSE_SET WHERE LABEL='text' AND VERSION_ID=(SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191)), (SELECT I.ITEM_ID FROM ITEM I LEFT OUTER JOIN ITEM_FORM_METADATA IFM ON I.ITEM_Id = IFM.ITEM_ID LEFT OUTER JOIN CRF_VERSION CV ON IFM.CRF_VERSION_ID = CV.CRF_VERSION_ID WHERE ( I.NAME='fu_call_date' AND I.owner_id = 2 AND CV.CRF_VERSION_ID is null ) OR ( I.NAME='fu_call_date' AND I.owner_id = 2 AND CV.CRF_VERSION_ID is not null AND CV.CRF_ID =191 ) ORDER BY I.OID DESC LIMIT 1) ,'','','Date of call','',0, (SELECT SECTION_ID FROM SECTION WHERE LABEL='32-34' AND CRF_VERSION_ID IN (SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191)), 1,'',1,'32','','','', false, '','','',true)
--
Daniel Rabczenko
Department-Centre for Monitoring and Analyses
of Population Health Status
National Institute of Public Health -
National Institute of Hygiene
Chocimska 24
00-791 Warsaw
Poland
tal: +48 22 54 21 236
fax: +48 22 54 21 315

Comments

  • Hi Daniel,

    In your database do you already have other items called 'fu_call_date'? More importantly, how many rows do you generate when you run the internal query to grab the item_id?

    SELECT I.ITEM_ID FROM ITEM I LEFT OUTER JOIN ITEM_FORM_METADATA IFM ON I.ITEM_Id = IFM.ITEM_ID LEFT OUTER JOIN CRF_VERSION CV ON IFM.CRF_VERSION_ID = CV.CRF_VERSION_ID WHERE ( I.NAME='fu_call_date' AND I.owner_id = 2 AND CV.CRF_VERSION_ID is null ) OR ( I.NAME='fu_call_date' AND I.owner_id = 2 AND CV.CRF_VERSION_ID is not null AND CV.CRF_ID =191

    I think you will have to rename the item in your form in order to proceed.

    Hope that helps, Tom

    Tom Hickerson | Senior Tier-2 Engineer
    [email protected]
    Register now for the 2012 OpenClinica Conference!
    http://community.openclinica.com/conference
  • haenselhaensel Posts: 602 ✭✭✭
    Hi Daniel
    Other users reported this error when they uploaded invalid crfs.
    a. there have been item_names with '
    b. there was a sub header with more than 240 characters
    Having a look onto your CRF might be of use if this doesn't help.
    Regards,
    Christian
    On 29.2.2012 13:15, Daniel Rabczenko wrote:
    > Good day,
    > I have following error, while trying to upload new CRF. There is a part of communicate in Polish that can be translated +/- like that ERROR: empty value in column "item_id" violates restictions of required value.
    > I can see on the CRFs list one CRF, that has no version at all.
    > I would be grateful for any help.
    > Kind regards,
    > Daniel
    >
    >
    > INSERT INTO CRF_VERSION (NAME,DESCRIPTION, CRF_ID, STATUS_ID,DATE_CREATED,OWNER_ID,REVISION_NOTES,OC_OID) VALUES ('2','v2',191,1,NOW(),2,'Wersja2','F_MP2810323334_2')
    > INSERT INTO SECTION (CRF_VERSION_ID,STATUS_ID,LABEL, TITLE, INSTRUCTIONS, SUBTITLE, PAGE_NUMBER_LABEL,ORDINAL, PARENT_ID, OWNER_ID, DATE_CREATED,BORDERS) VALUES ((SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191),1,'32-34','Pages 32-34', '', '','',1,0,2,NOW(),0)
    > INSERT INTO RESPONSE_SET (LABEL, OPTIONS_TEXT, OPTIONS_VALUES, RESPONSE_TYPE_ID, VERSION_ID) VALUES ('text', E'text','text',(SELECT RESPONSE_TYPE_ID From RESPONSE_TYPE Where NAME='text'),(SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191))
    > The following error was returned from the database: BŁĄD: pusta wartość w kolumnie "item_id" narusza ograniczenie wymaganej wartości using the following query: INSERT INTO ITEM_FORM_METADATA (CRF_VERSION_ID, RESPONSE_SET_ID,ITEM_ID,SUBHEADER,HEADER,LEFT_ITEM_TEXT,RIGHT_ITEM_TEXT,PARENT_ID,SECTION_ID,ORDINAL,PARENT_LABEL,COLUMN_NUMBER,PAGE_NUMBER_LABEL,question_number_label,REGEXP,REGEXP_ERROR_MSG,REQUIRED,DEFAULT_VALUE,RESPONSE_LAYOUT,WIDTH_DECIMAL, show_item) VALUES ((SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191),(SELECT RESPONSE_SET_ID FROM RESPONSE_SET WHERE LABEL='text' AND VERSION_ID=(SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191)), (SELECT I.ITEM_ID FROM ITEM I LEFT OUTER JOIN ITEM_FORM_METADATA IFM ON I.ITEM_Id = IFM.ITEM_ID LEFT OUTER JOIN CRF_VERSION CV ON IFM.CRF_VERSION_ID = CV.CRF_VERSION_ID WHERE ( I.NAME='fu_call_date' AND I.owner_id = 2 AND CV.CRF_VERSION_ID is null ) OR ( I.NAME='fu_call_date' AND I.owner_id = 2 AND CV.CRF_VERSION_ID is not null AND CV.CRF_ID =191 ) ORDER BY I.OID DESC LIMIT 1) ,'','','Date of call','',0, (SELECT SECTION_ID FROM SECTION WHERE LABEL='32-34' AND CRF_VERSION_ID IN (SELECT CRF_VERSION_ID FROM CRF_VERSION WHERE NAME ='2' AND CRF_ID=191)), 1,'',1,'32','','','', false, '','','',true)
    > --
    > Daniel Rabczenko
    > Department-Centre for Monitoring and Analyses
    > of Population Health Status
    > National Institute of Public Health -
    > National Institute of Hygiene
    > Chocimska 24
    > 00-791 Warsaw
    > Poland
    > tal: +48 22 54 21 236
    > fax: +48 22 54 21 315
    >
    >
    >
  • Hello Tom,
    Changing fu_call_date for fu_call_dat1 helped.
    Christian thank you for your help!
    Kind regards,
    Daniel
    W dniu 2012-02-29 13:48, Tom Hickerson pisze:
    > Hi Daniel,
    >
    > In your database do you already have other items called 'fu_call_date'? More importantly, how many rows do you generate when you run the internal query to grab the item_id?
    >
    > SELECT I.ITEM_ID FROM ITEM I LEFT OUTER JOIN ITEM_FORM_METADATA IFM ON I.ITEM_Id = IFM.ITEM_ID LEFT OUTER JOIN CRF_VERSION CV ON IFM.CRF_VERSION_ID = CV.CRF_VERSION_ID WHERE ( I.NAME='fu_call_date' AND I.owner_id = 2 AND CV.CRF_VERSION_ID is null ) OR ( I.NAME='fu_call_date' AND I.owner_id = 2 AND CV.CRF_VERSION_ID is not null AND CV.CRF_ID =191
    >
    > I think you will have to rename the item in your form in order to proceed.
    >
    > Hope that helps, Tom
    >
    > Tom Hickerson | Senior Tier-2 Engineer
    > [email protected]
    > Register now for the 2012 OpenClinica Conference!
    > http://community.openclinica.com/conference
    >
    >
This discussion has been closed.