wiki:i2b2 HowTo Add the Concept codes to the Observation_Fact table

you will need to update the Load_observation_source Proc.

If this is not yet created in the Programmability folder for you database then create one based on the Brave or Briccs one.

within the Proc there are two CTE*s the first of which is the StudyData CTE`* and the second Facts which is made up of some union joins, it's the Facts area you will need to update.
*CTE = Common Table Expression

StudyData get the create record observations (for Redcap you'll have two, one for Gelnfield, Redcap and another for external, Redcap ext)

NB: In the LOAD_Observations_RedCap you will see this listed as 'create record' however in the LOAD_Observations_CiviCRM it will done via a series of joins e.g the LOAD_ValidEnrollments view joined to
civicrm_contact joined to...
... civicrm_value_genvasc_recruitment_data_5

The Second CTE is the Facts which have many many many union joins all for different types of data. including, but not limited to, the following:

  • Date Fields
  • Exist if '1' Fields
  • Text and Enum Fields
  • Numeric Fields
  • Recruitment Site
  • Age at Interview

Work out which data type your fields are and add them to the appropriate Union join, it will then ensure the right values are inserted into the right variables.
NB: Whenever the variable is coded and will need decoding, it's a 'Text and Enum Fields'.

Last modified 6 years ago Last modified on 09/16/16 15:08:11
Note: See TracWiki for help on using the wiki.