def METHOD_NAME(dicom_table, mos_table):
    values_table = pd.DataFrame()
    to_be_compared = dicom_table.columns
    mos_index = mos_table.columns
    dicom_list = pd.DataFrame()
    mosaiq_list = pd.DataFrame()
    for field in range(len(dicom_table)):
        for label in to_be_compared:
            # check that the corresponding value exists in Mosaiq
            if label in mos_index:
                add_dicom = pd.DataFrame(
                    [dicom_table.iloc[field][label]], columns=[label]
                )
                add_mosaiq = pd.DataFrame(
                    [mos_table.iloc[field][label]], columns=[label]
                )
                dicom_list[label] = add_dicom
                mosaiq_list[label] = add_mosaiq
            # continue if the value is not in Mosaiq
            else:
                continue
        values_table = values_table.append(dicom_list, ignore_index=True)
        values_table = values_table.append(mosaiq_list, ignore_index=True)
    values_index = []
    for value in dicom_table[:]["field_name"]:
        values_index.append(value + "_DICOM")
        values_index.append(value + "_MOSAIQ")
    values_table["beam_index"] = pd.Series(values_index).values
    values_table = values_table.set_index("beam_index", drop=True)
    return values_table