This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CAST(@TIME_PERIOD_START AS DATE) AS PERIOD_START, | |
CAST(@TIME_PERIOD_END AS DATE) AS PERIOD_END, | |
c.CLIENT_NAME, | |
p.GRP_ID, | |
COUNT(DISTINCT u.USR_ID) AS USER_COUNT, | |
COUNT(DISTINCT COALESCE(up.CHILD_ID, u.USR_ID)) AS STUDENT_COUNT | |
FROM CLIENTS c | |
INNER JOIN CLIENT_PACKAGES cp ON (c.CLIENT_ID = cp.CLIENT_ID) | |
INNER JOIN PACKAGES p ON (p.GRP_ID = cp.GRP_ID) | |
INNER JOIN GROUPS g ON (p.GRP_ID = g.GRP_ID) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT i.IND_ID, | |
i.IND_Fname, | |
i.IND_Lname, | |
sa.ANS_String | |
FROM SINGLE_ANSWERS sa | |
INNER JOIN USER_MEMBERSHIPS um ON sa.USR_ID = um.USR_ID | |
INNER JOIN INDIVIDUALS i ON i.IND_ID = um.USR_ID | |
WHERE sa.QUE_ID = :queid | |
AND um.GRP_ID = :grpid | |
AND um.trCTM_Archive = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT u.USR_ID AS 'MHPID', | |
u.VENDOR_KEY AS 'Vendor Key', | |
u.LAST_NAME AS 'Last Name', | |
u.FIRST_NAME AS 'First Name', | |
CONVERT(u.DOB, Date) AS 'Date of Birth', | |
t.trCTM_Name AS 'Tracker', | |
g.listing AS 'Groups', | |
a.name AS 'Allergy Name', | |
COALESCE(ans_alother.ANS_String, ans_alother.ANS_Text, ans_alother.ANS_Longtext) AS 'Allergy Details', | |
COALESCE(ans_alreact.ANS_String, ans_alreact.ANS_Text, ans_alreact.ANS_Longtext) AS 'Allergy Reaction', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
String getCSVRecordForReport(Report report) { | |
String reportSql = getReportSql(report.getReportId()) | |
log.debug("${reportSql}") | |
def query = dslContextReadOnly.query(reportSql) | |
query = bindParams(query, reportSql, report.reportParamsMap) | |
String csvResult = this.dslContextReadOnly.fetch(query as ReaultQuery).formatCSV() | |
return csvResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
} | |
configurations { | |
reverseMap | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin:'org.hibernate.gradle.tools' | |
apply plugin: "hibernatetools-gradle-plugin" | |
apply plugin: "java" | |
buildscript { | |
repositories { | |
maven { | |
url "https://plugins.gradle.org/m2/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task hbm2java { | |
group = "hbm2java" | |
ant.taskdef { name ="hibernatetool" | |
classname="org.hibernate.tool.ant.HibernateToolTask" | |
classpathref="toolslib" | |
} | |
ant.hibernatetool{ | |
destdir="/src/main/java/" | |
configuration { | |
configurationfile="hibernate.cfg.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<databaseChangeLog | |
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" | |
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd | |
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> | |
<changeSet author="sudarshan" id="insertRedisNonceConfigTag"> | |
<tagDatabase tag="v2"/> | |
</changeSet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `DOCUMENTS_HISTORY` ( | |
`DOCUMENT_HISTORY_ID`int(11) NOT NULL AUTO_INCREMENT, | |
`REVISION_ID`int(11) DEFAULT 0, | |
`OP_DESC` varchar(255) DEFAULT NULL, | |
`DOC_ID` int(11) NOT NULL, | |
`DOC_CODE` varchar(30) NOT NULL, | |
`DOC_PATH` varchar(255) NOT NULL, | |
`DOC_UploadedId` int(11) NOT NULL, | |
`DOC_Uploaded` datetime DEFAULT NULL, | |
`DOC_Approved` datetime DEFAULT NULL, |