{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/comments/55824632","id":55824632,"diff_hunk":"@@ -174,15 +178,129 @@ public Study updateStudyPerformedStatus(String studyInstanceUid, PerformedProced\n \tpublic List<Study> getStudiesByRadiologyOrders(List<RadiologyOrder> radiologyOrders) throws IllegalArgumentException;\n \t\n \t/**\n-\t * Get all obs matching the orderId\n+\t * Creates a RadiologyReport and sets the radiologyReportStatus to claimed\n+\t *\n+\t * @param radiologyOrder RadiologyOrder\n+\t * @return a new claimed RadiologyReport\n+\t * @throws IllegalArgumentException if given RadiologyOrder is null\n+\t * @throws IllegalArgumentException if study of given RadiologyOrder is not completed\n+\t * @throws UnsupportedOperationException if given order has a completed RadiologyReport\n+\t * @throws UnsupportedOperationException if given order has a claimed RadiologyReport\n+\t * @should set the radiologyReportStatus to claimed\n+\t * @should create a new RadiologyReport\n+\t * @should throw an IllegalArgumentException if given RadiologyOrder is null\n+\t * @should throw an IllegalArgumentException if study of given RadiologyOrder is not completed\n+\t * @should throw an UnsupportedOperationException if given order has a completed RadiologyReport\n+\t * @should throw an UnsupportedOperationException if given order has a claimed RadiologyReport\n+\t */\n+\tRadiologyReport createAndClaimRadiologyReport(RadiologyOrder radiologyOrder) throws IllegalArgumentException,\n+\t        UnsupportedOperationException;\n+\t\n+\t/**\n+\t * Save a RadiologyReport matching the radiologyReport\n+\t *\n+\t * @param radiologyReport RadiologyReport which needs to be saved\n+\t * @return the saved radiologyReport\n+\t * @throws IllegalArgumentException if radiologyReport is null\n+\t * @throws IllegalArgumentException if radiologyReportStatus is null\n+\t * @throws IllegalArgumentException if radiologyReport is not modifiable\n+\t * @should save RadiologyReport in database and return it","path":"api/src/main/java/org/openmrs/module/radiology/RadiologyService.java","position":145,"original_position":145,"commit_id":"c977b1583c550b4e0ed99d84052ac875bde8de0b","original_commit_id":"c977b1583c550b4e0ed99d84052ac875bde8de0b","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":"when is a radiologyReport not modifiable ?\r\nif there is more than one case. these should be tested separately, so it is clearly defined what that word means.\r\nit does mean something to you now, but maybe not in 4 weeks or more from now","created_at":"2016-03-11T12:42:13Z","updated_at":"2016-03-11T12:42:13Z","html_url":"https://github.com/openmrs/openmrs-module-radiology/pull/178#discussion_r55824632","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/178","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/comments/55824632"},"html":{"href":"https://github.com/openmrs/openmrs-module-radiology/pull/178#discussion_r55824632"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/178"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/178","id":60590456,"html_url":"https://github.com/openmrs/openmrs-module-radiology/pull/178","diff_url":"https://github.com/openmrs/openmrs-module-radiology/pull/178.diff","patch_url":"https://github.com/openmrs/openmrs-module-radiology/pull/178.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/178","number":178,"state":"open","locked":false,"title":"RAD-116 - Create radiology report","user":{"login":"thomas-burko","id":8776365,"avatar_url":"https://avatars.githubusercontent.com/u/8776365?v=3","gravatar_id":"","url":"https://api.github.com/users/thomas-burko","html_url":"https://github.com/thomas-burko","followers_url":"https://api.github.com/users/thomas-burko/followers","following_url":"https://api.github.com/users/thomas-burko/following{/other_user}","gists_url":"https://api.github.com/users/thomas-burko/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-burko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-burko/subscriptions","organizations_url":"https://api.github.com/users/thomas-burko/orgs","repos_url":"https://api.github.com/users/thomas-burko/repos","events_url":"https://api.github.com/users/thomas-burko/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-burko/received_events","type":"User","site_admin":false},"body":"see https://issues.openmrs.org/browse/RAD-116","created_at":"2016-02-24T22:29:42Z","updated_at":"2016-03-11T12:42:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4258eb002f485d0bc5b5ff01d5101a3867d0aee8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/178/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/178/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/178/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/statuses/c977b1583c550b4e0ed99d84052ac875bde8de0b","head":{"label":"thomas-burko:RAD-116","ref":"RAD-116","sha":"c977b1583c550b4e0ed99d84052ac875bde8de0b","user":{"login":"thomas-burko","id":8776365,"avatar_url":"https://avatars.githubusercontent.com/u/8776365?v=3","gravatar_id":"","url":"https://api.github.com/users/thomas-burko","html_url":"https://github.com/thomas-burko","followers_url":"https://api.github.com/users/thomas-burko/followers","following_url":"https://api.github.com/users/thomas-burko/following{/other_user}","gists_url":"https://api.github.com/users/thomas-burko/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-burko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-burko/subscriptions","organizations_url":"https://api.github.com/users/thomas-burko/orgs","repos_url":"https://api.github.com/users/thomas-burko/repos","events_url":"https://api.github.com/users/thomas-burko/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-burko/received_events","type":"User","site_admin":false},"repo":{"id":51431188,"name":"openmrs-module-radiologydcm4chee","full_name":"thomas-burko/openmrs-module-radiologydcm4chee","owner":{"login":"thomas-burko","id":8776365,"avatar_url":"https://avatars.githubusercontent.com/u/8776365?v=3","gravatar_id":"","url":"https://api.github.com/users/thomas-burko","html_url":"https://github.com/thomas-burko","followers_url":"https://api.github.com/users/thomas-burko/followers","following_url":"https://api.github.com/users/thomas-burko/following{/other_user}","gists_url":"https://api.github.com/users/thomas-burko/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-burko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-burko/subscriptions","organizations_url":"https://api.github.com/users/thomas-burko/orgs","repos_url":"https://api.github.com/users/thomas-burko/repos","events_url":"https://api.github.com/users/thomas-burko/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-burko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thomas-burko/openmrs-module-radiologydcm4chee","description":"OpenMRS Radiology Module with dcm4chee","fork":true,"url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee","forks_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/forks","keys_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/teams","hooks_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/hooks","issue_events_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/issues/events{/number}","events_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/events","assignees_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/assignees{/user}","branches_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/branches{/branch}","tags_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/tags","blobs_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/git/refs{/sha}","trees_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/statuses/{sha}","languages_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/languages","stargazers_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/stargazers","contributors_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/contributors","subscribers_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/subscribers","subscription_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/subscription","commits_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/commits{/sha}","git_commits_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/git/commits{/sha}","comments_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/comments{/number}","issue_comment_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/issues/comments{/number}","contents_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/contents/{+path}","compare_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/merges","archive_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/downloads","issues_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/issues{/number}","pulls_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/pulls{/number}","milestones_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/milestones{/number}","notifications_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/labels{/name}","releases_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/releases{/id}","deployments_url":"https://api.github.com/repos/thomas-burko/openmrs-module-radiologydcm4chee/deployments","created_at":"2016-02-10T09:20:24Z","updated_at":"2016-02-10T09:20:25Z","pushed_at":"2016-03-08T14:49:11Z","git_url":"git://github.com/thomas-burko/openmrs-module-radiologydcm4chee.git","ssh_url":"git@github.com:thomas-burko/openmrs-module-radiologydcm4chee.git","clone_url":"https://github.com/thomas-burko/openmrs-module-radiologydcm4chee.git","svn_url":"https://github.com/thomas-burko/openmrs-module-radiologydcm4chee","homepage":null,"size":70513,"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":"8b631cd55fb383efc947714c586da37b66181da7","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-03-06T23:36:44Z","pushed_at":"2016-03-08T14:49:12Z","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":70970,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":1,"forks":23,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/178"},"html":{"href":"https://github.com/openmrs/openmrs-module-radiology/pull/178"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/178"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/178/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/178/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/178/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/statuses/c977b1583c550b4e0ed99d84052ac875bde8de0b"}}}}