MN WIC PROGRAM
Low Hemoglobin
HEIGHT, WEIGHT & BLOOD (REVISED 11.21.16)
Report Overview
A list of participants, based on their WIC Type at the time of measurement, who belong to the
specified agencies and have had a hemoglobin measurement taken during the specified time
period that is less than or equal to the specified hemoglobin value. The report output includes
three different lists: 1) A list and count of all participants with a low hemoglobin; 2) A list all of
hemoglobin records for those participants; and 3) A list of the most recent hemoglobin
measurements that have occurred since the Start Date entered into the prompt.
Some uses include:
•
Identify participants with low hemoglobin for chart audits or follow-up.
•
Review all hemoglobin records to determine whether WIC intervention has been
successful.
Notes
▪
The Age at Measurement for infants and children rounds down to their current age in
months. For women, it rounds to the nearest year.
▪
A participant may appears more than once in Tab 1 – Low Hgb if they have more than one
low measurement during the specified time period.
▪
The WIC Type entered into the PROMPT is based on the participant’s WIC Type at the time
of the hemoglobin measurement. The participant’s current WIC Type is also displayed in
the report output.
▪
High Risk status is based on the following:
▪
If High Risk is CPA-assigned (MEMBER.Highrisk = Y and CERTCONTACT.Highrisk = N) then
High Risk is Y.
▪
If the most recent High Risk record (Max CERTCONTACT.Highrisk) for the most recent
certification is Y then High Risk is Y.
▪
NOTE: Issue TMP-223 in which the CERTCONTACT record is incorrectly indicating High
Risk = Y may result in random records incorrectly displaying as high risk. (More
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
information is available on the Identified Issues with Current HuBERT Releases page on
the MDH WIC website.)
▪
The Next Appointment Date in Tab 1 – Low Hgb is based on the max appointment date after
the current date (i.e. if a participant has more than one appointment scheduled on a future
date, only the date scheduled furthest in the future will display). The column will be blank if
the participant does not have any future appointments scheduled.
▪
The Agency ID and Clinic ID are based on the agency/clinic the participant currently belongs
to. This may not reflect the agency/clinic where the hemoglobin measurement was taken.
Therefore, some Staff IDs may belong to other agencies.
▪
The Months bn Measurements in Tabs 2 and 3 is a calculated value that always rounds the
number of months, between the dates in the current row and the row just above, down.
▪
The Change is the difference between the Hgb Value in the current row and the row just
above. If there is no value in the current row or the row above, NA will display.
▪
If an agency collects Cultural Identity information in State Use Code #6, the selected cultural
identity will display in the Race/Ethnicity or Cultural Identity column. Otherwise, the race/
ethnicity displays, which is consistent with the MDH WIC annual reports.
▪
▪
Asian NH: Participants with race/ethnicity codes of 202 (Non-Hispanic Asian) and 204
(Non-Hispanic Native Hawaiian or Other Pacific Islander);
▪
> 1 Race NH: All Non-Hispanic participants with multiple races;
▪
HISPANIC All Races: All participants with an ethnicity of Hispanic or Latino; and
▪
UNK Race: Participants without a race/ethnicity, as sometimes occurs with VO
The HR FU Note in Tab 2 – All Hgb Records indicates if a note that meets all of the following criteria
has been written:
▪
The date the note was written is the same as the date the hemoglobin was measured;
▪
The hemoglobin measurement was NOT performed on the same date as a certification; and
▪
The Note Subject is one of the following: High Risk, High Risk Follow-up, High Risk Resolution or
SOAP Follow-up.
▪
All tabs in the report output are formatted to download to an 8 x 11.5 inch Landscape PDF.
The report can also be exported to Excel (the margins will need to be adjusted and the
headers/footers may not display.)
▪
Page breaks occur at change of Agency ID.
Page |2
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
Tab 1 – Low Hgb
Tab 2 – All Hgb Records
Tab 3 – Recent Hgb Records
Page |3
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
Prompts
TABLE
FIELD
MEMBER
Agencyid
BLOODWORK
Hemoglobin
OPERATOR
VALUE
Enter 3-digit Agency ID(s).
(separate with semi- The agency where the participant
colon; no spaces)
currently belongs.
### or ###
In List
Less than or
Equal to
## or ##.#
B;C;I;N;P
BLOODWORK
BLOODWORK
BLOODWORK
Wicstatus
Resultdate
Resultdate
In List
PROMPT/DEFINITIONS
(one or multiple - use
semi-colon to separate;
no spaces)
And
And
Enter Hemoglobin:
The upper limit for the
hemoglobin value.
Enter WIC Type(s):
The participant’s WIC Type at the
time of the hemoglobin
measurement.
mm/dd/yy
Enter Start Date.
The first date in the time period
during which the participant had
a low hemoglobin measurement.
mm/dd/yy
Enter End Date.
The last date in the time period
during which the participant had
a low hemoglobin measurement.
Static Criteria
Low Query
SQL (SELECT): MAX(dbo.APPOINTMENT.APPOINTMENTDATE)
Explanation: Include the last appointment scheduled
(dbo.APPOINTMENT.APPOINTMENTDATE > CURRENT_TIMESTAMP
or (dbo.APPOINTMENT.APPOINTMENTDATE Is Null
or dbo.APPOINTMENT.APPOINTMENTDATE <= CURRENT_TIMESTAMP)
Explanation: Include the record if appointments are scheduled in the future OR include the record if no
appointments are scheduled or include the record if appointments are scheduled for today or in the past (have to
include all scenarios or participants will be excluded since Appointmentdate is one of the report objects).
dbo.CERTCONTACT.Certstartdate = dbo.MEMBER.Certstartdate
Explanation: Include the most recent certification record.
All Query
SQL (SELECT): DATEADD(dd, DATEDIFF(dd, 0, dbo.HEALTHNOTE.Createdttm), 0)
Page |4
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
Explanation: Remove the timestamp from the HEALTHNOTE.Createdttm report object.
SQL (SELECT): MAX(dbo.CERTCONTACT.Highrisk)
Explanation: Include the most recent high risk record.
Dbo.MEMBER.Statewicid in List of Statewicids from Low Query
Explanation: Include State WIC IDs identified by the Low Query only
(dbo.HEALTHNOTE.CERTSTARTDATE Is Null
AND dbo.HEALTHNOTE.NOTESUBJECTID IN ( '10','11','HR','N' )
AND CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101) = dbo.BLOODWORK.Resultdate)
OR dbo.HEALTHNOTE.Createdttm Is Null
OR dbo.HEALTHNOTE.NOTESUBJECTID NOT IN ( '10','11','HR','N' )
Explanation: Include note record if the Cert Start Date is blank (not associated with a certification), the type is HR,
HR FU, HR Resolution or SOAP FU and the date the note was created (remove the timestamp) is the same as the
date of the hemoglobin measurement OR include if no note OR include if note subject is not HR, HR FU, HR
Resolution or SOAP FU ((have to include all scenarios or participants will be excluded since
HEALTHNOTE.Createdttm and HEALTHNOTE.Subjetid are both report objects).
Recent Query
SQL (SELECT): MAX(dbo.CERTCONTACT.Highrisk)
Explanation: Include the most recent high risk record.
BLOODWORK.Hemoglobin is Not Null
Explanation: Include all hemoglobin records that have a hemoglobin value (exclude any records where CPA
determined not required).
Tab 1 – Low Hgb
Columns
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
▪
HH ID (MEMBER.Householdid)
State WIC ID (MEMBER.Statewicid)
DOB (MEMBER.Dateofbirth)
Age – when measured See VARIABLES and FORMULAS
Staff ID (BLOODWORK.Createuserid)
Hgb Date (BLOOWORK.Resultdate)
Hgb Value (BLOODWORK.Hemoglobin)
WIC Type – when measured (BLOODWORK.Wicstatus)
Measured at Cert/Recert See FORMULAS
Current Cert Start Date (MEMBER.Certstartdate)
Current Cert End Date (MEMBER.Certificationduedate)
Current WIC Type (MEMBER.Wicstatus)
High Risk – Most Recent Cert (CERTCONTACT.Highrisk) See FORMULAS
Page |5
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
▪
▪
▪
Race/Ethnicity or Cultural Identity See VARIABLES and FORMULAS
Next Appt Date See FORMULAS
Clinic ID (MEMBER.Servicesiteid)
Grouped by
Agency ID – Ascending See FORMULAS
Sorted by
State WIC ID - Ascending
Counts
State WIC ID (Distinct)
Tab 2 – All Hgb Records
Columns
Table 1
▪ Household ID (MEMBER.Householdid)
▪ DOB (MEMBER.Dateofbirth)
▪ Current Cert Start Date (MEMBER.Certstartdate)
▪ Current Cert End Date (MEMBER.Certificationduedate)
▪ Current WIC Type (MEMBER.Wicstatus)
▪ High Risk – Most Recent Cert (CERTCONTACT.Highrisk) See FORMULAS
▪ Race/Ethnicity or Cultural Identity See VARIABLES and FORMULAS
▪ Clinic ID (MEMBER.Servicesiteid)
Table 2
▪ Age at Measurement See VARIABLES and FORMULAS
▪ Staff ID (BLOODWORK.Createuserid)
▪ Measurement Date (BLOOWORK.Resultdate)
▪ Months bn Measurements See FORMULAS
▪ Hgb Value (BLOODWORK.Hemoglobin)
▪ Change See FORMULAS
▪ Reason if No Hgb Value See FORMULAS
Grouped by
▪
▪
Agency ID – Ascending See FORMULAS
State WIC ID – Ascending See FORMULAS
Sorted by
Measurement Date - Ascending
Page |6
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
Tab 3 – Recent Hgb Records
Columns
Table 1
▪ Household ID (MEMBER.Householdid)
▪ DOB (MEMBER.Dateofbirth)
▪ Current Cert Start Date (MEMBER.Certstartdate)
▪ Current Cert End Date (MEMBER.Certificationduedate)
▪ Current WIC Type (MEMBER.Wicstatus)
▪ High Risk – Most Recent Cert (CERTCONTACT.Highrisk) See FORMULAS
▪ Race/Ethnicity or Cultural Identity See VARIABLES and FORMULAS
▪ Clinic ID (MEMBER.Servicesiteid)
Table 2
▪ Age at Measurement See VARIABLES and FORMULAS
▪ Staff ID (BLOODWORK.Createuserid)
▪ Measurement Date (BLOOWORK.Resultdate)
▪ Months bn Measurements See FORMULAS
▪ Hgb Value (BLOODWORK.Hemoglobin)
▪ Change See FORMULAS
▪ Reason if No Hgb Value See FORMULAS
Grouped by
▪
▪
Agency ID – Ascending See FORMULAS
State WIC ID – Ascending See FORMULAS
Sorted by
Measurement Date - Ascending
Page |7
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
Technical Notes
Notes
In order to remove duplicate rows caused by the High Risk – Most Recent Cert column where a row existed where
HR was both Y and N, the Max() function was used.
Variables
[Age] =If [All].[Dbo Member].[Wicstatus] = "I" Or [All].[Dbo Member].[Wicstatus] = "C" Then
MonthsBetween([All].[Dateofbirth];[All].[Resultdate]) + " mo." Else If [All].[Dbo Member].[Wicstatus] = "P" Or
[All].[Dbo Member].[Wicstatus] = "B" Or [All].[Dbo Member].[Wicstatus] = "N" Then
Round(((DaysBetween([Dateofbirth];[All].[Resultdate]))/365.25);0) + " y.o."
[AgeRecent] =If [Recent].[Dbo Member].[Wicstatus] = "I" Or [Recent].[Dbo Member].[Wicstatus] = "C" Then
MonthsBetween([Recent].[Dateofbirth];[Recent].[Resultdate]) + " mo." Else If [Recent].[Dbo Member].[Wicstatus]
= "P" Or [Recent].[Dbo Member].[Wicstatus] = "B" Or [Recent].[Dbo Member].[Wicstatus] = "N" Then
Round(((DaysBetween([Dateofbirth];[Recent].[Resultdate]))/365.25);0) + " y.o."
[HRFU] =If [Createdttm] = [Resultdate] And IsNull([All].[Dbo Bloodwork].[Certstartdate]) And [Notesubjectid]
InList("10";"11";"HR";"N") Then "Yes"
[V_RaceAll] =If [All].[Raceethnicity] = "201" Then "Amer Indian NH" Else If [All].[Raceethnicity] InList("202";"204")
Then "Asian NH" Else If [All].[Raceethnicity] = "203" Then "Black/African Amer NH" Else If [All].[Raceethnicity] =
"205" Then "White NH" Else If [All].[Raceethnicity] Between("206";"231") Then "> 1 Race NH" Else If
[All].[Raceethnicity] Between("101";"131") Then "HISPANIC All Races" Else If ([All].[Raceethnicity] InList
("10";"20";"30";"40";"50") Or IsNull([All].[Raceethnicity])) Then "UNK Race"
[V_RaceLow] =If [Low].[Raceethnicity] = "201" Then "Amer Indian NH" Else If [Low].[Raceethnicity]
InList("202";"204") Then "Asian NH" Else If [Low].[Raceethnicity] = "203" Then "Black/African Amer NH" Else If
[Low].[Raceethnicity] = "205" Then "White NH" Else If [Low].[Raceethnicity] Between("206";"231") Then "> 1 Race
NH" Else If [Low].[Raceethnicity] Between("101";"131") Then "HISPANIC All Races" Else If ([Low].[Raceethnicity]
InList ("10";"20";"30";"40";"50") Or IsNull([Low].[Raceethnicity])) Then "UNK Race"
[V_RaceRecent] =If [Recent].[Raceethnicity] = "201" Then "Amer Indian NH" Else If [Recent].[Raceethnicity]
InList("202";"204") Then "Asian NH" Else If [Recent].[Raceethnicity] = "203" Then "Black/African Amer NH" Else If
[Recent].[Raceethnicity] = "205" Then "White NH" Else If [Recent].[Raceethnicity] Between("206";"231") Then "> 1
Race NH" Else If [Recent].[Raceethnicity] Between("101";"131") Then "HISPANIC Recent Races" Else If
([Recent].[Raceethnicity] InList ("10";"20";"30";"40";"50") Or IsNull([Recent].[Raceethnicity])) Then "UNK Race"
Page |8
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
Formulas
Tab 1 – Low Hgb
Title (page header) ="Participants with Low Hemoglobin (<= " + UserResponse("Enter Hemoglobin:") + ") - WIC
Types = " + UserResponse("Enter WIC Type(s):")
Report Dates (report header) ="Report Dates: " + FormatDate(ToDate(UserResponse("Enter Start
Date:");"M/d/yyyy hh:mm:ss A");"MM/dd/yyyy") + " - " + FormatDate(ToDate(UserResponse("Enter End
Date:");"M/d/yyyy hh:mm:ss A");"MM/dd/yyyy")
Run Date (page header) ="Run Date: " + CurrentDate()
Agency (group header) =[Low].[Name] + " (" + [Low].[Agencyid] + ")"
Age – when measured (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 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]
Measured at Cert/Recert (column) =If IsNull([Low].[Dbo Bloodwork].[Certstartdate]) Then "No" Else "Yes"
High Risk- Most Recent Cert (column) =Max([Low].[Highrisk])
Race/Ethnicity or Cultural Identity (column) =If IsNull([Low].[Statevalueid6]) Or [Low].[Statevalueid6] = 0 Then
[V_RaceLow] Else [Low].[Description]
Next Appt Date (column) =If [Appointmentdate] > CurrentDate() Then [Appointmentdate] Else ""
Page # (page footer) ="Page " + Page()+" of "+NumberOfPages()
Tab 2 –All Hgb Records
Title (page header) ="All Measurements for Participants with Low Hemoglobin (<= " + UserResponse("Enter
Hemoglobin:") + ") - WIC Types = " + UserResponse("Enter WIC Type(s):")
Report Dates (report header) ="Report Dates: " + FormatDate(ToDate(UserResponse("Enter Start
Date:");"M/d/yyyy hh:mm:ss A");"MM/dd/yyyy") + " - " + FormatDate(ToDate(UserResponse("Enter End
Date:");"M/d/yyyy hh:mm:ss A");"MM/dd/yyyy")
Page |9
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
Run Date (page header) ="Run Date: " + CurrentDate()
Agency (group header) =[Name] + " (" + [All].[Agencyid] + ")"
State WIC ID (group header) ="State WIC ID: " + [All].[Statewicid]
High Risk- Most Recent Cert (column) =If [All].[Dbo Member].[Highrisk] = "Y" And [All].[Dbo
Certcontact].[Highrisk] = "N" Then "Y" Else [All].[Dbo Certcontact].[Highrisk]
Race/Ethnicity or Cultural Identity (column) =If IsNull([All].[Statevalueid6]) Or [All].[Statevalueid6] = 0 Then
[V_RaceAll] Else [All].[Description]
Age – when measured (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 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]
Months bn Measurements (column) =If IsNull( -(MonthsBetween([Resultdate]; Previous([Resultdate];Col)))) Then
"NA" Else -(MonthsBetween([Resultdate];Previous( [Resultdate];Col))) + " mo"
Change (column) =If IsNull([Hemoglobin]) Then "NA" ElseIf IsNull(Previous([Hemoglobin];Col)) Then "NA" Else
[Hemoglobin] - Previous([Hemoglobin];Col)
Measured at Cert/Recert (column) =If IsNull([All].[Dbo Bloodwork].[Certstartdate]) Then "No" Else "Yes"
Reason if No Hgb Value (column) =If [All].[Exceptionreason] = "1" Then "Medical Condition (Write Note)" Else If
[All].[Exceptionreason] = "2" Then "Religious Objection (Write Note)" Else If [All].[Exceptionreason] = "3" Then
"CPA determined not due for bloodwork" Else If [All].[Exceptionreason] = "4" Then "Other (Write Note)" Else "NA"
HR FU Note =Max([HRFU])
Page # (page footer) ="Page " + Page()+" of "+NumberOfPages()
Tab 3 – Recent Hgb Records
Title (page header) ="Recent Measurements for Participants with Low Hemoglobin (<= " + UserResponse("Enter
Hemoglobin:") + ") - WIC Types = " + UserResponse("Enter WIC Type(s):")
P a g e | 10
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
Report Dates (report header) ="Report Dates: " + FormatDate(ToDate(UserResponse("Enter Start
Date:");"M/d/yyyy hh:mm:ss A");"MM/dd/yyyy") + " - " + FormatDate(ToDate(UserResponse("Enter End
Date:");"M/d/yyyy hh:mm:ss A");"MM/dd/yyyy")
Run Date (page header) ="Run Date: " + CurrentDate()
Agency (group header) =[Name] + " (" + [Recent].[Agencyid] + ")"
State WIC ID (group header) ="State WIC ID: " + [Recent].[Statewicid]
High Risk- Most Recent Cert (column) =If [Recent].[Dbo Member].[Highrisk] = "Y" And [Recent].[Dbo
Certcontact].[Highrisk] = "N" Then "Y" Else [Recent].[Dbo Certcontact].[Highrisk]
Race/Ethnicity or Cultural Identity (column) =If IsNull([Recent].[Statevalueid6]) Or [Recent].[Statevalueid6] = 0
Then [V_RaceRecent] Else [Recent].[Description]
Age – when measured (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 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]
Months bn Measurements (column) =If IsNull( -(MonthsBetween([Resultdate]; Previous([Resultdate];Col)))) Then
"NA" Else -(MonthsBetween([Resultdate];Previous( [Resultdate];Col))) + " mo"
Change (column) =If IsNull([Hemoglobin]) Then "NA" ElseIf IsNull(Previous([Hemoglobin];Col)) Then "NA" Else
[Hemoglobin] - Previous([Hemoglobin];Col)
Measured at Cert/Recert (column) =If IsNull([Recent].[Dbo Bloodwork].[Certstartdate]) Then "No" Else "Yes"
Reason if No Hgb Value (column) =If [Recent].[Exceptionreason] = "1" Then "Medical Condition (Write Note)" Else
If [Recent].[Exceptionreason] = "2" Then "Religious Objection (Write Note)" Else If [Recent].[Exceptionreason] = "3"
Then "CPA determined not due for bloodwork" Else If [Recent].[Exceptionreason] = "4" Then "Other (Write Note)"
Else "NA"
HR FU Note =Max([HRFU])
Page # (page footer) ="Page " + Page()+" of "+NumberOfPages()
P a g e | 11
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
SQL (changes are highlighted)
Low Query
SELECT
dbo.MEMBER.HOUSEHOLDID,
dbo.MEMBER.STATEWICID,
dbo.MEMBER.AGENCYID,
dbo.MEMBER.DATEOFBIRTH,
dbo.BLOODWORK.CREATEUSERID,
dbo.BLOODWORK.WICSTATUS,
dbo.BLOODWORK.CERTSTARTDATE,
dbo.BLOODWORK.RESULTDATE,
dbo.BLOODWORK.HEMOGLOBIN,
dbo.MEMBER.CERTSTARTDATE,
dbo.MEMBER.CERTIFICATIONDUEDATE,
dbo.MEMBER.WICSTATUS,
dbo.AGENCY.NAME,
dbo.MEMBER.SERVICESITEID,
dbo.MEMBER.RACEETHNICITY,
MAX(dbo.APPOINTMENT.APPOINTMENTDATE),
dbo.MEMBEROTHINFO.STATEVALUEID6,
dbo.STATEUSECODE.DESCRIPTION,
dbo.CERTCONTACT.HIGHRISK
FROM
dbo.BLOODWORK INNER JOIN dbo.MEMBER ON (dbo.MEMBER.STATEWICID=dbo.BLOODWORK.STATEWICID)
INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID)
FULL OUTER JOIN dbo.APPOINTMENT ON (dbo.APPOINTMENT.STATEWICID=dbo.MEMBER.STATEWICID)
FULL OUTER JOIN dbo.MEMBEROTHINFO ON (dbo.MEMBER.STATEWICID=dbo.MEMBEROTHINFO.STATEWICID)
FULL OUTER JOIN dbo.STATEUSECODE ON (dbo.MEMBEROTHINFO.Statevalueid6=dbo.STATEUSECODE.Valueid)
INNER JOIN dbo.AGENCY ON (dbo.AGENCY.AGENCYID=dbo.MEMBER.AGENCYID)
WHERE
(
dbo.MEMBER.AGENCYID IN @prompt('Enter 3-digit Agency ID(s):','A','Dbo Member\Agencyid',Multi,Free,Persistent,,User:0)
AND
dbo.BLOODWORK.HEMOGLOBIN <= @prompt('Enter Hemoglobin:','N','Dbo
Bloodwork\Hemoglobin',Mono,Free,Persistent,,User:1)
AND
dbo.BLOODWORK.RESULTDATE BETWEEN @prompt('Enter Start Date:','D','Dbo
Bloodwork\Resultdate',Mono,Free,Persistent,,User:2) AND @prompt('Enter End Date:','D','Dbo
Bloodwork\Resultdate',Mono,Free,Persistent,,User:3)
AND
dbo.BLOODWORK.WICSTATUS IN @prompt('Enter WIC Type(s):','A','Dbo
Bloodwork\Wicstatus',Multi,Free,Persistent,,User:4)AND
(
dbo.APPOINTMENT.APPOINTMENTDATE > CURRENT_TIMESTAMP
or
(
dbo.APPOINTMENT.APPOINTMENTDATE Is Null
or
dbo.APPOINTMENT.APPOINTMENTDATE <= CURRENT_TIMESTAMP
)
)
AND
dbo.CERTCONTACT.Certstartdate = dbo.MEMBER.Certstartdate
P a g e | 12
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
)
GROUP BY dbo.MEMBER.HOUSEHOLDID,
dbo.MEMBER.STATEWICID,
dbo.MEMBER.AGENCYID,
dbo.MEMBER.DATEOFBIRTH,
dbo.BLOODWORK.CREATEUSERID,
dbo.BLOODWORK.WICSTATUS,
dbo.BLOODWORK.CERTSTARTDATE,
dbo.BLOODWORK.RESULTDATE,
dbo.BLOODWORK.HEMOGLOBIN,
dbo.MEMBER.CERTSTARTDATE,
dbo.MEMBER.CERTIFICATIONDUEDATE,
dbo.MEMBER.WICSTATUS,
dbo.AGENCY.NAME,
dbo.MEMBER.SERVICESITEID,
dbo.MEMBER.RACEETHNICITY,
dbo.MEMBEROTHINFO.STATEVALUEID6,
dbo.STATEUSECODE.DESCRIPTION,
dbo.CERTCONTACT.HIGHRISK
All Query
SELECT
dbo.BLOODWORK.STATEWICID,
dbo.BLOODWORK.RESULTDATE,
dbo.BLOODWORK.WICSTATUS,
dbo.BLOODWORK.HEMOGLOBIN,
dbo.BLOODWORK.CREATEUSERID,
dbo.BLOODWORK.EXCEPTIONREASON,
dbo.MEMBER.DATEOFBIRTH,
dbo.MEMBER.WICSTATUS,
dbo.BLOODWORK.CERTSTARTDATE,
dbo.MEMBER.AGENCYID,
dbo.MEMBER.HOUSEHOLDID,
dbo.MEMBER.CERTSTARTDATE,
dbo.MEMBER.CERTIFICATIONDUEDATE,
dbo.MEMBER.HIGHRISK,
dbo.AGENCY.NAME,
dbo.MEMBER.SERVICESITEID,
DATEADD(dd, DATEDIFF(dd, 0, dbo.HEALTHNOTE.Createdttm), 0),
dbo.HEALTHNOTE.CREATEUSERID,
dbo.MEMBER.RACEETHNICITY,
dbo.MEMBEROTHINFO.STATEVALUEID6,
dbo.STATEUSECODE.DESCRIPTION,
MAX(dbo.CERTCONTACT.HIGHRISK),
dbo.HEALTHNOTE.NOTESUBJECTID
FROM
dbo.BLOODWORK INNER JOIN dbo.MEMBER ON (dbo.MEMBER.STATEWICID=dbo.BLOODWORK.STATEWICID)
INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID)
FULL OUTER JOIN dbo.HEALTHNOTE ON (dbo.MEMBER.STATEWICID=dbo.HEALTHNOTE.STATEWICID)
FULL OUTER JOIN dbo.MEMBEROTHINFO ON (dbo.MEMBER.STATEWICID=dbo.MEMBEROTHINFO.STATEWICID)
FULL OUTER JOIN dbo.STATEUSECODE ON (dbo.MEMBEROTHINFO.Statevalueid6=dbo.STATEUSECODE.Valueid)
INNER JOIN dbo.AGENCY ON (dbo.AGENCY.AGENCYID=dbo.MEMBER.AGENCYID)
WHERE
(
dbo.MEMBER.STATEWICID IN @dpvalue('A', DP0.DO22d)
P a g e | 13
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
(
AND
(
dbo.HEALTHNOTE.CERTSTARTDATE Is Null
AND
dbo.HEALTHNOTE.NOTESUBJECTID IN ( '10','11','HR','N' )
AND
CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101) = dbo.BLOODWORK.Resultdate
)
OR
dbo.HEALTHNOTE.Createdttm Is Null
OR
dbo.HEALTHNOTE.NOTESUBJECTID NOT IN ( '10','11','HR','N' )
)
)
GROUP BY
dbo.BLOODWORK.STATEWICID,
dbo.BLOODWORK.RESULTDATE,
dbo.BLOODWORK.WICSTATUS,
dbo.BLOODWORK.HEMOGLOBIN,
dbo.BLOODWORK.CREATEUSERID,
dbo.BLOODWORK.EXCEPTIONREASON,
dbo.MEMBER.DATEOFBIRTH,
dbo.MEMBER.WICSTATUS,
dbo.BLOODWORK.CERTSTARTDATE,
dbo.MEMBER.AGENCYID,
dbo.MEMBER.HOUSEHOLDID,
dbo.MEMBER.CERTSTARTDATE,
dbo.MEMBER.CERTIFICATIONDUEDATE,
dbo.MEMBER.HIGHRISK,
dbo.AGENCY.NAME,
dbo.MEMBER.SERVICESITEID,
DATEADD(dd, DATEDIFF(dd, 0, dbo.HEALTHNOTE.Createdttm), 0),
dbo.HEALTHNOTE.CREATEUSERID,
dbo.MEMBER.RACEETHNICITY,
dbo.MEMBEROTHINFO.STATEVALUEID6,
dbo.STATEUSECODE.DESCRIPTION,
dbo.HEALTHNOTE.NOTESUBJECTID
Recent Query
SELECT
dbo.BLOODWORK.STATEWICID,
dbo.BLOODWORK.RESULTDATE,
dbo.BLOODWORK.WICSTATUS,
dbo.BLOODWORK.HEMOGLOBIN,
dbo.BLOODWORK.CREATEUSERID,
dbo.BLOODWORK.EXCEPTIONREASON,
dbo.MEMBER.DATEOFBIRTH,
dbo.MEMBER.WICSTATUS,
dbo.BLOODWORK.CERTSTARTDATE,
dbo.MEMBER.AGENCYID,
dbo.MEMBER.HOUSEHOLDID,
dbo.MEMBER.CERTSTARTDATE,
dbo.MEMBER.CERTIFICATIONDUEDATE,
dbo.MEMBER.HIGHRISK,
P a g e | 14
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
dbo.AGENCY.NAME,
dbo.MEMBER.SERVICESITEID,
dbo.MEMBER.RACEETHNICITY,
dbo.MEMBEROTHINFO.STATEVALUEID6,
dbo.STATEUSECODE.DESCRIPTION,
MAX(dbo.CERTCONTACT.HIGHRISK)
FROM
dbo.BLOODWORK INNER JOIN dbo.MEMBER ON (dbo.MEMBER.STATEWICID=dbo.BLOODWORK.STATEWICID)
INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID)
FULL OUTER JOIN dbo.MEMBEROTHINFO ON (dbo.MEMBER.STATEWICID=dbo.MEMBEROTHINFO.STATEWICID)
FULL OUTER JOIN dbo.STATEUSECODE ON (dbo.MEMBEROTHINFO.Statevalueid6=dbo.STATEUSECODE.Valueid)
INNER JOIN dbo.AGENCY ON (dbo.AGENCY.AGENCYID=dbo.MEMBER.AGENCYID)
WHERE
(
dbo.MEMBER.STATEWICID IN @dpvalue('A', DP0.DO22d)
AND
dbo.BLOODWORK.RESULTDATE >= @prompt('Enter Start Date:','D','Dbo
Bloodwork\Resultdate',Mono,Free,Persistent,,User:0)
AND
dbo.BLOODWORK.HEMOGLOBIN Is Not Null
)
GROUP BY
dbo.BLOODWORK.STATEWICID,
dbo.BLOODWORK.RESULTDATE,
dbo.BLOODWORK.WICSTATUS,
dbo.BLOODWORK.HEMOGLOBIN,
dbo.BLOODWORK.CREATEUSERID,
dbo.BLOODWORK.EXCEPTIONREASON,
dbo.MEMBER.DATEOFBIRTH,
dbo.MEMBER.WICSTATUS,
dbo.BLOODWORK.CERTSTARTDATE,
dbo.MEMBER.AGENCYID,
dbo.MEMBER.HOUSEHOLDID,
dbo.MEMBER.CERTSTARTDATE,
dbo.MEMBER.CERTIFICATIONDUEDATE,
dbo.MEMBER.HIGHRISK,
dbo.AGENCY.NAME,
dbo.MEMBER.SERVICESITEID,
dbo.MEMBER.RACEETHNICITY,
dbo.MEMBEROTHINFO.STATEVALUEID6,
dbo.STATEUSECODE.DESCRIPTION
Revisions
11.21.16 - Added Cultural Identity to the Race/Ethnicity column for all tabs and HR FU Note to
Tab 2 – All Hgb Records per request from Ramsey County. Also corrected High Risk column to
pull from both the MEMBER and the CERTCONTACT tables since it previously pulled only from
the MEMBER table, which no longer accurately indicates high risk.
P a g e | 15
LOW HEMOGLOBIN
INFOVIEW GUIDANCE DOCUMENT
11.23.15 – Had to take MAX instead of MIN appointment date because as query was written, it
was not showing participants that had an appointment scheduled prior to today’s date. Added
another line to SQL WHERE statement to include participants with an appointment date <
current date or null.
11.18.15 – Added Race/Ethnicity and Next Appt Date columns per request from Olmsted
County.
P a g e | 16
© Copyright 2026 Paperzz