{"action":"created","issue":{"url":"https://api.github.com/repos/jembi/bsis/issues/263","labels_url":"https://api.github.com/repos/jembi/bsis/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/jembi/bsis/issues/263/comments","events_url":"https://api.github.com/repos/jembi/bsis/issues/263/events","html_url":"https://github.com/jembi/bsis/issues/263","id":54415034,"number":263,"title":"Update component processing logic","user":{"login":"danfuterman","id":1052668,"avatar_url":"https://avatars.githubusercontent.com/u/1052668?v=3","gravatar_id":"","url":"https://api.github.com/users/danfuterman","html_url":"https://github.com/danfuterman","followers_url":"https://api.github.com/users/danfuterman/followers","following_url":"https://api.github.com/users/danfuterman/following{/other_user}","gists_url":"https://api.github.com/users/danfuterman/gists{/gist_id}","starred_url":"https://api.github.com/users/danfuterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danfuterman/subscriptions","organizations_url":"https://api.github.com/users/danfuterman/orgs","repos_url":"https://api.github.com/users/danfuterman/repos","events_url":"https://api.github.com/users/danfuterman/events{/privacy}","received_events_url":"https://api.github.com/users/danfuterman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jembi/bsis/labels/AppArea+Components","name":"AppArea Components","color":"207de5"},{"url":"https://api.github.com/repos/jembi/bsis/labels/DevCat+Backend%2FDatabase","name":"DevCat Backend/Database","color":"5319e7"},{"url":"https://api.github.com/repos/jembi/bsis/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/jembi/bsis/labels/refactor","name":"refactor","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"srikanthmalyala","id":6329521,"avatar_url":"https://avatars.githubusercontent.com/u/6329521?v=3","gravatar_id":"","url":"https://api.github.com/users/srikanthmalyala","html_url":"https://github.com/srikanthmalyala","followers_url":"https://api.github.com/users/srikanthmalyala/followers","following_url":"https://api.github.com/users/srikanthmalyala/following{/other_user}","gists_url":"https://api.github.com/users/srikanthmalyala/gists{/gist_id}","starred_url":"https://api.github.com/users/srikanthmalyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srikanthmalyala/subscriptions","organizations_url":"https://api.github.com/users/srikanthmalyala/orgs","repos_url":"https://api.github.com/users/srikanthmalyala/repos","events_url":"https://api.github.com/users/srikanthmalyala/events{/privacy}","received_events_url":"https://api.github.com/users/srikanthmalyala/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-01-15T05:51:03Z","updated_at":"2015-01-15T15:00:07Z","closed_at":null,"body":"I would like to start making use of the `ProductTypeCombination` table and it's associated functionality.\r\nWe've previously tried to improve the component processing logic (See #27 and #44), but there wasn't a clear understanding of the requirements at that point, so it missed one or two things.\r\n\r\nSo, the new plan:\r\n\r\nWe're currently using the ProductController `/record` endpoint to process components. Here, we specify the source/parent component, and the resulting/processed component (along with the num. units of the component). Rather, we should specify the source component, along with the resulting component combination (i.e. using `ProductTypeCombination`, which in turn uses the mappings in `ProductTypeCombination_ProductType`). This allows us to create multiple component types in a single step. \r\n\r\nSo what else do we need?\r\n\r\n- Two new fields in `ProductTypeCombination_ProductType` to specify the number of units that can be produced of a certain component - e.g. for paediatric processing, I can make 2 to 6 units (there should also be validation then that these ranges are stuck to).\r\n- The `ProductTypeCombination_ProductType` table specifies what components are produced from a `ProductTypeCombination`, but what seems to be missing is something that maps Component Types to Product Type combinations. i.e. a product type combination should be associated with an initial component type - e.g. see the examples here:\r\n![image](https://cloud.githubusercontent.com/assets/1052668/5753059/f3258860-9c8a-11e4-9e36-b4f1938414d0.png)\r\n\r\nThis will help in the front-end - when I record new components, the list of possible components to produce should be dependent on my initial component (the component I am processing) - the dropdown list where I select my new component combination should only contain the combinations that are relevant to the initial component."},"comment":{"url":"https://api.github.com/repos/jembi/bsis/issues/comments/70097594","html_url":"https://github.com/jembi/bsis/issues/263#issuecomment-70097594","issue_url":"https://api.github.com/repos/jembi/bsis/issues/263","id":70097594,"user":{"login":"srikanthmalyala","id":6329521,"avatar_url":"https://avatars.githubusercontent.com/u/6329521?v=3","gravatar_id":"","url":"https://api.github.com/users/srikanthmalyala","html_url":"https://github.com/srikanthmalyala","followers_url":"https://api.github.com/users/srikanthmalyala/followers","following_url":"https://api.github.com/users/srikanthmalyala/following{/other_user}","gists_url":"https://api.github.com/users/srikanthmalyala/gists{/gist_id}","starred_url":"https://api.github.com/users/srikanthmalyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srikanthmalyala/subscriptions","organizations_url":"https://api.github.com/users/srikanthmalyala/orgs","repos_url":"https://api.github.com/users/srikanthmalyala/repos","events_url":"https://api.github.com/users/srikanthmalyala/events{/privacy}","received_events_url":"https://api.github.com/users/srikanthmalyala/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T15:00:07Z","updated_at":"2015-01-15T15:00:07Z","body":"Okay sure , I will be adding max and min units into the system, "}}