Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.labkey.gradle.util.BuildUtils
import org.labkey.gradle.util.ModuleFinder

Expand Down
15 changes: 15 additions & 0 deletions nirc_ehr/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.labkey.gradle.util.BuildUtils

repositories
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/auditDeleteEvent.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
-- subquery to extract an animal event from AUDIT_TRAIL.REFERENCE to identify delete event
SELECT
auditSubQuery.objectid,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_account.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
ac.ACCOUNT_ID as AccountId,
ac.ACCOUNT_NUMBER as AccountNumber,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_alopecia.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT anmEvt.ANIMAL_EVENT_ID AS objectid,
anmEvt.ANIMAL_ID.ANIMAL_ID_NUMBER AS Id,
CAST(anmEvt.EVENT_DATETIME AS TIMESTAMP) AS date,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_alopecia_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT substring(adt.PRIMARY_KEY_VALUES, length('ANIMAL_EVENT_ID = ')) AS objectid,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified,
adt.REFERENCE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_animal_delivery.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
ad.ANIMAL_DELIVERY_ID as AnimalDeliveryId,
ad.ANIMAL_SHIPMENT_ID as AnimalShipment,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_animal_delivery_esig.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
ID as EsigId,
ANIMAL_DELIVERY_ID as AnimalDelivery,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_animal_req_order.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
ar.ANIMAL_REQ_ORDER_ID as AnimalReqOrderId,
ar.ANIMAL_VENDOR_ID as AnimalVendor,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_animal_req_order_esig.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
ID as EsigId,
ANIMAL_REQ_ORDER_ID as AnimalReqOrder,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_animal_shipment.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
ans.ANIMAL_SHIPMENT_ID as AnimalShipmentId,
ans.RECEIVED_BY_STAFF_ID.STAFF_FIRST_NAME
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_animal_vendor.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
av.ANIMAL_VENDOR_ID as AnimalVendorId,
av.VENDOR_APPROVAL_CODE_ID as VendorApprovalCode,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_areas.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT LOCATION_ID AS area,
LOCATION_NAME AS description,
FROM LOCATION
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_arrival.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT anmEvt.ANIMAL_EVENT_ID AS objectid,
anm.ANIMAL_ID_NUMBER AS Id,
(CASE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_arrival_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT substring(adt.PRIMARY_KEY_VALUES, length('ANIMAL_EVENT_ID = ')) AS objectid,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified,
adt.REFERENCE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_assignment.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT alt.ALTERNATE_ID AS "objectId",
anm.ANIMAL_ID,
anm.ANIMAL_ID_NUMBER AS "Id",
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_assignment_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT substring(adt.PRIMARY_KEY_VALUES, length('Alternate_ID = ')) AS objectid,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified,
adt.REFERENCE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_biopsy.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT anmEvt.ANIMAL_EVENT_ID AS objectid,
anmEvt.ANIMAL_ID.ANIMAL_ID_NUMBER AS Id,
CAST(anmEvt.EVENT_DATETIME AS TIMESTAMP) AS biopsyDate,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_biopsy_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/

SELECT substring(adt.PRIMARY_KEY_VALUES, 18) AS objectid,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_births.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT anm.ANIMAL_ID_NUMBER AS participantId,
anm.BIRTH_DATE AS birthDate,
(CASE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_births_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT an.ANIMAL_ID_NUMBER AS Id,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified,
adt.REFERENCE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_blood.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT anmEvt.ANIMAL_EVENT_ID AS objectid,
anmEvt.ANIMAL_ID.ANIMAL_ID_NUMBER AS Id,
CAST(anmEvt.EVENT_DATETIME AS TIMESTAMP) AS bloodDate,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_blood_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/

SELECT substring(adt.PRIMARY_KEY_VALUES, 18) AS objectid,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_breeder.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT anmEvt.ANIMAL_EVENT_ID AS objectid,
anmEvt.ANIMAL_ID.ANIMAL_ID_NUMBER AS Id,
CAST(anmEvt.EVENT_DATETIME AS TIMESTAMP) AS administrationDate,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_breeder_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT substring(adt.PRIMARY_KEY_VALUES, length('ANIMAL_EVENT_ID = ')) AS objectid,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified,
adt.REFERENCE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_buildings.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
building.LOCATION_ID AS name,
building.LOCATION_NAME AS description,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_cage_card.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
cc.CAGE_CARD_ID AS CageCardId,
s.PROTOCOL_ID AS Protocol,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_cage_card_history.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
cc.CAGE_CARD_ID AS CageCardId,
cc.ANIMAL_DELIVERY_ID AS AnimalDelivery,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_cages.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
cage.LOCATION_ID AS location,
cage.LOCATION_NAME AS cage,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_cases.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT * FROM (
SELECT anmEvt.ANIMAL_EVENT_ID as objectid,
anm.ANIMAL_ID_NUMBER AS Id,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_cases_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT ade.objectid,
ade.modified,
ade.REFERENCE,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_chemistryResults.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT anmEvt.ANIMAL_EVENT_ID AS objectid,
anmEvt.ANIMAL_ID.ANIMAL_ID_NUMBER AS Id,
CAST(anmEvt.EVENT_DATETIME AS TIMESTAMP) AS administrationDate,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_chemistryResults_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT substring(adt.PRIMARY_KEY_VALUES, length('ANIMAL_EVENT_ID = ')) AS objectid,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified,
adt.REFERENCE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_clinremarks.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT anmEvt.ANIMAL_EVENT_ID AS objectid,
anmEvt.ANIMAL_ID.ANIMAL_ID_NUMBER AS Id,
CAST(anmEvt.EVENT_DATETIME AS TIMESTAMP) AS administrationDate,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_clinremarks_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT substring(adt.PRIMARY_KEY_VALUES, length('ANIMAL_EVENT_ID = ')) AS objectid,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified,
adt.REFERENCE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_deaths.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/

SELECT an.ANIMAL_ID_NUMBER AS participantId,
an.DEATH_DATE AS deathDate,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_deaths_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT an.ANIMAL_ID_NUMBER AS Id,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified,
adt.REFERENCE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_deleted_record.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
dr.ID AS Id,
dr.PROTOCOL_NUMBER AS Protocol,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_demographics.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/

SELECT anm.ANIMAL_ID_NUMBER AS participantId,
anm.BIRTH_DATE,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_demographics_delete.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT an.ANIMAL_ID_NUMBER AS Id,
CAST(adt.CHANGE_DATETIME AS TIMESTAMP) AS modified,
adt.REFERENCE
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_department.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2022-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
DEPARTMENT_ID as DepartmentId,
DEPARTMENT_NAME as Name,
Expand Down
5 changes: 5 additions & 0 deletions nirc_ehr/resources/queries/dbo/q_departure.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2021-2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
-- Used for departure ETL. There are some duplicate departures in ANIMAL_EVENTS thus the GROUP BY and MAX values
SELECT
i.*,
Expand Down
Loading
Loading