{"comment":{"url":"https://api.github.com/repos/phenotips/phenotips/comments/11706051","html_url":"https://github.com/phenotips/phenotips/commit/95489523add055549ffd1e0b556a142f613fb94c#commitcomment-11706051","id":11706051,"user":{"login":"allasm","id":4990078,"avatar_url":"https://avatars.githubusercontent.com/u/4990078?v=3","gravatar_id":"","url":"https://api.github.com/users/allasm","html_url":"https://github.com/allasm","followers_url":"https://api.github.com/users/allasm/followers","following_url":"https://api.github.com/users/allasm/following{/other_user}","gists_url":"https://api.github.com/users/allasm/gists{/gist_id}","starred_url":"https://api.github.com/users/allasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allasm/subscriptions","organizations_url":"https://api.github.com/users/allasm/orgs","repos_url":"https://api.github.com/users/allasm/repos","events_url":"https://api.github.com/users/allasm/events{/privacy}","received_events_url":"https://api.github.com/users/allasm/received_events","type":"User","site_admin":false},"position":44,"line":62,"path":"components/patient-data/ui/src/main/resources/PhenoTips/ExportPatient.xml","commit_id":"95489523add055549ffd1e0b556a142f613fb94c","created_at":"2015-06-16T15:47:41Z","updated_at":"2015-06-16T15:47:41Z","body":"I would put the set ($pedigree = $services...) inside this #if (don't need it otherwise anyway, so no unnecessary work), and move the check for pedigree being defined also inside the if. Otherwise the logic is more convoluted. E.g. we'll get into the else branch which is actually designed to export patient itself even if we selected to export a pedigree but it is not defined"}}