Skip to content

Commit

Permalink
filled in a couple of columns in drug_exposure procedure, and I updat…
Browse files Browse the repository at this point in the history
…ed the run script.
  • Loading branch information
matthewjoss committed Feb 13, 2017
1 parent 629067a commit 7abef91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions MSSQL/OMOPLoader.sql
Original file line number Diff line number Diff line change
Expand Up @@ -921,10 +921,10 @@ person_id -----------------------> patient_num unique identifier for the patie
, route_source_value ----------> Varchar ....Do we have this?-------yes-----------------------> NOT DONE
, dose_unit_source_value ----------> Varchar .....Do we have this?--yes-----------------------> NOT DONE
)
select distinct m.patient_num, omap.concept_id, m.start_date, cast(m.start_Date as time), m.end_date, cast(m.end_date as time), 1, null
select distinct m.patient_num, omap.concept_id, m.start_date, cast(m.start_Date as time), m.end_date, cast(m.end_date as time), '0', null
, refills.nval_num refills, quantity.nval_num quantity, supply.nval_num supply, substring(freq.pcori_basecode,charindex(':',freq.pcori_basecode)+1,2) frequency
, null, null, null, null
, 0, m.Encounter_num, mo.C_BASECODE, null, null, null
, 0, m.Encounter_num, mo.C_BASECODE, null, null, units_cd
from i2b2fact m
inner join pcornet_med mo on m.concept_cd = mo.c_basecode
inner join visit_occurrence enc on enc.person_id = m.patient_num and enc.visit_occurrence_id = m.encounter_Num
Expand Down
4 changes: 2 additions & 2 deletions MSSQL/run.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ delete from PMNenrollment
GO
exec PCORNetEnroll
GO
delete from pmnprescribing
delete from drug_exposure
GO
exec PCORNetPrescribing
exec OMOPdrug_exposure
GO
delete from pmndispensing
GO
Expand Down

0 comments on commit 7abef91

Please sign in to comment.