Update of NDC
Prerequisites:
- Schema DevV5 with copies of tables concept, concept_relationship and concept_synonym from ProdV5, fully indexed.
- RxNorm must be loaded first
- Working directory NDC.
- Created schema ApiGrabber (\working\packages\APIgrabber). You must execute all functions in ApiGrabber at least once
-
Run create_source_tables.sql
-
Download NDC code distrbution file Open the site http://www.fda.gov/Drugs/InformationOnDrugs/ucm142438.htm
- Download the latest NDC Database File
- Extract product.txt and package.txt files
- Download additional source for SPL concepts and relationships from https://dailymed.nlm.nih.gov/dailymed/spl-resources-all-drug-labels.cfm and https://dailymed.nlm.nih.gov/dailymed/spl-resources-all-mapping-files.cfm
- Full Releases of HUMAN PRESCRIPTION LABELS, HUMAN OTC LABELS, HOMEOPATHIC LABELS and REMAINDER LABELS (1st link)
- SPL-RXNORM MAPPINGS (2d link)
-
Extract LABELS using unzipxml.sh
-
Extract rxnorm_mappings.txt from rxnorm_mappings.zip
-
Run in devv5 (with fresh vocabulary date and version): SELECT sources.load_input_tables('NDC',TO_DATE('20180420','YYYYMMDD'),'NDC 20180420');
-
Run the FastRecreate (Full recreate, all tables are included):
SELECT devv5.FastRecreateSchema(main_schema_name=>'devv5', include_concept_ancestor=>false, include_deprecated_rels=>true, include_synonyms=>true);
-
Run [load_stage.sql]
-
Perform manual work described in manual_work folder
-
Run [load_stage.sql]
-
Perform stage tables checks (should retrieve NULL)
SELECT * FROM qa_tests.check_stage_tables ();
- Run generic_update:
SELECT devv5.GenericUpdate();
- Perform QA checks (should retrieve NULL)
SELECT * FROM QA_TESTS.GET_CHECKS();
-
Get_summary - changes in tables between dev-schema (current) and devv5/prodv5/any other schema
--15.1. summary (table to check, schema to compare) select * from qa_tests.get_summary (table_name=>'concept',pCompareWith=>'devv5');
--15.2. summary (table to check, schema to compare) select * from qa_tests.get_summary (table_name=>'concept_relationship',pCompareWith=>'devv5');
- Statistics QA checks --changes in tables between dev-schema (current) and devv5/prodv5/any other schema
--16.1. Domain changes select * from qa_tests.get_domain_changes(pCompareWith=>'devv5');
--16.2. Newly added concepts grouped by vocabulary_id and domain select * from qa_tests.get_newly_concepts(pCompareWith=>'devv5');
--16.3. Standard concept changes select * from qa_tests.get_standard_concept_changes(pCompareWith=>'devv5');
--16.4. Newly added concepts and their standard concept status select * from qa_tests.get_newly_concepts_standard_concept_status(pCompareWith=>'devv5');
--16.5. Changes of concept mapping status grouped by target domain select * from qa_tests.get_changes_concept_mapping(pCompareWith=>'devv5');