---
title: "Stored Lists"
---

This analysis will need various lists of ICD-10 codes from those specifications. Copies of the files that outline the definitions are in the `resources` folder.

The Agency for Healthcare Research and Quality (AHRQ) provides a series of [Technical Specifications
For Inpatient Quality Indicators](https://qualityindicators.ahrq.gov/measures/IQI_TechSpec) that allow us to analyze different outcomes in the [Texas Inpatient Public Use Data File (PUDF)](https://www.dshs.texas.gov/center-health-statistics/texas-health-care-information-collection/download-and-purchase-data/texas-inpatient-public-use-data-file-pudf)

The Healthcare Cost and Utilization Project (HCUP) includes the largest collection of hospital care data in the United States but also provides a [clinical coding definition for severe maternal morbidity](https://datatools.ahrq.gov/hcup-fast-stats/?tab=special-emphasis&dash=92#accordion-92).

Of note, to use the values from one of these lists, use the following:

```txt
new_list <- read_rds("procedures-lists/filename.rds") |> pull(col_name)
```

## Setup

```{r}
#| label: setup
#| message: false
#| warning: false

library(tidyverse)
library(janitor)
library(rlang)

```

### Tabula process

When an Inpatient Quality Indicator includes a list too long to hand-code, we run the PDF through [Tabula](https://tabula.technology/) to extract the codes and descriptions, and then clean them up with this function.

It basically imports the file, which is four columns, and takes in a variable name to be used in the function. We keep the two that are the codes, drop NA values, then pivot to list them in one variable with the name we provided.

```{r}
tabula_process <-
  function(file_path, var_name) {
    read_csv(
        file_path,
        col_names = c("code1", "desc1", "code2", "desc2")  
    ) |> 
    select(code1, code2) |> 
    drop_na() |> 
    pivot_longer(cols = everything(), values_to = "combined") |> 
    arrange(combined) |> 
    select(!!var_name := combined)
  }
```

### Technical specs path

We write a lot of files to the same directory and I want to simplify it to reduce errors that writes paths from the project working directory.

>>> WE MIGHT PULL THIS OUT

```{r}
#| label: techspecs-path

dir_techspecs <- "data-published/technical-specs"
```


## AHRQ lists

Different scenarios need different lists of ICD-10 codes, listed in their specification. Some of these lists are used in multiple specifications.

In addition to the links below they available in the `resources` directory of this repo.

- [Inpatient Quality Indicator 21 (IQI 21) Cesarean Delivery Rate, Uncomplicated](https://qualityindicators.ahrq.gov/Downloads/Modules/IQI/V2024/TechSpecs/IQI_21_Cesarean_Delivery_Rate_Uncomplicated.pdf)
- [IQI 22 Vaginal Birth After Cesarean (VBAC) Delivery Rate, Uncomplicated](https://qualityindicators.ahrq.gov/Downloads/Modules/IQI/V2024/TechSpecs/IQI_22_Vaginal_Birth_After_Cesarean_(VBAC)_Delivery_Rate_Uncomplicated.pdf)
- [IQI 33 Primary Cesarean Delivery Rate, Uncomplicated](https://qualityindicators.ahrq.gov/Downloads/Modules/IQI/V2024/TechSpecs/IQI_33_Primary_Cesarean_Delivery_Rate_Uncomplicated.pdf)


### PRCSECP: Cesarean delivery procedure codes

> Updated v2024

These are "Cesarean delivery procedure codes: (PRCSECP)" as defined in Inpatient Quality Indicator 21 (IQI 21) Cesarean Delivery Rate, Uncomplicated. 

```{r prcsecp}
prcsecp_list <-
  c(
    "10D00Z0",
    "10D00Z1",
    "10D00Z2"
  ) |>   
  as_tibble() |> 
  rename(prcsecp = value)

prcsecp_list |> 
  write_rds("../data-published/technical-specs/prcsecp.rds")

prcsecp_list
```

### PRCSE2P: Hysterotomy procedure codes

> Updated v2024

These are "Hysterotomy procedure codes: (PRCSE2P)" as defined in Inpatient Quality Indicator 21 (IQI 21) Cesarean Delivery Rate, Uncomplicated.

```{r}
#| label: prcse2p

prcse2p_list <-
  c(
    "10A00ZZ",
    "10A03ZZ",
    "10A04ZZ"
  ) |>  
  as_tibble() |> 
  rename(prcse2p = value)

prcse2p_list |> 
  write_rds("../data-published/technical-specs/ahrq_prcse2p.rds")

prcse2p_list
```


### DELOCMD: All deliveries

> updated v2024

All deliveries, identified by any-listed ICD-10-CM diagnosis code for outcome of delivery (DELOCMD). The list is pulled from "IQI 21 Cesarean Delivery Rate, Uncomplicated", but it is used in a number of indicators.

```{r}
#| label: delocmd

delocmd_list <-
  c(
    "Z370",
    "Z371",
    "Z372",
    "Z373",
    "Z374",
    "Z3750",
    "Z3751",
    "Z3752",
    "Z3753",
    "Z3754",
    "Z3759",
    "Z3760",
    "Z3761",
    "Z3762",
    "Z3763",
    "Z3764",
    "Z3769",
    "Z377",
    "Z379"
  ) |>   
  as_tibble() |> 
  rename(delocmd = value)

delocmd_list |> write_rds("../data-published/technical-specs/delocmd.rds")

delocmd_list
```

### PRCSECD: Abnormal presentations

> Updated for 2024

These are codes for "abnormal presentation, preterm delivery, fetal death, multiple gestation, or breech presentation (Appendix A: PRCSECD)".

The list of the PRCSECD codes is in `resources/IQI_APPENDIX_A.pdf`, but the file is 10 pages with well more than a 300+ codes, more than we can reasonably copy by hand.

So, we used the tool [Tabula](https://tabula.technology/) to convert the tables there into a raw csv file we can process in R. That result of that process is `resources/IQI_APPENDIX_A-tabula.csv`.

We use the `tabula_process()` function defined above to clean up the codes.

```{r}
#| label: prcsecd

prcsecd_list <- 
  tabula_process("../resources/IQI_APPENDIX_A-tabula.csv", "presecd")

prcsecd_list |> 
  write_rds("../data-published/technical-specs/prcsecd.rds")

prcsecd_list
```

### MDC14: Principal Diagnosis Codes

> New for this project

This list comes from [APPENDIX B: MDC 14 and MDC 15 Principal Diagnosis Codes](https://qualityindicators.ahrq.gov/Downloads/Modules/IQI/V2024/TechSpecs/IQI_APPENDIX_B.pdf) (file also avail at `resources/IQI_APPENDIX_B.pdf`).

I'm not yet sure how it is used, but it was in the same appendix as MDC 15 which is used in "IQI 21 Cesarean Delivery Rate, Uncomplicated".

```{r}
mdc14prindx_list <- 
  tabula_process("../resources/IQI_APPENDIX_B_MDC14-tabula.csv", "mdc14prindx")

mdc14prindx_list |> 
  write_rds("../data-published/technical-specs/mdc14prindx.rds")

mdc14prindx_list |> tail()
```

### MDC15: Principal Diagnosis Codes

> New for this project

This list is MDC 15 Newborns & Other Neonates with Conditions Originating in Perinatal Period. The definitions come from [APPENDIX B: MDC 14 and MDC 15 Principal Diagnosis Codes](https://qualityindicators.ahrq.gov/Downloads/Modules/IQI/V2024/TechSpecs/IQI_APPENDIX_B.pdf) (file `resources/IQI_APPENDIX_B.pdf`)

```{r}
#| label: mdc15

mdc15prindx_list <- 
  tabula_process("../resources/IQI_APPENDIX_B_MDC15-tabula.csv", "mdc15prindx")

mdc15prindx_list |> 
  write_rds("../data-published/technical-specs/mdc15prindx.rds")

mdc15prindx_list
```

### VAGDELP: Vaginal delivery procedure codes

These are "Vaginal delivery procedure codes: (VAGDELP)" as found in IQI 22 Vaginal Birth After Cesarean, Uncomplicated.

```{r vagdelp}
vagdelp_list <- c(
  "10D07Z3",
  "10D07Z4",
  "10D07Z5",
  "10D07Z6",
  "10D07Z7",
  "10D07Z8",
  "10E0XZZ"
) |>  
  as_tibble() |> 
  rename(vagdelp = value)

vagdelp_list |> 
  write_rds("../data-published/technical-specs/vagdelp.rds")

vagdelp_list
```


### PRVBACD: Previous Cesarean delivery diagnosis codes

> Updated v2024

These are "Previous Cesarean delivery diagnosis codes: (PRVBACD)" as defined in "IQI 22 Vaginal Birth After Cesarean, Uncomplicated"

- with any-listed ICD-10-CM diagnosis codes for previous Cesarean delivery (PRVBACD*)

```{r prvbacd}
prvbacd_list <- c(
  "O3421",
  "O34211",
  "O34212",
  "O34218",
  "O34219",
  "O3422",
  "O6641"
) |> 
  as_tibble() |> 
  rename(prvbacd = value)

prvbacd_list |> 
  write_rds("../data-published/technical-specs/prvbacd.rds")

prvbacd_list
```

## HCUP Severe Maternal Morbidity

There are some lists we will use under HCUP definitions, including severe maternal morbidity. HCUP is the [Healthcare Cost and Utilization Project](https://hcup-us.ahrq.gov/overview.jsp) and is a family of healthcare databases and related software developed through a Federal-State-Industry partnership and sponsored by AHRQ. 

We will be following the [clinical coding definitions](https://datatools.ahrq.gov/hcup-fast-stats/?tab=special-emphasis&dash=92#accordion-92) from HCUP's Severe Maternal Morbidity analysis.

### Identifying deliveries

While AHRQ IQI Indicators define deliveries in the list of `DELOCMD` codes, H-Cup has a collection of its own codes that define a delivery. We should build such a list so that we can use this to categorize our deliveries.

#### Diagnosis codes

The diagnosis codes specified by HCUP include:

* Z37 series: Outcome of delivery
* O80: Encounter for full-term uncomplicated delivery
* O82: Encounter for Cesarean delivery without indication
* O7582: Onset of labor after 37 completed weeks of gestation but before 39 completed weeks gestation, with delivery by planned Cesarean section.

The Z37 series was previously defined by AHRQ as the `DELOCMD` list. We need a list for the rest of the diagnosis codes to consider. 

```{r}
#| label: additional-hcup-delivery-codes
#| message: false
#| warning: false

hcup_deldiag_list <- c(
  "O80",
  "O82",
  "O7582"
) |>
  as_tibble() |>
  rename(deldiag = value)

hcup_deldiag_list |>
  write_rds("../data-published/technical-specs/hcup_deldiag.rds")

hcup_deldiag_list
```

#### MS-DRGs (starting 2019)

Since we are evaluating data from 2019 and onward, we will disregard the MS-DRG values present from the 2016 list and start with MS-DRG values from 2019. Read more about the meanings of these codes from the H-Cup specification.

```{r}
#| label: ms drg deliveries
#| message: false
#| warning: false

msdrg_del_list <- c(
  "768",
  "783",
  "784",
  "785",
  "786",
  "787",
  "788",
  "796",
  "797",
  "798",
  "805",
  "806",
  "807"
) |>
  as_tibble() |>
  rename(deldrg = value)

msdrg_del_list |>
  write_rds("../data-published/technical-specs/hcup_deldrg.rds")

msdrg_del_list
```

#### Procedure codes

The HCUP definition of deliveries also includes some procedure codes. We will list them here.

We make one correction of the original HCUP [definition](https://datatools.ahrq.gov/hcup-fast-stats/?tab=special-emphasis&dash=92#accordion-92):

- 10D07Z3-0D07Z8: Extraction of products of conception via natural or artificial opening

We feel a `1` was dropped from `10D07Z3-0D07Z8` and we are using `10D07Z3-10D07Z8`.


We make one correction of the original HCUP [definition](https://datatools.ahrq.gov/hcup-fast-stats/?tab=special-emphasis&dash=92#accordion-92):

- 10D07Z3-0D07Z8: Extraction of products of conception via natural or artificial opening

We feel a `1` was dropped from `10D07Z3-0D07Z8` and we are using `10D07Z3-10D07Z8`.


```{r}
#| label: delivery procedure codes hcup
#| message: false
#| warning: false

hcup_delproc_list <- c(
  "10D00Z0",
  "10D00Z1",
  "10D00Z2",
  "10D07Z3",
  "10D07Z4",
  "10D07Z5",
  "10D07Z6",
  "10D07Z7",
  "10D07Z8",
  "10E0XZZ"
) |>
  as_tibble() |>
  rename(delproc = value)

hcup_delproc_list |>
  write_rds("../data-published/technical-specs/hcup_delproc.rds")

hcup_delproc_list
```


## Identifying SMM

There are lots of diagnosis and procedure codes that indicate severe maternal morbidity, ranging a variety of complications. 

### Diagnosis codes

There is a large list of diagnosis codes that can identify Severe Maternal Morbidity in maternal cases. 

Many of these codes are listed as "series," which can be expanded using the [CDC's ICD-10 browser tool](https://icd10cmtool.cdc.gov/?fy=FY2025) that allows you to search by code (including code groupings). However, since we can detect these codes using their prefix, we will focus primarily on the codes that aren't series.

For transparency, here is the list of series codes that will also be used in the [Categorization notebook.](02-categorization.qmd):

* A40 series: Streptococcal sepsis
* A41 series: Other sepsis
* D57 series: Sickle-cell disorders (except D571, D5720, D573, D5740, D5742, D5744, D5780)
* G45 series: Transient cerebral ischemic attacks and related syndromes
* G46 series: Vascular syndromes of brain in cerebrovascular diseases
* I21 series: Acute myocardial infarction
* I22 series: Subsequent ST elevation (STEMI) and non-ST elevation (NSTEMI) myocardial infarction
* 126 series: Pulmonary embolism (excluding 12603, 12695)
* I46 series: Cardiac arrest
* I50 series: Heart failure (excluding those related to chronic heart failure such as 15022, 15032, 15042, 150812)
* I60-I68 series: Cerebrovascular diseases (excluding 16302 and 16303)
* I71 series: Aortic aneurysm and dissection
* J96 series: Respiratory failure, not elsewhere classified (except J961, chronic respiratory failure)
* N17 series: Acute kidney failure
* O15 series: Eclampsia
* O291 series: Cardiac complications of anesthesia during pregnancy
* O292 series: Central nervous system complications of anesthesia during pregnancy
* O450 series: Premature separation of placenta with coagulation defect (except codes related to first trimester like O45001, O45011, O45021, O45091)
* O460 series: Antepartum hemorrhage with coagulation defect (except codes related to the first trimester like O46001, O46011, O46021, O46091)
* O88 series: Obstetric embolism (except codes related to the first trimester like O88011, O88111, O88211, O88311, O88811)
* R57 series: Shock, not elsewhere classified
* T811 series: Postprocedural shock but only including codes indicating initial encounter like T8110XA, T8111XA, T8112XA, T8119XA

#### Series codes

We want to save these codes as a list so that we can identify them later in our [Categorization](02-categorization.qmd) notebook. We also want to save them keeping in mind that when searching for the codes within the columns, the value must START with the specified code. Thus, we will save them in a list but include the regex character `^` to denote that it must begin with the specified code.

I stored a test regex expression for D57 on [Regex101.](https://regex101.com/r/KJsjVl/1)

```{r}
#| label: series codes
#| message: false
#| warning: false

smm_series_list <- c(
  "^(A40)",
  "^(A41)",
  "^(D57(?!1|20|3|40|42|44|80))",
  "^(G45)",
  "^(G46)",
  "^(I21)",
  "^(I22)",
  "^(I26(?!03|95))",
  "^(I50(?!22|32|42|812))",
  "^(I60)",
  "^(I61)",
  "^(I62)",
  "^(I63(?!02|03))",
  "^(I64)",
  "^(I65)",
  "^(I66)",
  "^(I67)",
  "^(I68)",
  "^(I71)",
  "^(J96(?!1))",
  "^(N17)",
  "^(O15)",
  "^(O291(?!11|21|91))",
  "^(O292(?!11|91))",
  "^(O450(?!01|11|21|91))",
  "^(O460(?!01|11|21|91))",
  "^(O88(?!011|111|211|311|811))",
  "^(R57)"
  # I will save T811 series for the next section
  # because it is only including a couple of codes
) |> 
  as_tibble() |>
  rename(smm_series = value)

smm_series_list |>
  write_rds("../data-published/technical-specs/smm_series.rds")

smm_series_list
```

#### Series without exclusions

Here is a list of series codes but disregarding any of those that had exclusions.

```{r}
#| label: series codes without exclusions
#| message: false
#| warning: false

smm_nonexclusion_list <- c(
  "^(A40)",
  "^(A41)",
  "^(G45)",
  "^(G46)",
  "^(I21)",
  "^(I22)",
  "^(I60)",
  "^(I61)",
  "^(I62)",
  "^(I64)",
  "^(I65)",
  "^(I66)",
  "^(I67)",
  "^(I68)",
  "^(I71)",
  "^(N17)",
  "^(O15)",
  "^(R57)"
  # I will save T811 series for the next section
  # because it is only including a couple of codes
) |>
  as_tibble() |>
  rename(smm_nonexclusion = value)

smm_nonexclusion_list |>
  write_rds("../data-published/technical-specs/smm_nonexclusion.rds")

smm_nonexclusion_list
```

#### Non-series codes

We want to make a list of the non-series codes because we can look for these codes explicitly. I will also include the codes from the T81.1 series because they including specific codes rather than excluding specific codes.

```{r}
#| label: non-series codes
#| message: false
#| warning: false

smm_nonseries_list <- c(
  "A327",
  "A812",
  "D65",
  "D688",
  "D689",
  "G9349",
  "H3400",
  "H3401",
  "H3402",
  "H3403",
  "I4901",
  "I4902",
  "I76",
  "I790",
  "I97120",
  "I97121",
  "I97130",
  "I97131",
  "I97710",
  "I97711",
  "I97810",
  "I97811",
  "I97820",
  "I97821",
  "J80",
  "J810",
  "J951",
  "J952",
  "J953",
  "J95821",
  "J95822",
  "O2250",
  "O2252",
  "O2253",
  "O670",
  "O723",
  "O740",
  "O741",
  "O742",
  "O743",
  "O751",
  "O85",
  "O8604",
  "O873",
  "O890",
  "O891",
  "O892",
  "O904",
  "R0603",
  "R092",
  "R6520",
  "R6521",
  "T782XXA",
  "T800XXA",
  # T811 series technically but there are only a 
  # couple of codes so I'll include here
  "T8110XA",
  "T8111XA",
  "T8112XA",
  "T8119XA",
  "T8144XA",
  "T882XXA",
  "T883XXA",
  "T886XXA"
) |>
  as_tibble() |>
  rename(nonseries = value)

smm_nonseries_list |>
  write_rds("../data-published/technical-specs/smm_nonseries.rds")

smm_nonseries_list
```

#### Exclusions

There are some codes that we must exclude when we are considering series of codes. We handled these using a regex expression in the series section, but for testing purposes, we will make a list of those codes.

>>> TAKE A LOOK AT EXCLUSIONS

```{r}
#| label: smm excluded
#| message: false
#| warning: false

smm_excluded_list <- c(
  # D57: sickle-cell disorders exclusions
  "D571",
  "D5720",
  "D573",
  "D5740",
  "D5742",
  "D5744",
  "D5780",
  # I26: Pulmonary embolism exclusions
  "I2603",
  "I2695",
  # I50: Heart failure exclusions
  "I5022",
  "15032",
  "15042",
  "150812",
  # I60-68: Cerebrovascular diseases exclusions
  "I6302",
  "16303",
  # J96: Respiratory failure exclusions
  "J961",
  # O29.1: Cardiac complications of anesthesia during pregnancy
  # Excluding codes related to first trimester
  "O29111",
  "O29121",
  "O29191",
  # O45.0: Premature separation of placenta with coagulation defect exclusions
  "O46001",
  "O46011",
  "O46021",
  "O46091",
  # O88: Obstetric embolism exclusions
  "O88011",
  "O88111",
  "O88211",
  "O88311",
  "O88811"
) |> as_tibble() |>
  rename(smm_exclude = value)

smm_excluded_list |>
  write_rds("../data-published/technical-specs/smm_exclude.rds")

smm_excluded_list
```


#### Procedure codes

There are some procedure codes that can also identify severe maternal morbidity in delivery cases. I will create a list with them here.

>>> CHECK RANGES

```{r}
#| label: smm proc codes
#| message: false
#| warning: false

smm_proc_list <- c(
  "0B110F4",
  "0B113F4",
  "0B114F4",
  # 0UT90ZL-0UT90ZZ range unsure?
  "0UT90ZL",
  "0UT90ZZ",
  "0UT97ZL",
  "0UT97ZZ",
  "5A12012",
  "5A1935Z",
  "5A1945Z",
  "5A1955Z",
  # we added one within the range based off of a lookup
  "5A2204Z"
) |>
  as_tibble() |>
  rename(smm_proc = value)

smm_proc_list |>
  write_rds("../data-published/technical-specs/smm_proc.rds")

smm_proc_list
```

## Other lists used

### Child-bearing age codes

Researchers at the Office of Health Affairs-Population Health, The University of Texas System work with the THCIC file daily and they suggest filtering deliveries to women of normal child-bearing age, 15-49.

The codes for the ages 15-49 include 05-12. For HIV or drug patients it includes 23 (18-44 yrs).

```{r age}
age_list <-
  c(
    "05",
    "06",
    "07",
    "08",
    "09",
    "10",
    "11",
    "12",
    "23"
  ) |>  
  as_tibble() |> 
  rename(age = value)

age_list |> 
  write_rds("../data-published/technical-specs/age.rds")

age_list

```

## Analysis grouping lists

There are some groupings that are relevant to the analysis portions of this project such as hospitals by brand and hospitals in the the Texas Medical Center. We will create lists of those here so that we can use them in a variety of notebooks.

### Texas Medical Center hospitals

The Texas Medical Center (TMC) is the ["largest medical complex in the world"](https://www.tmc.edu/about-tmc/) and is based in Houston, Texas. As we look at Harris County hospitals, there are some hospitals that fall within the Texas Medical Center. We want to save those in a list so that we can filter for them in a variety of analyses.

This list was compiled by Monique Welch-Rutherford and given to Teresa Do on September 2, 2025.

```{r}
#| label: TMC hospital list
#| message: false
#| warning: false

tmc_list <- 
  c("Womans Hospital of Texas",
    "Texas Childrens Hospital-Pavilion for Women",
    "Memorial Hermann - Texas Medical Center",
    "Harris Health Ben Taub Hospital",
    "Houston Methodist Hospital",
    "Texas Childrens Hospital",
    "UT MD Anderson Cancer Center",
    "CHI St Lukes Health Baylor College of Medicine Medical Center") |>
  as_tibble() |>
  rename(name = value)

tmc_list |>
  write_rds("../data-published/technical-specs/tmc.rds")

tmc_list
```

### Branded Hospitals

Within Harris County, there are a couple of brands of hospital that cover the county. These include:

* Harris Health
* HCA Houston Healthcare
* Houston Methodist
* Memorial Hermann

We'll make lists for each of these brands as well as a list for the unaffiliated hospitals so that we can quickly group data together for comparisons.

#### Harris Health

```{r}
#| label: harris health list
#| message: false
#| warning: false

harris_health_list <-
  c(
    "Harris Health Ben Taub Hospital",
    "Harris Health Lyndon B Johnson Hospital"
  ) |>
  as_tibble() |>
  rename(name = value)

harris_health_list |>
  write_rds("../data-published/technical-specs/harris_health.rds")

harris_health_list
```

#### HCA Houston

```{r}
#| label: HCA Houston list
#| message: false
#| warning: false

hca_list <-
  c(
    "HCA Houston Healthcare Clear Lake",
    "HCA Houston Healthcare Northwest",
    "HCA Houston Healthcare Southeast",
    "HCA Houston Healthcare West",
    "HCA Houston Healthcare Tomball",
    "HCA Houston Healthcare North Cypress"
  ) |>
  as_tibble() |>
  rename(name = value)

hca_list |>
  write_rds("../data-published/technical-specs/hca.rds")

hca_list
```

#### Houston Methodist

```{r}
#| label: houston methodist
#| message: false
#| warning: false

houston_methodist_list <-
  c(
    "Houston Methodist Willowbrook Hospital",
    "Houston Methodist West Hospital",
    "Houston Methodist Baytown Hospital",
    "Houston Methodist Hospital",
    "Houston Methodist Clear Lake Hospital"
  ) |>
  as_tibble() |>
  rename(name = value)

houston_methodist_list |>
  write_rds("../data-published/technical-specs/houston_methodist.rds")

houston_methodist_list
```

#### Memorial Hermann

```{r}
#| label: memorial hermann list
#| message: false
#| warning: false

memorial_hermann_list <-
  c(
    "Memorial Hermann - Texas Medical Center",
    "Memorial Hermann Southwest Hospital",
    "Memorial Hermann Memorial City Medical Center",
    "Memorial Hermann Katy Hospital",
    "Memorial Hermann Greater Heights Hospital",
    "Memorial Hermann Cypress Hospital",
    "Memorial Hermann Northeast",
    "Memorial Hermann Southeast Hospital"
  ) |>
  as_tibble() |>
  rename(name = value)

memorial_hermann_list |>
  write_rds("../data-published/technical-specs/memorial_hermann.rds")

memorial_hermann_list
```

#### Unaffiliated hospitals

```{r}
#| label: unaffiliated list
#| message: false
#| warning: false

unaffiliated_list <-
  c(
    "Womans Hospital of Texas",
    "Texas Childrens Hospital-Pavilion for Women",
    "UTMB Clear Lake Hospital",
    "St Lukes Hospital at the Vintage",
    "CHI St Lukes Health Baylor College of Medicine Medical Center",
    "Texas Childrens Hospital",
    "UT MD Anderson Cancer Center"
  ) |>
  as_tibble() |>
  rename(name = value)

unaffiliated_list |>
  write_rds("../data-published/technical-specs/unaffiliated.rds")

unaffiliated_list
```

## Closing out

```{r end}
beepr::beep(4)
```