{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/comments/65229265","id":65229265,"diff_hunk":"@@ -0,0 +1,74 @@\n+/**\n+ * This Source Code Form is subject to the terms of the Mozilla Public License,\n+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can\n+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under\n+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.\n+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS\n+ * graphic logo is a trademark of OpenMRS Inc.\n+ */\n+package org.openmrs.module.radiology.study;\n+\n+import java.beans.PropertyEditorSupport;\n+\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import org.openmrs.api.context.Context;\n+import org.springframework.util.StringUtils;\n+\n+/**\n+ * Allows for serializing/deserializing a RadiologyStudy object to a string so that Spring knows how to pass\n+ * a RadiologyStudy back and forth through an html form or other medium\n+ * <br/>\n+ * In version 1.9, added ability for this to also retrieve objects by uuid\n+ * \n+ * @see RadiologyStudy\n+ */\n+public class RadiologyStudyEditor extends PropertyEditorSupport {\n+    \n+    \n+    private Log log = LogFactory.getLog(this.getClass());\n+    \n+    /**\n+     * @should set using id\n+     * @should set using instance uid\n+     * @should throw illegal argument exception for radiology study not found\n+     * @should return null for empty text\n+     * \n+     * @see java.beans.PropertyEditorSupport#setAsText(java.lang.String)\n+     */\n+    public void setAsText(String text) throws IllegalArgumentException {\n+        RadiologyStudyService radiologyStudyService = Context.getService(RadiologyStudyService.class);\n+        if (StringUtils.hasText(text)) {\n+            try {\n+                setValue(radiologyStudyService.getStudyByStudyId(Integer.valueOf(text)));\n+            }\n+            catch (Exception ex) {","path":"api/src/main/java/org/openmrs/module/radiology/study/RadiologyStudyEditor.java","position":45,"original_position":45,"commit_id":"8862be6e72c2701111b521c401b4a1748204449d","original_commit_id":"8862be6e72c2701111b521c401b4a1748204449d","user":{"login":"teleivo","id":4661144,"avatar_url":"https://avatars.githubusercontent.com/u/4661144?v=3","gravatar_id":"","url":"https://api.github.com/users/teleivo","html_url":"https://github.com/teleivo","followers_url":"https://api.github.com/users/teleivo/followers","following_url":"https://api.github.com/users/teleivo/following{/other_user}","gists_url":"https://api.github.com/users/teleivo/gists{/gist_id}","starred_url":"https://api.github.com/users/teleivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teleivo/subscriptions","organizations_url":"https://api.github.com/users/teleivo/orgs","repos_url":"https://api.github.com/users/teleivo/repos","events_url":"https://api.github.com/users/teleivo/events{/privacy}","received_events_url":"https://api.github.com/users/teleivo/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block](https://www.codacy.com/app/teleivo/openmrs-module-radiology_2/file/2663114894/issues/source?bid=3178547&fileBranchId=3330497#l45)","created_at":"2016-05-31T17:42:39Z","updated_at":"2016-05-31T17:42:39Z","html_url":"https://github.com/openmrs/openmrs-module-radiology/pull/297#discussion_r65229265","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/297","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/comments/65229265"},"html":{"href":"https://github.com/openmrs/openmrs-module-radiology/pull/297#discussion_r65229265"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/297"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/297","id":72015910,"html_url":"https://github.com/openmrs/openmrs-module-radiology/pull/297","diff_url":"https://github.com/openmrs/openmrs-module-radiology/pull/297.diff","patch_url":"https://github.com/openmrs/openmrs-module-radiology/pull/297.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/297","number":297,"state":"open","locked":false,"title":"RAD-256 Use PropertyEditor for radiology studies","user":{"login":"bgeVam","id":11328579,"avatar_url":"https://avatars.githubusercontent.com/u/11328579?v=3","gravatar_id":"","url":"https://api.github.com/users/bgeVam","html_url":"https://github.com/bgeVam","followers_url":"https://api.github.com/users/bgeVam/followers","following_url":"https://api.github.com/users/bgeVam/following{/other_user}","gists_url":"https://api.github.com/users/bgeVam/gists{/gist_id}","starred_url":"https://api.github.com/users/bgeVam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgeVam/subscriptions","organizations_url":"https://api.github.com/users/bgeVam/orgs","repos_url":"https://api.github.com/users/bgeVam/repos","events_url":"https://api.github.com/users/bgeVam/events{/privacy}","received_events_url":"https://api.github.com/users/bgeVam/received_events","type":"User","site_admin":false},"body":"## Description\r\n* Add property editor for radiology studies\r\n* Add unit tests for radiology studies property editor\r\n\r\n## Related Issue\r\nsee https://issues.openmrs.org/browse/RAD-256\r\n","created_at":"2016-05-31T13:32:17Z","updated_at":"2016-05-31T17:42:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cda528d62ff946f995b58b04007a30c42cbf47f3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/297/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/297/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/297/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/statuses/8862be6e72c2701111b521c401b4a1748204449d","head":{"label":"bgeVam:RAD-256","ref":"RAD-256","sha":"8862be6e72c2701111b521c401b4a1748204449d","user":{"login":"bgeVam","id":11328579,"avatar_url":"https://avatars.githubusercontent.com/u/11328579?v=3","gravatar_id":"","url":"https://api.github.com/users/bgeVam","html_url":"https://github.com/bgeVam","followers_url":"https://api.github.com/users/bgeVam/followers","following_url":"https://api.github.com/users/bgeVam/following{/other_user}","gists_url":"https://api.github.com/users/bgeVam/gists{/gist_id}","starred_url":"https://api.github.com/users/bgeVam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgeVam/subscriptions","organizations_url":"https://api.github.com/users/bgeVam/orgs","repos_url":"https://api.github.com/users/bgeVam/repos","events_url":"https://api.github.com/users/bgeVam/events{/privacy}","received_events_url":"https://api.github.com/users/bgeVam/received_events","type":"User","site_admin":false},"repo":{"id":31704386,"name":"openmrs-module-radiologydcm4chee","full_name":"bgeVam/openmrs-module-radiologydcm4chee","owner":{"login":"bgeVam","id":11328579,"avatar_url":"https://avatars.githubusercontent.com/u/11328579?v=3","gravatar_id":"","url":"https://api.github.com/users/bgeVam","html_url":"https://github.com/bgeVam","followers_url":"https://api.github.com/users/bgeVam/followers","following_url":"https://api.github.com/users/bgeVam/following{/other_user}","gists_url":"https://api.github.com/users/bgeVam/gists{/gist_id}","starred_url":"https://api.github.com/users/bgeVam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgeVam/subscriptions","organizations_url":"https://api.github.com/users/bgeVam/orgs","repos_url":"https://api.github.com/users/bgeVam/repos","events_url":"https://api.github.com/users/bgeVam/events{/privacy}","received_events_url":"https://api.github.com/users/bgeVam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bgeVam/openmrs-module-radiologydcm4chee","description":"OpenMRS Radiology Module with dcm4chee","fork":true,"url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee","forks_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/forks","keys_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/teams","hooks_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/hooks","issue_events_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/issues/events{/number}","events_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/events","assignees_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/assignees{/user}","branches_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/branches{/branch}","tags_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/tags","blobs_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/git/refs{/sha}","trees_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/statuses/{sha}","languages_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/languages","stargazers_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/stargazers","contributors_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/contributors","subscribers_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/subscribers","subscription_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/subscription","commits_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/commits{/sha}","git_commits_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/git/commits{/sha}","comments_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/comments{/number}","issue_comment_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/issues/comments{/number}","contents_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/contents/{+path}","compare_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/merges","archive_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/downloads","issues_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/issues{/number}","pulls_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/pulls{/number}","milestones_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/milestones{/number}","notifications_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/labels{/name}","releases_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/releases{/id}","deployments_url":"https://api.github.com/repos/bgeVam/openmrs-module-radiologydcm4chee/deployments","created_at":"2015-03-05T08:48:58Z","updated_at":"2016-05-23T10:03:54Z","pushed_at":"2016-05-31T14:13:24Z","git_url":"git://github.com/bgeVam/openmrs-module-radiologydcm4chee.git","ssh_url":"git@github.com:bgeVam/openmrs-module-radiologydcm4chee.git","clone_url":"https://github.com/bgeVam/openmrs-module-radiologydcm4chee.git","svn_url":"https://github.com/bgeVam/openmrs-module-radiologydcm4chee","homepage":null,"size":71458,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openmrs:master","ref":"master","sha":"ed69e1f8c00a5cc8384bfbaf6ce036d20b5b8378","user":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"repo":{"id":13028147,"name":"openmrs-module-radiology","full_name":"openmrs/openmrs-module-radiology","owner":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmrs/openmrs-module-radiology","description":"OpenMRS Radiology Module with dcm4chee","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-module-radiology","forks_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/releases{/id}","deployments_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/deployments","created_at":"2013-09-23T06:03:47Z","updated_at":"2016-05-06T23:06:59Z","pushed_at":"2016-05-31T14:13:24Z","git_url":"git://github.com/openmrs/openmrs-module-radiology.git","ssh_url":"git@github.com:openmrs/openmrs-module-radiology.git","clone_url":"https://github.com/openmrs/openmrs-module-radiology.git","svn_url":"https://github.com/openmrs/openmrs-module-radiology","homepage":null,"size":71999,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":2,"forks":34,"open_issues":2,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/297"},"html":{"href":"https://github.com/openmrs/openmrs-module-radiology/pull/297"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/297"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/297/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/297/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/297/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/statuses/8862be6e72c2701111b521c401b4a1748204449d"}}}}
{"actor":{"display_login":"teleivo"}}