21
Certifications Completed by One Staff Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at the specified agency and clinic(s) during the specified time period for which one staff person was recorded for each required step of the certification. Participants are excluded from the report output if a “Separation of Duties (SOD) – Income” note has been written within 21 days prior to, on, or within 14 days after the certification by a different staff person than the certifier. Some Uses Include: Assist agencies with meeting the SOD auditing requirements for participants certified by one staff person. Notes Participants display in the report output if the following criteria are met: Criterion 1: Only one staff person is recorded for all steps of the Certification Guided Script (CGS), including the Income step. Household members certified during the same time period are included if no staff person is recorded for the income step and another household member has been identified by Criteria 1. Criterion 2: An SOD – Income note has NOT been written within 21 days prior to, on, or within 14 days after the Cert Start Date OR an SOD – Income note has been written during that time period but the staff person recorded as documenting the note is the same as the certifier. (Per 2018 Federal ME, certifications involving two staff must be evident, or auditable, in the Information System. This requires that if income is documented in an alert, that same staff person must also save it as a note. The alert should not be saved by the certifier as a note because when auditing it appears as if the same person performed both the income and the cert.) Report tabs: Tab 1 – No SOD-Reviewed Note: participants meet Criteria 1 and 2 and do NOT have a SOD – Reviewed Note written on or within 30 days of the Cert Date.

Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

  • Upload
    others

  • View
    20

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

Certifications Completed by One Staff Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19)

Report Overview A list and count of participants certified at the specified agency and clinic(s) during the specified time period for which one staff person was recorded for each required step of the certification. Participants are excluded from the report output if a “Separation of Duties (SOD) – Income” note has been written within 21 days prior to, on, or within 14 days after the certification by a different staff person than the certifier.

Some Uses Include:

▪ Assist agencies with meeting the SOD auditing requirements for participants certified by one staff person.

Notes ▪ Participants display in the report output if the following criteria are met:

▪ Criterion 1: Only one staff person is recorded for all steps of the Certification Guided Script (CGS), including the Income step.

▪ Household members certified during the same time period are included if no staff person is recorded for the income step and another household member has been identified by Criteria 1.

▪ Criterion 2: An SOD – Income note has NOT been written within 21 days prior to, on, or within 14 days after the Cert Start Date OR an SOD – Income note has been written during that time period but the staff person recorded as documenting the note is the same as the certifier. (Per 2018 Federal ME, certifications involving two staff must be evident, or auditable, in the Information System. This requires that if income is documented in an alert, that same staff person must also save it as a note. The alert should not be saved by the certifier as a note because when auditing it appears as if the same person performed both the income and the cert.)

▪ Report tabs:

▪ Tab 1 – No SOD-Reviewed Note: participants meet Criteria 1 and 2 and do NOT have a SOD – Reviewed Note written on or within 30 days of the Cert Date.

Page 2: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

2

▪ Tab 2 – SOD Reviewed Note: participants meet Criteria 1 and 2 and have a SOD – Reviewed note written on or within 30 days of the Cert Date.

▪ The report is based on there being only one staff person recorded for all steps of the Certification Guided Script (CGS). Since VOCs do not utilize the CGS, they are naturally excluded from this report output.

▪ The Food Type column displays “formula” if the food package issued on the date of the participant’s certification has any formula; it displays “foods” if there isn’t any formula. “FBF” displays based on an assumption that if the participant is an infant and no formula/foods were issued, then they are full-breastfeeding. If the participant did not receive food or formula and is not an infant, the column will be blank.

▪ The Cert Length is based on when the CGS was first started and the date/time the first set (if more than one set) of benefits were issued. “NA” will display if the participant was not issued benefits.

▪ The Certifier is based on the Staff ID recorded at the time the electronic CPA signature was collected. If the CPA failed to sign for the certification (for whatever reason), the column will be blank.

▪ If the Unknown Ht/Wt button was used the Ht. In., Ht 8ths, Wt. Lbs., and Wt. Oz. columns will be blank.

▪ If no Hemoglobin or Exception Reason was recorded (as is the case with infants under 6 months old) the Hgb or Exception Reason column will be blank.

▪ The SOD Scan will display “Yes” if the Separation of Duties (SOD) scanned document type is selected for a document scanned on the same date as the cert date.

▪ Agency and clinic are based on the agency/clinic where the participant was certified. This may not reflect where the participant currently belongs.

▪ The WIC Type is the participant’s WIC Type at the time of certification. This may not reflect the participant’s current WIC type.

▪ The report outputs have been formatted to export to 8.5 x 11 Landscape PDF. They can also be exported to Excel (NOTE: the margins will need to be adjusted and the headers/footers may not display).

Tab 1 – SOD-No Reviewed Note

Page 3: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

3

Tab 2 – SOD-Reviewed Note

Prompts TABLE FIELD OPERATOR VALUE PROMPT/DEFINITIONS

CERTCONTACT Agencyid Equal to ### Enter 3-digit Agency ID. The agency where participants were certified.

CERTCONTACT Servicesiteid In List ### or ###;### (use semi-colons to

separate; do not use spaces)

Enter 3-digit Clinic ID(s). The clinic where participants were certified.

CERTCONTACT Certstartdate Between mm/dd/yy Enter Start Date. The first date in the time period during which participants were certified.

CERTCONTACT Certenddate And mm/dd/yy Enter End Date The last date in the time period during which participants were certified.

Static Criteria Step ID Query – not used for report output; identifies steps and their descriptions

Certs Query – not used for report output; testing results only

Same Staff+Income Query – identifies participants with the same Staff ID listed for all steps of the CGS including Income (Certstepid = 2) combined query (INTERSECTION – includes data common to both queries)

Combined Query 1

SQL: COUNT(DISTINCT dbo.Certhistory.Creatuserid)…GROUP BY dbo.CERTHISTORY.Certificationid HAVING COUNT(DISTINCT dbo.CERTHISTORY.Createuserid) = ‘1’

Explanation: Count the number of staff IDs associated with each individual Cert ID and include only those records where only one staff ID displays for all steps

((dbo.CERTHISTORY.Stepacknowledged <> ‘N’ AND dbo.CERTHISTORY.Certstepid = ‘2’) AND ( dbo.CERTHISTORY.Modifyuserid = dbo.CERTHISTORY.Createuserid OR dbo.CERTHISTORY.Modifyuserid is Null) dbo.CertHistory.StepAcknowledged = 'Y') )

Explanation: Only count steps where a staff ID displays (step is acknowledged) and only include records where the Income step has a staff ID displayed as well; exclude if a different staff ID is listed for the Modifyuserid for the income step

Page 4: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

4

SQL (WHERE): CONVERT(date, dbo.CertHistory.CreateDTTM, 101)

Explanation: Remove the timestamp so that the date entered into the prompts can be included in the report output

Combined Query 2

SQL: COUNT(DISTINCT dbo.Certhistory.Creatuserid)…GROUP BY dbo.CERTHISTORY.Certificationid HAVING COUNT(DISTINCT dbo.CERTHISTORY.Createuserid) = ‘1’

Explanation: Count the number of staff IDs associated with each individual Cert ID and include only those records where only one staff ID displays for all steps

dbo.CertHistory.StepAcknowledged = 'Y'

Explanation: Only count steps where a staff ID displays (step is acknowledged)

SQL (WHERE): CONVERT(date, dbo.CertHistory.CreateDTTM, 101)

Explanation: Remove the timestamp so that the date entered into the prompts can be included in the report output

