Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ FROM (
SELECT rowid, 'Cynomolgus' AS arrow_common_name, protocol_id, max_three_year, date_modified, date_expiration
FROM arrow_protocols
WHERE arrow_common_name = 'Macaque'

UNION ALL

SELECT rowid, 'Pigtail' AS arrow_common_name, protocol_id, max_three_year, date_modified, date_expiration
FROM arrow_protocols
WHERE arrow_common_name = 'Macaque'
)

UNION ALL
Expand Down
3 changes: 2 additions & 1 deletion WNPRC_EHR/src/org/labkey/wnprc_ehr/TriggerScriptHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2678,6 +2678,7 @@ public String verifyProtocolCounts(final String id, Integer project, final List<
{
final String RHESUS_SPECIES = "Rhesus";
final String CYNOMOLGUS_SPECIES = "Cynomolgus";
final String PIGTAIL_SPECIES = "Pigtail";
final String MACAQUE_SPECIES = "Macaque";
final String ALL_SPECIES = "All Species";
if (id == null)
Expand Down Expand Up @@ -2748,7 +2749,7 @@ public void exec(ResultSet rs) throws SQLException
AnimalRecord ar = EHRDemographicsService.get().getAnimal(container, id);

//we don't want to exit the animal count if ar.species() is cyno or rhesus and the protocol's species value is macaque.
if (!ALL_SPECIES.equals(species) && !(RHESUS_SPECIES.equals(ar.getSpecies()) || CYNOMOLGUS_SPECIES.equals(ar.getSpecies()) && MACAQUE_SPECIES.equals(species)))
if (!ALL_SPECIES.equals(species) && !(RHESUS_SPECIES.equals(ar.getSpecies()) || CYNOMOLGUS_SPECIES.equals(ar.getSpecies()) || PIGTAIL_SPECIES.equals(ar.getSpecies()) && MACAQUE_SPECIES.equals(species)))
{
//find species
if (ar.getSpecies() == null || !species.equals(ar.getSpecies()))
Expand Down