{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/82582552","pull_request_review_id":3479500,"id":82582552,"diff_hunk":"@@ -425,85 +431,177 @@ public PatientIdentifierType getPatientIdentifierType(Integer patientIdentifierT\n \t@SuppressWarnings(\"unchecked\")\n \tpublic List<Patient> getDuplicatePatientsByAttributes(List<String> attributes) {\n \t\tList<Patient> patients = new Vector<Patient>();\n-\t\t\n+\t\tList<Integer> patientIds = new Vector<Integer>();\n+\n \t\tif (attributes.size() > 0) {\n-\t\t\tString select = \"select distinct p1 from Patient p1, Patient p2\";\n-\t\t\tString where = \" where p1 <> p2 \";\n-\t\t\tString orderBy = \" order by \";\n-\t\t\t\n-\t\t\tClass patient = Patient.class;\n-\t\t\tSet<String> patientFieldNames = new HashSet<String>(patient.getDeclaredFields().length);\n-\t\t\tfor (Field f : patient.getDeclaredFields()) {\n-\t\t\t\tpatientFieldNames.add(f.getName());\n-\t\t\t\tlog.debug(f.getName());\n-\t\t\t}\n-\t\t\t\n-\t\t\tClass person = Person.class;\n-\t\t\tSet<String> personFieldNames = new HashSet<String>(person.getDeclaredFields().length);\n-\t\t\tfor (Field f : person.getDeclaredFields()) {\n-\t\t\t\tpersonFieldNames.add(f.getName());\n-\t\t\t\tlog.debug(f.getName());\n+\n+\t\t\tString sqlString = getDuplicatePatientsSQLString(attributes);\n+\n+\t\t\ttry {\n+\t\t\t\tSQLQuery sqlquery = sessionFactory.getCurrentSession().createSQLQuery(sqlString);\n+\t\t\t\tpatientIds = sqlquery.list();\n+\t\t\t\tif (patientIds.size() >= 1) {\n+\t\t\t\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\n+\t\t\t\t\t\t\t\"from Patient p1 where p1.patientId in (:ids)\");\n+\t\t\t\t\tquery.setParameterList(\"ids\", patientIds);\n+\t\t\t\t\tpatients = query.list();\n+\t\t\t\t}\n \t\t\t}\n-\t\t\t\n-\t\t\tClass personName = PersonName.class;\n-\t\t\tSet<String> personNameFieldNames = new HashSet<String>(personName.getDeclaredFields().length);\n-\t\t\tfor (Field f : personName.getDeclaredFields()) {\n-\t\t\t\tpersonNameFieldNames.add(f.getName());\n-\t\t\t\tlog.debug(f.getName());\n+\t\t\tcatch (HibernateException ex) {\n+\t\t\t\tlog.warn(\"Hibernate exception: \" + ex.getStackTrace().toString());\n+\t\t\t\tthrow ex;\n+\n \t\t\t}\n-\t\t\t\n-\t\t\tClass identifier = PatientIdentifier.class;\n-\t\t\tSet<String> identifierFieldNames = new HashSet<String>(identifier.getDeclaredFields().length);\n-\t\t\tfor (Field f : identifier.getDeclaredFields()) {\n-\t\t\t\tidentifierFieldNames.add(f.getName());\n-\t\t\t\tlog.debug(f.getName());\n+\t\t\tfinally {}\n+\t\t}\n+\n+\t\tsortDuplicatePatients(patients, patientIds);\n+\t\treturn patients;\n+\t}\n+\n+\tprivate String getDuplicatePatientsSQLString(List<String> attributes) {\n+\t\tString outerSelect = \"select distinct t1.patient_id from patient t1 \";\n+\n+\t\tClass patient = Patient.class;\n+\t\tSet<String> patientFieldNames = new HashSet<String>(patient.getDeclaredFields().length);\n+\t\tfor (Field f : patient.getDeclaredFields()) {\n+\t\t\tpatientFieldNames.add(f.getName());\n+\t\t\tlog.debug(f.getName());\n+\t\t}\n+\n+\t\tClass person = Person.class;\n+\t\tSet<String> personFieldNames = new HashSet<String>(person.getDeclaredFields().length);\n+\t\tfor (Field f : person.getDeclaredFields()) {\n+\t\t\tpersonFieldNames.add(f.getName());\n+\t\t\tlog.debug(f.getName());\n+\t\t}\n+\n+\t\tClass personName = PersonName.class;\n+\n+\t\tSet<String> personNameFieldNames = new HashSet<String>(personName.getDeclaredFields().length);\n+\t\tfor (Field f : personName.getDeclaredFields()) {\n+\t\t\tpersonNameFieldNames.add(f.getName());\n+\t\t\tlog.debug(f.getName());\n+\t\t}\n+\n+\t\tClass identifier = PatientIdentifier.class;\n+\t\tSet<String> identifierFieldNames = new HashSet<String>(identifier.getDeclaredFields().length);\n+\t\tfor (Field f : identifier.getDeclaredFields()) {\n+\t\t\tidentifierFieldNames.add(f.getName());\n+\t\t\tlog.debug(f.getName());\n+\t\t}\n+\t\tList<String> whereConditions = new ArrayList<String>();\n+\n+\n+\t\tList<String> innerFields = new ArrayList<String>();\n+\t\tString innerSelect = \" from patient p1 \";\n+\n+\t\tfor (String s : attributes) {\n+\t\t\tif (s != null)\n+\t\t\t\ts = s.trim();\n+\t\t\tif (patientFieldNames.contains(s)) {\n+\n+\t\t\t\tAbstractEntityPersister aep = ((AbstractEntityPersister) sessionFactory.getClassMetadata(Patient.class));\n+\t\t\t\tString[] properties = aep.getPropertyColumnNames(s);\n+\t\t\t\tif (properties.length >= 1)\n+\t\t\t\t\ts = properties[0];\n+\t\t\t\twhereConditions.add(\" t1.\" + s + \" = t5.\" + s);\n+\t\t\t\tinnerFields.add(\"p1.\" + s);\n+\t\t\t} else if (personFieldNames.contains(s)) {\n+\t\t\t\tif (!outerSelect.contains(\"person\")) {\n+\t\t\t\t\touterSelect += \"inner join person t2 on t1.patient_id = t2.person_id \";\n+\t\t\t\t\tinnerSelect += \"inner join person person1 on p1.patient_id = person1.person_id \";\n+\t\t\t\t}\n+\n+\t\t\t\tAbstractEntityPersister aep = ((AbstractEntityPersister) sessionFactory.getClassMetadata(Person.class));\n+\t\t\t\tif (aep != null) {\n+\t\t\t\t\tString[] properties = aep.getPropertyColumnNames(s);\n+\t\t\t\t\tif (properties != null && properties.length >= 1)\n+\t\t\t\t\t\ts = properties[0];\n+\t\t\t\t}\n+\n+\t\t\t\twhereConditions.add(\" t2.\" + s + \" = t5.\" + s);\n+\t\t\t\tinnerFields.add(\"person1.\" + s);\n+\t\t\t} else if (personNameFieldNames.contains(s)) {\n+\t\t\t\tif (!outerSelect.contains(\"person_name\")) {\n+\t\t\t\t\touterSelect += \"inner join person_name t3 on t2.person_id = t3.person_id \";\n+\t\t\t\t\tinnerSelect += \"inner join person_name pn1 on person1.person_id = pn1.person_id \";\n+\t\t\t\t}\n+\n+\t\t\t\t//Since we are firing a native query get the actual table column name from the field name of the entity\n+\t\t\t\tAbstractEntityPersister aep = ((AbstractEntityPersister) sessionFactory\n+\t\t\t\t\t\t.getClassMetadata(PersonName.class));\n+\t\t\t\tif (aep != null) {\n+\t\t\t\t\tString[] properties = aep.getPropertyColumnNames(s);\n+\n+\t\t\t\t\tif (properties != null && properties.length >= 1)\n+\t\t\t\t\t\ts = properties[0];\n+\t\t\t\t}\n+\n+\t\t\t\twhereConditions.add(\" t3.\" + s + \" = t5.\" + s);\n+\t\t\t\tinnerFields.add(\"pn1.\" + s);\n+\t\t\t} else if (identifierFieldNames.contains(s)) {\n+\t\t\t\tif (!outerSelect.contains(\"patient_identifier\")) {\n+\t\t\t\t\touterSelect += \"inner join patient_identifier t4 on t1.patient_id = t4.patient_id \";\n+\t\t\t\t\tinnerSelect += \"inner join patient_identifier pi1 on p1.patient_id = pi1.patient_id \";\n+\t\t\t\t}\n+\n+\t\t\t\tAbstractEntityPersister aep = ((AbstractEntityPersister) sessionFactory\n+\t\t\t\t\t\t.getClassMetadata(PatientIdentifier.class));\n+\t\t\t\tif (aep != null) {\n+\n+\t\t\t\t\tString[] properties = aep.getPropertyColumnNames(s);\n+\t\t\t\t\tif (properties != null && properties.length >= 1)\n+\t\t\t\t\t\ts = properties[0];\n+\t\t\t\t}\n+\n+\t\t\t\twhereConditions.add(\" t4.\" + s + \" = t5.\" + s);\n+\t\t\t\tinnerFields.add(\"pi1.\" + s);\n+\t\t\t} else {\n+\t\t\t\tlog.warn(\"Unidentified attribute: \" + s);\n \t\t\t}\n-\t\t\t\n-\t\t\tif (!attributes.contains(\"includeVoided\")) {\n-\t\t\t\twhere += \"and p1.voided = false and p2.voided = false \";\n+\t\t}\n+\n+\t\tString innerFieldsJoined = StringUtils.join(innerFields, \", \");\n+\t\tString whereFieldsJoined = StringUtils.join(whereConditions, \" and \");\n+\t\tString innerWhereCondition = \"\";\n+\t\tif (!attributes.contains(\"includeVoided\")) {\n+\t\t\tinnerWhereCondition = \" where p1.voided = false \";\n+\t\t}\n+\t\tString innerQuery = \"(Select \" + innerFieldsJoined + innerSelect + innerWhereCondition + \" group by \"\n+\t\t\t\t+ innerFieldsJoined + \" having count(*) > 1\" + \" order by \" + innerFieldsJoined + \") t5\";\n+\t\treturn outerSelect + \", \" + innerQuery + \" where \" + whereFieldsJoined + \";\";\n+\t}\n+\n+\tprivate void sortDuplicatePatients(List<Patient> patients, List<Integer> patientIds) {\n+\n+\t\tMap<Integer, Integer> patientIdOrder = new HashMap<Integer, Integer>();\n+\t\tint startPos = 0;\n+\t\tfor (Integer id : patientIds) {\n+\t\t\tpatientIdOrder.put(id, startPos++);\n+\t\t}\n+\t\tclass PatientIdComparator implements Comparator<Patient> {\n+\n+\t\t\tprivate Map<Integer, Integer> sortOrder;\n+\n+\t\t\tpublic PatientIdComparator(Map<Integer, Integer> sortOrder) {\n+\t\t\t\tthis.sortOrder = sortOrder;\n \t\t\t}\n-\t\t\t\n-\t\t\tfor (String s : attributes) {\n-\t\t\t\tif (patientFieldNames.contains(s)) {\n-\t\t\t\t\twhere += \" and p1.\" + s + \" = p2.\" + s;\n-\t\t\t\t\torderBy += \"p1.\" + s + \", \";\n-\t\t\t\t} else if (personFieldNames.contains(s)) {\n-\t\t\t\t\tif (!select.contains(\"Person \")) {\n-\t\t\t\t\t\tselect += \", Person person1, Person person2\";\n-\t\t\t\t\t\twhere += \" and p1.patientId = person1.personId and p2.patientId = person2.personId \";\n-\t\t\t\t\t}\n-\t\t\t\t\twhere += \" and person1.\" + s + \" = person2.\" + s;\n-\t\t\t\t\torderBy += \"person1.\" + s + \", \";\n-\t\t\t\t} else if (personNameFieldNames.contains(s)) {\n-\t\t\t\t\tif (!select.contains(\"PersonName\")) {\n-\t\t\t\t\t\tselect += \", PersonName pn1, PersonName pn2\";\n-\t\t\t\t\t\twhere += \" and p1 = pn1.person and p2 = pn2.person \";\n-\t\t\t\t\t}\n-\t\t\t\t\twhere += \" and pn1.\" + s + \" = pn2.\" + s;\n-\t\t\t\t\torderBy += \"pn1.\" + s + \", \";\n-\t\t\t\t} else if (identifierFieldNames.contains(s)) {\n-\t\t\t\t\tif (!select.contains(\"PatientIdentifier\")) {\n-\t\t\t\t\t\tselect += \", PatientIdentifier pi1, PatientIdentifier pi2\";\n-\t\t\t\t\t\twhere += \" and p1 = pi1.patient and p2 = pi2.patient \";\n-\t\t\t\t\t}\n-\t\t\t\t\twhere += \" and pi1.\" + s + \" = pi2.\" + s;\n-\t\t\t\t\torderBy += \"pi1.\" + s + \", \";\n-\t\t\t\t} else {\n-\t\t\t\t\tlog.warn(\"Unidentified attribute: \" + s);\n+\n+\t\t\t@Override\n+\t\t\tpublic int compare(Patient i1, Patient i2) {\n+\t\t\t\tInteger weekdayPos1 = sortOrder.get(i1.getPatientId());\n+\t\t\t\tif (weekdayPos1 == null) {\n+\t\t\t\t\tthrow new IllegalArgumentException(\"Bad patient encountered: \" + i1.getPatientId());","path":"api/src/main/java/org/openmrs/api/db/hibernate/HibernatePatientDAO.java","position":254,"original_position":254,"commit_id":"5cd6d47b0d0d2509f3a5f05e05e0afaf8b97b692","original_commit_id":"5cd6d47b0d0d2509f3a5f05e05e0afaf8b97b692","user":{"login":"dkayiwa","id":1390773,"avatar_url":"https://avatars.githubusercontent.com/u/1390773?v=3","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":"What would lead to this? Patients without ids?","created_at":"2016-10-10T11:03:06Z","updated_at":"2016-10-10T11:03:06Z","html_url":"https://github.com/openmrs/openmrs-core/pull/1845#discussion_r82582552","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1845","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/82582552"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1845#discussion_r82582552"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1845"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1845","id":87093932,"html_url":"https://github.com/openmrs/openmrs-core/pull/1845","diff_url":"https://github.com/openmrs/openmrs-core/pull/1845.diff","patch_url":"https://github.com/openmrs/openmrs-core/pull/1845.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/1845","number":1845,"state":"open","locked":false,"title":"Trunk 4949","user":{"login":"karrtikiyer-tw","id":19147821,"avatar_url":"https://avatars.githubusercontent.com/u/19147821?v=3","gravatar_id":"","url":"https://api.github.com/users/karrtikiyer-tw","html_url":"https://github.com/karrtikiyer-tw","followers_url":"https://api.github.com/users/karrtikiyer-tw/followers","following_url":"https://api.github.com/users/karrtikiyer-tw/following{/other_user}","gists_url":"https://api.github.com/users/karrtikiyer-tw/gists{/gist_id}","starred_url":"https://api.github.com/users/karrtikiyer-tw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karrtikiyer-tw/subscriptions","organizations_url":"https://api.github.com/users/karrtikiyer-tw/orgs","repos_url":"https://api.github.com/users/karrtikiyer-tw/repos","events_url":"https://api.github.com/users/karrtikiyer-tw/events{/privacy}","received_events_url":"https://api.github.com/users/karrtikiyer-tw/received_events","type":"User","site_admin":false},"body":"TRUNK-4949 Patient Merge - HibernatePatientDAO - getDuplicatePatientsByAttributes - Not performing on large database \r\n\r\n## Description\r\nModified the getDuplicatePatientsByAttributes method to:\r\n\r\n1. have a group by + having count greater than 1 clause to identify duplicate patient IDs using native sql \r\n\r\n2. Then using the patient IDs identified in step 1 fetching Patients using HQL instead of all the self joins which was was case earlier.\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/TRUNK-4949\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.\r\n\r\n\r\n","created_at":"2016-09-28T10:34:20Z","updated_at":"2016-10-10T11:03:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b14a7013604c761eff2593160d331f2c5c315e0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1845/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1845/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/1845/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/5cd6d47b0d0d2509f3a5f05e05e0afaf8b97b692","head":{"label":"karrtikiyer-tw:TRUNK-4949","ref":"TRUNK-4949","sha":"5cd6d47b0d0d2509f3a5f05e05e0afaf8b97b692","user":{"login":"karrtikiyer-tw","id":19147821,"avatar_url":"https://avatars.githubusercontent.com/u/19147821?v=3","gravatar_id":"","url":"https://api.github.com/users/karrtikiyer-tw","html_url":"https://github.com/karrtikiyer-tw","followers_url":"https://api.github.com/users/karrtikiyer-tw/followers","following_url":"https://api.github.com/users/karrtikiyer-tw/following{/other_user}","gists_url":"https://api.github.com/users/karrtikiyer-tw/gists{/gist_id}","starred_url":"https://api.github.com/users/karrtikiyer-tw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karrtikiyer-tw/subscriptions","organizations_url":"https://api.github.com/users/karrtikiyer-tw/orgs","repos_url":"https://api.github.com/users/karrtikiyer-tw/repos","events_url":"https://api.github.com/users/karrtikiyer-tw/events{/privacy}","received_events_url":"https://api.github.com/users/karrtikiyer-tw/received_events","type":"User","site_admin":false},"repo":{"id":69336889,"name":"openmrs-core","full_name":"karrtikiyer-tw/openmrs-core","owner":{"login":"karrtikiyer-tw","id":19147821,"avatar_url":"https://avatars.githubusercontent.com/u/19147821?v=3","gravatar_id":"","url":"https://api.github.com/users/karrtikiyer-tw","html_url":"https://github.com/karrtikiyer-tw","followers_url":"https://api.github.com/users/karrtikiyer-tw/followers","following_url":"https://api.github.com/users/karrtikiyer-tw/following{/other_user}","gists_url":"https://api.github.com/users/karrtikiyer-tw/gists{/gist_id}","starred_url":"https://api.github.com/users/karrtikiyer-tw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karrtikiyer-tw/subscriptions","organizations_url":"https://api.github.com/users/karrtikiyer-tw/orgs","repos_url":"https://api.github.com/users/karrtikiyer-tw/repos","events_url":"https://api.github.com/users/karrtikiyer-tw/events{/privacy}","received_events_url":"https://api.github.com/users/karrtikiyer-tw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karrtikiyer-tw/openmrs-core","description":"OpenMRS API and web application code","fork":true,"url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core","forks_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/forks","keys_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/teams","hooks_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/events","assignees_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/tags","blobs_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/subscription","commits_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/merges","archive_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/downloads","issues_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/karrtikiyer-tw/openmrs-core/deployments","created_at":"2016-09-27T08:44:28Z","updated_at":"2016-09-27T08:44:42Z","pushed_at":"2016-09-28T10:55:49Z","git_url":"git://github.com/karrtikiyer-tw/openmrs-core.git","ssh_url":"git@github.com:karrtikiyer-tw/openmrs-core.git","clone_url":"https://github.com/karrtikiyer-tw/openmrs-core.git","svn_url":"https://github.com/karrtikiyer-tw/openmrs-core","homepage":"http://openmrs.org","size":221040,"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":"35b1e1f62715a2fd643d4f0cbc6ee2a7955694dc","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":5187976,"name":"openmrs-core","full_name":"openmrs/openmrs-core","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-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":"2016-10-07T18:06:23Z","pushed_at":"2016-10-10T07:03:59Z","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":239755,"stargazers_count":370,"watchers_count":370,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1539,"mirror_url":null,"open_issues_count":6,"forks":1539,"open_issues":6,"watchers":370,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1845"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1845"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1845"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1845/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1845/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/1845/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-core/statuses/5cd6d47b0d0d2509f3a5f05e05e0afaf8b97b692"}}}}
{"actor":{"display_login":"dkayiwa"}}