Same Staff-No Income Query – identifies household members isolated by the Same Staff+Income query (household members with only one staff person listed for all steps, including income, of the CGS) that don’t have staff listed for Income MEMBER.Householdid In List Household (Same Staff+Income)

Explanation: Include only those cert IDs identified by the Cert IDs query

CERTHISTORY.Certstepid Equal to 2 and CERTHISTORY.Stepacknowledged Equal to N

Explanation: Identify cert history records where the income step does not have a staff ID

SOD Income Note Query – identifies participants with an income note written within 21 days prior to, on, or within 14 days after the cert date (exclusionary) CONVERT(date, dbo.CertHistory.CreateDTTM, 101)

Explanation: Remove the timestamp so that the date entered into the prompts can be included in the report output

(dbo.HEALTHNOTE.NOTESUBJECTID = '34' AND CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101) >= DATEADD (day, -21, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101)) AND CONVERT(date, dbo.Healthnote.Createdttm, 101) < DATEADD (day, 14, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101) AND dbo.HEALTHNOTE.Createuserid <> dbo.CERTCONTACT.Createuserid))

Explanation: Include if a SOD – Income note (34) exists and the date it was written is within 21 days prior to, on, or within 14 days after the cert date AND the person who wrote the note is NOT the same as the certifier.

Note Query – identify participants with SOD – Reviewed notes to include in report output DATEADD(dd, DATEDIFF(dd, 0, dbo.MEMBERIMAGE.ADDEDDTTM),0),

Explanation: Remove timestamp from report output

CERTHISTORY.Certificationid In List Certificationid (Cert IDs query)

Explanation: Include cert IDs identified by the Cert IDs query (only one staff person completed cert)

((dbo.FOODINSTRUMENT.VOIDEDDATE Is Null AND CONVERT(date, dbo.FOODINSTRUMENTSET.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101)) OR dbo.FOODINSTRUMENTSET.Createdttm Is Null)

Page 5: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

5

Explanation: Include benefit issuance records where the benefits were not voided and the issuance date was the same as the cert date; include records even if issuance records don’t exist (this statement ensures that participants not issued benefts, such as FBF infants, are included in the report output)

((dbo.REFERENCEDICTIONARY.EXTERNALID = dbo.BLOODWORK.EXCEPTIONREASON AND dbo.REFERENCEDICTIONARY.CATEGORY = 'BLDWRKEXCP') OR dbo.BLOODWORK.Exceptionreason Is Null )

Explanation: Display the Bloodwork Exception Reason for the record; include records even if a bloodwork exception reason doesn’t exist (ensure participants without bloodwork exception reasons, those with Hgb values or Null values, are included in the report output)

(dbo.HEALTHNOTE.NOTESUBJECTID = '33' AND (DATEDIFF (day, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101), CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101)) >=0 0 AND DATEDIFF (day, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101), CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101)) <=30))

Explanation: Include if SOD – Reviewed note (33) exists and was written on or within 30 days of the cert date.

CERTCONTACT.Statewicid Not in List Statewicids (SOD Income Note query)

Explanation: Exclude State WIC IDs identified by SOD Income Note query

CONVERT(date, dbo.CertHistory.CreateDTTM, 101)

Explanation: Remove the timestamp so that the date entered into the prompts can be included in the report output

CONVERT(date, dbo.ANTHROPCONTACT.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101)

Explanation: Remove time stamps from dates; include height/weight records where the Create Date is the same as the Cert Date

CONVERT(date, dbo.BLOODWORK.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) OR dbo.BLOODWORK.Hemoglobin Is Null

Explanation: Remove time stamps from dates; include blood records where the Create Date is the same as the Cert Date; (OR) include records if no hemoglobin value (ensure participants without hemoglobin values, those with Exception Reasons or Null values, are included in the report output)

Dbo.CERTCONTACT.Certtermdate Is Null

Explanation: Exclude cert records if terminated

Dbo.CERTCONTACT.Certineligibledate Is Null

Explanation: Exclude cert records if ineligible

(( dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD = '17' AND CONVERT(date, dbo.MEMBERIMAGE.ADDEDDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101)) OR dbo.MEMBERIMAGE.Addeddttm is Null OR Dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD <> '17' )

Explanation: Include if a scanned document with type equal to Separation of Duties - SOD (17) was added on the same date as the cert date. Also include if no scanned images or if no SOD scanned documents.

No Note-One Staff Query – identifies participants and household members with one Staff ID for all steps of the CGS and excludes those terminated or ineligible (the terminated/ineligible criteria was added directly to the Notes query) CERTCONTACT.Certificationid In List Certificationid (Same Staff-No Income) OR CERTCONTACT.Certificationid In List Certificationid (Same Staff+Income)

Page 6: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

6

Explanation: Include participants who have one staff for all steps (including income) or are identified as having a household member with all steps completed (including income) by one staff person and no staff ID for their income step

Dbo.CERTCONTACT.Certtermdate Is Null

Explanation: Exclude cert records if terminated

Dbo.CERTCONTACT.Certineligibledate Is Null

Explanation: Exclude cert records if ineligible

SubQ Query – combined query MINUS - removes participants with SOD – Reviewed notes from list of participants without SOD – Reviewed notes; identifies participants to be included in the No Note Query (see technical notes for more information about this query)

Combined Query 1

CONVERT(date, dbo.CertHistory.CreateDTTM, 101)

Explanation: Remove the timestamp so that the date entered into the prompts can be included in the report output

CERTCONTACT.Certificationid In List Certificationids (No Note-One Staff query)

Explanation: Include cert IDs identified by No Note-One Staff query (include those with certs performed by one staff person and household members of these participants with no staff ID for income)

CERTCONTACT.Certificationid Not in List Certificationids (SOD Income Note query)

Explanation: Exclude cert IDs identified by SOD Income Note query (exclude participants with income notes)

Combined Query 2 – MINUS (remove those with SOD-Reviewed notes)

CONVERT(date, dbo.CertHistory.CreateDTTM, 101)

Explanation: Remove the timestamp so that the date entered into the prompts can be included in the report output

(dbo.HEALTHNOTE.NOTESUBJECTID = '33' AND (DATEDIFF (day, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101), CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101)) >= 0 AND DATEDIFF (day, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101), CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101)) <=30))

Explanation: Subtract participants if SOD – Reviewed note (33) exists and was written on or within 30 days of the cert date.

CERTCONTACT.Certificationid In List Certificationids (No Notes-One Staff query)

Explanation: Include cert IDs identified by Certs-One Staff query

CERTCONTACT.Certificationid Not in List Certificationids (SOD Income Note query)

Explanation: Exclude cert IDs identified by SOD Income Note query (exclude participants with income notes)

No Note Query – Identifies participants without SOD – Reviewed notes to include in report output DATEADD(dd, DATEDIFF(dd, 0, dbo.MEMBERIMAGE.ADDEDDTTM),0),

Explanation: Remove timestamp from report output

CERTCONTACT.Statewicid In List Statewicids (SubQ query)

Page 7: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

7

Explanation: Include State WIC IDs identified by SubQ query

( ( dbo.FOODINSTRUMENT.VOIDEDDATE Is Null AND CONVERT(date, dbo.FOODINSTRUMENTSET.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101)) OR dbo.FOODINSTRUMENTSET.Createdttm Is Null)

Explanation: Include benefit issuance records where the benefits were not voided and the issuance date was the same as the cert date; include records even if issuance records don’t exist (this statement ensures that participants not issued benefts, such as FBF infants, are included in the report output)

