Skip to content

Commit

Permalink
Re-ordered AddFreshMAPSTO() and DeprecateWrongMAPSTO() due to bug OHDSI@
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur committed Oct 11, 2019
1 parent afc3ddf commit bd7e13f
Show file tree
Hide file tree
Showing 29 changed files with 126 additions and 138 deletions.
8 changes: 4 additions & 4 deletions ATC/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1642,16 +1642,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

-- 19. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
-- 19. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

-- 20. Add mapping from deprecated to fresh concepts
-- 20. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

-- 21. DELETE ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions CIEL/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -664,16 +664,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--8. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--8. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--9. Add mapping from deprecated to fresh concepts
--9. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--10. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions CPT4/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -635,16 +635,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--14. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--14. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--15. Add mapping from deprecated to fresh concepts
--15. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--16. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions GCN_SEQNO/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ JOIN SOURCES.rxnconso rxn ON rxn.rxcui = gcn.rxcui
WHERE gcn.sab = 'NDDF'
AND gcn.tty = 'CDC';

--5. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--5. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--6. Add mapping from deprecated to fresh concepts
--6. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--7. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions GPI/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,16 @@ FROM (
) AS s0
WHERE TRIM(concept_name) IS NOT NULL;

--6. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--6. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--7. Add mapping from deprecated to fresh concepts
--7. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--8. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions Gemscript/final_part.sql
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,17 @@ BEGIN
END $_$;
/

-- Deprecate 'Maps to' mappings to deprecated and upgraded concepts
-- Add mapping from deprecated to fresh concepts, and also from non-standard to standard concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;
/

-- Add mapping from deprecated to fresh concepts, and also from non-standard to standard concepts
-- Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;
/

Expand Down
8 changes: 4 additions & 4 deletions Gemscript/final_rxE_version.sql
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ BEGIN
END $_$;
/

-- Deprecate 'Maps to' mappings to deprecated and upgraded concepts
-- Add mapping from deprecated to fresh concepts, and also from non-standard to standard concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;
/

-- Add mapping from deprecated to fresh concepts, and also from non-standard to standard concepts
-- Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;
/

Expand Down
8 changes: 4 additions & 4 deletions Gemscript/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,17 @@ BEGIN
END $_$;
/

-- Deprecate 'Maps to' mappings to deprecated and upgraded concepts
-- Add mapping from deprecated to fresh concepts, and also from non-standard to standard concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;
/

-- Add mapping from deprecated to fresh concepts, and also from non-standard to standard concepts
-- Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;
/

Expand Down
8 changes: 4 additions & 4 deletions HCPCS/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1642,16 +1642,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--15. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--15. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--16. Add mapping from deprecated to fresh concepts
--16. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--17. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions ICD10/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--8. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--8. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--9. Add mapping from deprecated to fresh concepts
--9. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--10. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions ICD10CM/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--6. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--6. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--7. Add mapping from deprecated to fresh concepts
--7. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--8. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions ICD10PCS/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--9. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--9. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--10. Add mapping from deprecated to fresh concepts
--10. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--11. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions ICD9CM/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--11. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--11. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--12. Add mapping from deprecated to fresh concepts
--12. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--13. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions ICD9Proc/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--9. Deprecate 'Maps to' mappings to deprecated and updated concepts
--9. Delete ambiguous 'Maps to' mappings
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.DeleteAmbiguousMAPSTO();
END $_$;

--10. Delete ambiguous 'Maps to' mappings
--10. Deprecate 'Maps to' mappings to deprecated and updated concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeleteAmbiguousMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--11. Add "Is a" relationship from ICD9Proc descendants (or their standard SNOMED equivalents) to ICD9Proc ancestors (or their standard SNOMED equivalents), using ICD9Proc code similarity, to the CONCEPT_RELATIONSHIP_STAGE
Expand Down
8 changes: 4 additions & 4 deletions Indication/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--6. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--6. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--7. Add mapping from deprecated to fresh concepts
--7. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--8. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions LOINC/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -892,16 +892,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--22. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--22. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--23. Add mapping from deprecated to fresh concepts
--23. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--24. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions MeSH/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,16 @@ JOIN SOURCES.mrconso u ON u.code = c.concept_code
AND u.suppress = 'N'
AND u.lat = 'ENG';

--6. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--6. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--7. Add mapping from deprecated to fresh concepts
--7. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--8. Delete ambiguous 'Maps to' mappings
Expand Down
8 changes: 4 additions & 4 deletions MedDRA/load_stage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -411,16 +411,16 @@ BEGIN
PERFORM VOCABULARY_PACK.CheckReplacementMappings();
END $_$;

--10. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
--10. Add mapping from deprecated to fresh concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
END $_$;

--11. Add mapping from deprecated to fresh concepts
--11. Deprecate 'Maps to' mappings to deprecated and upgraded concepts
DO $_$
BEGIN
PERFORM VOCABULARY_PACK.AddFreshMAPSTO();
PERFORM VOCABULARY_PACK.DeprecateWrongMAPSTO();
END $_$;

--12. Delete ambiguous 'Maps to' mappings
Expand Down
Loading

0 comments on commit bd7e13f

Please sign in to comment.