Skip to content

Commit

Permalink
tidy up columns
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairewj committed Feb 4, 2023
1 parent 4f3f4d0 commit 28a432e
Show file tree
Hide file tree
Showing 17 changed files with 80 additions and 70 deletions.
21 changes: 11 additions & 10 deletions content/en/docs/IV/modules/hosp/admissions.md
Expand Up @@ -22,20 +22,21 @@ The *admissions* table gives information regarding a patient's admission to the

Name | Postgres data type
---- | ----
`subject_id` | INTEGER
`hadm_id` | INTEGER
`admittime` | TIMESTAMP(0)
`dischtime` | TIMESTAMP(0)
`deathtime` | TIMESTAMP(0)
`admission_type` | VARCHAR(40)
`subject_id` | INTEGER NOT NULL
`hadm_id` | INTEGER NOT NULL
`admittime` | TIMESTAMP NOT NULL
`dischtime` | TIMESTAMP
`deathtime` | TIMESTAMP
`admission_type` | VARCHAR(40) NOT NULL
`admit_provider_id` | VARCHAR(10)
`admission_location` | VARCHAR(60)
`discharge_location` | VARCHAR(60)
`insurance` | VARCHAR(255)
`language` | VARCHAR(10)
`marital_status` | VARCHAR(80)
`ethnicity` | VARCHAR(80)
`edregtime` | TIMESTAMP(0)
`edouttime` | TIMESTAMP(0)
`marital_status` | VARCHAR(30)
`race` | VARCHAR(80)
`edregtime` | TIMESTAMP
`edouttime` | TIMESTAMP
`hospital_expire_flag` | SMALLINT

## Detailed description
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/IV/modules/hosp/d_hcpcs.md
Expand Up @@ -25,7 +25,7 @@ The *d_hcpcs* table is used to acquire human readable definitions for the codes

Name | Postgres data type
---- | ----
`code` | CHAR(5)
`code` | CHAR(5) NOT NULL
`category` | SMALLINT
`long_description` | TEXT
`short_description` | VARCHAR(180)
Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/IV/modules/hosp/d_icd_diagnoses.md
Expand Up @@ -22,9 +22,9 @@ This table defines International Classification of Diseases (ICD) Version 9 and

Name | Postgres data type
---- | ----
`icd_code` | VARCHAR(10)
`icd_version` | INTEGER
`long_title` | VARCHAR(300)
`icd_code` | CHAR(7) NOT NULL
`icd_version` | INTEGER NOT NULL
`long_title` | VARCHAR(255)

## Detailed Description

Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/IV/modules/hosp/d_icd_procedures.md
Expand Up @@ -23,9 +23,9 @@ This table defines International Classification of Diseases (ICD) codes for **pr

Name | Postgres data type
---- | ----
`icd_code` | VARCHAR(10)
`icd_version` | INTEGER
`long_title` | VARCHAR(300)
`icd_code` | CHAR(7) NOT NULL
`icd_version` | INTEGER NOT NULL
`long_title` | VARCHAR(255)

## Detailed Description

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/IV/modules/hosp/d_labitems.md
Expand Up @@ -19,7 +19,7 @@ Laboratory data contains information collected and recorded in the hospital labo

## Important considerations

