Skip to content

Treatment/Investigation codes flipped in A&E "Is Discharged with No Treatment or Investigations" #276

Description

@tomjemmett

df_treatments = (
spark.read.table(table_names.hes_aae_treatments)
.filter(F.col("treatment") != "24")
.select("aekey", "fyear", "procode3")
)
df_investigations = (
spark.read.table(table_names.hes_aae_investigations)
.filter(~F.col("investigation").isin(["22", "99"]))
.select("aekey", "fyear", "procode3")
)

Code Treatment Investigation
22 Guidance/advice only Dental investigation
24 Tetanus None
99 None Other

should be

    df_treatments = (
        spark.read.table(table_names.hes_aae_treatments)
        .filter(~F.col("treatment").isin(["22", "99"])
        .select("aekey", "fyear", "procode3")
    )

    df_investigations = (
        spark.read.table(table_names.hes_aae_investigations)
        .filter(F.col("investigation") != "24")
        .select("aekey", "fyear", "procode3")
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions