Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update synthetic_news_data.Rmd #88

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions vignettes/synthetic_news_data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,97 @@ This dataset is available from the [NHSRDatasets](https://CRAN.R-project.org/pac

For mode information about the [synthpop](http://gradientdescending.com/generating-synthetic-data-sets-with-synthpop-in-r/) package.

## What is NEWS?

NEWS is short for the National Early Warning Score. [NHS England have provided a detailed introduction here](https://www.england.nhs.uk/ourwork/clinical-policy/sepsis/nationalearlywarningscore/)

The latest iteration of the NEWS score is NEWS2

The premise of NEWS is that physiology such as heart rate (pulse), respiration rate, consciousness (GCS or AVPU) are all routinely measured.
GCS = Glasgow Coma Score (Categorical score 3-15) measuring the Eyes, verbal and motor responses.
AVPU = A categorical description of how concious a patient is A - Alert, V - Responds to voice, P - Responds to painful stimuli, U - Unresponsive

However there are a range of professional groups who use these measurements, and it can e challenging to recognise the deteriorating patient from the raw measurements alone especially if you do not often work with acutely unwell patients

NEWS(2) provides categorical classifications for distinct ranges of physiology. Each category is scored 0-3

The more abnormal a measure of physiology the greater the categorical score attributed. The score is supposed to be calculated at the time the physiology is measured. In a hospital this is often when the nurse or healthcare assistant completes their observation rounds.

The categorical NEWS score then is linked to distinct actions that should be followed. These actions will typically be localised by organisations depending on the level of resource that is available to support medical emergencies.

There are some criticisms of NEWS that were addressed by NEWS2. These were that normal measures of Oxygen saturation (SpO2) were not universal and often meant over escalation of "normal" abnormal physiology in patients with respiratory diseases such as COPD. These were addressed though adjusted ranges for SpO2.

There have also been concerns that in some cases the NEWS score has been introduced to settings (often mandatory) where it has not been validated. The Score was developed by the Royal College of Physicians. They often represent clinical specialties who work in, in-patient medicine. As such the data that was used to develop the score was based on data from patients who were typically out of the acute phase of their illness and so abnormal physiology was a measure post therapeutic interventions. In most Cases NEWS has been shown to be robust to these criticisms.

NEWS is more work for (typically nursing) staff to complete, NEWS is also not validated as an incomplete score for example where just a heart rate, Blood pressure and SpO2 are recorded which is a common set of measurements in most outpatient settings.

### Here are some code chunks for the calculation of NEWS sub scores:

#### Systolic Blood pressure
```{r}
sbp_news <- NEWS_var%>%
mutate (sbp = as.numeric(pulse)) %>%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be mutate(sbp = as.numeric(syst)) or something similar? In NHSRdatasets we have both pulse and syst and heart rate below also refers to pulse.

mutate(news = case_when(
sbp <= 90 | sbp >=220 ~ 3,
sbp %in% c(91:100) ~ 2,
sbp %in% c(101:110) ~ 1,
!is.numeric(pulse) ~ NA_real_,
TRUE ~ 0)
)
```

#### Heart Rate
```{r}
hr_news <- NEWS_var%>%
mutate (pulse = as.numeric(pulse)) %>%
mutate(news = case_when(
pulse <= 40 | pulse >=131 ~ 3,
pulse %in% c(111:130) ~ 2,
pulse %in% c(41:50,91:110) ~ 1,
!is.numeric(pulse) ~ NA_real_,
TRUE ~ 0)
)
```

#### Resp Rate
```{r}
rr_news <- NEWS_var%>%
mutate (resp_rate = as.numeric(resp_rate)) %>%
mutate(news = case_when(
resp_rate <= 8 | resp_rate >=25 ~ 3,
resp_rate %in% c(21:24) ~ 2,
resp_rate %in% c(9:11) ~ 1,
!is.numeric(resp_rate) ~ NA_real_,
TRUE ~ 0)
)
```

#### SpO2
```{r}
NEWS_var%>%
mutate(news = case_when(
spo2 <= 91 ~3,
spo2 %in% c(92:93) ~2,
spo2 %in% c(94:95) ~1,
!is.numeric(spo2) ~ NA_real_,
TRUE ~ 0
))
```

#### Temperature
```{r}
NEWS_var%>%
mutate(news = case_when(
temperature <= 35 ~ 3,
temperature >= 39.1 ~ 2,
temperature %in% c(38.1:39,35.1:36) ~ 1,
!is.numeric(temperature) ~ NA_real_,
TRUE ~ 0))
```

In addition NEWS2 has altered ranges for patients with known respiratory diseases. These need additional logic on a per patient basis to implement.


## Summary

In many ways, synthetic data reflects George Box’s observation that “all models are wrong, but some are useful” while providing a “useful approximation [of] those found in the real world,”
Expand Down
Loading