CONVERT(date, dbo.CertHistory.CreateDTTM, 101)

Explanation: Remove the timestamp so that the date entered into the prompts can be included in the report output

CONVERT(date, dbo.ANTHROPCONTACT.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101)

Explanation: Remove the timestamp from the height/weight record and include if equal to the Cert Start Date

CONVERT(date, dbo.BLOODWORK.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) OR dbo.BLOODWORK.Hemoglobin Is Null

Explanation: Remove time stamps from dates; include blood records where the Create Date is the same as the Cert Date; (OR) include records if no hemoglobin value (ensure participants without hemoglobin values, those with Exception Reasons or Null values, are included in the report output)

(( dbo.REFERENCEDICTIONARY.EXTERNALID = dbo.BLOODWORK.EXCEPTIONREASON AND dbo.REFERENCEDICTIONARY.CATEGORY = 'BLDWRKEXCP') OR dbo.BLOODWORK.Exceptionreason Is Null )

Explanation: Display the Bloodwork Exception Reason for the record; include records even if a bloodwork exception reason doesn’t exist (ensure participants without bloodwork exception reasons, those with Hgb values or Null values, are included in the report output)

(( dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD = '17' AND CONVERT(date, dbo.MEMBERIMAGE.ADDEDDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101)) OR dbo.MEMBERIMAGE.Addeddttm is Null OR Dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD <> '17' )

Explanation: Include if a scanned document with type equal to Separation of Duties - SOD (17) was added on the same date as the cert date. Also include if no scanned images or if no SOD scanned documents.

Dbo.CERTCONTACT.Certtermdate Is Null

Explanation: Exclude cert records if terminated

Dbo.CERTCONTACT.Certineligibledate Is Null

Explanation: Exclude cert records if ineligible

Report Columns Tab 1 – No SOD-Reviewed Note

Columns ▪ Food Type (FOODITEM.BASEFOODCATEGORYID) See FORMULAS ▪ Household ID (MEMBER.Householdid) ▪ State WIC ID (CERTCONTACT.Statewicid) ▪ WIC Type (CERTCONTACT.Certwicstatus) ▪ DOB (MEMBER.Dateofbirth) ▪ Cert Date (CERTHISTORY.Createdttm)

Page 8: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

8

▪ Cert Time (CERTHISTORY.Createdttm) See FORMULAS ▪ Cert Date (CERTHISTORY.Createdttm) See FORMULAS ▪ Cert Length See FORMULAS ▪ Certifier (CERTSTAFFESIGN.Createduserid) ▪ PPT Sig (RIGHTSESIGN.Rightsesignid) See FORMULAS ▪ Risk Factors ([V_ListNote] - RISKFACTOR.Riskfactorid) See VARIABLES ▪ Ht. In. (ANTHROPCONTACT.Heightinches) ▪ Ht. 8ths (ANTHROPCONTACT.Heighteighths) ▪ Wt. Lbs. (ANTHROPCONTACT.Weightpounds) ▪ Wt. Oz. (ANTHROPCONTACT.Weightounces) ▪ Hgb or Exception Reason See VARIABLES and FORMULAS ▪ SOD Scan See VARIABLES and FORMULAS

Grouped by ▪ Clinic ID (CERTCONTACT.Servicesiteid) - Ascending

Sorted by ▪ Food Type – Descending ▪ Cert Date – Ascending ▪ Cert Time – Ascending ▪ Household ID – Ascending

Counts ▪ State WIC ID - Distinct

Tab 2 – SOD-Reviewed Note

Columns ▪ Food Type (FOODITEM.BASEFOODCATEGORYID) See FORMULAS ▪ Household ID (MEMBER.Householdid) ▪ State WIC ID (CERTCONTACT.Statewicid) ▪ WIC Type (CERTCONTACT.Certwicstatus) ▪ DOB (MEMBER.Dateofbirth) ▪ Cert Date (CERTHISTORY.Createdttm) ▪ Cert Time (CERTHISTORY.Createdttm) See FORMULAS ▪ Cert Date (CERTHISTORY.Createdttm) See FORMULAS ▪ Cert Length See FORMULAS ▪ Staff Wrote Note (HEALTHNOTE.Createuserid) ▪ Note Date (HEALTHNOTE.Createdttm) ▪ Certifier (CERTSTAFFESIGN.Createduserid) ▪ PPT Sig (RIGHTSESIGN.Rightsesignid) See FORMULAS ▪ Risk Factors ([V_ListNote] - RISKFACTOR.Riskfactorid) See VARIABLES ▪ Ht. In. (ANTHROPCONTACT.Heightinches) ▪ Ht. 8ths (ANTHROPCONTACT.Heighteighths) ▪ Wt. Lbs. (ANTHROPCONTACT.Weightpounds) ▪ Wt. Oz. (ANTHROPCONTACT.Weightounces) ▪ Hgb or Exception Reason See VARIABLES and FORMULAS ▪ SOD Scan See VARIABLES and FORMULAS

Page 9: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

9

Grouped by ▪ Clinic ID (CERTCONTACT.Servicesiteid) - Ascending

Sorted by ▪ Food Type – Descending ▪ Cert Date – Ascending ▪ Cert Time – Ascending ▪ Household ID – Ascending

Counts ▪ State WIC ID – Distinct

Page 10: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

10

Technical Notes

Notes ▪ TEST queries are not described in this document. They were/are used to test report output issues. The

TESTAllOneInc query and the TESTAllOneNoInc query are the separated queries used in the combined query in the Same Staff+Income query. Participants founds in both query results should be the output for the Same Staff+Income query.

▪ When more than one household member is certified on the same date, once the income record is initially entered, it is then automatically copied over to subsequent members. A result of this is that only the first member that actually had the income entered into their record will have a staff person listed next to the Income step in the Certification History tab. In the previous version of this report, household members certified on the same date with no staff person listed were displayed on another tab. This seemed unnecessary; therefore, all participants were combined into one list regardless of whether the income was performed by the same person or is blank as indicated in the Cert History tab.

▪ There are two different types of records that had to be accounted for when determining whether one staff ID completed the CGS. First, identified by the Same Staff+Income Query, are participants that have one staff ID for all steps of the CGS, including the Income step. When a staff person enters an income record into one household member’s CGS, their staff ID is recorded for the income step but only in that participant’s Cert History. For any other household member certified at the same time, the income record is shared by those members but the staff ID for the income step remains blank in the Cert History. In order to exclude participants who don’t have any staff listed for the income step but have another household member with more than one staff ID associated with the CGS, a second query was created: Same Staff-No Income Query. This pulls the household IDs identified by the Same Staff+Income Query, where the participants with only one staff for all steps have been isolated, and includes household members if they don’t have a staff ID listed for the income step in their Cert History.

▪ The PPT Sig formula includes an unnecessary statement to display “NA” if 502 is one of the risk factors. However, trying to remove it resulted in none of the records displaying so left the formula as is.

▪ In order to identify certifications completed by only one staff person, the Cert ID query was created to perform a count of Creatuserid based on Certificationid. Since Createuserid is a string, and COUNT can only be used with numbers, it could not be directly used in the SELECT statement. Instead, Certificationid and Certhistoryid were pulled into the Results Objects and Certhistoryid converted to COUNT (DISTINCT dbo.CERTHISTORY.Creatuserid) in the SQL SELECT statement. The DISTINCT is required in order to count the Createuserid only once regardless of how many times it is recorded for each Certificationid. In the HAVING statement COUNT (DISTINCT dbo.CERTHISTORY.Createuserid) was set equal to 1.

