{"action":"created","comment":{"url":"https://api.github.com/repos/intervention-engine/fhir/pulls/comments/81007515","pull_request_review_id":2019852,"id":81007515,"diff_hunk":"@@ -14,16 +14,67 @@ import (\n \t\"gopkg.in/mgo.v2/bson\"\n )\n \n+// MongoConnection manages the direct connection to the Mongo database\n+type MongoConnection struct {\n+\tsession *mgo.Session\n+\tdbname  string\n+}\n+\n+// Connect establishes a session with the mongo database\n+func (dc *MongoConnection) Connect(host string) (err error) {","path":"server/mongo_data_access.go","position":11,"original_position":11,"commit_id":"b3a9422c8ecf40e86be9a5a07d34f0da7dafe16f","original_commit_id":"b3a9422c8ecf40e86be9a5a07d34f0da7dafe16f","user":{"login":"cmoesel","id":2278253,"avatar_url":"https://avatars.githubusercontent.com/u/2278253?v=3","gravatar_id":"","url":"https://api.github.com/users/cmoesel","html_url":"https://github.com/cmoesel","followers_url":"https://api.github.com/users/cmoesel/followers","following_url":"https://api.github.com/users/cmoesel/following{/other_user}","gists_url":"https://api.github.com/users/cmoesel/gists{/gist_id}","starred_url":"https://api.github.com/users/cmoesel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmoesel/subscriptions","organizations_url":"https://api.github.com/users/cmoesel/orgs","repos_url":"https://api.github.com/users/cmoesel/repos","events_url":"https://api.github.com/users/cmoesel/events{/privacy}","received_events_url":"https://api.github.com/users/cmoesel/received_events","type":"User","site_admin":false},"body":"Why `dc`?  Did you call this `DatabaseConnection` at some point?  Idiomatic Go would suggest it should be `m` or `mc`.","created_at":"2016-09-28T20:17:52Z","updated_at":"2016-09-28T20:35:40Z","html_url":"https://github.com/intervention-engine/fhir/pull/95#discussion_r81007515","pull_request_url":"https://api.github.com/repos/intervention-engine/fhir/pulls/95","_links":{"self":{"href":"https://api.github.com/repos/intervention-engine/fhir/pulls/comments/81007515"},"html":{"href":"https://github.com/intervention-engine/fhir/pull/95#discussion_r81007515"},"pull_request":{"href":"https://api.github.com/repos/intervention-engine/fhir/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/intervention-engine/fhir/pulls/95","id":87130557,"html_url":"https://github.com/intervention-engine/fhir/pull/95","diff_url":"https://github.com/intervention-engine/fhir/pull/95.diff","patch_url":"https://github.com/intervention-engine/fhir/pull/95.patch","issue_url":"https://api.github.com/repos/intervention-engine/fhir/issues/95","number":95,"state":"open","locked":false,"title":"Updated Management of Mongo Sessions","user":{"login":"cjduffett","id":5651138,"avatar_url":"https://avatars.githubusercontent.com/u/5651138?v=3","gravatar_id":"","url":"https://api.github.com/users/cjduffett","html_url":"https://github.com/cjduffett","followers_url":"https://api.github.com/users/cjduffett/followers","following_url":"https://api.github.com/users/cjduffett/following{/other_user}","gists_url":"https://api.github.com/users/cjduffett/gists{/gist_id}","starred_url":"https://api.github.com/users/cjduffett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjduffett/subscriptions","organizations_url":"https://api.github.com/users/cjduffett/orgs","repos_url":"https://api.github.com/users/cjduffett/repos","events_url":"https://api.github.com/users/cjduffett/events{/privacy}","received_events_url":"https://api.github.com/users/cjduffett/received_events","type":"User","site_admin":false},"body":"The Mongo session is now managed through the MongoConnection type. Each\r\ntransaction makes a copy of the master session and closes that copy\r\nafter the transaction is complete. I also removed the dependency on the\r\nglobal Database variable!","created_at":"2016-09-28T14:25:27Z","updated_at":"2016-09-28T20:35:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14321f7a72eefcea49fb5e7fb3efab54b3625b63","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/intervention-engine/fhir/pulls/95/commits","review_comments_url":"https://api.github.com/repos/intervention-engine/fhir/pulls/95/comments","review_comment_url":"https://api.github.com/repos/intervention-engine/fhir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/intervention-engine/fhir/issues/95/comments","statuses_url":"https://api.github.com/repos/intervention-engine/fhir/statuses/b3a9422c8ecf40e86be9a5a07d34f0da7dafe16f","head":{"label":"intervention-engine:mongo-connection","ref":"mongo-connection","sha":"b3a9422c8ecf40e86be9a5a07d34f0da7dafe16f","user":{"login":"intervention-engine","id":9937125,"avatar_url":"https://avatars.githubusercontent.com/u/9937125?v=3","gravatar_id":"","url":"https://api.github.com/users/intervention-engine","html_url":"https://github.com/intervention-engine","followers_url":"https://api.github.com/users/intervention-engine/followers","following_url":"https://api.github.com/users/intervention-engine/following{/other_user}","gists_url":"https://api.github.com/users/intervention-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/intervention-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intervention-engine/subscriptions","organizations_url":"https://api.github.com/users/intervention-engine/orgs","repos_url":"https://api.github.com/users/intervention-engine/repos","events_url":"https://api.github.com/users/intervention-engine/events{/privacy}","received_events_url":"https://api.github.com/users/intervention-engine/received_events","type":"Organization","site_admin":false},"repo":{"id":28101020,"name":"fhir","full_name":"intervention-engine/fhir","owner":{"login":"intervention-engine","id":9937125,"avatar_url":"https://avatars.githubusercontent.com/u/9937125?v=3","gravatar_id":"","url":"https://api.github.com/users/intervention-engine","html_url":"https://github.com/intervention-engine","followers_url":"https://api.github.com/users/intervention-engine/followers","following_url":"https://api.github.com/users/intervention-engine/following{/other_user}","gists_url":"https://api.github.com/users/intervention-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/intervention-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intervention-engine/subscriptions","organizations_url":"https://api.github.com/users/intervention-engine/orgs","repos_url":"https://api.github.com/users/intervention-engine/repos","events_url":"https://api.github.com/users/intervention-engine/events{/privacy}","received_events_url":"https://api.github.com/users/intervention-engine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intervention-engine/fhir","description":"Generic FHIR server implementation in GoLang.","fork":false,"url":"https://api.github.com/repos/intervention-engine/fhir","forks_url":"https://api.github.com/repos/intervention-engine/fhir/forks","keys_url":"https://api.github.com/repos/intervention-engine/fhir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intervention-engine/fhir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intervention-engine/fhir/teams","hooks_url":"https://api.github.com/repos/intervention-engine/fhir/hooks","issue_events_url":"https://api.github.com/repos/intervention-engine/fhir/issues/events{/number}","events_url":"https://api.github.com/repos/intervention-engine/fhir/events","assignees_url":"https://api.github.com/repos/intervention-engine/fhir/assignees{/user}","branches_url":"https://api.github.com/repos/intervention-engine/fhir/branches{/branch}","tags_url":"https://api.github.com/repos/intervention-engine/fhir/tags","blobs_url":"https://api.github.com/repos/intervention-engine/fhir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intervention-engine/fhir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intervention-engine/fhir/git/refs{/sha}","trees_url":"https://api.github.com/repos/intervention-engine/fhir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intervention-engine/fhir/statuses/{sha}","languages_url":"https://api.github.com/repos/intervention-engine/fhir/languages","stargazers_url":"https://api.github.com/repos/intervention-engine/fhir/stargazers","contributors_url":"https://api.github.com/repos/intervention-engine/fhir/contributors","subscribers_url":"https://api.github.com/repos/intervention-engine/fhir/subscribers","subscription_url":"https://api.github.com/repos/intervention-engine/fhir/subscription","commits_url":"https://api.github.com/repos/intervention-engine/fhir/commits{/sha}","git_commits_url":"https://api.github.com/repos/intervention-engine/fhir/git/commits{/sha}","comments_url":"https://api.github.com/repos/intervention-engine/fhir/comments{/number}","issue_comment_url":"https://api.github.com/repos/intervention-engine/fhir/issues/comments{/number}","contents_url":"https://api.github.com/repos/intervention-engine/fhir/contents/{+path}","compare_url":"https://api.github.com/repos/intervention-engine/fhir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intervention-engine/fhir/merges","archive_url":"https://api.github.com/repos/intervention-engine/fhir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intervention-engine/fhir/downloads","issues_url":"https://api.github.com/repos/intervention-engine/fhir/issues{/number}","pulls_url":"https://api.github.com/repos/intervention-engine/fhir/pulls{/number}","milestones_url":"https://api.github.com/repos/intervention-engine/fhir/milestones{/number}","notifications_url":"https://api.github.com/repos/intervention-engine/fhir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intervention-engine/fhir/labels{/name}","releases_url":"https://api.github.com/repos/intervention-engine/fhir/releases{/id}","deployments_url":"https://api.github.com/repos/intervention-engine/fhir/deployments","created_at":"2014-12-16T18:46:27Z","updated_at":"2016-09-23T03:18:15Z","pushed_at":"2016-09-28T19:31:00Z","git_url":"git://github.com/intervention-engine/fhir.git","ssh_url":"git@github.com:intervention-engine/fhir.git","clone_url":"https://github.com/intervention-engine/fhir.git","svn_url":"https://github.com/intervention-engine/fhir","homepage":null,"size":3990,"stargazers_count":22,"watchers_count":22,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":8,"forks":8,"open_issues":8,"watchers":22,"default_branch":"master"}},"base":{"label":"intervention-engine:stu3_aug2016","ref":"stu3_aug2016","sha":"fa67395cd195c9f7654e0436712c3170a0839d3c","user":{"login":"intervention-engine","id":9937125,"avatar_url":"https://avatars.githubusercontent.com/u/9937125?v=3","gravatar_id":"","url":"https://api.github.com/users/intervention-engine","html_url":"https://github.com/intervention-engine","followers_url":"https://api.github.com/users/intervention-engine/followers","following_url":"https://api.github.com/users/intervention-engine/following{/other_user}","gists_url":"https://api.github.com/users/intervention-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/intervention-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intervention-engine/subscriptions","organizations_url":"https://api.github.com/users/intervention-engine/orgs","repos_url":"https://api.github.com/users/intervention-engine/repos","events_url":"https://api.github.com/users/intervention-engine/events{/privacy}","received_events_url":"https://api.github.com/users/intervention-engine/received_events","type":"Organization","site_admin":false},"repo":{"id":28101020,"name":"fhir","full_name":"intervention-engine/fhir","owner":{"login":"intervention-engine","id":9937125,"avatar_url":"https://avatars.githubusercontent.com/u/9937125?v=3","gravatar_id":"","url":"https://api.github.com/users/intervention-engine","html_url":"https://github.com/intervention-engine","followers_url":"https://api.github.com/users/intervention-engine/followers","following_url":"https://api.github.com/users/intervention-engine/following{/other_user}","gists_url":"https://api.github.com/users/intervention-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/intervention-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intervention-engine/subscriptions","organizations_url":"https://api.github.com/users/intervention-engine/orgs","repos_url":"https://api.github.com/users/intervention-engine/repos","events_url":"https://api.github.com/users/intervention-engine/events{/privacy}","received_events_url":"https://api.github.com/users/intervention-engine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intervention-engine/fhir","description":"Generic FHIR server implementation in GoLang.","fork":false,"url":"https://api.github.com/repos/intervention-engine/fhir","forks_url":"https://api.github.com/repos/intervention-engine/fhir/forks","keys_url":"https://api.github.com/repos/intervention-engine/fhir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intervention-engine/fhir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intervention-engine/fhir/teams","hooks_url":"https://api.github.com/repos/intervention-engine/fhir/hooks","issue_events_url":"https://api.github.com/repos/intervention-engine/fhir/issues/events{/number}","events_url":"https://api.github.com/repos/intervention-engine/fhir/events","assignees_url":"https://api.github.com/repos/intervention-engine/fhir/assignees{/user}","branches_url":"https://api.github.com/repos/intervention-engine/fhir/branches{/branch}","tags_url":"https://api.github.com/repos/intervention-engine/fhir/tags","blobs_url":"https://api.github.com/repos/intervention-engine/fhir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intervention-engine/fhir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intervention-engine/fhir/git/refs{/sha}","trees_url":"https://api.github.com/repos/intervention-engine/fhir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intervention-engine/fhir/statuses/{sha}","languages_url":"https://api.github.com/repos/intervention-engine/fhir/languages","stargazers_url":"https://api.github.com/repos/intervention-engine/fhir/stargazers","contributors_url":"https://api.github.com/repos/intervention-engine/fhir/contributors","subscribers_url":"https://api.github.com/repos/intervention-engine/fhir/subscribers","subscription_url":"https://api.github.com/repos/intervention-engine/fhir/subscription","commits_url":"https://api.github.com/repos/intervention-engine/fhir/commits{/sha}","git_commits_url":"https://api.github.com/repos/intervention-engine/fhir/git/commits{/sha}","comments_url":"https://api.github.com/repos/intervention-engine/fhir/comments{/number}","issue_comment_url":"https://api.github.com/repos/intervention-engine/fhir/issues/comments{/number}","contents_url":"https://api.github.com/repos/intervention-engine/fhir/contents/{+path}","compare_url":"https://api.github.com/repos/intervention-engine/fhir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intervention-engine/fhir/merges","archive_url":"https://api.github.com/repos/intervention-engine/fhir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intervention-engine/fhir/downloads","issues_url":"https://api.github.com/repos/intervention-engine/fhir/issues{/number}","pulls_url":"https://api.github.com/repos/intervention-engine/fhir/pulls{/number}","milestones_url":"https://api.github.com/repos/intervention-engine/fhir/milestones{/number}","notifications_url":"https://api.github.com/repos/intervention-engine/fhir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intervention-engine/fhir/labels{/name}","releases_url":"https://api.github.com/repos/intervention-engine/fhir/releases{/id}","deployments_url":"https://api.github.com/repos/intervention-engine/fhir/deployments","created_at":"2014-12-16T18:46:27Z","updated_at":"2016-09-23T03:18:15Z","pushed_at":"2016-09-28T19:31:00Z","git_url":"git://github.com/intervention-engine/fhir.git","ssh_url":"git@github.com:intervention-engine/fhir.git","clone_url":"https://github.com/intervention-engine/fhir.git","svn_url":"https://github.com/intervention-engine/fhir","homepage":null,"size":3990,"stargazers_count":22,"watchers_count":22,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":8,"forks":8,"open_issues":8,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intervention-engine/fhir/pulls/95"},"html":{"href":"https://github.com/intervention-engine/fhir/pull/95"},"issue":{"href":"https://api.github.com/repos/intervention-engine/fhir/issues/95"},"comments":{"href":"https://api.github.com/repos/intervention-engine/fhir/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/intervention-engine/fhir/pulls/95/comments"},"review_comment":{"href":"https://api.github.com/repos/intervention-engine/fhir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/intervention-engine/fhir/pulls/95/commits"},"statuses":{"href":"https://api.github.com/repos/intervention-engine/fhir/statuses/b3a9422c8ecf40e86be9a5a07d34f0da7dafe16f"}}}}
{"actor":{"display_login":"cmoesel"}}