Skip to content

Commit bed79b6

Browse files
authored
- Created default view for MhcData dataset (#449)
- Removed leading whitespace from MhcData source view
1 parent 6285b2e commit bed79b6

3 files changed

Lines changed: 29 additions & 3 deletions

File tree

snprc_ehr/resources/queries/snprc_ehr/MhcData.query.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
<updateUrl />
99
<deleteUrl />
1010
<columns>
11-
<column columnName="Id"/>
11+
<column columnName="Id">
12+
<fk>
13+
<fkDbSchema>study</fkDbSchema>
14+
<fkTable>Animal</fkTable>
15+
<fkColumnName>Id</fkColumnName>
16+
</fk>
17+
</column>
1218
<column columnName="OcId">
1319
<columnTitle>OC ID</columnTitle>
1420
<isHidden>true</isHidden>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
2+
<columns>
3+
<column name="Id"/>
4+
<column name="MHCValue"/>
5+
<column name="Haplotype"/>
6+
<column name="DataFileSource"/>
7+
<column name="OcId"/>
8+
<column name="Modified"/>
9+
<column name="id/parents/dam"/>
10+
<column name="id/parents/sire"/>
11+
<column name="id/age/birth"/>
12+
<column name="Id/age/ageInYears"/>
13+
<column name="Id/AgeClass/Label"/>
14+
<column name="Id/ActiveGroups/Colony::animal_group.Category"/>
15+
</columns>
16+
<sorts>
17+
<sort column="Id"/>
18+
<sort column="Haplotype" />
19+
</sorts>
20+
</customView>

snprc_ehr/resources/source_queries/create_v_MhcData.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ ALTER VIEW [labkey_etl].[V_MhcData] AS
2828
-- Create date: 5/16/2017
2929
-- Description:
3030
-- Changes:
31-
--
31+
-- 05/18/2022 removed leading spaces from animal id
3232
--
3333
-- ==========================================================================================
3434

3535
SELECT
36-
RIGHT(SPACE(6) + u.[Animal ID], 6) AS Id,
36+
u.[Animal ID] AS Id,
3737
u.[File Source] AS DataFileSource,
3838
u.[OC ID] AS OcId,
3939
u.Haplotype AS Haplotype,

0 commit comments

Comments
 (0)