# Table VISIT_DETAIL

# Tables et variables utilisées dans le SNDS

T_MCOaaUM
  • eta_num
  • rsa_num
  • eta_num_geo
  • aut_typ1_um
  • par_dur_sej
  • um_ord_num
T_SSRaaB
  • eta_num
  • rha_num
  • aut_typ_um
  • rhs_num
  • rhs_ant_sej_ent
  • jp_hwe
  • jp_we
T_SSRaaC
  • eta_num
  • rha_num
  • exe_soi_dtd

# Tables utilisées dans le modèle OMOP

VISIT_OCCURRENCE
  • visit_occurrence_id
  • visit_occurrence_source_value
  • visit_occurrence_start_date
  • provider_id
SOURCE_TO_CONCEPT_MAP
  • Target_concept_id
  • Source_vocabulary_id
  • Concept_code
CARE_SITE
  • Care_site_id
  • Care_site_source_value

# Variables du format OMOP remplies

Variable Règle Type Clé primaire Clé étrangère Table de la clé étrangère
visit_detail_id* Use this to identify unique interactions between a person and the health care system. This identifier links across the other CDM event tables to associate events with a visit detail. integer Yes No
person_id* integer No Yes PERSON
visit_detail_ concept_id* This field contains a concept id representing the kind of visit detail, like inpatient or outpatient. All concepts in this field should be standard and belong to the Visit domain. integer No Yes CONCEPT
visit_detail_start_date* This is the date of the start of the encounter. This may or may not be equal to the date of the Visit the Visit Detail is associated with. date No No
visit_detail_start_datetime datetime No No
visit_detail_end_ date* This the end date of the patient-provider interaction. date No No
visit_detail_end_ datetime datetime No No
visit_detail_type_ concept_id* Use this field to understand the provenance of the visit detail record, or where the record comes from. integer No Yes CONCEPT
provider_id There will only be one provider per visit record and the ETL document should clearly state how they were chosen (attending, admitting, etc.). This is a typical reason for leveraging the VISIT_DETAIL table as even though each VISIT_DETAIL record can only have one provider, there is no limit to the number of VISIT_DETAIL records that can be associated to a VISIT_OCCURRENCE record. integer No Yes PROVIDER
care_site_id This field provides information about the Care Site where the Visit Detail took place. integer No Yes CARE_SITE
visit_detail_ source_value This field houses the verbatim value from the source data representing the kind of visit detail that took place (inpatient, outpatient, emergency, etc.) varchar(50) No No
visit_detail_source_concept_id Integer No Yes CONCEPT
preceding_visit_detail_id Use this field to find the visit detail that occurred for the person prior to the given visit detail record. There could be a few days or a few years in between. integer No Yes VISIT_DETAIL
visit_detail_parent_id Use this field to find the visit detail that subsumes the given visit detail record. This is used in the case that a visit detail record needs to be nested beyond the VISIT_OCCURRENCE/VISIT_DETAIL relationship. integer No Yes VISIT_DETAIL
visit_occurrence_id* Use this field to link the VISIT_DETAIL record to its VISIT_OCCURRENCE. integer No Yes VISIT_ OCCURRENCE

# PMSI MCO et SSR

Variables Règles Jointure Filtre
Gauche Droite
visit_detail_id* hash(visit_detail_source_value)
person_id* person_id de VISIT_OCCURRENCE cf jointure pour visit_occurrence_id
visit_detail_ concept_id* target_concept_id de SOURCE_TO_CONCEPT_MAP T_MCOaaUM aut_typ1_um T_SSRaaB aut_typ_um SOURCE_TO_ CONCEPT_MAP source_code source_vocabulary_id = ‘Type_um’
visit_detail_ start_date* MCO visit_start_date + délai calculé à partir de par_dur_sej et um_ord_num cf jointure pour visit_occurrence_id
SSR:
  • Si rhs_num = 1: visit_occurrence_start_date
  • Sinon : visit_occurrence_start_date + POSITION(‘1’ IN jp_hwe || jp_we) + rhs_ant_sej_ent - 1
visit_detail_ start_datetime visit_start_date + ‘00:00:00’
visit_detail_ end_date* MCO : visit_detail_start_date + délai calculé à partir de par_dur_sej et um_ord_num cf jointure pour visit_occurrence_id
SSR :
  • Si rhs_num = 1 :
visit_occurrence_start_date + POSITION(‘1’ IN REVERSE(jp_hwe||jp_we)) - POSITION(‘1’ IN jp_hwe||jp_we)
  • Sinon :
visit_occurrence_start_date + POSITION(‘1’ IN REVERSE(jp_hwe||jp_we)) + rhs_ant_sej_ent - 1
visit_detail_ end_datetime visit_end_date + ‘00:00:00’
visit_detail_type_ concept_id* 32810
provider_id provider_id de VISIT_OCCURRENCE cf jointure pour visit_occurrence_id
care_site_id care_site_id de CARE_SITE T_MCOaaUM eta_num_geo || _ || aut_typ1_um T_SSRaaB aut_typ_um CARE_SITE care_site_ source_value
visit_detail_ source_value
  • MCO : aut_typ1_um de T_MCOaaUM
  • SSR : aut_typ_um de T_SSRaaB
  • visit_detail_ source_concept_id 0
    preceding_ visit_detail_id SSR :
    • if rhs_num = 1 : null
    • else : hash(ssr || eta_num || rha_num || rhs_num-1)
    visit_occurrence_ id* visit_occurrence_id de VISIT_OCCURRENCE T_MCOaaUM ‘mcoaa’ || eta_num || rsa_num T_SSRaaB ‘ssr’ || eta_num || rha_num || exe_soi_dtd VISIT_ OCCURRENCE visit_occurrence_ source_value
    visit_detail_id_source_value
  • T_MCOaaUM : mcoaa || _ || eta_num || _ || rsa_num || _ || um_ord_num
  • T_SSRaaB : ‘ssr’ || _ || eta_num || _ || rha_num || _ || exe_soi_dtd || _ || rhs_num