▪ When testing queries, it was determined that common records found between a query that had the criteria CERTHISTORY.Stepsacknowledged = Y and another query that had ((CERTHISTORY.Stepsacknowledged <> N and CERTHISTORY.Certstepid = 2) and CERTHISTORY.Stepsacknowledged = Y) had to be isolated. Therefore, the combined query was used for the Same Staff+Income query and an INTERSECTION was used to find the records that these two sets of criteria had in common.

▪ The SubQ query was created because an “incorrect filter” error was occurring when trying to run the report. This was due to the No Note query referencing the Note query and the Note query not having any report results. The function of the SubQ query is to use a combined query to subtract those with SOD – Reviewed notes from the list of those without SOD – Reviewed notes. By using the combined query, if there aren’t any results for the Notes query, the error won’t occur. This resulted in three queries (No Note, No Note-OneStaff and SubQ) used to identify participants for the No Notes tab.

▪ Each risk factor is saved as an individual records. As long as the risk factors are the only difference in the row, the three variables used work to display the risk factors as a list in one row.

Page 11: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

11

▪ The CERTHISTORY.Createdttm was used instead of the CERTCONTACT.Certstartdate because they are the same and the CERTHISTORY.Createdttm is only created when the CGS is started (as opposed to the CERTCONTACT table that includes pseudo-certs, which create new Certstartdates).

▪ The SOD Scan column on both tabs had two issues. In order to simplify the formula, the MEMBERIMAGE.Addeddttm had to have the timestamp removed prior to displaying in the report output. So the DateAdd/DateDiff functions were used in the SELECT statement. This formula then resulted in two row results; one row for Yes and one for No. To resolve this, the formula was converted to a variable ([V_ScanNo]), inserted into that column, and then the Max([V_ScanNo]) function was used so that Yes always displays instead of No if both exist.

▪ Duplicate rows were showing for Null and Description records in the Hgb or Exception Reason column. To resolve this, the formula was changed to a variable ([Bloodwork] and [BloodworkNo]) and then the Max(Variable) was used in the column. This results in only one record displaying the Description unless no description or Hgb exists, then nothing displays.

▪ The Food Type column was displaying two rows for children if they received both formula and foods. In order to correct for this, the formula was revised to have any WIC Type display “FORMULA” if food and formula were issued.

Variables [Bloodwork] =If IsNull([Note].[Hemoglobin]) Then [Note].[Description] Else [Note].[Hemoglobin]

[BloodworkNo] =If IsNull([No Note].[Hemoglobin]) Then [No Note].[Description] Else [No Note].[Hemoglobin]

[V_ConcatNote] = ([Note].[Riskfactorid] + "; " + Previous(Self)) ForEach([Note].[Certificationid])

[V_ListNote] =[V_ConcatNote] Where ([Note].[Riskfactorid] = [V_MaxNote])

[V_ConcatNo] =([No Note].[Riskfactorid] + "; " + Previous(Self)) ForEach([No Note].[Certificationid])

[V_ListNo] =[V_ConcatNo] Where ([No Note].[Riskfactorid] = [V_MaxNo])

[V_MaxNo] =Max([No Note].[Riskfactorid]) ForEach([No Note].[Certificationid])

[V_MaxNote] =Max([Note].[Riskfactorid]) ForEach([Note].[Certificationid])

[V_ScanNo] =If IsNull([No Note].[Addeddttm]) Then "No" ElseIf Not(IsNull([No Note].[Addeddttm])) And [Documentimagetypecd] = "17" Then "Yes" Else "No"

[V_ScanNote] =If IsNull([Note].[Addeddttm]) Then "No" ElseIf Not(IsNull([Note].[Addeddttm])) And [Documentimagetypecd] = "17" Then "Yes" Else "No"

Formulas Tab 1 – No SOD-Reviewed Note Agency (page header) =[No Note].[Name] + " (" + [No Note].[Agencyid] + ")"

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()

Food Type (column) =If (IsNull([No Note].[Basefoodcategoryid]) And [No Note].[Certwicstatus] = "I") Then "FBF" ElseIf IsNull([No Note].[Basefoodcategoryid]) Then " " ElseIf ( Max([No Note].[Basefoodcategoryid] = "A") And [No Note].[Certwicstatus] = "C") Then "Formula" ElseIf (Max([No Note].[Basefoodcategoryid]) = "A" And [No Note].[Certwicstatus] = "I") Then "Formula" ElseIf (Max([No Note].[Basefoodcategoryid]) = "A" And [No Note].[Certwicstatus] = "P") Then "Formula" ElseIf (Max([No Note].[Basefoodcategoryid]) = "A" And [No Note].[Certwicstatus] = "B") Then "Formula" ElseIf (Max([No Note].[Basefoodcategoryid]) = "A" And [No Note].[Certwicstatus] = "N") Then "Formula" Else "Foods"

Page 12: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

12

Cert Time (column) =FormatDate([No Note].[Dbo Certhistory].[Createdttm]; "hh:mm A")

Cert Day (column) =If DayName([No Note].[Dbo Certhistory].[Createdttm]) = "Monday" Then "Mon." ElseIf DayName([No Note].[Dbo Certhistory].[Createdttm]) = "Tuesday" Then "Tues." ElseIf DayName([No Note].[Dbo Certhistory].[Createdttm]) = "Wednesday" Then "Wed." ElseIf DayName([No Note].[Dbo Certhistory].[Createdttm]) = "Thursday" Then "Thurs." Else If DayName([No Note].[Dbo Certhistory].[Createdttm]) = "Friday" Then "Fri." Else If DayName([No Note].[Dbo Certhistory].[Createdttm]) = "Saturday" Then "Sat." Else If DayName([No Note].[Dbo Certhistory].[Createdttm]) = "Sunday" Then "Sun."

Cert Length (column) =If IsNull([No Note].[Dbo Foodinstrumentset].[Createdttm]) And IsNull([No Note].[Statewicid]) Then "" Else If IsNull([No Note].[Dbo Foodinstrumentset].[Createdttm]) Then "NA" Else Round((((ToNumber(Substr(FormatDate(Min([No Note].[Dbo Foodinstrumentset].[Createdttm]);"HH:mm:ss");1;2))*60*60 + ToNumber(Substr(FormatDate(Min([No Note].[Dbo Foodinstrumentset].[Createdttm]);"HH:mm:ss");4;2))*60 + ToNumber(Substr(FormatDate(Min([No Note].[Dbo Foodinstrumentset].[Createdttm]);"HH:mm:ss");7;2)) - (ToNumber(Substr(FormatDate(Min([No Note].[Dbo Certhistory].[Createdttm]);"HH:mm:ss");1;2))*60*60 + ToNumber(Substr(FormatDate(Min([No Note].[Dbo Certhistory].[Createdttm]);"HH:mm:ss");4;2))*60 + ToNumber(Substr(FormatDate(Min([No Note].[Dbo Certhistory].[Createdttm]);"HH:mm:ss");7;2))))/3600))*60;0) + " min."

PPT Sig (column) =If IsNull([No Note].[Rightsesignid]) And IsNull([No Note].[Statewicid]) Then "" ElseIf IsNull([No Note].[Rightsesignid]) And Match([V_ListNote] ;"*502*") Then "NA" ElseIf IsNull([No Note].[Rightsesignid]) Then "No" Else "Yes"

