Skip to content

Commit

Permalink
OMOPdrug procedure updated for removed columns in 5.2=
Browse files Browse the repository at this point in the history
  • Loading branch information
jklann committed Mar 26, 2018
1 parent 2dc485e commit b47e259
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MSSQL/OMOPLoader.sql
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,8 @@ person_id -----------------------> patient_num unique identifier for the patie
, days_supply --------------------------> from ontology \PCORI_MOD\RX_DAYS_SUPPLY ----------> Done
, sig----------------------------> The directions "signetur" on the Drug prescription as recorded in the original prescription or dispensing record -- Passing the frequency---> Done
, route_concept_id ---------------> routes of administrating medication oral, intravenous, etc... Need a mapping ---------------------------> NOT DONE
, effective_drug_dose ------------> Numerical Value of Drug dose for this Drug_Exposure... Do we have this? --> No
, dose_unit_concept_id -----------> UCUM Codes concpet c where c.vocabulary_id = 'UCUM and c.standard_concept='S' and c.domain_id='Unit'----> NOT DONE
-- NOT IN 5.2 -- , effective_drug_dose ------------> Numerical Value of Drug dose for this Drug_Exposure... Do we have this? --> No
-- NOT IN 5.2 -- , dose_unit_concept_id -----------> UCUM Codes concpet c where c.vocabulary_id = 'UCUM and c.standard_concept='S' and c.domain_id='Unit'----> NOT DONE
, lot_number ----------------------> varchar... do we have this value?------------------------> No
, provider_id ---------------------> (Set to 0 for Data Sprint 2)-----------------------------> Done
, visit_occurrence_id -----------------> observation_fact.encounter_num i2b2 id for the encounter (visit)-> Done
Expand All @@ -918,9 +918,9 @@ 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 datetime), m.end_date, cast(m.end_date as datetime), '0', null
select distinct m.patient_num, omap.concept_id, m.start_date, cast(m.start_Date as datetime), isnull(m.end_date,m.start_date), cast(isnull(m.end_date,m.start_date) as datetime), '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
, 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
Expand Down

0 comments on commit b47e259

Please sign in to comment.