Multiple master data monitoring

AD
DM

Subscribing to data from multiple master sources within the same country introduces the risk of subscribing to the same information from two different master sources. After you begin using the multiple master support in your instance, monitor your database regularly by running reports to find any duplicates that originate from two different master sources.

The following query templates can help you to identify if any records with the same name or HCO/HCP type were subscribed from different master sources.

HCO/HCP types being used by master sources

To monitor if you have HCP types duplicated among master sources, you can use the same query that you used to analyze your data before you enabled multiple master support. For more information about those queries, see Analyze existing data using Network reports.

Find specific records

To find records that have the same name and same HCO/HCP type but different master sources, you can use the following queries. Note that in the queries, MASTER__v is the Veeva OpenData custom key source. Replace third_party_master with the custom key source that you defined for your third party master data.

HCP query

To check for specific HCP records, use this query:

SELECT
        hcp.first_name__v,
        hcp.last_name__v,
        hcp.hcp_type__v,
        COUNT (
            DISTINCT customkey.custom_key_source_type__v
        ) AS COUNT
    FROM
        hcp INNER JOIN customkey
            ON hcp.vid__v = customkey.custom_key_entity_id__v
    WHERE
        hcp.hcp_status__v = 'A'
        AND hcp.primary_country__v = 'CN'
        AND custom_key_source_type__v IN (
            'MASTER__v',
            'third_party_master'
        )
    GROUP BY
        hcp.first_name__v,
        hcp.last_name__v,
        hcp.hcp_type__v
    HAVING
        COUNT > 1

HCO query

To check for specific HCO records, use this query:

SELECT
        hco.corporate_name__v,
        hco.hco_type__v,
        COUNT (
            DISTINCT customkey.custom_key_source_type__v
        ) AS COUNT
    FROM
        hco INNER JOIN customkey
            ON hco.vid__v = customkey.custom_key_entity_id__v
    WHERE
        hco.hco_status__v = 'A'
        AND hco.primary_country__v = 'CN'
        AND custom_key_source_type__v IN (
            'MASTER__v',
            'third_party_master'
        )
    GROUP BY
        hco.corporate_name__v,
        hco.hco_type__v
    HAVING
        COUNT > 1