{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/comments/71711125","id":71711125,"diff_hunk":"@@ -0,0 +1,116 @@\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+ *\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.report.template;\n+\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.util.List;\n+\n+import org.openmrs.annotation.Authorized;\n+import org.openmrs.api.OpenmrsService;\n+import org.openmrs.module.radiology.RadiologyPrivileges;\n+\n+/**\n+ * Service layer for {@code MrrtReportTemplate}.\n+ * \n+ * @see org.openmrs.module.radiology.report.template.MrrtReportTemplate\n+ */\n+public interface MrrtReportTemplateService extends OpenmrsService {\n+    \n+    \n+    /**\n+    * Saves a new {@code MrrtReportTemplate}.\n+    *\n+    * @param template the {@code MrrtReportTemplate} to save\n+    * @return the saved template\n+    * @throws IllegalArgumentException if given null\n+    * @should throw illegal argument exception if given null\n+    * @should save given template\n+    * @should prevent template editing\n+    */\n+    @Authorized(RadiologyPrivileges.ADD_RADIOLOGY_REPORT_TEMPLATES)\n+    public MrrtReportTemplate saveMrrtReportTemplate(MrrtReportTemplate template);\n+    \n+    /**\n+     * Import an {@code MrrtReportTemplate} into the system.\n+     * \n+     * @param in the input stream of the mrrt template file\n+     * @return \n+     * @throws IOException if OpenmrsUtil.copyFile throws one\n+     * TODO improve javadoc for exceptions and add tests\n+     * @should create mrrt report template in the database with metadata from input stream\n+     * @should create report template file in report template home directory\n+     */\n+    @Authorized(RadiologyPrivileges.ADD_RADIOLOGY_REPORT_TEMPLATES)\n+    public void importMrrtReportTemplate(InputStream in) throws IOException;\n+    \n+    /**\n+     * Delete an {@code MrrtReportTemplate} from the database.\n+     *\n+     * @param template the {@code MrrtReportTemplate} that is been deleted\n+     * @throws IllegalArgumentException if given null\n+     * @should delete report from database\n+     * @should throw illigal argument exception if given null","path":"api/src/main/java/org/openmrs/module/radiology/report/template/MrrtReportTemplateService.java","position":60,"original_position":60,"commit_id":"6fd7d53550ba204daebca0e773eae8e5386bf8c2","original_commit_id":"6fd7d53550ba204daebca0e773eae8e5386bf8c2","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":"@ivange94 typo in illegal","created_at":"2016-07-21T14:06:05Z","updated_at":"2016-07-21T14:06:05Z","html_url":"https://github.com/openmrs/openmrs-module-radiology/pull/364#discussion_r71711125","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/364","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/comments/71711125"},"html":{"href":"https://github.com/openmrs/openmrs-module-radiology/pull/364#discussion_r71711125"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/364"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/364","id":78313804,"html_url":"https://github.com/openmrs/openmrs-module-radiology/pull/364","diff_url":"https://github.com/openmrs/openmrs-module-radiology/pull/364.diff","patch_url":"https://github.com/openmrs/openmrs-module-radiology/pull/364.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/364","number":364,"state":"open","locked":false,"title":"RAD-272: Providing suport for template import","user":{"login":"ivange94","id":11330494,"avatar_url":"https://avatars.githubusercontent.com/u/11330494?v=3","gravatar_id":"","url":"https://api.github.com/users/ivange94","html_url":"https://github.com/ivange94","followers_url":"https://api.github.com/users/ivange94/followers","following_url":"https://api.github.com/users/ivange94/following{/other_user}","gists_url":"https://api.github.com/users/ivange94/gists{/gist_id}","starred_url":"https://api.github.com/users/ivange94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivange94/subscriptions","organizations_url":"https://api.github.com/users/ivange94/orgs","repos_url":"https://api.github.com/users/ivange94/repos","events_url":"https://api.github.com/users/ivange94/events{/privacy}","received_events_url":"https://api.github.com/users/ivange94/received_events","type":"User","site_admin":false},"body":"<!--- Provide PR Title above as: 'RAD-JiraIssueNumber JiraIssueTitle' -->\r\nRAD-272: Providing suport for template import\r\n\r\n## Description\r\n* added parser to parse mrrt template file\r\n* added test with real life mrrt template\r\n* implemented templates tab in UI with ability to import templates and search\r\nby title\r\n* added privileges specific to mrrt templates\r\n* added REST services\r\n** added MrrtReportTemplateResource\r\n** added MrrtReportTemplateSearchHandler\r\n* added GP for templates folder\r\n\r\n## Related Issue\r\n<!--- This project only accepts pull requests related to open issues -->\r\n<!--- If suggesting a new feature or change, please discuss it in an issue\r\nfirst -->\r\n<!--- If fixing a bug, there should be an issue describing it with steps to\r\nreproduce -->\r\n<!--- Please link to the issue here: -->\r\nsee https://issues.openmrs.org/browse/RAD-272\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that\r\napply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to\r\nhelp! -->\r\n- [x] My pull request only contains one single commit.\r\n- [x] My pull request is based on the latest master branch\r\n  `git pull --rebase upstream master`.\r\n- [x] I ran `mvn clean package` right before creating this pull request and\r\n  added all formatting changes to my commit.\r\n- [x] My code follows the code style of this project.\r\n- [x] I have read the **CONTRIBUTING** document.\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.","created_at":"2016-07-21T13:16:55Z","updated_at":"2016-07-21T14:06:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86ebaca727b6488b1a23fe0f3cb486b2396182b1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/364/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/364/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/364/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-radiology/statuses/6fd7d53550ba204daebca0e773eae8e5386bf8c2","head":{"label":"ivange94:RAD-272-part1","ref":"RAD-272-part1","sha":"6fd7d53550ba204daebca0e773eae8e5386bf8c2","user":{"login":"ivange94","id":11330494,"avatar_url":"https://avatars.githubusercontent.com/u/11330494?v=3","gravatar_id":"","url":"https://api.github.com/users/ivange94","html_url":"https://github.com/ivange94","followers_url":"https://api.github.com/users/ivange94/followers","following_url":"https://api.github.com/users/ivange94/following{/other_user}","gists_url":"https://api.github.com/users/ivange94/gists{/gist_id}","starred_url":"https://api.github.com/users/ivange94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivange94/subscriptions","organizations_url":"https://api.github.com/users/ivange94/orgs","repos_url":"https://api.github.com/users/ivange94/repos","events_url":"https://api.github.com/users/ivange94/events{/privacy}","received_events_url":"https://api.github.com/users/ivange94/received_events","type":"User","site_admin":false},"repo":{"id":53416892,"name":"openmrs-module-radiology","full_name":"ivange94/openmrs-module-radiology","owner":{"login":"ivange94","id":11330494,"avatar_url":"https://avatars.githubusercontent.com/u/11330494?v=3","gravatar_id":"","url":"https://api.github.com/users/ivange94","html_url":"https://github.com/ivange94","followers_url":"https://api.github.com/users/ivange94/followers","following_url":"https://api.github.com/users/ivange94/following{/other_user}","gists_url":"https://api.github.com/users/ivange94/gists{/gist_id}","starred_url":"https://api.github.com/users/ivange94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivange94/subscriptions","organizations_url":"https://api.github.com/users/ivange94/orgs","repos_url":"https://api.github.com/users/ivange94/repos","events_url":"https://api.github.com/users/ivange94/events{/privacy}","received_events_url":"https://api.github.com/users/ivange94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ivange94/openmrs-module-radiology","description":"OpenMRS Radiology Module with dcm4chee","fork":true,"url":"https://api.github.com/repos/ivange94/openmrs-module-radiology","forks_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/forks","keys_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/teams","hooks_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/hooks","issue_events_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/issues/events{/number}","events_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/events","assignees_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/assignees{/user}","branches_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/branches{/branch}","tags_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/tags","blobs_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/git/refs{/sha}","trees_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/statuses/{sha}","languages_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/languages","stargazers_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/stargazers","contributors_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/contributors","subscribers_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/subscribers","subscription_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/subscription","commits_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/commits{/sha}","git_commits_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/git/commits{/sha}","comments_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/comments{/number}","issue_comment_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/issues/comments{/number}","contents_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/contents/{+path}","compare_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/merges","archive_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/downloads","issues_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/issues{/number}","pulls_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/pulls{/number}","milestones_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/milestones{/number}","notifications_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/labels{/name}","releases_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/releases{/id}","deployments_url":"https://api.github.com/repos/ivange94/openmrs-module-radiology/deployments","created_at":"2016-03-08T14:05:49Z","updated_at":"2016-03-08T14:05:50Z","pushed_at":"2016-07-21T13:51:30Z","git_url":"git://github.com/ivange94/openmrs-module-radiology.git","ssh_url":"git@github.com:ivange94/openmrs-module-radiology.git","clone_url":"https://github.com/ivange94/openmrs-module-radiology.git","svn_url":"https://github.com/ivange94/openmrs-module-radiology","homepage":null,"size":72698,"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":"34f49d04a75ef37c15374273041bee11fa48ddd4","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":":hospital: OpenMRS Radiology Module","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-07-19T12:19:28Z","pushed_at":"2016-07-21T13:51:31Z","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":"https://wiki.openmrs.org/display/docs/Radiology+Module","size":73349,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":2,"forks":37,"open_issues":2,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/364"},"html":{"href":"https://github.com/openmrs/openmrs-module-radiology/pull/364"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/364"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/issues/364/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/pulls/364/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/364/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-module-radiology/statuses/6fd7d53550ba204daebca0e773eae8e5386bf8c2"}}}}
{"actor":{"display_login":"teleivo"}}