Risk Factors (column) =[V_ListNo]

Hgb or Exception Reason (column) Max([BloodworkNo])

SOD Scan (column) =Max([V_ScanNo])

Page # (page footer) ="Page " + Page()+" of "+NumberOfPages()

Tab 2 – SOD-Reviewed Note Agency (page header) =[Note].[Name] + " (" + [Note].[Agencyid] + ")"

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()

Food Type (column) =If (IsNull([Note].[Basefoodcategoryid]) And [Note].[Certwicstatus] = "I") Then "FBF" ElseIf IsNull([Note].[Basefoodcategoryid]) Then " " ElseIf ( Max([Note].[Basefoodcategoryid] = "A") And [Note].[Certwicstatus] = "C") Then "Formula" ElseIf (Max([Note].[Basefoodcategoryid]) = "A" And [Note].[Certwicstatus] = "I") Then "Formula" ElseIf (Max([Note].[Basefoodcategoryid]) = "A" And [Note].[Certwicstatus] = "P") Then "Formula" ElseIf (Max([Note].[Basefoodcategoryid]) = "A" And [Note].[Certwicstatus] = "B") Then "Formula" ElseIf (Max([Note].[Basefoodcategoryid]) = "A" And [Note].[Certwicstatus] = "N") Then "Formula" Else "Foods"Cert Time (column) =FormatDate([Note].[Dbo Certhistory].[Createdttm]; "hh:mm A")

Cert Day (column) =If DayName([Note].[Dbo Certhistory].[Createdttm]) = "Monday" Then "Mon." ElseIf DayName([Note].[Dbo Certhistory].[Createdttm]) = "Tuesday" Then "Tues." ElseIf DayName([Note].[Dbo Certhistory].[Createdttm]) = "Wednesday" Then "Wed." ElseIf DayName([Note].[Dbo Certhistory].[Createdttm]) = "Thursday" Then "Thurs." Else If DayName([Note].[Dbo Certhistory].[Createdttm]) = "Friday" Then "Fri." Else If DayName([Note].[Dbo Certhistory].[Createdttm]) = "Saturday" Then "Sat." Else If DayName([Note].[Dbo Certhistory].[Createdttm]) = "Sunday" Then "Sun."

Cert Length (column) =If IsNull([Note].[Dbo Foodinstrumentset].[Createdttm]) And IsNull([Note].[Statewicid]) Then "" Else If IsNull([Note].[Dbo Foodinstrumentset].[Createdttm]) Then "NA" Else Round((((ToNumber(Substr(FormatDate(Min([Note].[Dbo Foodinstrumentset].[Createdttm]);"HH:mm:ss");1;2))*60*60 + ToNumber(Substr(FormatDate(Min([Note].[Dbo Foodinstrumentset].[Createdttm]);"HH:mm:ss");4;2))*60 + ToNumber(Substr(FormatDate(Min([Note].[Dbo

Page 13: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

13

Foodinstrumentset].[Createdttm]);"HH:mm:ss");7;2)) - (ToNumber(Substr(FormatDate(Min([Note].[Dbo Certhistory].[Createdttm]);"HH:mm:ss");1;2))*60*60 + ToNumber(Substr(FormatDate(Min([Note].[Dbo Certhistory].[Createdttm]);"HH:mm:ss");4;2))*60 + ToNumber(Substr(FormatDate(Min([Note].[Dbo Certhistory].[Createdttm]);"HH:mm:ss");7;2))))/3600))*60;0) + " min."

PPT Sig (column) =If IsNull([Note].[Rightsesignid]) And IsNull([Note].[Statewicid]) Then "" ElseIf IsNull([Note].[Rightsesignid]) And Match([V_ListNote] ;"*502*") Then "NA" ElseIf IsNull([Note].[Rightsesignid]) Then "No" Else "Yes"

Risk Factors (column) =[V_ListNote]

Hgb or Exception Reason (column) =Max([Bloodwork])

SOD Scan (column) =Max([V_ScanNote])

Page # (page footer) ="Page " + Page()+" of "+NumberOfPages()

SQL (changes are highlighted) Step IDs Query SELECT dbo.REFERENCEDICTIONARY.EXTERNALID, dbo.REFERENCEDICTIONARY.DESCRIPTION FROM dbo.REFERENCEDICTIONARY WHERE dbo.REFERENCEDICTIONARY.CATEGORY = 'CertSteps'

Certs Query SELECT dbo.CertHistory.CertHistoryID, dbo.CertHistory.CertificationID, dbo.CertHistory.CertStepID, dbo.CertHistory.StepAcknowledged, dbo.CertHistory.CreateUserID, dbo.CertHistory.CreateDTTM, dbo.CertHistory.ModifyUserID, dbo.CertHistory.ModifyDTTM, dbo.CertHistory.AddedDTTM, dbo.CertHistory.EditedDTTM, dbo.CERTCONTACT.STATEWICID, dbo.CERTCONTACT.SERVICESITEID, dbo.AGENCY.NAME FROM dbo.AGENCY INNER JOIN dbo.CERTCONTACT ON (dbo.AGENCY.AGENCYID=dbo.CERTCONTACT.AGENCYID) INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) WHERE ( CONVERT(Date, dbo.CertHistory.CreateDTTM, 101) BETWEEN @prompt('Enter Start Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:2) AND @prompt('Enter End Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:3) AND dbo.CertHistory.StepAcknowledged = 'Y' AND dbo.CERTCONTACT.SERVICESITEID IN @prompt('Enter 3-digit Clinic ID(s):','A','Dbo Certcontact\Servicesiteid',Multi,Free,Persistent,,User:1) AND dbo.CERTCONTACT.AGENCYID = @prompt('Enter 3-digit Agency ID:','A','Dbo Certcontact\Agencyid',Mono,Free,Persistent,,User:0) )

Same Staff+Income Query ( SELECT

Page 14: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

14

dbo.CertHistory.CertificationID, COUNT(DISTINCT dbo.CertHistory.Createuserid), dbo.CERTCONTACT.STATEWICID, dbo.MEMBER.Householdid FROM dbo.CERTCONTACT INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) INNER JOIN dbo.MEMBER ON (dbo.CERTCONTACT.Statewicid = dbo.MEMBER.Statewicid) WHERE ( CONVERT (date, dbo.CertHistory.CreateDTTM, 101) BETWEEN @prompt('Enter Start Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:2) AND @prompt('Enter End Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:3) AND dbo.CERTCONTACT.AGENCYID = @prompt('Enter 3-digit Agency ID:','A','Dbo Certcontact\Agencyid',Mono,Free,Persistent,,User:0) AND ( (dbo.CERTHISTORY.StepAcknowledged <> 'N' AND dbo.CERTHISTORY.Certstepid = '2' AND ( dbo.CERTHISTORY.Modifyuserid = dbo.CERTHISTORY.Createuserid OR dbo.CERTHISTORY.Modifyuserid is Null ) ) AND dbo.CertHistory.StepAcknowledged = 'Y' ) AND dbo.CERTCONTACT.SERVICESITEID IN @prompt('Enter 3-digit Clinic ID(s):','A','Dbo Certcontact\Servicesiteid',Multi,Free,Persistent,,User:1) ) GROUP BY dbo.CertHistory.CertificationID, dbo.CERTCONTACT.STATEWICID, dbo.MEMBER.Householdid HAVING COUNT(DISTINCT dbo.CertHistory.Createuserid) = '1' INTERSECT SELECT dbo.CertHistory.CertificationID, COUNT(DISTINCT dbo.CertHistory.Createuserid), dbo.CERTCONTACT.STATEWICID, dbo.MEMBER.Householdid FROM dbo.CERTCONTACT INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) INNER JOIN dbo.MEMBER ON (dbo.CERTCONTACT.Statewicid = dbo.MEMBER.Statewicid) WHERE ( dbo.CERTCONTACT.AGENCYID = @prompt('Enter 3-digit Agency ID:','A','Dbo Certcontact\Agencyid',Mono,Free,Persistent,,User:4) AND dbo.CERTCONTACT.SERVICESITEID IN @prompt('Enter 3-digit Clinic ID(s):','A','Dbo Certcontact\Servicesiteid',Multi,Free,Persistent,,User:5) AND Dbo.CERTCONTACT.Certeffectivedate is NOT NULL AND CONVERT(date, dbo.CertHistory.CreateDTTM, 101) BETWEEN @prompt('Enter Start Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:6) AND @prompt('Enter End Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:7) AND dbo.CertHistory.StepAcknowledged = 'Y' ) GROUP BY dbo.CertHistory.CertificationID, dbo.CERTCONTACT.STATEWICID,

