GitHub PullRequestReviewCommentEvent at 2014-06-11 15:43:29
Repository: rhea-shr-adapter
Actor: devcritter
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/comments/13656318","id":13656318,"diff_hunk":"@@ -106,39 +108,45 @@\n \n \t@RequestMapping(value = \"/identifier\", method = RequestMethod.PUT)\n \t@ResponseBody\n-\tpublic void mergePatients(@RequestBody String mergeMessage,\n+\tpublic ResponseEntity<String> mergePatients(@RequestBody String mergeMessage,\n \t\t\tHttpServletRequest request, HttpServletResponse response) {\n \t\tMap<String, String> postUpdateIdentifiers = null;\n \t\tMap<String, String> preUpdateIdentifiers = null;\n \t\t\n \t\tHttpSession httpSession = request.getSession();\n \t\tif (Context.isAuthenticated()) {\n-\t\t\t\n \t\t\tNodeList node = identifyMessageType(mergeMessage);\t\t\t\n \t\t\tString typeName = node.item(0).getTextContent();\n-\n \t\t\t\tpostUpdateIdentifiers = identifyPostUpdateIdentifiers(mergeMessage);\n \t\t\t\tpreUpdateIdentifiers = identifyPreUpdateIdentifiers(mergeMessage);\t    \n-\t\t    \n-\t\t\tif(typeName.equals(\"LINK\")){\n+\t\t\tif(typeName.equals(\"JOIN\")){\n \t\t\t\t\tObject httpResponse = mergePatient(postUpdateIdentifiers, preUpdateIdentifiers);\t\t\t\t\n \t\t\t\t\tresponse.setStatus((Integer) httpResponse);\n \t\t\t\t\t\n \t\t\t\t\tif(response.equals(HttpServletResponse.SC_OK)){\n \t\t\t\t\t\thttpSession.setAttribute(WebConstants.OPENMRS_MSG_ATTR, \"Patient.merged\");\t\n \t\t\t\t\t\tvalidatePostidentifiers(postUpdateIdentifiers);\n+\t\t\t\t\t\t\n+\t\t\t\t\t\treturn new ResponseEntity<String>(HttpStatus.OK);\n+\t\t\t\t\t} else{\n+\t\t\t\t\t\treturn new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR);\n \t\t\t\t\t}\n \n-\t\t\t}else if(typeName.equals(\"UNLINK\")){\n+\t\t\t}else if(typeName.equals(\"LEAVE\")){\n \t\t\t\tObject httpResponse = restorePatient(postUpdateIdentifiers, preUpdateIdentifiers);\n \t\t\t\t\tresponse.setStatus((Integer) httpResponse);\n \t\t\t\t\t\n \t\t\t\t\tif(response.equals(HttpServletResponse.SC_OK)){\n \t\t\t\t\t\thttpSession.setAttribute(WebConstants.OPENMRS_MSG_ATTR, \"Patient.restored\");\t\n \t\t\t\t\t\tvalidatePostidentifiers(postUpdateIdentifiers);\n-\t\t\t\t\t} \n+\t\t\t\t\t\t\n+\t\t\t\t\t\treturn new ResponseEntity<String>(HttpStatus.OK);\n+\t\t\t\t\t} else{\n+\t\t\t\t\t\treturn new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR);","path":"omod/src/main/java/org/openmrs/module/rheashradapter/web/controller/RHEApatientController.java","position":54,"original_position":54,"commit_id":"905ea9f4c8f16648d3946634b6c64233ecea44dc","original_commit_id":"905ea9f4c8f16648d3946634b6c64233ecea44dc","user":{"login":"devcritter","id":1872071,"avatar_url":"https://avatars.githubusercontent.com/u/1872071?","gravatar_id":"bb32616a9ce10f546851a4005615197b","url":"https://api.github.com/users/devcritter","html_url":"https://github.com/devcritter","followers_url":"https://api.github.com/users/devcritter/followers","following_url":"https://api.github.com/users/devcritter/following{/other_user}","gists_url":"https://api.github.com/users/devcritter/gists{/gist_id}","starred_url":"https://api.github.com/users/devcritter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devcritter/subscriptions","organizations_url":"https://api.github.com/users/devcritter/orgs","repos_url":"https://api.github.com/users/devcritter/repos","events_url":"https://api.github.com/users/devcritter/events{/privacy}","received_events_url":"https://api.github.com/users/devcritter/received_events","type":"User","site_admin":false},"body":"Ditto; see my error comments above.","created_at":"2014-06-11T15:43:29Z","updated_at":"2014-06-11T15:43:29Z","html_url":"https://github.com/jembi/rhea-shr-adapter/pull/44#discussion_r13656318","pull_request_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/comments/13656318"},"html":{"href":"https://github.com/jembi/rhea-shr-adapter/pull/44#discussion_r13656318"},"pull_request":{"href":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/44","id":14949127,"html_url":"https://github.com/jembi/rhea-shr-adapter/pull/44","diff_url":"https://github.com/jembi/rhea-shr-adapter/pull/44.diff","patch_url":"https://github.com/jembi/rhea-shr-adapter/pull/44.patch","issue_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/issues/44","number":44,"state":"open","title":"Integrating changes to OpenEMPI messages","user":{"login":"surangak","id":1867728,"avatar_url":"https://avatars.githubusercontent.com/u/1867728?","gravatar_id":"32302da24c67ca28098af07f81d51057","url":"https://api.github.com/users/surangak","html_url":"https://github.com/surangak","followers_url":"https://api.github.com/users/surangak/followers","following_url":"https://api.github.com/users/surangak/following{/other_user}","gists_url":"https://api.github.com/users/surangak/gists{/gist_id}","starred_url":"https://api.github.com/users/surangak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surangak/subscriptions","organizations_url":"https://api.github.com/users/surangak/orgs","repos_url":"https://api.github.com/users/surangak/repos","events_url":"https://api.github.com/users/surangak/events{/privacy}","received_events_url":"https://api.github.com/users/surangak/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-04-20T02:56:06Z","updated_at":"2014-06-11T15:43:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab12162c52b68a82be722d35cd49a4287b417f50","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/44/commits","review_comments_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/44/comments","review_comment_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/issues/44/comments","statuses_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/statuses/905ea9f4c8f16648d3946634b6c64233ecea44dc","head":{"label":"surangak:openempi-fixes","ref":"openempi-fixes","sha":"905ea9f4c8f16648d3946634b6c64233ecea44dc","user":{"login":"surangak","id":1867728,"avatar_url":"https://avatars.githubusercontent.com/u/1867728?","gravatar_id":"32302da24c67ca28098af07f81d51057","url":"https://api.github.com/users/surangak","html_url":"https://github.com/surangak","followers_url":"https://api.github.com/users/surangak/followers","following_url":"https://api.github.com/users/surangak/following{/other_user}","gists_url":"https://api.github.com/users/surangak/gists{/gist_id}","starred_url":"https://api.github.com/users/surangak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surangak/subscriptions","organizations_url":"https://api.github.com/users/surangak/orgs","repos_url":"https://api.github.com/users/surangak/repos","events_url":"https://api.github.com/users/surangak/events{/privacy}","received_events_url":"https://api.github.com/users/surangak/received_events","type":"User","site_admin":false},"repo":{"id":18952716,"name":"rhea-shr-adapter","full_name":"surangak/rhea-shr-adapter","owner":{"login":"surangak","id":1867728,"avatar_url":"https://avatars.githubusercontent.com/u/1867728?","gravatar_id":"32302da24c67ca28098af07f81d51057","url":"https://api.github.com/users/surangak","html_url":"https://github.com/surangak","followers_url":"https://api.github.com/users/surangak/followers","following_url":"https://api.github.com/users/surangak/following{/other_user}","gists_url":"https://api.github.com/users/surangak/gists{/gist_id}","starred_url":"https://api.github.com/users/surangak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surangak/subscriptions","organizations_url":"https://api.github.com/users/surangak/orgs","repos_url":"https://api.github.com/users/surangak/repos","events_url":"https://api.github.com/users/surangak/events{/privacy}","received_events_url":"https://api.github.com/users/surangak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/surangak/rhea-shr-adapter","description":"RHEA SHR Adapter","fork":true,"url":"https://api.github.com/repos/surangak/rhea-shr-adapter","forks_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/forks","keys_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/teams","hooks_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/hooks","issue_events_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/issues/events{/number}","events_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/events","assignees_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/assignees{/user}","branches_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/branches{/branch}","tags_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/tags","blobs_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/git/refs{/sha}","trees_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/statuses/{sha}","languages_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/languages","stargazers_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/stargazers","contributors_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/contributors","subscribers_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/subscribers","subscription_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/subscription","commits_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/commits{/sha}","git_commits_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/git/commits{/sha}","comments_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/comments{/number}","issue_comment_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/issues/comments/{number}","contents_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/contents/{+path}","compare_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/merges","archive_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/downloads","issues_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/issues{/number}","pulls_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/pulls{/number}","milestones_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/milestones{/number}","notifications_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/labels{/name}","releases_url":"https://api.github.com/repos/surangak/rhea-shr-adapter/releases{/id}","created_at":"2014-04-19T22:46:37Z","updated_at":"2014-04-20T02:56:06Z","pushed_at":"2014-04-20T02:54:00Z","git_url":"git://github.com/surangak/rhea-shr-adapter.git","ssh_url":"git@github.com:surangak/rhea-shr-adapter.git","clone_url":"https://github.com/surangak/rhea-shr-adapter.git","svn_url":"https://github.com/surangak/rhea-shr-adapter","homepage":null,"size":876,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jembi:master","ref":"master","sha":"d30de444a4d7a215c48b07e1828bb2606f248c91","user":{"login":"jembi","id":1931511,"avatar_url":"https://avatars.githubusercontent.com/u/1931511?","gravatar_id":"935b6cd327ebcc8199bda23ad880ea12","url":"https://api.github.com/users/jembi","html_url":"https://github.com/jembi","followers_url":"https://api.github.com/users/jembi/followers","following_url":"https://api.github.com/users/jembi/following{/other_user}","gists_url":"https://api.github.com/users/jembi/gists{/gist_id}","starred_url":"https://api.github.com/users/jembi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jembi/subscriptions","organizations_url":"https://api.github.com/users/jembi/orgs","repos_url":"https://api.github.com/users/jembi/repos","events_url":"https://api.github.com/users/jembi/events{/privacy}","received_events_url":"https://api.github.com/users/jembi/received_events","type":"Organization","site_admin":false},"repo":{"id":6774260,"name":"rhea-shr-adapter","full_name":"jembi/rhea-shr-adapter","owner":{"login":"jembi","id":1931511,"avatar_url":"https://avatars.githubusercontent.com/u/1931511?","gravatar_id":"935b6cd327ebcc8199bda23ad880ea12","url":"https://api.github.com/users/jembi","html_url":"https://github.com/jembi","followers_url":"https://api.github.com/users/jembi/followers","following_url":"https://api.github.com/users/jembi/following{/other_user}","gists_url":"https://api.github.com/users/jembi/gists{/gist_id}","starred_url":"https://api.github.com/users/jembi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jembi/subscriptions","organizations_url":"https://api.github.com/users/jembi/orgs","repos_url":"https://api.github.com/users/jembi/repos","events_url":"https://api.github.com/users/jembi/events{/privacy}","received_events_url":"https://api.github.com/users/jembi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jembi/rhea-shr-adapter","description":"RHEA SHR Adapter","fork":false,"url":"https://api.github.com/repos/jembi/rhea-shr-adapter","forks_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/forks","keys_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/teams","hooks_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/hooks","issue_events_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/issues/events{/number}","events_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/events","assignees_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/assignees{/user}","branches_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/branches{/branch}","tags_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/tags","blobs_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/git/refs{/sha}","trees_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/statuses/{sha}","languages_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/languages","stargazers_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/stargazers","contributors_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/contributors","subscribers_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/subscribers","subscription_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/subscription","commits_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/commits{/sha}","git_commits_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/git/commits{/sha}","comments_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/comments{/number}","issue_comment_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/issues/comments/{number}","contents_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/contents/{+path}","compare_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/merges","archive_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/downloads","issues_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/issues{/number}","pulls_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls{/number}","milestones_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/milestones{/number}","notifications_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/labels{/name}","releases_url":"https://api.github.com/repos/jembi/rhea-shr-adapter/releases{/id}","created_at":"2012-11-20T08:04:03Z","updated_at":"2013-12-06T10:42:42Z","pushed_at":"2013-12-06T10:42:42Z","git_url":"git://github.com/jembi/rhea-shr-adapter.git","ssh_url":"git@github.com:jembi/rhea-shr-adapter.git","clone_url":"https://github.com/jembi/rhea-shr-adapter.git","svn_url":"https://github.com/jembi/rhea-shr-adapter","homepage":null,"size":1094,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/44"},"html":{"href":"https://github.com/jembi/rhea-shr-adapter/pull/44"},"issue":{"href":"https://api.github.com/repos/jembi/rhea-shr-adapter/issues/44"},"comments":{"href":"https://api.github.com/repos/jembi/rhea-shr-adapter/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jembi/rhea-shr-adapter/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/jembi/rhea-shr-adapter/statuses/905ea9f4c8f16648d3946634b6c64233ecea44dc"}}}}