{"action":"closed","number":24,"pull_request":{"url":"https://api.github.com/repos/OHDSI/WebAPI/pulls/24","id":31167844,"html_url":"https://github.com/OHDSI/WebAPI/pull/24","diff_url":"https://github.com/OHDSI/WebAPI/pull/24.diff","patch_url":"https://github.com/OHDSI/WebAPI/pull/24.patch","issue_url":"https://api.github.com/repos/OHDSI/WebAPI/issues/24","number":24,"state":"closed","locked":false,"title":"Clearer distinction between DataSource handling (CDM vs OHDSI)","user":{"login":"alexfranken","id":5394963,"avatar_url":"https://avatars.githubusercontent.com/u/5394963?v=3","gravatar_id":"","url":"https://api.github.com/users/alexfranken","html_url":"https://github.com/alexfranken","followers_url":"https://api.github.com/users/alexfranken/followers","following_url":"https://api.github.com/users/alexfranken/following{/other_user}","gists_url":"https://api.github.com/users/alexfranken/gists{/gist_id}","starred_url":"https://api.github.com/users/alexfranken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexfranken/subscriptions","organizations_url":"https://api.github.com/users/alexfranken/orgs","repos_url":"https://api.github.com/users/alexfranken/repos","events_url":"https://api.github.com/users/alexfranken/events{/privacy}","received_events_url":"https://api.github.com/users/alexfranken/received_events","type":"User","site_admin":false},"body":"@chrisknoll & @fdefalco , I realized that the datasource plumbing wasn't really in line with what I believe to be our intent.  That is, the CDM schema should be read-only and that we want the OHDSI/RESULTS schema  to be transactional.  \r\nFlyway config was right but the Jpa & Job config was really using the default datasource, which was the \"CDM DataSource\".\r\nSo, I tweaked the configuration to make a cleaner distinction between CDM & OHDSI DataSources (including JdbcTemplates).  So, within WebAPI, the idea is that when you need transaction support, you should work with the ohdsiDataSource/ohdsiJdbcTemplate/transactionTemplate/crudrepository (any of) beans.  For example, the /vocabulary/vocabularies endpoint would use the CDM JdbcTemplate (getJdbcTemplate in AbstractDAOService), and the tasklets, etc., that write data, would use the OHDSI JdbcTemplate (getOhdsiJdbcTemplate in AbstractDAOService).\r\nI think this makes sense from the WebAPI perspective and supports variable configurations.  I don't think it was an issue for any of us because we were all configuring WebAPI with DB accounts that were associated with the OHDSI schema, or had a \"CDM\" account that could write to the OHDSI schema...\r\n\r\nTo take it a step further, we could rename the \"flyway.datasource\" properties to represent the ohdsi.datasource but I didn't go there due to the impact to others and their settings.xml.\r\n\r\nLet me know any thoughts you all have.","created_at":"2015-03-13T22:02:44Z","updated_at":"2015-03-15T00:47:54Z","closed_at":"2015-03-15T00:47:54Z","merged_at":null,"merge_commit_sha":"15af4874243a1ee7c395bace2a0684fa43f5e26e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OHDSI/WebAPI/pulls/24/commits","review_comments_url":"https://api.github.com/repos/OHDSI/WebAPI/pulls/24/comments","review_comment_url":"https://api.github.com/repos/OHDSI/WebAPI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OHDSI/WebAPI/issues/24/comments","statuses_url":"https://api.github.com/repos/OHDSI/WebAPI/statuses/21be7dfd553c0651b1cd430cff38473d92ab8021","head":{"label":"OHDSI:datasource-distinction","ref":"datasource-distinction","sha":"21be7dfd553c0651b1cd430cff38473d92ab8021","user":{"login":"OHDSI","id":6570077,"avatar_url":"https://avatars.githubusercontent.com/u/6570077?v=3","gravatar_id":"","url":"https://api.github.com/users/OHDSI","html_url":"https://github.com/OHDSI","followers_url":"https://api.github.com/users/OHDSI/followers","following_url":"https://api.github.com/users/OHDSI/following{/other_user}","gists_url":"https://api.github.com/users/OHDSI/gists{/gist_id}","starred_url":"https://api.github.com/users/OHDSI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OHDSI/subscriptions","organizations_url":"https://api.github.com/users/OHDSI/orgs","repos_url":"https://api.github.com/users/OHDSI/repos","events_url":"https://api.github.com/users/OHDSI/events{/privacy}","received_events_url":"https://api.github.com/users/OHDSI/received_events","type":"Organization","site_admin":false},"repo":{"id":27504653,"name":"WebAPI","full_name":"OHDSI/WebAPI","owner":{"login":"OHDSI","id":6570077,"avatar_url":"https://avatars.githubusercontent.com/u/6570077?v=3","gravatar_id":"","url":"https://api.github.com/users/OHDSI","html_url":"https://github.com/OHDSI","followers_url":"https://api.github.com/users/OHDSI/followers","following_url":"https://api.github.com/users/OHDSI/following{/other_user}","gists_url":"https://api.github.com/users/OHDSI/gists{/gist_id}","starred_url":"https://api.github.com/users/OHDSI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OHDSI/subscriptions","organizations_url":"https://api.github.com/users/OHDSI/orgs","repos_url":"https://api.github.com/users/OHDSI/repos","events_url":"https://api.github.com/users/OHDSI/events{/privacy}","received_events_url":"https://api.github.com/users/OHDSI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OHDSI/WebAPI","description":"[Under development] OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications","fork":false,"url":"https://api.github.com/repos/OHDSI/WebAPI","forks_url":"https://api.github.com/repos/OHDSI/WebAPI/forks","keys_url":"https://api.github.com/repos/OHDSI/WebAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OHDSI/WebAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OHDSI/WebAPI/teams","hooks_url":"https://api.github.com/repos/OHDSI/WebAPI/hooks","issue_events_url":"https://api.github.com/repos/OHDSI/WebAPI/issues/events{/number}","events_url":"https://api.github.com/repos/OHDSI/WebAPI/events","assignees_url":"https://api.github.com/repos/OHDSI/WebAPI/assignees{/user}","branches_url":"https://api.github.com/repos/OHDSI/WebAPI/branches{/branch}","tags_url":"https://api.github.com/repos/OHDSI/WebAPI/tags","blobs_url":"https://api.github.com/repos/OHDSI/WebAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OHDSI/WebAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OHDSI/WebAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/OHDSI/WebAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OHDSI/WebAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/OHDSI/WebAPI/languages","stargazers_url":"https://api.github.com/repos/OHDSI/WebAPI/stargazers","contributors_url":"https://api.github.com/repos/OHDSI/WebAPI/contributors","subscribers_url":"https://api.github.com/repos/OHDSI/WebAPI/subscribers","subscription_url":"https://api.github.com/repos/OHDSI/WebAPI/subscription","commits_url":"https://api.github.com/repos/OHDSI/WebAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/OHDSI/WebAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/OHDSI/WebAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/OHDSI/WebAPI/issues/comments{/number}","contents_url":"https://api.github.com/repos/OHDSI/WebAPI/contents/{+path}","compare_url":"https://api.github.com/repos/OHDSI/WebAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OHDSI/WebAPI/merges","archive_url":"https://api.github.com/repos/OHDSI/WebAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OHDSI/WebAPI/downloads","issues_url":"https://api.github.com/repos/OHDSI/WebAPI/issues{/number}","pulls_url":"https://api.github.com/repos/OHDSI/WebAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/OHDSI/WebAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/OHDSI/WebAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OHDSI/WebAPI/labels{/name}","releases_url":"https://api.github.com/repos/OHDSI/WebAPI/releases{/id}","created_at":"2014-12-03T19:49:51Z","updated_at":"2015-03-14T16:41:30Z","pushed_at":"2015-03-14T16:41:37Z","git_url":"git://github.com/OHDSI/WebAPI.git","ssh_url":"git@github.com:OHDSI/WebAPI.git","clone_url":"https://github.com/OHDSI/WebAPI.git","svn_url":"https://github.com/OHDSI/WebAPI","homepage":"","size":1487,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"OHDSI:master","ref":"master","sha":"b6b17d124f0efc6fa8c0df7677b5e868a1626308","user":{"login":"OHDSI","id":6570077,"avatar_url":"https://avatars.githubusercontent.com/u/6570077?v=3","gravatar_id":"","url":"https://api.github.com/users/OHDSI","html_url":"https://github.com/OHDSI","followers_url":"https://api.github.com/users/OHDSI/followers","following_url":"https://api.github.com/users/OHDSI/following{/other_user}","gists_url":"https://api.github.com/users/OHDSI/gists{/gist_id}","starred_url":"https://api.github.com/users/OHDSI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OHDSI/subscriptions","organizations_url":"https://api.github.com/users/OHDSI/orgs","repos_url":"https://api.github.com/users/OHDSI/repos","events_url":"https://api.github.com/users/OHDSI/events{/privacy}","received_events_url":"https://api.github.com/users/OHDSI/received_events","type":"Organization","site_admin":false},"repo":{"id":27504653,"name":"WebAPI","full_name":"OHDSI/WebAPI","owner":{"login":"OHDSI","id":6570077,"avatar_url":"https://avatars.githubusercontent.com/u/6570077?v=3","gravatar_id":"","url":"https://api.github.com/users/OHDSI","html_url":"https://github.com/OHDSI","followers_url":"https://api.github.com/users/OHDSI/followers","following_url":"https://api.github.com/users/OHDSI/following{/other_user}","gists_url":"https://api.github.com/users/OHDSI/gists{/gist_id}","starred_url":"https://api.github.com/users/OHDSI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OHDSI/subscriptions","organizations_url":"https://api.github.com/users/OHDSI/orgs","repos_url":"https://api.github.com/users/OHDSI/repos","events_url":"https://api.github.com/users/OHDSI/events{/privacy}","received_events_url":"https://api.github.com/users/OHDSI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OHDSI/WebAPI","description":"[Under development] OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications","fork":false,"url":"https://api.github.com/repos/OHDSI/WebAPI","forks_url":"https://api.github.com/repos/OHDSI/WebAPI/forks","keys_url":"https://api.github.com/repos/OHDSI/WebAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OHDSI/WebAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OHDSI/WebAPI/teams","hooks_url":"https://api.github.com/repos/OHDSI/WebAPI/hooks","issue_events_url":"https://api.github.com/repos/OHDSI/WebAPI/issues/events{/number}","events_url":"https://api.github.com/repos/OHDSI/WebAPI/events","assignees_url":"https://api.github.com/repos/OHDSI/WebAPI/assignees{/user}","branches_url":"https://api.github.com/repos/OHDSI/WebAPI/branches{/branch}","tags_url":"https://api.github.com/repos/OHDSI/WebAPI/tags","blobs_url":"https://api.github.com/repos/OHDSI/WebAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OHDSI/WebAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OHDSI/WebAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/OHDSI/WebAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OHDSI/WebAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/OHDSI/WebAPI/languages","stargazers_url":"https://api.github.com/repos/OHDSI/WebAPI/stargazers","contributors_url":"https://api.github.com/repos/OHDSI/WebAPI/contributors","subscribers_url":"https://api.github.com/repos/OHDSI/WebAPI/subscribers","subscription_url":"https://api.github.com/repos/OHDSI/WebAPI/subscription","commits_url":"https://api.github.com/repos/OHDSI/WebAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/OHDSI/WebAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/OHDSI/WebAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/OHDSI/WebAPI/issues/comments{/number}","contents_url":"https://api.github.com/repos/OHDSI/WebAPI/contents/{+path}","compare_url":"https://api.github.com/repos/OHDSI/WebAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OHDSI/WebAPI/merges","archive_url":"https://api.github.com/repos/OHDSI/WebAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OHDSI/WebAPI/downloads","issues_url":"https://api.github.com/repos/OHDSI/WebAPI/issues{/number}","pulls_url":"https://api.github.com/repos/OHDSI/WebAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/OHDSI/WebAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/OHDSI/WebAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OHDSI/WebAPI/labels{/name}","releases_url":"https://api.github.com/repos/OHDSI/WebAPI/releases{/id}","created_at":"2014-12-03T19:49:51Z","updated_at":"2015-03-14T16:41:30Z","pushed_at":"2015-03-14T16:41:37Z","git_url":"git://github.com/OHDSI/WebAPI.git","ssh_url":"git@github.com:OHDSI/WebAPI.git","clone_url":"https://github.com/OHDSI/WebAPI.git","svn_url":"https://github.com/OHDSI/WebAPI","homepage":"","size":1487,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OHDSI/WebAPI/pulls/24"},"html":{"href":"https://github.com/OHDSI/WebAPI/pull/24"},"issue":{"href":"https://api.github.com/repos/OHDSI/WebAPI/issues/24"},"comments":{"href":"https://api.github.com/repos/OHDSI/WebAPI/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/OHDSI/WebAPI/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/OHDSI/WebAPI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OHDSI/WebAPI/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/OHDSI/WebAPI/statuses/21be7dfd553c0651b1cd430cff38473d92ab8021"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":104,"deletions":76,"changed_files":7}}