This table used to contain a column called `loinc_code`, which store standardized identifiers for laboratory measurements. To support ongoing improvement of these labels, the assignment of LOINC codes is now done in the [MIMIC Code Repository](https://www.github.com/MIT-LCP/mimic-code).
This table used to contain a column called `loinc_code`, which stored standardized identifiers for laboratory measurements. To support ongoing improvement of these labels, the assignment of LOINC codes is now done in the [MIMIC Code Repository](https://www.github.com/MIT-LCP/mimic-code).

## Table columns

Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/IV/modules/hosp/diagnoses_icd.md
Expand Up @@ -21,9 +21,9 @@ Diagnoses are billed on hospital discharge, and are determined by trained person

Name | Postgres data type
---- | ----
`subject_id` | INTEGER
`hadm_id` | INTEGER
`seq_num` | INTEGER
`subject_id` | INTEGER NOT NULL
`hadm_id` | INTEGER NOT NULL
`seq_num` | INTEGER NOT NULL
`icd_code` | VARCHAR(7)
`icd_version` | INTEGER

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/IV/modules/hosp/drgcodes.md
Expand Up @@ -4,7 +4,7 @@ linktitle: "drgcodes"
weight: 1
date: 2020-08-10
description: >
Billed DRG codes for hospitalizations.
Billed diagnosis related group (DRG) codes for hospitalizations.
---

## *drgcodes*
Expand Down
8 changes: 5 additions & 3 deletions content/en/docs/IV/modules/hosp/emar.md
Expand Up @@ -29,13 +29,15 @@ Records in this table are populated by bedside nursing staff scanning barcodes a
Name | Postgres data type
---- | ----
`subject_id` | INTEGER NOT NULL
`hadm_id` | INTEGER NOT NULL
`emar_id` | VARCHAR(100) NOT NULL
`hadm_id` | INTEGER
`emar_id` | VARCHAR(25) NOT NULL
`emar_seq` | INTEGER NOT NULL
`poe_id` | VARCHAR(25) NOT NULL
`pharmacy_id` | INTEGER
`enter_provider_id` | VARCHAR(10)
`charttime` | TIMESTAMP NOT NULL
`medication` | TEXT
`event_txt` | TEXT
`event_txt` | VARCHAR(100)
`scheduletime` | TIMESTAMP
`storetime` | TIMESTAMP NOT NULL

Expand Down
16 changes: 8 additions & 8 deletions content/en/docs/IV/modules/hosp/emar_detail.md
Expand Up @@ -28,13 +28,13 @@ Name | Postgres data type
`subject_id` | INTEGER NOT NULL
`emar_id` | VARCHAR(25) NOT NULL
`emar_seq` | INTEGER NOT NULL
`parent_field_ordinal` | NUMERIC(5, 3)
`parent_field_ordinal` | VARCHAR(10)
`administration_type` | VARCHAR(50)
`pharmacy_id` | INTEGER
`barcode_type` | VARCHAR(4)
`reason_for_no_barcode` | TEXT
`complete_dose_not_given` | VARCHAR(5)
`dose_due` | VARCHAR(50)
`dose_due` | VARCHAR(100)
`dose_due_unit` | VARCHAR(50)
`dose_given` | VARCHAR(255)
`dose_given_unit` | VARCHAR(50)
Expand All @@ -44,17 +44,17 @@ Name | Postgres data type
`product_code` | VARCHAR(30)
`product_description` | VARCHAR(255)
`product_description_other` | VARCHAR(255)
`prior_infusion_rate` | VARCHAR(20)
`infusion_rate` | VARCHAR(20)
`prior_infusion_rate` | VARCHAR(40)
`infusion_rate` | VARCHAR(40)
`infusion_rate_adjustment` | VARCHAR(50)
`infusion_rate_adjustment_amount` | VARCHAR(30)
`infusion_rate_unit` | VARCHAR(30)
`route` | VARCHAR(5)
`infusion_complete` | VARCHAR(255)
`completion_interval` | VARCHAR(30)
`route` | VARCHAR(10)
`infusion_complete` | VARCHAR(1)
`completion_interval` | VARCHAR(50)
`new_iv_bag_hung` | VARCHAR(1)
`continued_infusion_in_other_location` | VARCHAR(1)
`restart_interval` | VARCHAR(30)
`restart_interval` | TEXT
`side` | VARCHAR(10)
`site` | VARCHAR(255)
`non_formulary_visual_verification` | VARCHAR(1)
Expand Down
10 changes: 5 additions & 5 deletions content/en/docs/IV/modules/hosp/hcpcsevents.md
Expand Up @@ -23,12 +23,12 @@ description: >

Name | Postgres data type
---- | ----
`subject_id` | INTEGER
`hadm_id` | INTEGER
`subject_id` | INTEGER NOT NULL
`hadm_id` | INTEGER NOT NULL
`chartdate` | DATE
`hcpcs_cd` | CHAR(5)
`seq_num` | INTEGER
`short_description` | TEXT
`hcpcs_cd` | CHAR(5) NOT NULL
`seq_num` | INTEGER NOT NULL
`short_description` | VARCHAR(180)

### `subject_id`

Expand Down
5 changes: 3 additions & 2 deletions content/en/docs/IV/modules/hosp/labevents.md
Expand Up @@ -49,8 +49,9 @@ Name | Postgres data type
`hadm_id` | INTEGER
`specimen_id` | INTEGER NOT NULL
`itemid` | INTEGER NOT NULL
`charttime` | TIMESTAMP NOT NULL
`storetime` | TIMESTAMP
`order_provider_id` | VARCHAR(10)
`charttime` | TIMESTAMP(0)
`storetime` | TIMESTAMP(0)
`value` | VARCHAR(200)
`valuenum` | DOUBLE PRECISION
`valueuom` | VARCHAR(20)
Expand Down
3 changes: 2 additions & 1 deletion content/en/docs/IV/modules/hosp/microbiologyevents.md
Expand Up @@ -46,9 +46,10 @@ WHERE me.subject_id IS NOT NULL;
Name | Postgres data type | Example value
---- | ---- | ----
`microevent_id` | INTEGER NOT NULL | 1234567
`subject_id` | INTEGER | 12078372
`subject_id` | INTEGER NOT NULL | 12078372
`hadm_id` | INTEGER | 29450599
`micro_specimen_id` | INTEGER NOT NULL | 6386644
`order_provider_id` | VARCHAR(10) | P12ABC
`chartdate` | TIMESTAMP(0) NOT NULL | 2130-04-01 00:00:00
`charttime` | TIMESTAMP(0) | 2130-04-01 16:00:00
`spec_itemid` | INTEGER NOT NULL | 70012
Expand Down
10 changes: 5 additions & 5 deletions content/en/docs/IV/modules/hosp/patients.md
Expand Up @@ -13,11 +13,11 @@ Information that is consistent for the lifetime of a patient is stored in this t

Name | Postgres data type
---- | ----
`subject_id` | INTEGER
`gender` | VARCHAR(1)
`anchor_age` | INTEGER
`anchor_year` | INTEGER
`anchor_year_group` | VARCHAR(255)
`subject_id` | INTEGER NOT NULL
`gender` | VARCHAR(1) NOT NULL
`anchor_age` | INTEGER NOT NULL
`anchor_year` | INTEGER NOT NULL
`anchor_year_group` | VARCHAR(255) NOT NULL
`dod` | TIMESTAMP(0)

## Detailed Description
Expand Down
7 changes: 4 additions & 3 deletions content/en/docs/IV/modules/hosp/poe.md
Expand Up @@ -28,13 +28,14 @@ Name | Postgres data type
`poe_id` | VARCHAR(25) NOT NULL
`poe_seq` | INTEGER NOT NULL
`subject_id` | INTEGER NOT NULL
`hadm_id` | INTEGER NOT NULL
`ordertime` | TIMESTAMP NOT NULL
`order_type` | VARCHAR(25)
`hadm_id` | INTEGER
`ordertime` | TIMESTAMP(0) NOT NULL
`order_type` | VARCHAR(25) NOT NULL
`order_subtype` | VARCHAR(50)
`transaction_type` | VARCHAR(15)
`discontinue_of_poe_id` | VARCHAR(25)
`discontinued_by_poe_id` | VARCHAR(25)
`order_provider_id` | VARCHAR(10)
`order_status` | VARCHAR(15)

### `poe_id`
Expand Down
31 changes: 17 additions & 14 deletions content/en/docs/IV/modules/hosp/poe_detail.md
Expand Up @@ -29,7 +29,7 @@ Name | Postgres data type
`poe_id` | VARCHAR(25) NOT NULL
`poe_seq` | INTEGER NOT NULL
`subject_id` | INTEGER NOT NULL
`field_name` | VARCHAR(255)
`field_name` | VARCHAR(255) NOT NULL
`field_value` | TEXT

### `poe_id`
Expand All @@ -46,19 +46,22 @@ A monotonically increasing integer which chronologically sorts the POE orders. T

### `field_name`

Each row provides detail regarding a particular aspect of a POE order. `field_name` is the name given to that aspect. It is one of the following values:

* Admit category
* Admit to
* Code status
* Consult Status
* Consult Status Time
* Discharge Planning
* Discharge When
* Indication
* Level of Urgency
* Transfer to
* Tubes & Drains type
Each row provides detail regarding a particular aspect of a POE order. `field_name` is the name given to that aspect.
As of MIMIC-IV v2.2, the following table lists the possible values and the most common entry for it in `field_value`.

`field_name` | number of rows | most frequent `field_value` observation
--- | --- | ---
Admit to | 881522 | Medicine
Indication | 27190 | Antibiotics
Code status | 197932 | Resuscitate (Full code)
Transfer to | 161707 | Medicine
Admit category | 1093726 | Admit to inpatient
Consult Status | 36591 | Accepted
Discharge When | 431642 | Discharge Now
Level of Urgency | 45617 | Routine (within 24 hours)
Discharge Planning | 475428 | Finalized
Consult Status Time | 36591 | 2149-12-03 09:00:01
Tubes & Drains type | 491472 | Indwelling urinary catheter (IUC) - Foley

### `field_value`

Expand Down
11 changes: 6 additions & 5 deletions content/en/docs/IV/modules/hosp/prescriptions.md
Expand Up @@ -28,16 +28,17 @@ Name | Postgres data type
---- | ----
`subject_id` | INTEGER NOT NULL
`hadm_id` | INTEGER NOT NULL
`pharmacy_id` | INTEGER
`pharmacy_id` | INTEGER NOT NULL
`poe_id` | VARCHAR(25)
`poe_seq` | INTEGER
`starttime` | TIMESTAMP
`stoptime` | TIMESTAMP
`order_provider_id` | VARCHAR(10)
`starttime` | TIMESTAMP(3)
`stoptime` | TIMESTAMP(3)
`drug_type` | VARCHAR(20) NOT NULL
`drug` | VARCHAR(255) NOT NULL
`formulary_drug_cd` | VARCHAR(50)
`gsn` | VARCHAR(10)
`ndc` | VARCHAR(20)
`gsn` | VARCHAR(255)
`ndc` | VARCHAR(25)
`prod_strength` | VARCHAR(255)
`form_rx` | VARCHAR(25)
`dose_val_rx` | VARCHAR(100)
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/IV/modules/hosp/transfers.md
Expand Up @@ -24,9 +24,9 @@ Physical locations for patients throughout their hospital stay.

Name | Postgres data type
---- | ----
`subject_id` | INTEGER
`subject_id` | INTEGER NOT NULL
`hadm_id` | INTEGER
`transfer_id` | INTEGER
`transfer_id` | INTEGER NOT NULL
`eventtype` | VARCHAR(10)
`careunit` | VARCHAR(255)
`intime` | TIMESTAMP(0)
Expand Down

0 comments on commit 28a432e

Please sign in to comment.