{"action":"opened","issue":{"url":"https://api.github.com/repos/HospitalRun/hospitalrun-server/issues/47","repository_url":"https://api.github.com/repos/HospitalRun/hospitalrun-server","labels_url":"https://api.github.com/repos/HospitalRun/hospitalrun-server/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/HospitalRun/hospitalrun-server/issues/47/comments","events_url":"https://api.github.com/repos/HospitalRun/hospitalrun-server/issues/47/events","html_url":"https://github.com/HospitalRun/hospitalrun-server/issues/47","id":226293734,"number":47,"title":"Inventory Import needs to be updated to new schema","user":{"login":"jkleinsc","id":609052,"avatar_url":"https://avatars3.githubusercontent.com/u/609052?v=3","gravatar_id":"","url":"https://api.github.com/users/jkleinsc","html_url":"https://github.com/jkleinsc","followers_url":"https://api.github.com/users/jkleinsc/followers","following_url":"https://api.github.com/users/jkleinsc/following{/other_user}","gists_url":"https://api.github.com/users/jkleinsc/gists{/gist_id}","starred_url":"https://api.github.com/users/jkleinsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkleinsc/subscriptions","organizations_url":"https://api.github.com/users/jkleinsc/orgs","repos_url":"https://api.github.com/users/jkleinsc/repos","events_url":"https://api.github.com/users/jkleinsc/events{/privacy}","received_events_url":"https://api.github.com/users/jkleinsc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-04T14:11:12Z","updated_at":"2017-05-04T14:11:12Z","closed_at":null,"body":"Since the move to ember-pouch, https://github.com/HospitalRun/hospitalrun-server/blob/master/utils/inv-import.js does not properly load inventory data.  The script needs to be updated to load the inventory data using the ember-pouch schema, eg:\r\n\r\n```js\r\n{\r\n  \"_id\": \"inventory_2_iiqtc6w3_31\",\r\n  \"_rev\": \"4-8b68967daca21a66f63837d3900439cb\",\r\n  \"data\": {\r\n    \"distributionUnit\": \"vial\",\r\n    \"friendlyId\": \"m00001\",\r\n    \"inventoryType\": \"Medication\",\r\n    \"name\": \"Cefazolin 500mg vial (Hazolin)\",\r\n    \"quantity\": 999986,\r\n    \"lastModified\": \"2017-04-12T15:30:07.970Z\",\r\n    \"modifiedBy\": \"Admin User\",\r\n    \"purchases\": [\r\n      \"E3B2184F-4ECA-3B76-92C8-437846C2E3DC\"\r\n    ],\r\n    \"locations\": [\r\n      \"24BB235E-B271-AF61-9A3D-9ACD77CE25AF\",\r\n      \"DBCF3E06-B812-B6C7-930E-74F9372D384A\"\r\n    ]\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"jkleinsc"}}