Skip to content

Commit 7be5931

Browse files
committed
Claude review feedback. Enable ONPRC_EHR tests on PostgreSQL.
1 parent 1278c23 commit 7be5931

4 files changed

Lines changed: 12 additions & 13 deletions

File tree

onprc_ehr/resources/schemas/dbscripts/postgresql/onprc_ehr-0.000-25.000.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ CREATE TABLE onprc_ehr.Frequency_DayofWeek(
269269

270270
CREATE TABLE onprc_ehr.usersActiveNames(
271271
Email varchar(64) NULL,
272-
_ts TIMESTAMP NOT NULL,
272+
_ts TIMESTAMP DEFAULT now(),
273273
EntityId ENTITYID NULL,
274274
CreatedBy USERID NULL,
275275
Created TIMESTAMP NULL,
@@ -397,7 +397,7 @@ CREATE TABLE onprc_ehr.PotentialSire_source(
397397
Species varchar(100) NULL,
398398
room varchar(100) NULL,
399399
cage varchar(100) NULL,
400-
SireAgeAtTime integer NULL,
400+
SireAgeAtTime integer NULL, -- TODO: Check this - DateTime type on SQL Server, but looks like INTEGER is the correct type
401401
PotentialSire varchar(100) NULL,
402402
SireBirth TIMESTAMP NULL,
403403
Siregender varchar(100) NULL,
@@ -419,7 +419,7 @@ CREATE TABLE onprc_ehr.PotentialDam_source(
419419
Species varchar(100) NULL,
420420
room varchar(100) NULL,
421421
cage varchar(100) NULL,
422-
DamAgeAtTime integer NULL,
422+
DamAgeAtTime integer NULL, -- TODO: Check this - DateTime type on SQL Server, but looks like INTEGER is the correct type
423423
PotentialDam varchar(100) NULL,
424424
DamBirth TIMESTAMP NULL,
425425
Damgender varchar(100) NULL,
@@ -441,9 +441,9 @@ CREATE TABLE onprc_ehr.PotentialParents_source(
441441
Species varchar(100) NULL,
442442
BirthRoom varchar(100) NULL,
443443
Birthcage varchar(100) NULL,
444-
ParentAgeAtTime integer NULL,
444+
ParentAgeAtTime integer NULL, -- TODO: Check this - DateTime type on SQL Server, but looks like INTEGER is the correct type
445445
PotentialParent varchar(100) NULL,
446-
"[PotentialParentType" varchar(100) NULL, -- TODO: Yes, we need to get rid of that bracket, but this is how it is in the SQL Server script
446+
"[PotentialParentType" varchar(100) NULL, -- TODO: Yes, we need to get rid of that bracket, but this is how it is in the SQL Server script
447447
ParentBirth TIMESTAMP NULL,
448448
Parentgender varchar(100) NULL,
449449
ParentSpecies varchar(100) NULL,
@@ -702,7 +702,7 @@ CREATE TABLE onprc_ehr.Prima_TissueCollections(
702702
PreviousVersionId int NULL,
703703
Title varchar(127) NOT NULL,
704704
Created TIMESTAMPTZ NOT NULL,
705-
LastModified TIMESTAMP NOT NULL,
705+
LastModified TIMESTAMP DEFAULT now(),
706706
Abbreviation varchar(127) NULL
707707
);
708708

@@ -949,15 +949,15 @@ BEGIN
949949
Name,
950950
UserId,
951951
'Active_Groups',
952-
Active,
952+
CASE WHEN Active THEN 1 ELSE 0 END,
953953
Type,
954954
NULL,
955955
now(),
956956
NULL
957957
FROM core.Principals
958958
WHERE type = 'g'
959959
AND UserId > 0
960-
AND Active = 1
960+
AND Active IS TRUE
961961
AND Container IS NULL;
962962

963963
RETURN 0;

onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/AbstractGenericONPRC_EHRTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import org.labkey.test.util.LogMethod;
4040
import org.labkey.test.util.PasswordUtil;
4141
import org.labkey.test.util.SchemaHelper;
42-
import org.labkey.test.util.SqlserverOnlyTest;
4342
import org.labkey.test.util.ehr.EHRClientAPIHelper;
4443
import org.labkey.test.util.ext4cmp.Ext4CmpRef;
4544
import org.labkey.test.util.ext4cmp.Ext4ComboRef;
@@ -60,7 +59,7 @@
6059

6160
import static org.junit.Assert.assertTrue;
6261

63-
public abstract class AbstractGenericONPRC_EHRTest extends AbstractGenericEHRTest implements SqlserverOnlyTest
62+
public abstract class AbstractGenericONPRC_EHRTest extends AbstractGenericEHRTest
6463
{
6564
protected static final String REFERENCE_STUDY_PATH = "/resources/referenceStudy";
6665
protected static final String GENETICS_PIPELINE_LOG_PATH = REFERENCE_STUDY_PATH + "/kinship/EHR Kinship Calculation/kinship.txt.log";

onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_BillingTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.labkey.test.util.Ext4Helper;
3737
import org.labkey.test.util.LogMethod;
3838
import org.labkey.test.util.PortalHelper;
39+
import org.labkey.test.util.SqlserverOnlyTest;
3940
import org.labkey.test.util.ext4cmp.Ext4FieldRef;
4041
import org.labkey.test.util.ext4cmp.Ext4GridRef;
4142

@@ -55,7 +56,7 @@
5556

5657
@Category({EHR.class, ONPRC.class})
5758
@BaseWebDriverTest.ClassTimeout(minutes = 20)
58-
public class ONPRC_BillingTest extends AbstractONPRC_EHRTest
59+
public class ONPRC_BillingTest extends AbstractONPRC_EHRTest implements SqlserverOnlyTest
5960
{
6061
protected static String PROJECT_NAME = "ONPRC_Billing_TestProject";
6162
private static final String BILLING_FOLDER_PATH = "/" + PROJECT_NAME + "/" + BILLING_FOLDER;

onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_RestrictedIssueTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.labkey.test.pages.search.SearchResultsPage;
1616
import org.labkey.test.util.IssuesHelper;
1717
import org.labkey.test.util.SearchHelper;
18-
import org.labkey.test.util.SqlserverOnlyTest;
1918
import org.labkey.test.util.TestUser;
2019

2120
import java.util.Arrays;
@@ -26,7 +25,7 @@
2625
import static org.labkey.test.util.PermissionsHelper.FOLDER_ADMIN_ROLE;
2726

2827
@Category({EHR.class, ONPRC.class})
29-
public class ONPRC_RestrictedIssueTest extends BaseWebDriverTest implements SqlserverOnlyTest
28+
public class ONPRC_RestrictedIssueTest extends BaseWebDriverTest
3029
{
3130
private final IssuesHelper _issuesHelper;
3231

0 commit comments

Comments
 (0)