Skip to content

Commit

Permalink
Fix bug: Columns dislocation in the 'emar' table.
Browse files Browse the repository at this point in the history
Columns dislocation due to duplicate column names when importing the 'emar' table. so update the load.sql.
  • Loading branch information
Scott1743 authored Aug 13, 2024
1 parent e58ecab commit 6967e91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mimic-iv/buildmimic/mysql/load.sql
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ LOAD DATA LOCAL INFILE 'emar.csv' INTO TABLE emar
FIELDS TERMINATED BY ',' ESCAPED BY '' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES
(@subject_id,@hadm_id,@emar_id,@emar_seq,@poe_id,@pharmacy_id,@enter_provider_id,@enter_provider_id,@charttime,@medication,@event_txt,@scheduletime,@storetime)
(@subject_id,@hadm_id,@emar_id,@emar_seq,@poe_id,@pharmacy_id,@enter_provider_id,@charttime,@medication,@event_txt,@scheduletime,@storetime)
SET
subject_id = trim(@subject_id),
hadm_id = IF(@hadm_id='', NULL, trim(@hadm_id)),
Expand Down

0 comments on commit 6967e91

Please sign in to comment.