{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/174041710","pull_request_review_id":103325799,"id":174041710,"diff_hunk":"@@ -986,4 +987,22 @@ public Encounter transferEncounter(Encounter encounter, Patient patient) {\n \t\t\n \t\treturn saveEncounter(encounterCopy);\n \t}\n+\n+\t/**\n+\t * Check if encounter has a particular diagnosis\n+\t *\n+\t * @param encounter the encounter whose diagnoses we are to get\n+\t * @param diagnosis the diagnosis to check if it belongs to a given encounter\n+\t * @return true if the encounter has the given diagnosis, else false\n+\t */\n+\t@Override\n+\tpublic Boolean hasDiagnosis(Encounter encounter, Diagnosis diagnosis) {\n+\t\tfor (Diagnosis diagnosisFound :","path":"api/src/main/java/org/openmrs/api/impl/EncounterServiceImpl.java","position":50,"original_position":50,"commit_id":"2f318b58ad8d4f4f0da7bf7fbceb2950168fbb34","original_commit_id":"2f318b58ad8d4f4f0da7bf7fbceb2950168fbb34","user":{"login":"dkayiwa","id":1390773,"avatar_url":"https://avatars1.githubusercontent.com/u/1390773?v=4","gravatar_id":"","url":"https://api.github.com/users/dkayiwa","html_url":"https://github.com/dkayiwa","followers_url":"https://api.github.com/users/dkayiwa/followers","following_url":"https://api.github.com/users/dkayiwa/following{/other_user}","gists_url":"https://api.github.com/users/dkayiwa/gists{/gist_id}","starred_url":"https://api.github.com/users/dkayiwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkayiwa/subscriptions","organizations_url":"https://api.github.com/users/dkayiwa/orgs","repos_url":"https://api.github.com/users/dkayiwa/repos","events_url":"https://api.github.com/users/dkayiwa/events{/privacy}","received_events_url":"https://api.github.com/users/dkayiwa/received_events","type":"User","site_admin":false},"body":"This should go to the Encounter class","created_at":"2018-03-13T08:08:11Z","updated_at":"2018-03-13T08:08:11Z","html_url":"https://github.com/openmrs/openmrs-core/pull/2614#discussion_r174041710","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/2614","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/174041710"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/2614#discussion_r174041710"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/2614"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/2614","id":173381804,"html_url":"https://github.com/openmrs/openmrs-core/pull/2614","diff_url":"https://github.com/openmrs/openmrs-core/pull/2614.diff","patch_url":"https://github.com/openmrs/openmrs-core/pull/2614.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/2614","number":2614,"state":"open","locked":false,"title":"TRUNK-5353: Implement diagnosis service interface","user":{"login":"paradisekelechi","id":14928334,"avatar_url":"https://avatars3.githubusercontent.com/u/14928334?v=4","gravatar_id":"","url":"https://api.github.com/users/paradisekelechi","html_url":"https://github.com/paradisekelechi","followers_url":"https://api.github.com/users/paradisekelechi/followers","following_url":"https://api.github.com/users/paradisekelechi/following{/other_user}","gists_url":"https://api.github.com/users/paradisekelechi/gists{/gist_id}","starred_url":"https://api.github.com/users/paradisekelechi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paradisekelechi/subscriptions","organizations_url":"https://api.github.com/users/paradisekelechi/orgs","repos_url":"https://api.github.com/users/paradisekelechi/repos","events_url":"https://api.github.com/users/paradisekelechi/events{/privacy}","received_events_url":"https://api.github.com/users/paradisekelechi/received_events","type":"User","site_admin":false},"body":"<!--- Add a pull request title above in this format -->\r\n<!--- real example: 'TRUNK-5111 Replace use of deprecated isVoided' -->\r\n<!--- 'TRUNK-JiraIssueNumber JiraIssueTitle' -->\r\n## Description of what I changed\r\n<!--- Describe your changes in detail -->\r\n<!--- It can simply be your commit message, which you must have -->\r\nImplementation of the diagnosis service interface\r\nThe following files were changed\r\n- api/src/main/java/org/openmrs/api/context/Context.java\r\n- api/src/main/java/org/openmrs/api/context/ServiceContext.java\r\n- api/src/main/resources/applicationContext-service.xml\r\n- api/src/main/resources/org/openmrs/api/db/hibernate/Encounter.hbm.xml\r\n- api/src/test/java/org/openmrs/api/db/hibernate/HibernateDiagnosisDAOTest.java\r\n- api/src/main/java/org/openmrs/api/db/hibernate/HibernateDiagnosisDAO.java\r\n- api/src/main/java/org/openmrs/api/db/DiagnosisDAO.java\r\n- api/src/test/resources/org/openmrs/api/include/EncounterServiceTest-initialData.xml\r\n- api/src/test/java/org/openmrs/api/EncounterServiceTest.java\r\n- api/src/main/java/org/openmrs/api/impl/EncounterServiceImpl.java\r\n- api/src/main/java/org/openmrs/api/EncounterService.java\r\n- api/src/main/java/org/openmrs/api/DiagnosisService.java\r\nThe following files were added\r\n- api/src/main/java/org/openmrs/api/impl/DiagnosisServiceImpl.java\r\n- api/src/test/java/org/openmrs/api/impl/DiagnosisServiceImplTest.java\r\n- api/src/test/resources/org/openmrs/api/include/DiagnosisServiceImplTest-SetupDiagnosis.xml\r\n\r\n## Issue I worked on\r\n<!--- This project only accepts pull requests related to open issues -->\r\n<!--- Want a new feature or change? Discuss it in an issue first -->\r\n<!--- Found a bug? Point us to the issue/or create one so we can reproduce it -->\r\n<!--- Just add the issue number at the end: -->\r\nsee https://issues.openmrs.org/browse/TRUNK-5353\r\n\r\n## Checklist: I completed these to help reviewers :)\r\n<!--- Put an `x` in the box if you did the task -->\r\n<!--- If you forgot a task please follow the instructions below -->\r\n- [x] My pull request only contains **ONE single commit**\r\n(the number above, next to the 'Commits' tab is 1).\r\n\r\n  No? -> [read here](https://wiki.openmrs.org/display/docs/Pull+Request+Tips) on how to squash multiple commits into one\r\n\r\n- [x] My IDE is configured to follow the [**code style**](https://wiki.openmrs.org/display/docs/Java+Conventions) of this project.\r\n\r\n  No? Unsure? -> [configure your IDE](https://wiki.openmrs.org/display/docs/How-To+Setup+And+Use+Your+IDE), format the code and add the changes with `git add . && git commit --amend`\r\n\r\n- [x] I have **added tests** to cover my changes. (If you refactored\r\n  existing code that was well tested you do not have to add tests)\r\n\r\n  No? -> write tests and add them to this commit `git add . && git commit --amend`\r\n\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\r\n  No? -> execute above command\r\n\r\n- [x] All new and existing **tests passed**.\r\n\r\n  No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.\r\n\r\n- [x] My pull request is **based on the latest changes** of the master branch.\r\n\r\n  No? Unsure? -> execute command `git pull --rebase upstream master`\r\n\r\n","created_at":"2018-03-07T08:26:37Z","updated_at":"2018-03-13T08:08:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9dedc4a542a68616f6cd950e4bfc62addde0abc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/2614/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/2614/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/2614/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/2f318b58ad8d4f4f0da7bf7fbceb2950168fbb34","head":{"label":"paradisekelechi:TRUNK-5353","ref":"TRUNK-5353","sha":"2f318b58ad8d4f4f0da7bf7fbceb2950168fbb34","user":{"login":"paradisekelechi","id":14928334,"avatar_url":"https://avatars3.githubusercontent.com/u/14928334?v=4","gravatar_id":"","url":"https://api.github.com/users/paradisekelechi","html_url":"https://github.com/paradisekelechi","followers_url":"https://api.github.com/users/paradisekelechi/followers","following_url":"https://api.github.com/users/paradisekelechi/following{/other_user}","gists_url":"https://api.github.com/users/paradisekelechi/gists{/gist_id}","starred_url":"https://api.github.com/users/paradisekelechi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paradisekelechi/subscriptions","organizations_url":"https://api.github.com/users/paradisekelechi/orgs","repos_url":"https://api.github.com/users/paradisekelechi/repos","events_url":"https://api.github.com/users/paradisekelechi/events{/privacy}","received_events_url":"https://api.github.com/users/paradisekelechi/received_events","type":"User","site_admin":false},"repo":{"id":121345652,"name":"openmrs-core","full_name":"paradisekelechi/openmrs-core","owner":{"login":"paradisekelechi","id":14928334,"avatar_url":"https://avatars3.githubusercontent.com/u/14928334?v=4","gravatar_id":"","url":"https://api.github.com/users/paradisekelechi","html_url":"https://github.com/paradisekelechi","followers_url":"https://api.github.com/users/paradisekelechi/followers","following_url":"https://api.github.com/users/paradisekelechi/following{/other_user}","gists_url":"https://api.github.com/users/paradisekelechi/gists{/gist_id}","starred_url":"https://api.github.com/users/paradisekelechi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paradisekelechi/subscriptions","organizations_url":"https://api.github.com/users/paradisekelechi/orgs","repos_url":"https://api.github.com/users/paradisekelechi/repos","events_url":"https://api.github.com/users/paradisekelechi/events{/privacy}","received_events_url":"https://api.github.com/users/paradisekelechi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paradisekelechi/openmrs-core","description":"OpenMRS API and web application code","fork":true,"url":"https://api.github.com/repos/paradisekelechi/openmrs-core","forks_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/forks","keys_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/teams","hooks_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/events","assignees_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/tags","blobs_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/subscription","commits_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/merges","archive_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/downloads","issues_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/paradisekelechi/openmrs-core/deployments","created_at":"2018-02-13T06:08:53Z","updated_at":"2018-02-13T06:09:01Z","pushed_at":"2018-03-12T19:09:31Z","git_url":"git://github.com/paradisekelechi/openmrs-core.git","ssh_url":"git@github.com:paradisekelechi/openmrs-core.git","clone_url":"https://github.com/paradisekelechi/openmrs-core.git","svn_url":"https://github.com/paradisekelechi/openmrs-core","homepage":"http://openmrs.org","size":227455,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openmrs:master","ref":"master","sha":"711922c23a5ddcd2e033b40abf94830b20c27dc7","user":{"login":"openmrs","id":860776,"avatar_url":"https://avatars3.githubusercontent.com/u/860776?v=4","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":5187976,"name":"openmrs-core","full_name":"openmrs/openmrs-core","owner":{"login":"openmrs","id":860776,"avatar_url":"https://avatars3.githubusercontent.com/u/860776?v=4","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-core","description":"OpenMRS API and web application code","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-core","forks_url":"https://api.github.com/repos/openmrs/openmrs-core/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-core/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-core/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-core/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-core/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-core/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-core/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/openmrs/openmrs-core/deployments","created_at":"2012-07-26T04:54:29Z","updated_at":"2018-03-12T13:41:29Z","pushed_at":"2018-03-12T19:09:35Z","git_url":"git://github.com/openmrs/openmrs-core.git","ssh_url":"git@github.com:openmrs/openmrs-core.git","clone_url":"https://github.com/openmrs/openmrs-core.git","svn_url":"https://github.com/openmrs/openmrs-core","homepage":"http://openmrs.org","size":227462,"stargazers_count":626,"watchers_count":626,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2064,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2064,"open_issues":25,"watchers":626,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/2614"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/2614"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/2614"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/2614/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/2614/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/2614/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-core/statuses/2f318b58ad8d4f4f0da7bf7fbceb2950168fbb34"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dkayiwa"}}