Report Overview
•••
A list of participants who belong to
the specified agencies and have more
than one hemoglobin record with the
Hemoglobin Not Done
Infoview Report Template Guidance –
HEIGHT/WEIGHT & BLOOD
Exception Reason CPA determined
Notes
not due for blood within the past
*In general, participants should have a hemoglobin measurement
nine months.
every year or at every other contact, at either a certification or a Midcertification Assessment (MCA). This report identifies participants
that have two instances of CPA determined not due for blood work within the past 9 months. For these
participants, all blood records within the past year are displayed in the report output to help determine
whether this selection was appropriate. This may also assist with assessing whether staff are incorrectly
selecting this reason when entering data into the Participant Folder (CPA determined not due for blood work is
only necessary in the Certification Guided Script or MCA Guided Script if blood is required by the system but
not by policy).
*The Agency ID is based on where the participant currently belongs.
*The WIC Type is based on the participant’s WIC type at the time of the blood measurement and may no
longer reflect their current WIC status.
*The Age as of Date column is calculated based on the participant’s date of birth and the date of the blood
record.
*This report can only be run for one agency at a time.
Prompt(s)
TABLE
FIELD
MEMBER
Agencyid
1|Page
OPERATOR
VALUE
In List
###
PROMPT/DEFINITION
Enter 3-digit Agency ID(s).
Agency participants currently belong to.
MN Department of Health WIC Program
Hemoglobin Not Done
•••
Static Criteria
Find Duplicates Records Query
BLOODWORK.Exceptionreason Equal to 3
Explanation: Identify participants with an Exception Reason of CPA determined not due for bloodwork
SQL: COUNT(dbo.BLOODWORK.Statewicid)
Explanation: Count the number of State WIC IDs See TECHNICAL NOTES
SQL: HAVING COUNT(dbo.BLOODWORK.Statewicid) > 1
Explanation: Include only those State WIC IDs that have more than one record
SQL: (dbo.BLOODWORK.Resultdate > CURRENT_TIMESTAMP AND (dbo.BLOODWORK.Resultdate <
DATEADD(DAY, -270, CURRENT_TIMESTAMP))
Explanation: Include only those records with a measurement date between the current date and 270 days (9
months) in the past
All Records Query
BLOODWORK.Statewicid In List Statewicid from Find Duplicate Records query
Explanation: Include only participants identified by the Find Duplicate Records query
SQL: dbo.REFERENCEDICTIONARY.Category = ‘BLDWRKEXCP’ OR
dbo.BLOODWORK.Exceptionreason is Null
Explanation: For the identified records, use the Description that corresponds with the bloodwork exception
category; if there isn’t a description (the Exception Reason is null) then still display the identified records
SQL: (dbo.BLOODWORK.Resultdate > CURRENT_TIMESTAMP AND (dbo.BLOODWORK.Resultdate <
DATEADD(DAY, -365, CURRENT_TIMESTAMP))
Explanation: Include only those records with a measurement date between the current date and 365 days (one
year) in the past
Tab 1 – Labels by Household & Auth Rep
Columns (top row)
•
•
•
•
•
Agency ID (MEMBER.Agencyid)
DOB (MEMBER.Dateofbirth)
Blood Rcd Date (BLOODWORK.Resultdate)
Exception Reason (REFERENCEDICTIONARY.Description) See FORMULAS
Staff ID (BLOODWORK.Createuserid)
2|Page
Hemoglobin Not Done
•••
Columns (bottom row)
•
•
•
•
•
Clinic ID (MEMBER.Servicesiteid)
WIC Type (BLOODWORK.Wicstatus)
Age as of Date See FORMULAS
Hgb Value (BLOODWORK.Hemoglobin) See FORMULAS
Entered Into See FORMULAS
Sorted by
Blood Rcd Date (Ascending)
Grouped by
State WIC ID (Ascending)
3|Page
Hemoglobin Not Done
•••
Technical Notes
Notes
Infoview automatically joins the REFERENCEDICTIONARY table to the HEALTHNOTE table. These joins were
removed and the REFERENCEDICTIONARY.Externalid was joined to BLOODWORK.Exceptionreason. A FULL OUTER
JOIN was used so that records without an exception reason, those that have a hemoglobin value instead, would also be
included in the report output.
This report first identifies participants (State WIC IDs) with duplicate records during a 9-month period in the Find
Duplicate Records query. It then takes those State WIC IDs and pulls all blood records within the last 365 days and displays
them on the report output.
To identify duplicate records: must use only one table. Select Statewicid and a NUMBER field for the Result Objects
(BLOODWORK.Statewicid and BLOODWORK.Hemoglobin were used). In the SELECT statement, the
BLOODWORK.Hemoglobin field was changed to COUNT (BLOODWORK.StateWICID) – this avoids the mismatched
columns error that would occur if we did not have the NUMBER field in our Result Objects. We then have to GROUP BY
the StateWIC ID and add the HAVING statement.
An Age variable was created to shorten the length of the Age formula. A formula was used because the age that
displays in HuBERT for each measurement is calculated when the screen displays; it is not saved to the database.
This report is limited to only being run for one Agency ID because issues occurred when attempting to run by multiple
agencies and group the report by the Agency ID.
Variables
Age =If [Wicstatus] = "I" Or [Wicstatus] = "C" Then MonthsBetween([Dateofbirth];[Resultdate]) + " mo." Else If [Wicstatus]
= "P" Or [Wicstatus] = "B" Or [Wicstatus] = "N" Then Round(((DaysBetween([Dateofbirth];[Resultdate]))/365.25);0) + " y.o."
Formulas
Agency (report header) =[Name] + " (" + [Agencyid] + ")"
Report Date (report header) ="Report Date: " + CurrentDate()
Exception Reason (column) =If IsNull([Description]) Then "NA" Else [Description]
Age as of Date (column) =If [Age] = "25 mo." Then "2 y 1 m" Else If [Age] = "26 mo." Then "2 y 2 m" Else If [Age] = "27 mo."
Then "2 y 3 m" Else If [Age] = "28 mo." Then "2 y 4 m" Else If [Age] = "29 mo." Then "2 y 5 m" Else If [Age] = "30 mo." Then
"2 y 6 m" Else If [Age] = "31 mo." Then "2 y 7 m" Else If [Age] = "32 mo." Then "2 y 8 m" Else If [Age] = "33 mo." Then "2 y 9
m" Else If [Age] = "34 mo." Then "2 y 10 m" Else If [Age] = "35 mo." Then "2 y 11 m" Else If [Age] = "36 mo." Then "3 y.o. "
Else If [Age] = "37 mo." Then "3 y 1 m" Else If [Age] = "38 mo." Then "3 y 2 m" Else If [Age] = "39 mo." Then "3 y 3 m" Else If
[Age] = "40 mo." Then "3 y 4 m" Else If [Age] = "41 mo." Then "3 y 5 m" Else If [Age] = "42 mo." Then "3 y 6 m" Else If [Age]
= "43 mo." Then "3 y 7 m" Else If [Age] = "44 mo." Then "3 y 8 m" Else If [Age] = "45 mo." Then "3 y 9 m" Else If [Age] = "46
4|Page
Hemoglobin Not Done
•••
mo." Then "3 y 10 m" Else If [Age] = "47 mo." Then "3 y 11 m" Else If [Age] = "48 mo." Then "4 y.o." Else If [Age] = "49 mo."
Then " 4 y 1 m" Else If [Age] = "50 mo." Then "4 y 2 m" Else If [Age] = "51 mo." Then "4 y 3 m" Else If [Age] = "52 mo." Then
"4 y 4 m" Else If [Age] = "53 mo." Then "4 y 5 m" Else If [Age] = "54 mo." Then "4 y 6 m" Else If [Age] = "55 mo." Then "4 y 7
m" Else If [Age] = "56 mo." Then "4 y 8 m" Else If [Age] = "57 mo." Then "4 y 9 m" Else If [Age] = "58 mo." Then "4 y 10 m"
Else If [Age] = "59 mo." Then "4 y 11 m" Else If [Age] = "60 mo." Then "5 y.o." Else [Age]
Hemoglobin Value (column) =If IsNull([All Records].[Hemoglobin]) Then "No Hgb" Else [All Records].[Hemoglobin]
Entered Into (column) =If IsNull([Certstartdate]) Then "PF or MCA" Else "CGS"
SQL (changes are highlighted)
Find Duplicate Records Query
SELECT
dbo.BLOODWORK.STATEWICID,
COUNT(dbo.BLOODWORK.STATEWICID)
FROM
dbo.BLOODWORK
WHERE
(
dbo.BLOODWORK.EXCEPTIONREASON = '3'
AND
(
dbo.BLOODWORK.RESULTDATE < CURRENT_TIMESTAMP AND
(dbo.BLOODWORK.RESULTDATE > DATEADD(DAY,-270,CURRENT_TIMESTAMP))
)
)
GROUP BY
dbo.BLOODWORK.STATEWICID
HAVING
COUNT(dbo.BLOODWORK.STATEWICID) > 1
All Records Query
SELECT
dbo.MEMBER.AGENCYID,
dbo.MEMBER.SERVICESITEID,
dbo.AGENCY.NAME,
dbo.BLOODWORK.STATEWICID,
dbo.BLOODWORK.RESULTDATE,
dbo.BLOODWORK.WICSTATUS,
dbo.BLOODWORK.EXCEPTIONREASON,
dbo.BLOODWORK.CREATEUSERID,
dbo.BLOODWORK.HEMOGLOBIN,
5|Page
Hemoglobin Not Done
•••
dbo.MEMBER.DATEOFBIRTH,
dbo.BLOODWORK.CERTSTARTDATE,
dbo.REFERENCEDICTIONARY.DESCRIPTION,
dbo.MEMBER.HOUSEHOLDID
FROM
dbo.BLOODWORK INNER JOIN dbo.MEMBER ON (dbo.MEMBER.STATEWICID=dbo.BLOODWORK.STATEWICID)
FULL OUTER JOIN dbo.REFERENCEDICTIONARY ON
(dbo.REFERENCEDICTIONARY.EXTERNALID=dbo.BLOODWORK.EXCEPTIONREASON)
INNER JOIN dbo.AGENCY ON (dbo.AGENCY.AGENCYID=dbo.MEMBER.AGENCYID)
WHERE
(
dbo.MEMBER.AGENCYID = @prompt('Enter 3-digit Agency ID:','A','Dbo
Member\Agencyid',Mono,Free,Persistent,,User:0)
AND
dbo.BLOODWORK.STATEWICID IN @dpvalue('A', DP0.DO17e)
AND
(dbo.REFERENCEDICTIONARY.CATEGORY = 'BLDWRKEXCP'
OR
dbo.BLOODWORK.EXCEPTIONREASON IS NULL)
AND
(
dbo.BLOODWORK.RESULTDATE < CURRENT_TIMESTAMP AND
(dbo.BLOODWORK.RESULTDATE > DATEADD(DAY,-365,CURRENT_TIMESTAMP))
)
)
6|Page
© Copyright 2026 Paperzz