Details
Description
The SQL procedure i2b2demodata. INSERT_PATIENT_FROMTEMP() throws the following Exception, “cannot insert NULL into ("I2B2DEMODATA"."PATIENT_MAPPING"."PROJECT_ID")
In the PATIENT_MAPPING table, COLUMN PROJECT_ID is defined as NOT NULL.
However, in the INSERT_PATIENT_FROMTEMP.sql, the SQL code tries to insert records into patient_mapping without setting the value for PROJECT_ID column. It throws the following Exception,
Cannot insert NULL into
("I2B2DEMODATA"."PATIENT_MAPPING"."PROJECT_ID")
The SQL code is as below.
"execute immediate ' insert into patient_mapping (patient_ide,patient_ide_source,patient_num,patient_ide_status, upload_id)
(select distinct ...... ) ';
In the PATIENT_MAPPING table, COLUMN PROJECT_ID is defined as NOT NULL.
However, in the INSERT_PATIENT_FROMTEMP.sql, the SQL code tries to insert records into patient_mapping without setting the value for PROJECT_ID column. It throws the following Exception,
Cannot insert NULL into
("I2B2DEMODATA"."PATIENT_MAPPING"."PROJECT_ID")
The SQL code is as below.
"execute immediate ' insert into patient_mapping (patient_ide,patient_ide_source,patient_num,patient_ide_status, upload_id)
(select distinct ...... ) ';