Skip to main content

visit_detail

Table name: visit_detail

Reading from encounters_clean_0_0.csv

Destination FieldSource fieldLogicComment field
person_idpatient_deiden_idPerson ID is the source ID from IDR after the project name and deidentification database intialization date.
visit_occurrence_idmerged_enc_id
visit_detail_source_idencounter_deiden_idPopulate encounter_deiden_id value
visit_detail_idAuto increment
visit_detail_start_dateadmit_datetimeencounter_effective_datemerged_admit_datetimevisit_detail_start_date is derived from admit_datetime. Please see the sheet map_table for additional mapping detailsWhen admit_datetime is null, populate visit_detail_start_date with encounter_effective_date
visit_detail_start_datetimeadmit_datetimeencounter_effective_datemerged_admit_datetimevisit_detail_start_datetime comes from admit_datetime. Please see the sheet map_table for additional mapping detailsWhen admit_datetime is null, populate visit_detail_start_datetime with encounter_effective_date and default time to midnight
visit_detail_end_datemerged_dischg_datetimedischg_datetimeadmit_datetimevisit_detail_end_date will be populated with the date derived from dischg_datetimeIf Dischg_datetime is null then populate visit_detail_end_date with the date derived from admit_datetime
visit_detail_end_datetimemerged_dischg_datetimedischg_datetimeadmit_datetimeIf discharge datetime is not 23:59, then populate visit_detail_end_datetime as dischg_datetimeIf Dischg_datetime is null(i.e; when missing or when time in Dischg_datetime is 23:59) then populate visit_detail_end_datetime with admit_datetime
visit_detail_concept_idencounter_typepatient_typeThe visit_detail_concept_id is derived from a curated map table based on the concatation of the patient and encounter types. Please see the sheet map_table for additional mapping details.
visit_detail_source_valueencounter_typepatient_typehospitalexternal_nameThis is a combination of patient type, encounter type, hospital, and external name.
care_site_idlocation_of_svchospitalUse combination of location_of_svc and hospital to lookup care site id
visit_detail_type_concept_idUse standard concept for EHR DATA 32817.
provider_idattending_dr_deiden_idPopulate attending_dr_deiden_id value
admitted_from_concept_idadmit_source
admitted_from_source_valueadmit_source
discharged_to_source_valuedischg_disposition
admitted_from_site_idNot Populated
discharged_to_concept_iddischg_dispositionThe discharge to Concept ID is derived from discharge disposition. Please see the sheet map_table for additional mapping details.
discharged_to_site_idNot Populated
or_case_numor_case_num
care_site_type_concept_idNot Populated
visit_detail_source_concept_idNot Populated
preceding_visit_detail_idPopulated through SQL
parent_visit_detail_idNot populated

Reading from internal_stations_clean_0_0.csv

Destination FieldSource fieldLogicComment field
person_idpatient_deiden_id
visit_occurrence_idmerged_enc_id
visit_detail_source_idencounter_deiden_idPopulate encounter_deiden_id value
visit_detail_idbatch_visit_detail_idencounter_deiden_idAuto increment
visit_detail_start_dateenter_datetime
visit_detail_start_datetimeenter_datetime
visit_detail_end_dateexit_datetime
visit_detail_end_datetimeexit_datetime
visit_detail_concept_idThe visit_detail_concept_id is derived from a curated map table based on the concatation of the patient and encounter types. Please see the sheet map_table for additional mapping details.
visit_detail_source_valueat_stationThis is a combination of patient type, encounter type, hospital, and external name.
care_site_idat_stationUse combination of location_of_svc and hospital to lookup care site id
visit_detail_type_concept_idUse standard concept for EHR DATA 32817.
provider_idPopulate attending_dr_deiden_id value
admitted_from_concept_idfrom_station
admitted_from_source_valuefrom_station
discharged_to_source_valuefrom_station
admitted_from_site_idfrom_stationNot Populated
discharged_to_concept_idfrom_station
discharged_to_site_idto_stationNot Populated
or_case_numor_case_num
care_site_type_concept_idNot Populated
visit_detail_source_concept_idNot Populated
preceding_visit_detail_idPopulated through SQL
parent_visit_detail_idNot populated