-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c145ad4
commit a5f2ba2
Showing
3 changed files
with
38 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
common/src/main/resources/db/changelog/v2024/create_current_mbi_procedure.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
CREATE OR REPLACE PROCEDURE update_current_mbi_2024() | ||
LANGUAGE plpgsql | ||
AS $$ | ||
begin | ||
INSERT INTO current_mbi | ||
SELECT DISTINCT current_mbi from coverage_anthem_united_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_bcbs_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_centene_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_cigna1_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_cigna2_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_cvs_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_centene_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_humana_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_misc_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_mutual_dean_clear_cambia_rite_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_united1_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_united_2024 | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from coverage_default | ||
UNION DISTINCT | ||
SELECT DISTINCT current_mbi from sandbox_2024 | ||
ON CONFLICT DO NOTHING; | ||
end; | ||
$$; |