Page 15: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

15

dbo.MEMBER.Householdid HAVING COUNT(DISTINCT dbo.CertHistory.Createuserid)= '1' ) SELECT dbo.CertHistory.CreateUserID, dbo.CERTCONTACT.STATEWICID, dbo.CERTCONTACT.AGENCYID, dbo.CERTCONTACT.SERVICESITEID, dbo.CertHistory.CreateDTTM, dbo.MEMBER.FIRSTNAME, dbo.MEMBER.LASTNAME, dbo.AGENCY.NAME, dbo.CertHistory.CertificationID, dbo.MEMBER.HOUSEHOLDID FROM dbo.MEMBER INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID) INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) INNER JOIN dbo.AGENCY ON (dbo.AGENCY.AGENCYID=dbo.CERTCONTACT.AGENCYID)) WHERE ( dbo.CertHistory.CertificationID IN @dpvalue('N', DP2.DO94a) AND dbo.CertHistory.CertStepID = '4' AND dbo.CERTCONTACT.Certtermdate Is Null AND dbo.CERTCONTACT.Certineligibledate Is Null )

SameStaff-No Income Query SELECT dbo.CertHistory.CertificationID, dbo.CertHistory.CreateDTTM, dbo.CERTCONTACT.STATEWICID, dbo.CERTCONTACT.AGENCYID, dbo.CERTCONTACT.SERVICESITEID, dbo.MEMBER.LASTNAME, dbo.MEMBER.FIRSTNAME, dbo.CertHistory.CertHistoryID, dbo.CertHistory.CertStepID, dbo.CertHistory.StepAcknowledged, dbo.MEMBER.HOUSEHOLDID FROM dbo.MEMBER INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID) INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) WHERE ( dbo.CertHistory.CertStepID = '2' AND dbo.CertHistory.StepAcknowledged = 'N' AND dbo.MEMBER.HOUSEHOLDID IN @dpvalue('A', DP2.DO22e) )

SOD Income Note Query SELECT dbo.HEALTHNOTE.STATEWICID, dbo.HEALTHNOTE.CREATEDTTM, dbo.CERTCONTACT.CERTIFICATIONID FROM dbo.HEALTHNOTE INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.HEALTHNOTE.STATEWICID) INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) WHERE (

Page 16: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

16

dbo.CERTCONTACT.AGENCYID = @prompt('Enter 3-digit Agency ID:','A','Dbo Certcontact\Agencyid',Mono,Free,Persistent,,User:0) AND CONVERT (date, dbo.CertHistory.CreateDTTM, 101) BETWEEN @prompt('Enter Start Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:2) AND @prompt('Enter End Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:3) AND ( dbo.HEALTHNOTE.NOTESUBJECTID = '34' AND ( CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101) >= DATEADD (day, -21, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101)) AND CONVERT(date, dbo.Healthnote.Createdttm, 101) < DATEADD (day, 14, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101)) ) AND Dbo.HEALTHNOTE.Createuserid <> dbo.CERTCONTACT.Creatuserid ) AND dbo.CERTCONTACT.SERVICESITEID IN @prompt('Enter 3-digit Clinic ID(s):','A','Dbo Certcontact\Servicesiteid',Multi,Free,Persistent,,User:1) )

Note Query SELECT dbo.CertHistory.CertificationID, dbo.CertHistory.CreateDTTM, dbo.AGENCY.NAME, dbo.CERTCONTACT.AGENCYID, dbo.CERTCONTACT.SERVICESITEID, dbo.CERTCONTACT.STATEWICID, dbo.CERTCONTACT.CERTWICSTATUS, dbo.MEMBER.FIRSTNAME, dbo.MEMBER.LASTNAME, dbo.MEMBER.HOUSEHOLDID, dbo.MEMBER.DATEOFBIRTH, dbo.FOODINSTRUMENTSET.CREATEDTTM, dbo.FOODITEM.BASEFOODCATEGORYID, dbo.HEALTHNOTE.NOTESUBJECTID, dbo.HEALTHNOTE.CREATEUSERID, dbo.HEALTHNOTE.CREATEDTTM, dbo.REFERENCEDICTIONARY.DESCRIPTION, dbo.CERTSTAFFESIGN.CREATEDUSERID, RIGHTSESIGN.RIGHTSESIGNID, dbo.RISKFACTOR.RISKFACTORID, dbo.ANTHROPCONTACT.LENGTHINCHES, dbo.ANTHROPCONTACT.LENGTHEIGHTHS, dbo.ANTHROPCONTACT.WEIGHTPOUNDS, dbo.ANTHROPCONTACT.WEIGHTOUNCES, dbo.BLOODWORK.HEMOGLOBIN, dbo.BLOODWORK.EXCEPTIONREASON, DATEADD(dd, DATEDIFF(dd, 0, dbo.MEMBERIMAGE.ADDEDDTTM),0), dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD FROM dbo.MEMBER INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID) INNER JOIN dbo.RISKFACTOR ON (dbo.RISKFACTOR.CERTIFICATIONID=dbo.CERTCONTACT.CERTIFICATIONID) FULL OUTER JOIN dbo.CERTSTAFFESIGN ON (dbo.CERTSTAFFESIGN.CERTIFICATIONID=dbo.CERTCONTACT.CERTIFICATIONID) INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) FULL OUTER JOIN RIGHTSESIGN ON (RIGHTSESIGN.RIGHTSESIGNID=dbo.CERTCONTACT.RIGHTSESIGNID) FULL OUTER JOIN dbo.FOODINSTRUMENTSET ON (dbo.FOODINSTRUMENTSET.STATEWICID=dbo.MEMBER.STATEWICID) FULL OUTER JOIN dbo.FOODINSTRUMENT ON (dbo.FOODINSTRUMENT.FOODINSTRUMENTSETID=dbo.FOODINSTRUMENTSET.FOODINSTRUMENTSETID) FULL OUTER JOIN dbo.FOODINSTRUMENTITEM ON (dbo.FOODINSTRUMENT.FOODINSTRUMENTID=dbo.FOODINSTRUMENTITEM.FOODINSTRUMENTID) FULL OUTER JOIN dbo.FOODITEM ON (dbo.FOODINSTRUMENTITEM.FOODITEMID=dbo.FOODITEM.FOODITEMID)

Page 17: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

17

