{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/comments/203428500","pull_request_review_id":138315777,"id":203428500,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzQyODUwMA==","diff_hunk":"@@ -0,0 +1,185 @@\n+import 'babel-polyfill';\n+import randomString, { generate } from 'randomstring';\n+\n+import loading from './loading';\n+import axiosInstance from '../config';\n+\n+import {\n+  CREATE_LAB_ORDER,\n+  CREATE_LAB_ORDER_SUCCESS,\n+  CREATE_LAB_ORDER_FAILURE,\n+} from './actionTypes';\n+\n+const createLabOrderFailure = error => ({\n+  type: CREATE_LAB_ORDER_FAILURE,\n+  error,\n+});\n+\n+const createLabOrderSuccess = data => ({\n+  type: CREATE_LAB_ORDER_SUCCESS,\n+  data,\n+});\n+\n+const createLabOrder = labOrderData => async (dispatch) => {\n+  try {\n+    dispatch(loading(CREATE_LAB_ORDER, true));\n+    const requestPayload = {\n+      encounterProviders: [\n+        {\n+          encounterRole: '240b26f9-dd88-4172-823d-4a8bfeb7841f',\n+          provider: 'f9badd80-ab76-11e2-9e96-0800200c9a66',","path":"app/js/actions/createLabOrder.js","position":30,"original_position":30,"commit_id":"c6fd48394cee52cf4b981bbc19728472019939c3","original_commit_id":"c6fd48394cee52cf4b981bbc19728472019939c3","user":{"login":"mogoodrich","id":1163015,"node_id":"MDQ6VXNlcjExNjMwMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1163015?v=4","gravatar_id":"","url":"https://api.github.com/users/mogoodrich","html_url":"https://github.com/mogoodrich","followers_url":"https://api.github.com/users/mogoodrich/followers","following_url":"https://api.github.com/users/mogoodrich/following{/other_user}","gists_url":"https://api.github.com/users/mogoodrich/gists{/gist_id}","starred_url":"https://api.github.com/users/mogoodrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogoodrich/subscriptions","organizations_url":"https://api.github.com/users/mogoodrich/orgs","repos_url":"https://api.github.com/users/mogoodrich/repos","events_url":"https://api.github.com/users/mogoodrich/events{/privacy}","received_events_url":"https://api.github.com/users/mogoodrich/received_events","type":"User","site_admin":false},"body":"These should come from variables, like they do for drug order... if you are hardcoding these for testing, that's fine, but it may not work on another users system:\r\n\r\nhttps://github.com/openmrs/openmrs-owa-orderentry/blob/master/app/js/components/drugOrderEntry/addForm/DraftDataTable.jsx#L93","created_at":"2018-07-18T15:39:04Z","updated_at":"2018-07-18T15:41:35Z","html_url":"https://github.com/openmrs/openmrs-owa-orderentry/pull/111#discussion_r203428500","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/111","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/comments/203428500"},"html":{"href":"https://github.com/openmrs/openmrs-owa-orderentry/pull/111#discussion_r203428500"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/111","id":200735202,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNzM1MjAy","html_url":"https://github.com/openmrs/openmrs-owa-orderentry/pull/111","diff_url":"https://github.com/openmrs/openmrs-owa-orderentry/pull/111.diff","patch_url":"https://github.com/openmrs/openmrs-owa-orderentry/pull/111.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/issues/111","number":111,"state":"open","locked":false,"title":"OEUI-169: Consume Endpoint to create Lab Order","user":{"login":"Efosaok","id":24938186,"node_id":"MDQ6VXNlcjI0OTM4MTg2","avatar_url":"https://avatars2.githubusercontent.com/u/24938186?v=4","gravatar_id":"","url":"https://api.github.com/users/Efosaok","html_url":"https://github.com/Efosaok","followers_url":"https://api.github.com/users/Efosaok/followers","following_url":"https://api.github.com/users/Efosaok/following{/other_user}","gists_url":"https://api.github.com/users/Efosaok/gists{/gist_id}","starred_url":"https://api.github.com/users/Efosaok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Efosaok/subscriptions","organizations_url":"https://api.github.com/users/Efosaok/orgs","repos_url":"https://api.github.com/users/Efosaok/repos","events_url":"https://api.github.com/users/Efosaok/events{/privacy}","received_events_url":"https://api.github.com/users/Efosaok/received_events","type":"User","site_admin":false},"body":"#### JIRA TICKET NAME\r\n[Consume the endpoint for adding a Lab order](https://issues.openmrs.org/browse/OEUI-169?jql=project%20%3D%20OEUI%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC)\r\n\r\n#### Summary\r\n- Consume resource to create a lab order.\r\n- display the appropriate response from the server in the view.","created_at":"2018-07-11T15:13:10Z","updated_at":"2018-07-18T15:41:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec5b1f79b2968a6026e568b0b3c146dba1380dff","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/111/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/111/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/issues/111/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/statuses/c6fd48394cee52cf4b981bbc19728472019939c3","head":{"label":"Efosaok:OEUI-169","ref":"OEUI-169","sha":"c6fd48394cee52cf4b981bbc19728472019939c3","user":{"login":"Efosaok","id":24938186,"node_id":"MDQ6VXNlcjI0OTM4MTg2","avatar_url":"https://avatars2.githubusercontent.com/u/24938186?v=4","gravatar_id":"","url":"https://api.github.com/users/Efosaok","html_url":"https://github.com/Efosaok","followers_url":"https://api.github.com/users/Efosaok/followers","following_url":"https://api.github.com/users/Efosaok/following{/other_user}","gists_url":"https://api.github.com/users/Efosaok/gists{/gist_id}","starred_url":"https://api.github.com/users/Efosaok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Efosaok/subscriptions","organizations_url":"https://api.github.com/users/Efosaok/orgs","repos_url":"https://api.github.com/users/Efosaok/repos","events_url":"https://api.github.com/users/Efosaok/events{/privacy}","received_events_url":"https://api.github.com/users/Efosaok/received_events","type":"User","site_admin":false},"repo":{"id":139842575,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4NDI1NzU=","name":"openmrs-owa-orderentry","full_name":"Efosaok/openmrs-owa-orderentry","owner":{"login":"Efosaok","id":24938186,"node_id":"MDQ6VXNlcjI0OTM4MTg2","avatar_url":"https://avatars2.githubusercontent.com/u/24938186?v=4","gravatar_id":"","url":"https://api.github.com/users/Efosaok","html_url":"https://github.com/Efosaok","followers_url":"https://api.github.com/users/Efosaok/followers","following_url":"https://api.github.com/users/Efosaok/following{/other_user}","gists_url":"https://api.github.com/users/Efosaok/gists{/gist_id}","starred_url":"https://api.github.com/users/Efosaok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Efosaok/subscriptions","organizations_url":"https://api.github.com/users/Efosaok/orgs","repos_url":"https://api.github.com/users/Efosaok/repos","events_url":"https://api.github.com/users/Efosaok/events{/privacy}","received_events_url":"https://api.github.com/users/Efosaok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Efosaok/openmrs-owa-orderentry","description":"Open Web Application for Order Entry","fork":true,"url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry","forks_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/forks","keys_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/teams","hooks_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/hooks","issue_events_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/issues/events{/number}","events_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/events","assignees_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/assignees{/user}","branches_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/branches{/branch}","tags_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/tags","blobs_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/git/refs{/sha}","trees_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/statuses/{sha}","languages_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/languages","stargazers_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/stargazers","contributors_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/contributors","subscribers_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/subscribers","subscription_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/subscription","commits_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/commits{/sha}","git_commits_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/git/commits{/sha}","comments_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/comments{/number}","issue_comment_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/issues/comments{/number}","contents_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/contents/{+path}","compare_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/merges","archive_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/downloads","issues_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/issues{/number}","pulls_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/pulls{/number}","milestones_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/milestones{/number}","notifications_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/labels{/name}","releases_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/releases{/id}","deployments_url":"https://api.github.com/repos/Efosaok/openmrs-owa-orderentry/deployments","created_at":"2018-07-05T11:55:25Z","updated_at":"2018-07-05T11:55:27Z","pushed_at":"2018-07-18T10:02:58Z","git_url":"git://github.com/Efosaok/openmrs-owa-orderentry.git","ssh_url":"git@github.com:Efosaok/openmrs-owa-orderentry.git","clone_url":"https://github.com/Efosaok/openmrs-owa-orderentry.git","svn_url":"https://github.com/Efosaok/openmrs-owa-orderentry","homepage":null,"size":522,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openmrs:master","ref":"master","sha":"b415fe54c2d5a96a269e124da16b504c9c0d4657","user":{"login":"openmrs","id":860776,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg2MDc3Ng==","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":124887271,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ4ODcyNzE=","name":"openmrs-owa-orderentry","full_name":"openmrs/openmrs-owa-orderentry","owner":{"login":"openmrs","id":860776,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg2MDc3Ng==","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-owa-orderentry","description":"Open Web Application for Order Entry","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry","forks_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/releases{/id}","deployments_url":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/deployments","created_at":"2018-03-12T12:41:06Z","updated_at":"2018-07-17T11:14:25Z","pushed_at":"2018-07-18T10:03:00Z","git_url":"git://github.com/openmrs/openmrs-owa-orderentry.git","ssh_url":"git@github.com:openmrs/openmrs-owa-orderentry.git","clone_url":"https://github.com/openmrs/openmrs-owa-orderentry.git","svn_url":"https://github.com/openmrs/openmrs-owa-orderentry","homepage":null,"size":520,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":10,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/111"},"html":{"href":"https://github.com/openmrs/openmrs-owa-orderentry/pull/111"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/issues/111"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-owa-orderentry/statuses/c6fd48394cee52cf4b981bbc19728472019939c3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mogoodrich"}}