Server (Cells) Design
Space shortcuts
Space Tools
Skip to end of metadata
Go to start of metadata

The VISIT_DIMENSION table represents sessions where observations were made. Each row represents one session (also called a visit, event or encounter). This session can involve a patient directly, such as a visit to a doctor's office, or it can involve the patient indirectly, as in when several tests are run on a tube of the patient's blood. More than one observation can be made during a visit. All visits must have a start date / time associated with them, but they may or may not have an end date. The visit record also contains specifics about the location of the session, such as the hospital or clinic the session occurred and whether the patient was an inpatient or an outpatient at the time of the visit.
Starting from version 1.6, this table will support custom columns apart from the required ones. The custom column in the table follows the same setup rule as the ones in the PATIENT_DIMENSION table. Please refer to the PATIENT_DIMENSION section for the data type mapping information.
The VISIT_DIMENSION table has the following four REQUIRED columns:

  1. ENCOUNTER_NUM
  • It is the primary key for the table; therefore it cannot contain duplicates.
  • Cannot be null.
  • Holds a reference number for the patient within the data repository.
  • Integer field.


  1. START_DATE
  • Cannot be null.
  • Contains the date the event began.
  • Date-time field.


  1. END_DATE
  • Can be null.
  • Contains the date the event ended.
  • Date-time field.


  • A visit is considered to be an event; there is a distinct beginning and ending date and time for the event. However, these dates may not be recorded and the ACTIVE_STATUS_CD is used to record whether the event is still going on.



  1. ACTIVE_STATUS_CD
  • Contains a code that represents the status of an event along with the precision of the available dates.
  • Conceptually it is very similar to the VITAL_STATUS_CD column in the PATIENT_DIMENSION table.
  • The code consists of two characters; the first one represents the validity of the END_DATE and the second one is for the START_DATE.
  • These values are:


KEY:
"*" means that a second character should be the start date indicator (if exists)
"_" means that a first character should be the end date indicator (if exists)

Date Explained

Value

Description

 

End date

U*

Unknown

corresponds to a null END_DATE

End date

O*

Ongoing

corresponds to a null END_DATE

End date

(null)*

Known

END_DATE accurate to day

End date

Y*

Known

END_DATE accurate to day

End date

M*

Known

END_DATE accurate to month

End date

X*

Known

END_DATE accurate to year

End date

R*

Known

END_DATE accurate to hour

End date

T*

Known

END_DATE accurate to minute

End date

S*

Known

END_DATE accurate to second

 

 

 

 

Start date

_L

Unknown

corresponds to a null START_DATE

Start date

_A

Active

corresponds to a null START_DATE

Start date

_(null)

Ongoing

START_DATE accurate to day

Start date

_D

Ongoing

START_DATE accurate to day

Start date

_B

Known

START_DATE accurate to month

Start date

_F

Known

START_DATE accurate to year

Start date

_H

Known

START_DATE accurate to hour

Start date

_I

Known

START_DATE accurate to minute

Start date

_C

Known

START_DATE accurate to second



  • The codes for this field were determined arbitrarily as there was no standardized coding system for their representation.



The VISIT_DIMENSION table may have an unlimited number of optional columns but their data types and coding systems are specific to the local implementation. An example of a visit table is shown below. In the example table, there are eight optional columns.

VISIT_DIMENSION

 

 

PK

ENCOUNTER_NUM

int

 

PATIENT_NUM

int

 

ACTIVE_STATUS_CD

varchar(50)

 

START_DATE

datetime

 

END_DATE

datetime

 

INOUT_CD

varchar(50)

 

LOCATION_CD

varchar(50)

 

VISIT_BLOB

text

 

UPDATE_DATE

datetime

 

DOWNLOAD_DATE

datetime

 

IMPORT_DATE

datetime

 

SOURCESYSTEM_CD

varchar(50)

 

UPLOAD_ID

int



The rules for using the codes in the columns to perform queries are represented in the metadata and the values within the columns follow a similar pattern as previously described for the PATIENT_DIMENSION table.

  • No labels