def METHOD_NAME(
    client,
    dmd_version_asthma_medication,
    dmd_version_asthma_medication_refill,
    rhs_column_names,
    expected_unknown_term,
):
    # codelists have one common code, one different
    # terms for the common code differ but are extracted from the coding system, so are
    # summarised identically
    # Code 123 is unknown in the coding system; it is displayed with the data from the CSV
    # dmd_version_asthma_medication
    # 10514511000001106 - Adrenaline (base) 220micrograms/dose inhaler
    # 10525011000001107 - Adrenaline (base) 220micrograms/dose inhaler refill
    # dmd_version_asthma_medication_refill
    # 10525011000001107 - Adrenaline (base) 220micrograms/dose inhaler refill X
    # 123 - Test refill
    # in the fixtures, the column names are: dmd_type, dmd_id, dmd_name, bnf_code
    # test that different column names can be used to fetch the same data
    replacement_csv_data = dmd_version_asthma_medication_refill.csv_data.replace(
        "dmd_type,dmd_id,dmd_name,bnf_code", rhs_column_names
    )
    dmd_version_asthma_medication_refill.csv_data = replacement_csv_data
    dmd_version_asthma_medication_refill.save()
    assert dmd_version_asthma_medication_refill.table[0] == rhs_column_names.split(",")
    rsp = client.get(
        dmd_version_asthma_medication.get_diff_url(dmd_version_asthma_medication_refill)
    )
    assert rsp.context["common_codes"] == {"10525011000001107"}
    assert rsp.context["lhs_only_codes"] == {"10514511000001106"}
    assert rsp.context["rhs_only_codes"] == {"123"}
    assert rsp.context["rhs_only_summary"] == [
        {"code": "123", "term": expected_unknown_term}
    ]
    assert rsp.context["common_summary"] == [
        {
            "code": "10525011000001107",
            "term": "Adrenaline (base) 220micrograms/dose inhaler refill (VMP)",
        }
    ]