{"action":"created","issue":{"url":"https://api.github.com/repos/medic/medic-webapp/issues/1635","labels_url":"https://api.github.com/repos/medic/medic-webapp/issues/1635/labels{/name}","comments_url":"https://api.github.com/repos/medic/medic-webapp/issues/1635/comments","events_url":"https://api.github.com/repos/medic/medic-webapp/issues/1635/events","html_url":"https://github.com/medic/medic-webapp/issues/1635","id":118159125,"number":1635,"title":"Only show relevant forms in profile","user":{"login":"abbyad","id":789512,"avatar_url":"https://avatars.githubusercontent.com/u/789512?v=3","gravatar_id":"","url":"https://api.github.com/users/abbyad","html_url":"https://github.com/abbyad","followers_url":"https://api.github.com/users/abbyad/followers","following_url":"https://api.github.com/users/abbyad/following{/other_user}","gists_url":"https://api.github.com/users/abbyad/gists{/gist_id}","starred_url":"https://api.github.com/users/abbyad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbyad/subscriptions","organizations_url":"https://api.github.com/users/abbyad/orgs","repos_url":"https://api.github.com/users/abbyad/repos","events_url":"https://api.github.com/users/abbyad/events{/privacy}","received_events_url":"https://api.github.com/users/abbyad/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/medic/medic-webapp/labels/2%20-%20Active%20Work","name":"2 - Active Work","color":"bfd4f2"},{"url":"https://api.github.com/repos/medic/medic-webapp/labels/Feature%20Request","name":"Feature Request","color":"6fc5af"}],"state":"open","locked":false,"assignee":{"login":"alxndrsn","id":191496,"avatar_url":"https://avatars.githubusercontent.com/u/191496?v=3","gravatar_id":"","url":"https://api.github.com/users/alxndrsn","html_url":"https://github.com/alxndrsn","followers_url":"https://api.github.com/users/alxndrsn/followers","following_url":"https://api.github.com/users/alxndrsn/following{/other_user}","gists_url":"https://api.github.com/users/alxndrsn/gists{/gist_id}","starred_url":"https://api.github.com/users/alxndrsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxndrsn/subscriptions","organizations_url":"https://api.github.com/users/alxndrsn/orgs","repos_url":"https://api.github.com/users/alxndrsn/repos","events_url":"https://api.github.com/users/alxndrsn/events{/privacy}","received_events_url":"https://api.github.com/users/alxndrsn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/medic/medic-webapp/milestones/36","html_url":"https://github.com/medic/medic-webapp/milestones/Mobile%20application%20overflow","labels_url":"https://api.github.com/repos/medic/medic-webapp/milestones/36/labels","id":1294435,"number":36,"title":"Mobile application overflow","description":"","creator":{"login":"browndav","id":763977,"avatar_url":"https://avatars.githubusercontent.com/u/763977?v=3","gravatar_id":"","url":"https://api.github.com/users/browndav","html_url":"https://github.com/browndav","followers_url":"https://api.github.com/users/browndav/followers","following_url":"https://api.github.com/users/browndav/following{/other_user}","gists_url":"https://api.github.com/users/browndav/gists{/gist_id}","starred_url":"https://api.github.com/users/browndav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/browndav/subscriptions","organizations_url":"https://api.github.com/users/browndav/orgs","repos_url":"https://api.github.com/users/browndav/repos","events_url":"https://api.github.com/users/browndav/events{/privacy}","received_events_url":"https://api.github.com/users/browndav/received_events","type":"User","site_admin":false},"open_issues":60,"closed_issues":45,"state":"open","created_at":"2015-09-07T23:28:13Z","updated_at":"2015-12-07T17:19:11Z","due_on":"2015-12-31T08:00:00Z","closed_at":null},"comments":7,"created_at":"2015-11-21T01:15:35Z","updated_at":"2015-12-14T08:55:43Z","closed_at":null,"body":"As a follow up to #1293, we are getting a lot of requests to only show the relevant forms. For the field test, the ones in question are:\r\n\r\n**Pregnancy Registration**: only show for women over 10 years old\r\n**Newborn Visit**: only show for women over 10 years old. Although we may need to show it only if they only have a previous Pregnancy Registration, current thinking they miss the pregnancy entirely and want to report a Newborn Visit.\r\n**Assessment**: only shown for people under 12 years old.\r\n\r\nWe could make use context for this (eg `context.sex: 'female'`, `context.min_age: 10`, `context.max_age: 12`)."},"comment":{"url":"https://api.github.com/repos/medic/medic-webapp/issues/comments/164381406","html_url":"https://github.com/medic/medic-webapp/issues/1635#issuecomment-164381406","issue_url":"https://api.github.com/repos/medic/medic-webapp/issues/1635","id":164381406,"user":{"login":"alxndrsn","id":191496,"avatar_url":"https://avatars.githubusercontent.com/u/191496?v=3","gravatar_id":"","url":"https://api.github.com/users/alxndrsn","html_url":"https://github.com/alxndrsn","followers_url":"https://api.github.com/users/alxndrsn/followers","following_url":"https://api.github.com/users/alxndrsn/following{/other_user}","gists_url":"https://api.github.com/users/alxndrsn/gists{/gist_id}","starred_url":"https://api.github.com/users/alxndrsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxndrsn/subscriptions","organizations_url":"https://api.github.com/users/alxndrsn/orgs","repos_url":"https://api.github.com/users/alxndrsn/repos","events_url":"https://api.github.com/users/alxndrsn/events{/privacy}","received_events_url":"https://api.github.com/users/alxndrsn/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T08:55:43Z","updated_at":"2015-12-14T08:55:43Z","body":"Implemented on `testing`.  Example `.context` value for _New pregnancy_/`pregnancy` form:\r\n```json\r\n\"context\": \"contact.type === 'person' && (!contact.gender || contact.gender === 'female') && (!contact.date_of_birth || ageInYears(contact) >= 12)\",\r\n```"}}