Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="complianceEmployeelist_rpt" tableDbType="NOT_IN_DB">
<tableTitle>Category/Unit Comparison</tableTitle>
<columns>

<column columnName="employeeid">
</column>
<column columnName="lastName">
</column>
<column columnName="firstName">
</column>
<column columnName="email">
</column>
<column columnName="type">
</column>
<column columnName="majorudds">
</column>
<column columnName="title">
</column>
<column columnName="unit">
</column>
<column columnName="category">
</column>
<column columnName="supervisor">
</column>
<column columnName="location">
</column>
<column columnName="startdate">
</column>
<column columnName="enddate">
</column>
</columns>
</table>
</tables>
</metadata>
</query>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
select a.employeeid, a.unit, null as category, a.enddate, a.lastName, a.firstName, a.email, a.type, a.title, a.category
from ehr_compliancedb.employees a
where a.unit not in (select unit from ehr_compliancedb.employeeperUnit j where j.EmployeeId = a.employeeid)
and a.unit is not null
and a.enddate is null



group by a.employeeid, a.unit, a.enddate, a.lastName, a.firstName, a.email, a.type, a.title, a.category


union

select a.employeeid, null as unit, a.category, a.enddate, a.lastName,
a.firstName, a.email, a.type, a.title, a.category
from ehr_compliancedb.employees a where
a.category not in (select category from ehr_compliancedb.employeeperUnit j where j.EmployeeId = a.employeeid)
and a.category is not null
and a.enddate is null

group by a.employeeid, a.category, a.enddate, a.lastName, a.firstName, a.email, a.type, a.title, a.category

order by a.employeeid
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
<columns>
<column name="employeeid"/>
<column name="lastName"/>
<column name="firstName"/>
<column name="email"/>
<column name="type"/>
<column name="majorudds"/>
<column name="title"/>
<column name="unit"/>
<column name="category"/>
<column name="supervisor"/>
<column name="location"/>
<column name="startdate"/>
<column name="enddate"/>
</columns>
<sorts>
<sort column="lastName" descending="false"/>
<sort column="firstName" descending="false"/>
</sorts>
</customView>
2 changes: 2 additions & 0 deletions ONPRC_EHR_ComplianceDB/resources/views/begin.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
name: 'List of Unused Training Names', url: ctx['SSRSServerURL'] +'%2fPrime+Reports%2fCompliance%2fCompliance_Unassigned_requirements&rs:Command=Render'
},{
name: 'List of Duplicate Completion Dates', url: ctx['SSRSServerURL'] +'%2fPrime+Reports%2fCompliance%2fCompliance_Duplicate_CompletedDates&rs:Command=Render'
},{
name: 'Category/Unit Comparison', url: '<%=contextPath%>/query' + container + '/executeQuery.view?schemaName=ehr_compliancedb&query.queryName=complianceEmployeelist_rpt'
}]
},{

Expand Down