INNER JOIN dbo.HEALTHNOTE ON (dbo.MEMBER.STATEWICID=dbo.HEALTHNOTE.STATEWICID) INNER JOIN dbo.ANTHROPCONTACT ON (dbo.MEMBER.STATEWICID=dbo.ANTHROPCONTACT.STATEWICID) FULL OUTER JOIN dbo.BLOODWORK ON (dbo.MEMBER.STATEWICID=dbo.BLOODWORK.STATEWICID) INNER JOIN dbo.AGENCY ON (dbo.AGENCY.AGENCYID=dbo.CERTCONTACT.AGENCYID) FULL OUTER JOIN dbo.REFERENCEDICTIONARY ON (dbo.REFERENCEDICTIONARY.Externalid = dbo.BLOODWORK.Exceptionreason) FULL OUTER JOIN dbo.MEMBERIMAGE ON (dbo.MEMBERIMAGE.STATEWICID=dbo.MEMBER.STATEWICID) WHERE ( dbo.CertHistory.CertificationID IN @dpvalue('N', DP2.DO94a) AND ( ( dbo.FOODINSTRUMENT.VOIDEDDATE Is Null AND CONVERT(date, dbo.FOODINSTRUMENTSET.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) ) OR dbo.FOODINSTRUMENTSET.Createdttm Is Null ) AND ( ( dbo.REFERENCEDICTIONARY.EXTERNALID = dbo.BLOODWORK.EXCEPTIONREASON AND dbo.REFERENCEDICTIONARY.CATEGORY = 'BLDWRKEXCP' ) OR dbo.BLOODWORK.Exceptionreason Is Null ) AND ( dbo.HEALTHNOTE.NOTESUBJECTID = '33' AND ( DATEDIFF (day, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101), CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101)) >= 0 AND DATEDIFF (day, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101), CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101)) <=30 ) ) AND dbo.CERTCONTACT.CERTIFICATIONID NOT IN @dpvalue('N', DPd.DO18d) AND dbo.CERTCONTACT.AGENCYID = @prompt('Enter 3-digit Agency ID:','A','Dbo Certcontact\Agencyid',Mono,Free,Persistent,,User:0) AND CONVERT(date, dbo.CertHistory.CreateDTTM, 101) BETWEEN @prompt('Enter Start Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:2) AND @prompt('Enter End Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:3) AND dbo.CERTCONTACT.SERVICESITEID IN @prompt('Enter 3-digit Clinic ID(s):','A','Dbo Certcontact\Servicesiteid',Multi,Free,Persistent,,User:1) AND CONVERT(date, dbo.ANTHROPCONTACT.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) AND ( CONVERT(date, dbo.BLOODWORK.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) OR dbo.BLOODWORK.Hemoglobin Is Null ) AND dbo.CERTCONTACT.Certtermdate Is Null AND dbo.CERTCONTACT.Certineligibledate Is Null AND ( ( dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD = '17'

Page 18: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

18

AND CONVERT(date, dbo.MEMBERIMAGE.ADDEDDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) ) OR dbo.MEMBERIMAGE.Addeddttm is Null OR Dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD <> '17' ) )

No Note-One Staff Query SELECT dbo.CERTCONTACT.STATEWICID, dbo.CertHistory.CertificationID, dbo.MEMBER.HOUSEHOLDID FROM dbo.MEMBER INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID) INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) WHERE ( ( dbo.CERTCONTACT.CERTIFICATIONID IN @dpvalue('N', DP7.DO94a) OR dbo.CertHistory.CertificationID IN @dpvalue('N', DP2.DO94a) ) AND dbo.CERTCONTACT.CERTTERMDATE Is Null AND dbo.CERTCONTACT.CERTINELIGIBLEDATE Is Null ) )

SubQ Query ( SELECT dbo.CERTCONTACT.STATEWICID FROM dbo.CERTCONTACT INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) WHERE ( dbo.CERTCONTACT.AGENCYID = @prompt('Enter 3-digit Agency ID:','A','Dbo Certcontact\Agencyid',Mono,Free,Persistent,,User:0) AND dbo.CERTCONTACT.SERVICESITEID IN @prompt('Enter 3-digit Clinic ID(s):','A','Dbo Certcontact\Servicesiteid',Multi,Free,Persistent,,User:1) AND CONVERT(date, dbo.CertHistory.CreateDTTM, 101) BETWEEN @prompt('Enter Start Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:2) AND @prompt('Enter End Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:3) AND dbo.CERTCONTACT.CERTIFICATIONID IN @dpvalue('N', DP6.DO94a) AND dbo.CERTCONTACT.CERTIFICATIONID NOT IN @dpvalue('N', DPd.DO18d) ) EXCEPT SELECT dbo.CERTCONTACT.STATEWICID FROM dbo.HEALTHNOTE INNER JOIN dbo.MEMBER ON (dbo.MEMBER.STATEWICID=dbo.HEALTHNOTE.STATEWICID) INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID) INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) WHERE ( dbo.CERTCONTACT.AGENCYID = @prompt('Enter 3-digit Agency ID:','A','Dbo Certcontact\Agencyid',Mono,Free,Persistent,,User:4)

Page 19: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

19

AND dbo.CERTCONTACT.SERVICESITEID IN @prompt('Enter 3-digit Clinic ID(s):','A','Dbo Certcontact\Servicesiteid',Multi,Free,Persistent,,User:5) AND CONVERT(date, dbo.CertHistory.CreateDTTM, 101) BETWEEN @prompt('Enter Start Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:6) AND @prompt('Enter End Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:7) AND ( dbo.HEALTHNOTE.NOTESUBJECTID = '33' AND ( DATEDIFF (day, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101), CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101)) >= 0 AND DATEDIFF (day, CONVERT(date, dbo.CERTHISTORY.Createdttm, 101), CONVERT(date, dbo.HEALTHNOTE.Createdttm, 101)) <=30 ) ) AND dbo.CERTCONTACT.CERTIFICATIONID IN @dpvalue('N', DP6.DO94a) AND dbo.CERTCONTACT.CERTIFICATIONID NOT IN @dpvalue('N', DPd.DO18d) ) )

