Skip to content

Commit df5564f

Browse files
committed
Merge discvr-23.3 to develop
2 parents b0aff96 + 7c9de91 commit df5564f

File tree

101 files changed

+641
-9935
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+641
-9935
lines changed

GenotypeAssays/src/org/labkey/genotypeassays/GeneticsTableCustomizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private void customizeSummaryByLineage(AbstractTableInfo ti)
144144
ti.addColumn(newCol);
145145

146146
String chr = ti.getSqlDialect().isPostgreSQL() ? "chr" : "char";
147-
SQLFragment sql3 = new SQLFragment("(select ").append(ti.getSqlDialect().getGroupConcat(new SQLFragment("hs.haplotype"), true, true, chr + "(10)")).append(" as expr FROM assayresult." + d.getStorageTableName() + " a JOIN sequenceanalysis.haplotype_sequences hs ON (a.marker = hs.haplotype AND hs.type = 'Lineage' AND hs.present = " + ti.getSqlDialect().getBooleanTRUE() + ") WHERE a.analysisId = " + ExprColumn.STR_TABLE_ALIAS + ".analysis_id AND a.result IS NULL AND hs.name = " + ExprColumn.STR_TABLE_ALIAS + ".lineages)");
147+
SQLFragment sql3 = new SQLFragment("(select ").append(ti.getSqlDialect().getGroupConcat(new SQLFragment("hs.haplotype"), true, true, chr + "(10)")).append(" as expr FROM assayresult.").append(d.getStorageTableName()).append(" a JOIN sequenceanalysis.haplotype_sequences hs ON (a.marker = hs.haplotype AND hs.type = 'Lineage' AND hs.present = ").append(ti.getSqlDialect().getBooleanTRUE()).append(") WHERE a.analysisId = ").append(ExprColumn.STR_TABLE_ALIAS).append(".analysis_id AND a.result IS NULL AND hs.name = ").append(ExprColumn.STR_TABLE_ALIAS).append(".lineages)");
148148
ExprColumn newCol3 = new ExprColumn(ti, "cachedHaplotypes", sql3, JdbcType.VARCHAR, ti.getColumn("analysis_id"), ti.getColumn("lineages"));
149149
newCol3.setLabel("Matching Cached Haplotypes");
150150
ti.addColumn(newCol3);

IDR/build.gradle

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import org.labkey.gradle.util.BuildUtils;
2+
3+
plugins {
4+
id 'org.labkey.build.module'
5+
}
6+
7+
dependencies
8+
{
9+
implementation "com.sun.mail:jakarta.mail:${javaMailVersion}"
10+
implementation project(path: ':server:modules:LabDevKitModules:LDK')
11+
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: "apiJarFile")
12+
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:ehrModules:ehr", depProjectConfig: "apiJarFile")
13+
14+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:LabDevKitModules:laboratory", depProjectConfig: 'published', depExtension: 'module')
15+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: 'published', depExtension: 'module')
16+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:dataintegration", depProjectConfig: 'published', depExtension: 'module')
17+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:premium", depProjectConfig: 'published', depExtension: 'module')
18+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:ehrModules:ehr", depProjectConfig: 'published', depExtension: 'module')
19+
}

IDR/module.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ModuleClass: org.labkey.idr.IDRModule
2+
Label: IDR
3+
Description: This module will support the ONPRC IDR
4+
License: Apache 2.0
5+
LicenseURL: http://www.apache.org/licenses/LICENSE-2.0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
-- Create schema, tables, indexes, and constraints used for IDR module here
3+
-- All SQL VIEW definitions should be created in idr-create.sql and dropped in idr-drop.sql
4+
CREATE SCHEMA idr;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2023 LabKey Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
-- Create schema, tables, indexes, and constraints used for IDR module here
18+
-- All SQL VIEW definitions should be created in idr-create.sql and dropped in idr-drop.sql
19+
CREATE SCHEMA idr;
20+
GO

IDR/resources/schemas/idr.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<tables xsi:schemaLocation="http://labkey.org/data/xml ..\..\..\..\schemas\tableInfo.xsd"
4+
xmlns="http://labkey.org/data/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.labkey.idr;
2+
3+
import org.labkey.api.action.SpringActionController;
4+
5+
public class IDRController extends SpringActionController
6+
{
7+
private static final DefaultActionResolver _actionResolver = new DefaultActionResolver(IDRController.class);
8+
public static final String NAME = "idr";
9+
10+
public IDRController()
11+
{
12+
setActionResolver(_actionResolver);
13+
}
14+
15+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.labkey.idr;
2+
3+
public class IDRManager
4+
{
5+
private static final IDRManager _instance = new IDRManager();
6+
7+
private IDRManager()
8+
{
9+
// prevent external construction with a private default constructor
10+
}
11+
12+
public static IDRManager get()
13+
{
14+
return _instance;
15+
}
16+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright (c) 2023 LabKey Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.labkey.idr;
18+
19+
import org.jetbrains.annotations.Nullable;
20+
import org.labkey.api.ehr.EHRService;
21+
import org.labkey.api.ldk.ExtendedSimpleModule;
22+
import org.labkey.api.module.ModuleContext;
23+
24+
public class IDRModule extends ExtendedSimpleModule
25+
{
26+
public static final String NAME = "IDR";
27+
28+
@Override
29+
public String getName()
30+
{
31+
return NAME;
32+
}
33+
34+
@Override
35+
protected void doStartupAfterSpringConfig(ModuleContext moduleContext)
36+
{
37+
registerEHRResources();
38+
}
39+
40+
private void registerEHRResources()
41+
{
42+
EHRService.get().registerModule(this);
43+
}
44+
45+
@Override
46+
public @Nullable Double getSchemaVersion()
47+
{
48+
return 23.000;
49+
}
50+
51+
@Override
52+
public boolean hasScripts()
53+
{
54+
return true;
55+
}
56+
57+
@Override
58+
protected void init()
59+
{
60+
addController(IDRController.NAME, IDRController.class);
61+
}
62+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package org.labkey.idr;
2+
3+
import org.labkey.api.data.DbSchema;
4+
import org.labkey.api.data.DbSchemaType;
5+
import org.labkey.api.data.dialect.SqlDialect;
6+
7+
public class IDRSchema
8+
{
9+
private static final IDRSchema _instance = new IDRSchema();
10+
public static final String NAME = "idr";
11+
12+
public static IDRSchema getInstance()
13+
{
14+
return _instance;
15+
}
16+
17+
private IDRSchema()
18+
{
19+
// private constructor to prevent instantiation from
20+
// outside this class: this singleton should only be
21+
// accessed via org.labkey.idr.IDRSchema.getInstance()
22+
}
23+
24+
public DbSchema getSchema()
25+
{
26+
return DbSchema.get(NAME, DbSchemaType.Module);
27+
}
28+
29+
public SqlDialect getSqlDialect()
30+
{
31+
return getSchema().getSqlDialect();
32+
}
33+
}

0 commit comments

Comments
 (0)