{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/comments/34182393","id":34182393,"diff_hunk":"@@ -206,33 +206,45 @@ public MethodOutcome updatePatient(@ResourceParam Patient patient, @IdParam IdDt\n \t *            {@link ca.uhn.fhir .rest.server.RestfulServer}\n \t * @param theId Only one of theId or theConditional will have a value and the other will be\n \t *            null, depending on the URL passed into the server\n-\t * @param theConditional This will have a value like \"Patient?identifier=OpenMRS Identification\n-\t *            Number%7C00001\n+\t * @param theConditional This will have a value like \"Patient?identifier=7C00001\n \t * @return MethodOutcome which contains the status of the update operation\n \t */\n \t@Update()\n \tpublic MethodOutcome updatePatientByIdentifier(@ResourceParam Patient patient, @IdParam IdDt theId,\n \t\t                                        @ConditionalUrlParam String theConditional) {\n-\t\tString name = null;\n+\t\tMethodOutcome outcome = new MethodOutcome();\n \t\tif (theConditional != null) {\n-\t\t\tint startIndex = theConditional.lastIndexOf('=');\n-\t\t\tname = theConditional.substring(startIndex + 1);\n-\t\t\tTokenParam params = new TokenParam();\n-\t\t\tparams.setValue(name);\n-\t\t\tList<Patient> patientList = patientResource.searchByIdentifier(params);\n+\t\t\tList<Patient> patientList = null;\n+\t\t\tString args[] = theConditional.split(\"?\");\n+\t\t\tString parameterPart = args[1];\n+\t\t\tString paraArgs[] = parameterPart.split(\"=\");\n+\t\t\tString parameterName = paraArgs[0];\n+\t\t\tif (\"name\".equals(parameterName)) {","path":"omod/src/main/java/org/openmrs/module/fhir/providers/RestfulPatientResourceProvider.java","position":25,"original_position":25,"commit_id":"8811bb42ade857356c661fcfabacf61941e5780d","original_commit_id":"8811bb42ade857356c661fcfabacf61941e5780d","user":{"login":"harsha89","id":1561366,"avatar_url":"https://avatars.githubusercontent.com/u/1561366?v=3","gravatar_id":"","url":"https://api.github.com/users/harsha89","html_url":"https://github.com/harsha89","followers_url":"https://api.github.com/users/harsha89/followers","following_url":"https://api.github.com/users/harsha89/following{/other_user}","gists_url":"https://api.github.com/users/harsha89/gists{/gist_id}","starred_url":"https://api.github.com/users/harsha89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harsha89/subscriptions","organizations_url":"https://api.github.com/users/harsha89/orgs","repos_url":"https://api.github.com/users/harsha89/repos","events_url":"https://api.github.com/users/harsha89/events{/privacy}","received_events_url":"https://api.github.com/users/harsha89/received_events","type":"User","site_admin":false},"body":"move strings to constants","created_at":"2015-07-08T18:34:26Z","updated_at":"2015-07-08T18:34:26Z","html_url":"https://github.com/openmrs/openmrs-module-fhir/pull/89#discussion_r34182393","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/comments/34182393"},"html":{"href":"https://github.com/openmrs/openmrs-module-fhir/pull/89#discussion_r34182393"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/89","id":39507315,"html_url":"https://github.com/openmrs/openmrs-module-fhir/pull/89","diff_url":"https://github.com/openmrs/openmrs-module-fhir/pull/89.diff","patch_url":"https://github.com/openmrs/openmrs-module-fhir/pull/89.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/issues/89","number":89,"state":"open","locked":false,"title":"Cond location name","user":{"login":"sashrika","id":1342627,"avatar_url":"https://avatars.githubusercontent.com/u/1342627?v=3","gravatar_id":"","url":"https://api.github.com/users/sashrika","html_url":"https://github.com/sashrika","followers_url":"https://api.github.com/users/sashrika/followers","following_url":"https://api.github.com/users/sashrika/following{/other_user}","gists_url":"https://api.github.com/users/sashrika/gists{/gist_id}","starred_url":"https://api.github.com/users/sashrika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sashrika/subscriptions","organizations_url":"https://api.github.com/users/sashrika/orgs","repos_url":"https://api.github.com/users/sashrika/repos","events_url":"https://api.github.com/users/sashrika/events{/privacy}","received_events_url":"https://api.github.com/users/sashrika/received_events","type":"User","site_admin":false},"body":"https://issues.openmrs.orhttps://issues.openmrs.org/browse/FM-101g/browse/FM-94\r\n\r\nmodified existing conditional update to normal update.\r\n\r\nadded conditional support based on location name","created_at":"2015-07-08T18:22:38Z","updated_at":"2015-07-08T18:34:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d929087f1288cfbeea9fc780f377aea5cd37af97","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/89/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/89/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/issues/89/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/statuses/8811bb42ade857356c661fcfabacf61941e5780d","head":{"label":"sashrika:cond_location_name","ref":"cond_location_name","sha":"8811bb42ade857356c661fcfabacf61941e5780d","user":{"login":"sashrika","id":1342627,"avatar_url":"https://avatars.githubusercontent.com/u/1342627?v=3","gravatar_id":"","url":"https://api.github.com/users/sashrika","html_url":"https://github.com/sashrika","followers_url":"https://api.github.com/users/sashrika/followers","following_url":"https://api.github.com/users/sashrika/following{/other_user}","gists_url":"https://api.github.com/users/sashrika/gists{/gist_id}","starred_url":"https://api.github.com/users/sashrika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sashrika/subscriptions","organizations_url":"https://api.github.com/users/sashrika/orgs","repos_url":"https://api.github.com/users/sashrika/repos","events_url":"https://api.github.com/users/sashrika/events{/privacy}","received_events_url":"https://api.github.com/users/sashrika/received_events","type":"User","site_admin":false},"repo":{"id":31542254,"name":"openmrs-module-fhir","full_name":"sashrika/openmrs-module-fhir","owner":{"login":"sashrika","id":1342627,"avatar_url":"https://avatars.githubusercontent.com/u/1342627?v=3","gravatar_id":"","url":"https://api.github.com/users/sashrika","html_url":"https://github.com/sashrika","followers_url":"https://api.github.com/users/sashrika/followers","following_url":"https://api.github.com/users/sashrika/following{/other_user}","gists_url":"https://api.github.com/users/sashrika/gists{/gist_id}","starred_url":"https://api.github.com/users/sashrika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sashrika/subscriptions","organizations_url":"https://api.github.com/users/sashrika/orgs","repos_url":"https://api.github.com/users/sashrika/repos","events_url":"https://api.github.com/users/sashrika/events{/privacy}","received_events_url":"https://api.github.com/users/sashrika/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sashrika/openmrs-module-fhir","description":"Implements REST and Java APIs to access OpenMRS via FHIR Specification.","fork":true,"url":"https://api.github.com/repos/sashrika/openmrs-module-fhir","forks_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/forks","keys_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/teams","hooks_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/hooks","issue_events_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/issues/events{/number}","events_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/events","assignees_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/assignees{/user}","branches_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/branches{/branch}","tags_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/tags","blobs_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/git/refs{/sha}","trees_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/statuses/{sha}","languages_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/languages","stargazers_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/stargazers","contributors_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/contributors","subscribers_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/subscribers","subscription_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/subscription","commits_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/commits{/sha}","git_commits_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/git/commits{/sha}","comments_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/comments{/number}","issue_comment_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/issues/comments{/number}","contents_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/contents/{+path}","compare_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/merges","archive_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/downloads","issues_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/issues{/number}","pulls_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/pulls{/number}","milestones_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/milestones{/number}","notifications_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/labels{/name}","releases_url":"https://api.github.com/repos/sashrika/openmrs-module-fhir/releases{/id}","created_at":"2015-03-02T13:50:04Z","updated_at":"2015-05-02T01:57:48Z","pushed_at":"2015-07-08T18:19:47Z","git_url":"git://github.com/sashrika/openmrs-module-fhir.git","ssh_url":"git@github.com:sashrika/openmrs-module-fhir.git","clone_url":"https://github.com/sashrika/openmrs-module-fhir.git","svn_url":"https://github.com/sashrika/openmrs-module-fhir","homepage":null,"size":47892,"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":"78089cbce4ef653891f370bd3f368b2ae572de4a","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":23968789,"name":"openmrs-module-fhir","full_name":"openmrs/openmrs-module-fhir","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-fhir","description":"Implements REST and Java APIs to access OpenMRS via FHIR Specification.","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-module-fhir","forks_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-module-fhir/releases{/id}","created_at":"2014-09-12T16:51:12Z","updated_at":"2015-05-06T20:37:37Z","pushed_at":"2015-07-08T18:22:38Z","git_url":"git://github.com/openmrs/openmrs-module-fhir.git","ssh_url":"git@github.com:openmrs/openmrs-module-fhir.git","clone_url":"https://github.com/openmrs/openmrs-module-fhir.git","svn_url":"https://github.com/openmrs/openmrs-module-fhir","homepage":null,"size":48691,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":3,"forks":15,"open_issues":3,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/89"},"html":{"href":"https://github.com/openmrs/openmrs-module-fhir/pull/89"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-module-fhir/issues/89"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-fhir/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-module-fhir/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-module-fhir/statuses/8811bb42ade857356c661fcfabacf61941e5780d"}}}}