Opened 6 years ago

Closed 6 years ago

#2235 closed enhancement (fixed)

Delete pathology test codes that have no associated records

Reported by: Lisa Burke Owned by: Benjamin Haag
Priority: medium Milestone:
Component: Database, Data Updates Version: N/A
Severity: Keywords: Pathogen test zero records
Cc: devteam@…, lisa.burke@… Database Engine: N/A
Operating System: N/A

Description

Delete Pathogen Test codes that have no associated records. See attachment for examples

Attachments (1)

Pathogen tests for zero records.xlsx​ (11.9 KB ) - added by Lisa Burke 6 years ago.
zero record pathology test codes

Download all attachments as: .zip

Change History (3)

by Lisa Burke, 6 years ago

zero record pathology test codes

comment:1 by Benjamin Haag, 6 years ago

Ran the following SQL successfully on prod:

DELETE
FROM code_value
WHERE group_name = 'PATHOLOGY_TEST'
AND value NOT IN 
(SELECT DISTINCT contaminant_code FROM inventory_quality_status)

comment:2 by Benjamin Haag, 6 years ago

Resolution: → fixed
Status: assigned → closed
Note: See TracTickets for help on using tickets.