wiki:i2b2 Data Import PATS Mapping v1

Version 36 (modified by Richard Bramley, 12 years ago) ( diff )

--

Back

The PATS mappings are split into text and numeric fields.

Text Fields

Text fields are mapped to the i2b2 Observation Fact table like this

i2b2 FieldSource
Encounter_Numi2b2 Patient ID
Patient_Numi2b2 PatientID
Concept_CdEnum lookup value (see below)
Provider_Id"@"
Start_DateThe source table observation date field (see below)
Modifier_Cd"@"
ValType_Cd"T" (text)
Units_Cd"@"
Location_Cd"@"
Update_DateThe current date using the GETDATE() Function
SourceSystem_Cd"BRICCS"
Upload_Id"1"

SOMETIME (RB): Convert Update_Date to use a date parameter. It's just a little quicker.

SOMETIME (RB): Should the SourceSystem_Cd not be "PATS"? Or maybe "MINAP" or whatever.

SOMETIME (RB): The Upload_Id is presumably always one because everything is reloaded each time. Might be nice to change this to something more meaningful.

Enum Lookup Value

The Concept Code to use is found in the table DATA_DICTIONARY_ENUM_VALUES in the DWBRICCS database on UHLDWH server. This table contains records for concept code keyed on source table name, column name and column value. NULL column values may be mapped to the field '(empty)'.

ACTION (RB): Check if all possible values of column value contain a mapping in the DATA_DICTIONARY_ENUM_VALUES table.

Source Table Observation Date Field

For each source table in the there is a single field that is used as the start date for all columns from that field. The observation date field to use for each table is stored in the pats_tables table in the DWBRICS on the UHLDWH server.

Numeric Fields

Numeric fields are mapped to the i2b2 Observation Fact table like this

i2b2 FieldSource
Encounter_Numi2b2 Patient ID
Patient_Numi2b2 PatientID
Concept_Cd"PTS:{TABLE_NAME}_{COLUMN_ID}"
Provider_Id"@"
Start_DateThe source table observation date field (see above)
Modifier_Cd"@"
ValType_Cd"N" (numeric)
TVal_Char"E" (see below)
Units_CdValue calculated by ufn_get_units function (see below)
Location_Cd"@"
Update_DateThe current date using the GETDATE() Function
SourceSystem_Cd"BRICCS"
Upload_Id"1"

TVal_Char

The TVal_Char describes the meaning of the value contained in the NVal_Num field.

For all values currently the value of TVal_Char is set to "E", which means equals. That is, the value in the NVal_Num field is the result of the test. All possible values of TVal_Char are:

ValueMeaning
EEquals
NENot Equal
LLess Than
LELess Than or Equals
GGreater Than
GEGreater Than or Equals

From a casual look at the data, I think that a value of less than X, or greater than Y is sometimes used for Pathology data.

ufn_get_units Function

The function ufn_get_units in the DWBRICCS database is called with parameters of table_name and field_name to determine the units.

ACTION (RB): Work out what this function actually does and then move the logic into a join if possible. This should be clearer and also quicker.

Tables

The PATS i2b2 data integration load maps source table types to either Text or Numeric. All other types are ignored. The mapping is as follows.

Source Typei2b2 Type
VARCHARText
INT or FLOATNumeric
All other typesNOT LOADED

In addition, all fields with certain names are also ignored.

Ignored Field Names

Comments about data:

COMMENT (RB): Which fields should be removed?

COMMENT (RB): All date fields are ignored, but could they be converted into numeric fields. For example, length of stay, time between stays, etc. This may already be being done.

COMMENT (RB): There are quite a few denormalised fields. For example: drug1, drug2 - could these be normalised into one concept code. Or: readmittedDate1, readmittedDate2 - could these be different encounters? Are these already being recorded?

COMMENT (RB): Some dates are recorded as varchars and so presumably are being imported

COMMENT (RB): Are some text fields also being ignored because they don't have entries in the enum data dictionary? Yes they are ignored.

ACTION (RB): Rewrite extracting of varchar fields to check that there are any entries in the ENUM Data Dictionary for that field. This should reduce the number of queries that need to be run in the for each and speed things up quite a bit.

CATH_CATHINITIALVW

