Report Overview
•••
This report has two tabs. The first tab is a
reference report that can be used to obtain
the BF Counselor ID(s) necessary to identify
Peer Active and
Closed Client List
Infoview Report Template Guidance –
the peer counselors for whom the report
BREASTFEEDING – PEER PROGRAM - Peer
should be run. The second tab is a list of
Active and Closed Client List
clients for the specified peer counselor(s)
and all peer contacts, which identify the
Notes
beginning or end of peer counseling, since a
*This report provides private information. Please refer to
specified date.
the MN WIC Data Privacy Policy (Ref: MOM, Section 1.7).
Tab 1 – BF Counselor ID: List of BF
Counselors IDs, names and User IDs.
Tab 2 – Peer Client List: List of peer clients.
*The report will list multiple records per client. It includes
all types of peer contact that specify the beginning or end of
peer counseling. Those that specify types of contacts
between the peer and client are excluded.
*To obtain the BF Counselor ID for the Peer Client List report, click the Run button just above the Enter BF
Counselor ID(s) field to refresh the information. Peer counselors are listed alphabetically by first name. Use
the page arrows above the report to view multiple pages.
*The report is run for the following BF Contact Topics:
•
0 = 5 or 53 (Date Changed Peer) and 47 or 48 (Date Assigned Peer)
•
1 = When ppt began receiving services
•
2 or 50 = When peer counseling ended
•
3 or 51 = Never received services
•
4 or 52 = Refused services
*The date range for this report is between the date entered into the Enter Contact Start Date PROMPT and
the current date.
*The adjusted contact type converts BF Contact Topics 1, 5, 47, 48 and 53 to a 0 (zero) for sorting purposes.
*The Agencyid and Servicesiteid are the agency and clinic the participant currently belongs to; this may not
reflect the agency/clinic where the contact was made.
*The WICstatus is the participant’s current WIC Type and may not reflect the participant’s WIC Type at the
time the contact was made.
1|Page
MN Department of Health WIC Program
Peer Active and Closed Client List
•••
*To create a comprehensive list of clients for the peer once the repot has been saved to Excel remove
duplicates:
•
Click the Data tab
•
Click the Remove Duplicates icon
•
Click the Unselect All button
•
Select the Householdid checkbox
•
Click the OK button
•
Click the OK button on the message indicating the number of remaining unique values
Tab 1 – BF Counselor ID
Tab 2 – Peer Client List
Prompt(s)
TABLE
BFCOUNSELORCONTACT
FIELD
OPERATOR
Bfcounselorid
Like
Contactdate
Greater than
or Equal to
VALUE
########
(use semi-colon to
separate; no spaces)
PROMPT/DEFINITION
Enter BF Counselor ID(s).
The IDs associate with the peer
counselors for whom the report
should be run.
Enter Contact Start Date.
BFCOUNSELORCONTACT
2|Page
mm/dd/yy
The first date in the desired time
period (the end date is the
current date).
Peer Active and Closed Client List
•••
Static Criteria
Begin Contacts Query
BFCOUNSELORCONTACTTOPIC.Bfcontacttopicid In List (1, 2, 3, 4, 5, 47, 48, 50, 51, 52, 53)
Explanation: Only include records with these types of contacts
SQL: MAX(dbo.BFCOUNSELORCONTACT.Contactdate)
Explanation: Include records with the most recent contact date
Peer Client List Query
BFCOUNSELORCONTACT.Statewicid Equal to Statewicid in Begin Contacts query
Explanation: Only include participants identified by the Begin Contacts query
BFCOUNSELORCONTACT.Statewicid Equal to Contactdate in Begin Contacts query
Explanation: Only include participants with contact dates specified in the Begin Contacts query
SQL: MAX(dbo.PREGNANCY.Expdelivdate)
Explanation: Include records with the most recent expected delivery date
Tab 1 – BF Counselor IDs
Columns
•
•
•
•
BFCounselorID (BFCOUNSELOR.BFCounselorID)
First Name (BRCOUNSELOR.FirstName)
Last Name (BFCOUNSELOR.LastName)
User ID (BFCOUNSELOR.UserID)
Sorted by
Firstname (Ascending)
Tab 2 – Peer Client List
Columns
•
•
•
•
•
•
•
•
Statewicid (BFCOUNSELORCONTACT.StateWICID)
Householdid (BFCOUNSELORCONTACT.HouseholdID)
Contact Date (BFCOUNSELORCONTACT.ContactDate)
Adjusted contact type See VARIABLES
Createuserid (BFCOUNSELORCONTACT.Createuserid)
Bfcounselorid (BFCOUNSELORCONTACT.BFCounselorID)
Bfcontacttopicid (BFCOUNSELORCONTACTTOPIC.BFContactTopicID)
Wicstatus (MEMBER.WICStatus)
3|Page
Peer Active and Closed Client List
•••
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Terminateddate (MEMBER.TerminatedDate)
Firstname (MEMBER.FIrstName)
Lastname (MEMBER.LastName)
ExpDelivDate (PREGNANCY.ExpDelivDate)
Actdelivdate (POSTPARTUM.ActDelivDate)
Mailaddress (HOUSEHOLD.Mailaddress)
Mailcity (HOUSEHOLD.Mailcity)
Mailzip (HOUSEHOLD.Mailzip)
Telephone1 (HOUSEHOLD.Telephone1)
Comment1 (HOUSEHOLD.Comment1)
Telephone2 (HOUSEHOLD.Telephone2)
Comment2 (HOUSEHOLD.Comment2)
Raceethnicity (MEMBER.RaceEthnicity)
Interpreterneeded (HOUSEHOLD.InterpreterNeeded)
Language1 (HOUSEHOLD.Language1)
Agencyid (MEMBER.AgencyID)
Servicesiteid (MEMBER.ServiceSiteID)
Sorted by
•
•
•
•
Household ID (Ascending)
Contactdate (Descending)
Expdelivdate (Descending)
Adjusted contact type (Descending
4|Page
Peer Active and Closed Client List
•••
Technical Notes
Notes
The Operator of Matches Pattern is used with wildcards in prompts; this converts to “like” in SQL.
The Begin Contacts query was created first to identify the MAX Contactdate for participants who meet the Contactdate
and Bfcounselorid criteria (prompts).
Since peer contacts can be provided to participants other than pregnant women, the INNER JOIN between
PREGNANCY and CERTCONTACT was changed to a FULL OUTER JOIN to include records that do not have an
EDD/EDC.
The link between the CERTCONTACT and MEMBER tables was changed from Certificationid to Statewicid since the
Certificationid updates in the MEMBER record when pseudo-certs are created.
Variables
Adjusted contact type =If ([Peer Client List].[Bfcontacttopicid] InList(1;5;47;48;53)) Then 0 Else [Peer Client
List].[Bfcontacttopicid]
Formulas
Zip Code (column): =Left([Mailzip];5)
Telephone 1 (column): =If IsNull([Telephone1]) Then " " Else If [Telephone1] = "" Then " " Else "("+ Left([Telephone1];3)+")
"+Substr([Telephone1];4;3)+"-"+Right([Telephone1];4)
Telephone 2 (column): =If IsNull([Telephone2]) Then " " Else If [Telephone2] = "" Then " " Else "("+
Left([Telephone2];3)+") "+Substr([Telephone2];4;3)+"-"+Right([Telephone2];4)
SQL (changes are highlighted)
BF Counselor IDs & Names Query
SELECT
dbo.BFCOUNSELOR.BFCOUNSELORID,
dbo.BFCOUNSELOR.FIRSTNAME,
dbo.BFCOUNSELOR.LASTNAME,
dbo.BFCOUNSELOR.USERID
FROM
dbo.BFCOUNSELOR
5|Page
Peer Active and Closed Client List
•••
Begin Contacts Query
SELECT
dbo.BFCOUNSELORCONTACT.STATEWICID,
MAX( dbo.BFCOUNSELORCONTACT.CONTACTDATE),
dbo.BFCOUNSELORCONTACT.BFCOUNSELORID,
dbo.BFCOUNSELORCONTACTTOPIC.BFCONTACTTOPICID
FROM
dbo.BFCOUNSELORCONTACT INNER JOIN dbo.BFCOUNSELORCONTACTTOPIC ON
(dbo.BFCOUNSELORCONTACT.BFCOUNSELORCONTACTID=dbo.BFCOUNSELORCONTACTTOPIC.BFCOUNSELO
RCONTACTID)
WHERE
(
dbo.BFCOUNSELORCONTACT.BFCOUNSELORID IN @prompt('Enter BF Counselor ID(s):','N','Dbo
Bfcounselorcontact\Bfcounselorid',Multi,Free,Persistent,,User:0)
AND
dbo.BFCOUNSELORCONTACTTOPIC.BFCONTACTTOPICID IN ( 1, 2, 3, 4, 5, 47, 48, 50, 51, 52, 53 )
AND
dbo.BFCOUNSELORCONTACT.CONTACTDATE >= @prompt('Enter Contact Start Date:','D','Dbo
Bfcounselorcontact\Contactdate',Mono,Free,Persistent,,User:1)
)
GROUP BY
dbo.BFCOUNSELORCONTACT.STATEWICID,
dbo.BFCOUNSELORCONTACT.BFCOUNSELORID,
dbo.BFCOUNSELORCONTACTTOPIC.BFCONTACTTOPICID
Peer Client List Query
SELECT
dbo.BFCOUNSELORCONTACT.STATEWICID,
dbo.BFCOUNSELORCONTACT.CONTACTDATE,
dbo.BFCOUNSELORCONTACT.BFCOUNSELORID,
dbo.BFCOUNSELORCONTACTTOPIC.BFCONTACTTOPICID,
dbo.MEMBER.HOUSEHOLDID,
dbo.MEMBER.AGENCYID,
dbo.MEMBER.SERVICESITEID,
dbo.MEMBER.FIRSTNAME,
dbo.MEMBER.LASTNAME,
dbo.MEMBER.RACEETHNICITY,
dbo.MEMBER.WICSTATUS,
dbo.MEMBER.TERMINATEDDATE,
dbo.HOUSEHOLD.MAILADDRESS,
dbo.HOUSEHOLD.MAILCITY,
dbo.HOUSEHOLD.MAILZIP,
dbo.HOUSEHOLD.EMAILADDRESS,
dbo.HOUSEHOLD.TELEPHONE1,
dbo.HOUSEHOLD.COMMENT1,
dbo.HOUSEHOLD.TELEPHONE2,
6|Page
Peer Active and Closed Client List
•••
dbo.HOUSEHOLD.COMMENT2,
dbo.HOUSEHOLD.LANGUAGE1,
dbo.HOUSEHOLD.INTERPRETERNEEDED,
dbo.POSTPARTUM.ACTDELIVDATE,
MAX(dbo.PREGNANCY.EXPDELIVDATE),
dbo.BFCOUNSELORCONTACT.CREATEUSERID
FROM
dbo.HOUSEHOLD INNER JOIN dbo.MEMBER ON
(dbo.MEMBER.HOUSEHOLDID=dbo.HOUSEHOLD.HOUSEHOLDID)
INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID)
FULL OUTER JOIN dbo.PREGNANCY ON
(dbo.PREGNANCY.PREGNANCYID=dbo.CERTCONTACT.PREGNANCYID)
INNER JOIN dbo.BFCOUNSELORCONTACT ON
(dbo.MEMBER.STATEWICID=dbo.BFCOUNSELORCONTACT.STATEWICID)
INNER JOIN dbo.BFCOUNSELORCONTACTTOPIC ON
(dbo.BFCOUNSELORCONTACT.BFCOUNSELORCONTACTID=dbo.BFCOUNSELORCONTACTTOPIC.BFCOUNSELO
RCONTACTID)
FULL OUTER JOIN dbo.POSTPARTUM ON (dbo.MEMBER.STATEWICID=dbo.POSTPARTUM.STATEWICID)
WHERE
(
dbo.BFCOUNSELORCONTACT.BFCOUNSELORID IN @prompt('Enter BF Counselor ID(s):','N','Dbo
Bfcounselorcontact\Bfcounselorid',Multi,Free,Persistent,,User:0)
AND
dbo.BFCOUNSELORCONTACTTOPIC.BFCONTACTTOPICID IN ( 1, 2, 3, 4, 5, 47, 48, 50, 51, 52, 53 )
AND
dbo.BFCOUNSELORCONTACT.STATEWICID IN @dpvalue('A', DP0.DO390)
AND
dbo.BFCOUNSELORCONTACT.CONTACTDATE IN @dpvalue('D', DP0.DO391)
)
GROUP BY
dbo.BFCOUNSELORCONTACT.STATEWICID,
dbo.BFCOUNSELORCONTACT.CONTACTDATE,
dbo.BFCOUNSELORCONTACT.BFCOUNSELORID,
dbo.BFCOUNSELORCONTACTTOPIC.BFCONTACTTOPICID,
dbo.MEMBER.HOUSEHOLDID,
dbo.MEMBER.AGENCYID,
dbo.MEMBER.SERVICESITEID,
dbo.MEMBER.FIRSTNAME,
dbo.MEMBER.LASTNAME,
dbo.MEMBER.RACEETHNICITY,
dbo.MEMBER.WICSTATUS,
dbo.MEMBER.TERMINATEDDATE,
dbo.HOUSEHOLD.MAILADDRESS,
dbo.HOUSEHOLD.MAILCITY,
dbo.HOUSEHOLD.MAILZIP,
dbo.HOUSEHOLD.EMAILADDRESS,
dbo.HOUSEHOLD.TELEPHONE1,
7|Page
Peer Active and Closed Client List
•••
dbo.HOUSEHOLD.COMMENT1,
dbo.HOUSEHOLD.TELEPHONE2,
dbo.HOUSEHOLD.COMMENT2,
dbo.HOUSEHOLD.LANGUAGE1,
dbo.HOUSEHOLD.INTERPRETERNEEDED,
dbo.POSTPARTUM.ACTDELIVDATE,
dbo.BFCOUNSELORCONTACT.CREATEUSERID
BF Contact Topics Query
SELECT
dbo.BFCONTACTTOPIC.BFCONTACTTOPICID,
dbo.BFCONTACTTOPIC.DESCRIPTION
FROM
dbo.BFCONTACTTOPIC
8|Page
© Copyright 2026 Paperzz