[CORE-130] SQL stored procedure not inserting required data into PROJECT_ID Created: 04/Aug/14 Updated: 27/Oct/14 Resolved: 27/Oct/14 |
|
Status: | Closed |
Project: | i2b2 Core Software |
Component/s: | CRC Cell, Install |
Affects Version/s: | 1.7.01, 1.7.02 |
Fix Version/s: | 1.7.04 |
Type: | Bug | Priority: | Major |
Reporter: | Hong Luo | Assignee: | Janice Donahoe |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
i2b2 Sponsored Project/s: |
i2b2 Core
|
Affects Database/s: |
Oracle
|
Developer Notes: | Fixed already, except in Postgres which is unsupported in the Loader currently. |
Participant/s: |
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 ...... ) '; |
Comments |
Comment by Jeffrey Klann [ 29/Sep/14 ] |
This is fixed in MSSQL & Oracle. Postgres is untested. However, multiple projects are not supported by the loader - project_id is assigned '@'. |