Field NameColumn IDTypeComments
EntryId1intIgnored For Field Name
PatientId2intIgnored For Field Name
DateofCatheter3dateIgnored For Datatype
TimeofCatheter4timeIgnored For Datatype
EntryStatus5varchar
PreviousEntry6intIgnored For Field Name
NextEntry7intIgnored For Field Name
DateOfAdmission8dateIgnored For Datatype
AgeAtCatheter9int
DoneInMobileLab10varchar
Consultant11varcharIgnored For No Enum
Operator12varcharIgnored For No Enum
SecondOperator13varcharIgnored For No Enum
Technician14varcharIgnored For No Enum
PatientType15varchar
WasThePatientCatheterised16varchar
ProcedureType17varchar
GeneralAnaesthetics18varchar
ProcedureSite19varcharIgnored For No Enum
BiopsyTaken20varchar
BiopsySite21varchar
OtherProcedure22varcharIgnored For No Enum
Arterial_123varchar
Vessel_1_Arterial24varchar
Complicated_1_Arterial25varchar
Arterial_226varchar
Vessel_2_Arterial27varchar
Complicated2Arterial28varchar
Arterial_329varchar
Vessel_3_Arterial30varchar
Complicated_3_Arterial31varchar
Venous_132varchar
Vessel_1_Venous33varchar
Complicated_1_Venous34varchar
Venous_235varchar
Vessel_2_Venous36varchar
Complicated_2_Venous37varchar
Venous_338varchar
Vessel_3_Venous39varchar
Complicated_3_Venous40varchar
Vessels41varcharIgnored For No Enum
ReturnedTo42varchar
FurtherProcedure43varchar
ImmediateComplications44varchar
ProcedureAbandoned45varchar
ReasonForAbandoningProcedure46varchar
OtherComplications47varcharIgnored For No Enum
DiedInCathLab48varchar
CoronaryDisease49varchar
SignificantValveDisease50varchar
SignificantLvDisease51varchar
Outcome52varchar
ReturnToCathLab53varchar
EmbolicSequelae54varchar
NonEmergencySurgery55varchar
GroinComplication56varchar
Death57varchar
DischargeComplications58varchar
OutcomeOfCatheter59varchar
DateOfDischarge60dateIgnored For Datatype
DateOfDeath61dateIgnored For Datatype
DischargeTo62varchar
PreopStay_days63int
PostOpStay_days64int
TotalHospitalStay65int
IhdScore_cardwl66int
NihdScore_cardwl67int
OtherComplicationsPreDischarge68varchar
DateOfDeathPostDischarge69dateIgnored For Datatype
PostProcedureDeathInterval_days70int
FormsVerified71varchar
Contract72varcharIgnored For No Enum
Pcg73varcharIgnored For No Enum
AuditLoopClosed74varchar
DateAuditLoopClosed75dateIgnored For Datatype
ReasonAuditLoopClosed76varchar
IntervalBetweenProc_LoopClosed_days77int
DateOnWaitingList78dateIgnored For Datatype
DaysOnList79int
GpPracticeCode80varcharIgnored For No Enum
Pct81varcharIgnored For No Enum
MedicalRecordNumber82varcharIgnored For No Enum
AdministrativeCategory83varchar
AuditTrail84textIgnored For Datatype
DateAndTimeOfProcedure85varcharIgnored For No Enum
IsThisAcs86varchar
Sub_Xiphoid87varchar
PreDischargeComplications88varchar
IfOtherPreDischargeComplicationsPleaseState89varchar
Height90float
Weight91float
Bmi92float
ScreeningTime93float
ScreeningDose94float
ExceededDrl95varchar
Radiographer96varchar
ReasonForExceedingDrl97varchar
CatheterProcedureReport98varcharIgnored For No Enum
ConsultantCode99varcharIgnored For No Enum
OperatorCode100varcharIgnored For No Enum
SecondOperatorCode101varcharIgnored For No Enum
TroponinPositive102varchar
DateOfCurrentStatus103dateIgnored For Datatype
DateOfEndStatus104dateIgnored For Datatype
DateTimeRecordCreated105varcharIgnored For No Enum
DateTimeRecordLastChanged106varcharIgnored For No Enum
EnteredByTag107varchar
EntryCurrentStatus108varchar
EntryEndStatus109varchar
HospitalTag110varchar
ImportLinkId111int

CS2003F_PostProcedure

Field NameColumn IDTypeComments

CS2003F_PreProcedure

Field NameColumn IDTypeComments

CS2010F_PostProcedure

Field NameColumn IDTypeComments

CS2010F_PreProcedure

Field NameColumn IDTypeComments

EPS_EPSINIVW

Field NameColumn IDTypeComments

GGHMINAP_GGHMINAP

Field NameColumn IDTypeComments

GGHMINAPNEW

Field NameColumn IDTypeComments

GGHMINAPNEW_GGHMINAPINIVW

Field NameColumn IDTypeComments

GGHPACEICD_GGHPACEICDINIALVW

Field NameColumn IDTypeComments

GGHPCI_FLWGGHPCIVIEW

Field NameColumn IDTypeComments

GGHPCI_INITIALGGHPCIVIEW

Field NameColumn IDTypeComments

LRIMINAPNEW

Field NameColumn IDTypeComments

LRIMINAPNEW_LRIMINAPNEWINITIALVW

Field NameColumn IDTypeComments

VERTED_VERTEDINIALVW

Field NameColumn IDTypeComments
Note: See TracWiki for help on using the wiki.