{"action":"opened","issue":{"url":"https://api.github.com/repos/opendatakit/roadmap/issues/23","repository_url":"https://api.github.com/repos/opendatakit/roadmap","labels_url":"https://api.github.com/repos/opendatakit/roadmap/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/opendatakit/roadmap/issues/23/comments","events_url":"https://api.github.com/repos/opendatakit/roadmap/issues/23/events","html_url":"https://github.com/opendatakit/roadmap/issues/23","id":335745401,"node_id":"MDU6SXNzdWUzMzU3NDU0MDE=","number":23,"title":"Longitudinal data management","user":{"login":"adamvert","id":1815204,"node_id":"MDQ6VXNlcjE4MTUyMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1815204?v=4","gravatar_id":"","url":"https://api.github.com/users/adamvert","html_url":"https://github.com/adamvert","followers_url":"https://api.github.com/users/adamvert/followers","following_url":"https://api.github.com/users/adamvert/following{/other_user}","gists_url":"https://api.github.com/users/adamvert/gists{/gist_id}","starred_url":"https://api.github.com/users/adamvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamvert/subscriptions","organizations_url":"https://api.github.com/users/adamvert/orgs","repos_url":"https://api.github.com/users/adamvert/repos","events_url":"https://api.github.com/users/adamvert/events{/privacy}","received_events_url":"https://api.github.com/users/adamvert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-26T09:59:43Z","updated_at":"2018-06-26T09:59:43Z","closed_at":null,"author_association":"NONE","body":"## User Stories\r\n\r\n*As a health worker, I want to be able to collect a medical record every time a patient visits my health facility, so that I can keep track of the patient's progress over time*\r\n\r\n*As a census taker, I want to visit a village every year and record population data*\r\n\r\n*As a vaccine delivery driver, I want to keep track of the quantities of vaccines that I deliver to cold storage facilities during my weekly deliveries*\r\n\r\n*As a regional vaccine administrator, I want to download CSV files that show the quantities of vaccine that have been delivered to all the cold storage facilities in my region over the last six months*\r\n\r\n## Proposed Implementation\r\n\r\nFor the sake of this explanation, I'm going to use the following terminology:\r\n- **Entity** refers to the thing about which data is collected. The kind of thing -- the \"entity type\" -- will depend on the use case. So in the above user stories, the entity types would be \"patient\", \"village\", \"cold storage facility\", \"cold storage facility\"\r\n- **Record** refers to one round of data collection. So in the above user stories, a record would be \r\n    1. the details of patient's visit to a health facility\r\n    2. an annual set of population data for a village\r\n    3. the quantities delivered to a health facility in a given week \r\n    4. again, the quantities delivered to a health facility in a given week\r\n\r\nThe simplest solution is probably to have two separate forms, one to collect the details of an entity (\"the Entity Form\") and one to collect the details of each visit (\"the Record Form\"). A Record must have one (and only one) Entity associated with it. An Entity can have multiple Records associated with it.\r\n\r\n### The Entity Form\r\n\r\nForms for creating entities must have certain fields marked as \"identifiers\". This would be for example a patient's name, or a village name and region, or a cold storage facility name and ID number.\r\n\r\n### The Record Form\r\n\r\nForms for creating records must have one attribute called `entity_type_id`; this attribute can only contain the UUID of an Entity Form. They must also have one field called `entity_id`. This field can only contain the `instanceID` of an Entity.\r\n"}}
{"actor":{"display_login":"adamvert"}}