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
#! usr/bin/python | |
#currently python3 | |
import py2neo as py | |
class MusicTraverser: | |
def getSong(): | |
# gets the information needed from the neo4j graph and sends request to lastfm API to play song | |
pass |
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 CODE IS NOT FULLY TESTED YET. It still needs to be verified, but it uses the same | |
* algorithm found in Chris_Knoll's script: https://gist.github.com/chrisknoll/c820cc12d833db2e3d1e | |
*/ | |
---TRUNCATE omop.v5drug_era; | |
WITH | |
ctePreDrugTarget(drug_exposure_id, person_id, ingredient_concept_id, drug_exposure_start_date, days_supply, drug_exposure_end_date) AS | |
(-- Normalize DRUG_EXPOSURE_END_DATE to either the existing drug exposure end date, or add days supply, or add 1 day to the start date | |
SELECT |
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
-------------------------------------------------------------------------------------------------------------- | |
---Adapted to PostgreSQL drug_era from Pure SQL drug_era written by Chris_Knoll: https://gist.github.com/chrisknoll/c820cc12d833db2e3d1e | |
---Upgraded to v5 | |
---Uses STOCKPILE method to populate gap_days field | |
---INTERVAL set to 30 days | |
---Chris Knoll's comments are after two dashes | |
---Taylor Delehanty's comments are after three dashes | |
---proper schema for "<schema>" needs to be replaced in the code | |
---proper schema for "<vocabulary_and_concept_schema>" needs to be replaced in the code |
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
-------------------------------------------------------------------------------------------------------------- | |
---Adapted to PostgreSQL drug_era from Pure SQL drug_era written by Chris_Knoll: https://gist.github.com/chrisknoll/c820cc12d833db2e3d1e | |
---INTERVAL set to 30 days | |
---Chris Knoll's comments are after two dashes | |
---Taylor Delehanty's comments are after three dashes | |
---proper schema for "<schema>" needs to be replaced in the code | |
---proper schema for "<vocabulary_and_concept_schema>" needs to be replaced in the code | |
-------------------------------------------------------------------------------------------------------------- |
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
-------------------------------------------------------------------------------------------------------------- | |
---Adapted to PostgreSQL condition_era from Pure SQL drug_era written by Chris_Knoll: https://gist.github.com/chrisknoll/c820cc12d833db2e3d1e | |
---INTERVAL set to 30 days | |
---Chris Knoll's comments are after two dashes | |
---Taylor Delehanty's comments are after three dashes | |
---proper schema name needs to replace "<schema>" in the code | |
-------------------------------------------------------------------------------------------------------------- | |
TRUNCATE <schema>.condition_era; |
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
-------------------------------------------------------------------------------------------------------------- | |
---Adapted to PostgreSQL v5 dose_era from Pure SQL drug_era written by Chris_Knoll: https://gist.github.com/chrisknoll/c820cc12d833db2e3d1e | |
---INTERVAL set to 30 days | |
---Chris Knoll's comments are after two dashes | |
---Taylor Delehanty's comments are after three dashes | |
---proper schema name needs to replace "<schema>" in the code | |
---<schema> needs to be replaced with actual schema where dose_era table is located | |
---<vocabulary_schema> needs to be replaced with actual schema where vocabularies and concepts are located | |
---works with dose_era_id being self-generated |
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
-------------------------------------------------------------------------------------------------------------- | |
---Adapted to PostgreSQL condition_era from Pure SQL drug_era written by Chris_Knoll: https://gist.github.com/chrisknoll/c820cc12d833db2e3d1e | |
---Upgraded to v5 OMOP | |
---INTERVAL set to 30 days | |
---Chris Knoll's comments are after two dashes | |
---Taylor Delehanty's comments are after three dashes | |
-------------------------------------------------------------------------------------------------------------- | |
TRUNCATE <schema>.condition_era; |