{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/comments/38106380","id":38106380,"diff_hunk":"@@ -0,0 +1,20 @@\n+package org.openmrs.module.registrationcore.api.mpi.common;\n+\n+import org.openmrs.Patient;\n+\n+/**\n+ * Defines a MpiPatient in the system. A mpi patient is simply an extension of a patient and all that that\n+ * implies.\n+ */\n+public class MpiPatient extends Patient {","path":"api/src/main/java/org/openmrs/module/registrationcore/api/mpi/common/MpiPatient.java","position":9,"original_position":9,"commit_id":"e7efa7b10eb7d0ccfc83b65629e493c24bc564d8","original_commit_id":"0e6ee9fd62fabfb9db57b124cd35eef5a178ced1","user":{"login":"djazayeri","id":1165236,"avatar_url":"https://avatars.githubusercontent.com/u/1165236?v=3","gravatar_id":"","url":"https://api.github.com/users/djazayeri","html_url":"https://github.com/djazayeri","followers_url":"https://api.github.com/users/djazayeri/followers","following_url":"https://api.github.com/users/djazayeri/following{/other_user}","gists_url":"https://api.github.com/users/djazayeri/gists{/gist_id}","starred_url":"https://api.github.com/users/djazayeri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djazayeri/subscriptions","organizations_url":"https://api.github.com/users/djazayeri/orgs","repos_url":"https://api.github.com/users/djazayeri/repos","events_url":"https://api.github.com/users/djazayeri/events{/privacy}","received_events_url":"https://api.github.com/users/djazayeri/received_events","type":"User","site_admin":false},"body":"What I'm saying is that you have a compound object that has a patient as a property. You can use that property as a common patient.\r\n\r\nE.g. we'd introduce something like\r\n\r\n    class MatchingPatientResult {\r\n        // never null\r\n        Patient patient; \r\n        // if non-null, this is an MPI patient.\r\n        Object rawMpiResponse;\r\n    }\r\n\r\nThen in any code you can do \"matchingPatientResults.patient\" to refer to the patient.\r\n\r\nSomething like this principle: https://en.wikipedia.org/wiki/Composition_over_inheritance\r\n\r\nAlso, the fact that we have to introduce a fake hibernate mapping xml to support this is really incorrect.","created_at":"2015-08-27T15:08:32Z","updated_at":"2015-08-27T15:08:32Z","html_url":"https://github.com/openmrs/openmrs-module-registrationcore/pull/11#discussion_r38106380","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/comments/38106380"},"html":{"href":"https://github.com/openmrs/openmrs-module-registrationcore/pull/11#discussion_r38106380"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/11","id":43408136,"html_url":"https://github.com/openmrs/openmrs-module-registrationcore/pull/11","diff_url":"https://github.com/openmrs/openmrs-module-registrationcore/pull/11.diff","patch_url":"https://github.com/openmrs/openmrs-module-registrationcore/pull/11.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/issues/11","number":11,"state":"open","locked":false,"title":"MPI integration.","user":{"login":"approce","id":11144422,"avatar_url":"https://avatars.githubusercontent.com/u/11144422?v=3","gravatar_id":"","url":"https://api.github.com/users/approce","html_url":"https://github.com/approce","followers_url":"https://api.github.com/users/approce/followers","following_url":"https://api.github.com/users/approce/following{/other_user}","gists_url":"https://api.github.com/users/approce/gists{/gist_id}","starred_url":"https://api.github.com/users/approce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/approce/subscriptions","organizations_url":"https://api.github.com/users/approce/orgs","repos_url":"https://api.github.com/users/approce/repos","events_url":"https://api.github.com/users/approce/events{/privacy}","received_events_url":"https://api.github.com/users/approce/received_events","type":"User","site_admin":false},"body":"Have been implemented MPI integration with OpenEMPI.","created_at":"2015-08-26T14:27:34Z","updated_at":"2015-08-27T15:08:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4703251fb24244e732dc9e378660a06aa50b8c19","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/11/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/11/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/issues/11/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/statuses/e7efa7b10eb7d0ccfc83b65629e493c24bc564d8","head":{"label":"approce:master","ref":"master","sha":"e7efa7b10eb7d0ccfc83b65629e493c24bc564d8","user":{"login":"approce","id":11144422,"avatar_url":"https://avatars.githubusercontent.com/u/11144422?v=3","gravatar_id":"","url":"https://api.github.com/users/approce","html_url":"https://github.com/approce","followers_url":"https://api.github.com/users/approce/followers","following_url":"https://api.github.com/users/approce/following{/other_user}","gists_url":"https://api.github.com/users/approce/gists{/gist_id}","starred_url":"https://api.github.com/users/approce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/approce/subscriptions","organizations_url":"https://api.github.com/users/approce/orgs","repos_url":"https://api.github.com/users/approce/repos","events_url":"https://api.github.com/users/approce/events{/privacy}","received_events_url":"https://api.github.com/users/approce/received_events","type":"User","site_admin":false},"repo":{"id":33920882,"name":"openmrs-module-registrationcore","full_name":"approce/openmrs-module-registrationcore","owner":{"login":"approce","id":11144422,"avatar_url":"https://avatars.githubusercontent.com/u/11144422?v=3","gravatar_id":"","url":"https://api.github.com/users/approce","html_url":"https://github.com/approce","followers_url":"https://api.github.com/users/approce/followers","following_url":"https://api.github.com/users/approce/following{/other_user}","gists_url":"https://api.github.com/users/approce/gists{/gist_id}","starred_url":"https://api.github.com/users/approce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/approce/subscriptions","organizations_url":"https://api.github.com/users/approce/orgs","repos_url":"https://api.github.com/users/approce/repos","events_url":"https://api.github.com/users/approce/events{/privacy}","received_events_url":"https://api.github.com/users/approce/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/approce/openmrs-module-registrationcore","description":"Provides registration utilities and services for other modules to use.","fork":true,"url":"https://api.github.com/repos/approce/openmrs-module-registrationcore","forks_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/forks","keys_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/teams","hooks_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/hooks","issue_events_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/issues/events{/number}","events_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/events","assignees_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/assignees{/user}","branches_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/branches{/branch}","tags_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/tags","blobs_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/statuses/{sha}","languages_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/languages","stargazers_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/stargazers","contributors_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/contributors","subscribers_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/subscribers","subscription_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/subscription","commits_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/contents/{+path}","compare_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/merges","archive_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/downloads","issues_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/issues{/number}","pulls_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/pulls{/number}","milestones_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/milestones{/number}","notifications_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/labels{/name}","releases_url":"https://api.github.com/repos/approce/openmrs-module-registrationcore/releases{/id}","created_at":"2015-04-14T08:49:54Z","updated_at":"2015-08-03T06:40:16Z","pushed_at":"2015-08-27T14:17:09Z","git_url":"git://github.com/approce/openmrs-module-registrationcore.git","ssh_url":"git@github.com:approce/openmrs-module-registrationcore.git","clone_url":"https://github.com/approce/openmrs-module-registrationcore.git","svn_url":"https://github.com/approce/openmrs-module-registrationcore","homepage":null,"size":660,"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":"3bac78193b71c73dff79562ce924b2ff7b563cd2","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":7151216,"name":"openmrs-module-registrationcore","full_name":"openmrs/openmrs-module-registrationcore","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-registrationcore","description":"Provides registration utilities and services for other modules to use.","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore","forks_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/releases{/id}","created_at":"2012-12-13T16:17:23Z","updated_at":"2015-06-17T20:09:11Z","pushed_at":"2015-08-27T14:17:09Z","git_url":"git://github.com/openmrs/openmrs-module-registrationcore.git","ssh_url":"git@github.com:openmrs/openmrs-module-registrationcore.git","clone_url":"https://github.com/openmrs/openmrs-module-registrationcore.git","svn_url":"https://github.com/openmrs/openmrs-module-registrationcore","homepage":null,"size":524,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":1,"forks":19,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/11"},"html":{"href":"https://github.com/openmrs/openmrs-module-registrationcore/pull/11"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/issues/11"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-module-registrationcore/statuses/e7efa7b10eb7d0ccfc83b65629e493c24bc564d8"}}}}