Server (Cells) Design
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:
may have an unlimited number of optional columns but their data types and coding systems are specific to the local implementation. The default visit table is shown below. 

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 VISIT_DIMENSION table has one required column and two that should be present if at all possible :  

REQUIRED: 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.

IMPORTANT: START_DATE

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

IMPORTANT: END_DATE

  • Can be null.
  • Contains the date the event ended.
  • Date-time field.
Info Box
titleInfo
  • 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.


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.

  • and the ACTIVE_STATUS_CD is used to record whether the event is still going on.


...

ACTIVE_STATUS_CD is intended to record whether an event is still going on. The schema below is not presently implemented, but it could be used within an ontology.

  • 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.

...

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

...