No Note Query SELECT dbo.CertHistory.CertificationID, dbo.CertHistory.CreateDTTM, dbo.AGENCY.NAME, dbo.CERTCONTACT.AGENCYID, dbo.CERTCONTACT.SERVICESITEID, dbo.CERTCONTACT.STATEWICID, dbo.CERTCONTACT.CERTWICSTATUS, dbo.MEMBER.FIRSTNAME, dbo.MEMBER.LASTNAME, dbo.MEMBER.HOUSEHOLDID, dbo.MEMBER.DATEOFBIRTH, dbo.FOODINSTRUMENTSET.CREATEDTTM, dbo.FOODITEM.BASEFOODCATEGORYID, dbo.CERTSTAFFESIGN.CREATEDUSERID, dbo.RISKFACTOR.RISKFACTORID, RIGHTSESIGN.RIGHTSESIGNID, dbo.ANTHROPCONTACT.LENGTHINCHES, dbo.ANTHROPCONTACT.LENGTHEIGHTHS, dbo.ANTHROPCONTACT.WEIGHTPOUNDS, dbo.ANTHROPCONTACT.WEIGHTOUNCES, dbo.BLOODWORK.HEMOGLOBIN, dbo.BLOODWORK.EXCEPTIONREASON, dbo.REFERENCEDICTIONARY.DESCRIPTION, DATEADD(dd, DATEDIFF(dd, 0, dbo.MEMBERIMAGE.ADDEDDTTM),0), dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD FROM dbo.MEMBER INNER JOIN dbo.CERTCONTACT ON (dbo.CERTCONTACT.STATEWICID=dbo.MEMBER.STATEWICID) INNER JOIN dbo.RISKFACTOR ON (dbo.RISKFACTOR.CERTIFICATIONID=dbo.CERTCONTACT.CERTIFICATIONID) FULL OUTER JOIN dbo.CERTSTAFFESIGN ON (dbo.CERTSTAFFESIGN.CERTIFICATIONID=dbo.CERTCONTACT.CERTIFICATIONID) INNER JOIN dbo.CertHistory ON (dbo.CertHistory.CertificationID=dbo.CERTCONTACT.CERTIFICATIONID) FULL OUTER JOIN RIGHTSESIGN ON (RIGHTSESIGN.RIGHTSESIGNID=dbo.CERTCONTACT.RIGHTSESIGNID) FULL OUTER JOIN dbo.FOODINSTRUMENTSET ON (dbo.FOODINSTRUMENTSET.STATEWICID=dbo.MEMBER.STATEWICID) FULL OUTER JOIN dbo.FOODINSTRUMENT ON (dbo.FOODINSTRUMENT.FOODINSTRUMENTSETID=dbo.FOODINSTRUMENTSET.FOODINSTRUMENTSETID) FULL OUTER JOIN dbo.FOODINSTRUMENTITEM ON (dbo.FOODINSTRUMENT.FOODINSTRUMENTID=dbo.FOODINSTRUMENTITEM.FOODINSTRUMENTID) FULL OUTER JOIN dbo.FOODITEM ON (dbo.FOODINSTRUMENTITEM.FOODITEMID=dbo.FOODITEM.FOODITEMID) INNER JOIN dbo.ANTHROPCONTACT ON (dbo.MEMBER.STATEWICID=dbo.ANTHROPCONTACT.STATEWICID) FULL OUTER JOIN dbo.BLOODWORK ON (dbo.MEMBER.STATEWICID=dbo.BLOODWORK.STATEWICID) INNER JOIN dbo.AGENCY ON (dbo.AGENCY.AGENCYID=dbo.CERTCONTACT.AGENCYID)

Page 20: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

20

FULL OUTER JOIN dbo.REFERENCEDICTIONARY ON (dbo.REFERENCEDICTIONARY.Externalid = dbo.BLOODWORK.Exceptionreason) FULL OUTER JOIN dbo.MEMBERIMAGE ON (dbo.MEMBERIMAGE.STATEWICID=dbo.MEMBER.STATEWICID) WHERE ( dbo.CERTCONTACT.STATEWICID IN @dpvalue('A', DP14.DO18e) AND ( ( dbo.FOODINSTRUMENT.VOIDEDDATE Is Null AND CONVERT(date, dbo.FOODINSTRUMENT.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) ) OR dbo.FOODINSTRUMENTSET.Createdttm Is Null ) AND dbo.CERTCONTACT.AGENCYID = @prompt('Enter 3-digit Agency ID:','A','Dbo Certcontact\Agencyid',Mono,Free,Persistent,,User:0) AND dbo.CERTCONTACT.SERVICESITEID IN @prompt('Enter 3-digit Clinic ID(s):','A','Dbo Certcontact\Servicesiteid',Multi,Free,Persistent,,User:1) AND CONVERT(date, dbo.CertHistory.CreateDTTM, 101) BETWEEN @prompt('Enter Start Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:2) AND @prompt('Enter End Date:','D','Dbo Certhistory\Createdttm',Mono,Free,Persistent,,User:3) AND ( CONVERT(date, dbo.BLOODWORK.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) OR dbo.BLOODWORK.Createdttm Is Null ) AND ( ( dbo.REFERENCEDICTIONARY.CATEGORY = 'BLDWRKEXCP' AND dbo.REFERENCEDICTIONARY.EXTERNALID = dbo.BLOODWORK.EXCEPTIONREASON ) OR dbo.BLOODWORK.EXCEPTIONREASON Is Null ) AND CONVERT(date, dbo.ANTHROPCONTACT.CREATEDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) AND ( ( dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD = '17' AND CONVERT(date, dbo.MEMBERIMAGE.ADDEDDTTM, 101) = CONVERT(date, dbo.CertHistory.CreateDTTM, 101) ) OR dbo.MEMBERIMAGE.Addeddttm is Null OR Dbo.MEMBERIMAGE.DOCUMENTIMAGETYPECD <> '17' )

Colors ▪ GRB (dark green) = 135;169;150

▪ GRB (medium green) = 190;208;198

▪ GRB (light green) = 226;234;230

Page 21: Certification Completed by One Staff Person...Person (SOD) AGENCY MANAGEMENT >> CHART AUDIT/REVIEWS (REVISED 2.27.19) Report Overview A list and count of participants certified at

I N F O V I E W G U I D A N C E D O C U M E N T

21

▪ GRB (dark blue) = 94;138;156

▪ GRB (medium blue) = 135;169;183

▪ GRB (light blue) = 211;224;219

▪ GRB (border) = 153;153;153

Revisions 2.27.19 – added dbo.CERTHISTORY.Createuserid <> dbo.HEALTHNOTE.Createuserid in the exclusionary SOD Income Note Query. The purpose of this query is to exclude participants/households with one certifier who has an income note performed by another person. This does not exclude participants/households with income notes created from an alert by the certifier. New SOD procedures require the note be auditable so the note must be saved by the person performing the income assessment and not the person completing the certification.

6.1.17 – added dbo.CERTCONTACT.Certeffectivedate is not null to the SQL of the Same Staff+Income query (in the second combined query section) to remove participants that appear to have duplicate cert records (one without a Certeffectivedate and only one staff person recorded and only for Step 2-income) causing the participant to incorrectly display on the report.

5.30 17 – Changed Tab 1 to No SOD-Reviewed Note and Tab 2 to SOD-Reviewed Note.

5.15.17 – updated income note criteria to be written within 21 days prior, on, or within 14 days after the cert date.

5.15.17 – SWID 1096356 was not displaying and should have. Resolved issue – ANTHROP.Measurementdate was being used in the NoNote query instead of ANTHROP.Createddtm (corrected to use Createdttm like Note query). Since the participant’s height/weight were entered on q date (5.4.17) different from his Cert Date (5.8.17), the record wasn’t displaying.

5.11.17 – Bloodwork was showing duplicate rows if Null and Description. Changed formula to variables ([Bloodwork] and [BloodworkNo]) then took Max(Variable) to remove duplicate row. Also revised Food Type formula due to duplicate rows if both formula and foods were received for a WIC Type other than Infants; now only formula row displays if formula issued to any WIC Type.

5.1.17 – changed SOD – Reviewed Note criteria to include if written on same date as cert; excluded records where the income step has a different Modifyuserid

4.27.17 – corrected issue whereby household members with no Staff ID for the income step of the CGS were displaying.

4.19.17 – added SOD Scan column, which was part of the original request.

4.18.17 – revised CERTIFICATIONS COMPLETED BY ONE STAFF PERSON to meet the following criteria per SOD workgroup at State: include records with or without SOD-Reviewed Note written within 30 days after Cert Date; exclude records with SOD-Income Note written within 14 days of Cert Date; identify whether participant was issued formula or food; and include cert date, time, day, duration, certifier, ppt sig, height, weight, hgb, and risk factors.