Skip to content

Where does TPMA data live?

Fran Barton edited this page Jul 29, 2026 · 23 revisions

https://github.com/The-Strategy-Unit/nhp_data/wiki/Data-Structure is incomplete we also want to record inputs-data and model-data as well as the tables on UDAL, and the reference files on the TPMAs repo. Possibly the TPMA descriptions on project info as well.

What is the difference between the NHP model data and the TPMA explorer data?

What do we mean by "rates" and how do these relate / how are these used in the Inputs app and/or the TPMA Explorer app?

Where is the data for the TPMA explorer and how do I access it?

(Link to TPMA explorer app itself: Explore opportunities to reduce hospital care)

This data isn't different or separate to NHP model for outputs. The inputs pipeline generates all the data (includes rates) goes to Azure (central repository for data) and then is presented in these apps.

Where is the NHP model data and how do I access it?

Parquet files

It's possible to use the R package azkit (maintained by SU) to access the data:

container <- azkit::get_container(
  # Ask for this value, put it in .Renviron
  Sys.getenv("AZ_INPUTS_CONTAINER")
) 

rates <- azkit::read_azure_parquet(
  container,
  "vX.Y/provider/rates.parquet"
)

Tables on UDAL

https://github.com/The-Strategy-Unit/nhp_data/wiki/Data-Structure

In UDAL, udal_lake_mart.newhospitalprograme.default_apc_mitigators has data on TPMA, you can join to udal_lake_mart.newhospitalprograme.default_apc to get patient/spell info. From that, data is aggregated and standardised to create the data that goes into the tpma_explorer. That data is not stored in UDAL though.

Is there a central repository for data about the TPMAs, e.g. codes and categories?

Might not be the definitive answer but the NHP documentation has information on TPMAs with descriptions.

Exploring this a bit more it's metadata for the TPMAs and explaining what each includes.

https://connect.strategyunitwm.nhs.uk/nhp/project_information/user_guide/mitigators_lookup.html is more technical around the codes used and lookups. This is linked from the tpma-explorer app.

This repository has the intention of being a central place to get the data, descriptions but possibly not code.

Where are the layperson descriptions of the TPMAs, including references?

How do we ensure that the English descriptions/definitions of the TPMAs get updated if and when the code definitions of the TPMAs change?

Wonder if this section should live under "What is a TPMA?" ?

Where do the technical / code definitions of the TPMAs live?

And how useful are these?

[TODO] link to other page about where the data originates before the models.

Difficulties with data access

Some data is on UDAL, some isn't but analysis requires combining of the two data locations. Ideal would be to be in both places but that could create syncing issues. Data needs to be on UDAL to be used and cannot be brought out to do that work.

TMPA analysis doesn't always need other data.

Difficulties can arise when slight changes to the TPMA definitions are needed to be analysed, for example the TMPA may say 28 days but the analysis needs the same logic but with 29 days.

Clone this wiki locally