{"action":"opened","issue":{"url":"https://api.github.com/repos/OHDSI/Achilles/issues/43","labels_url":"https://api.github.com/repos/OHDSI/Achilles/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/OHDSI/Achilles/issues/43/comments","events_url":"https://api.github.com/repos/OHDSI/Achilles/issues/43/events","html_url":"https://github.com/OHDSI/Achilles/issues/43","id":56004745,"number":43,"title":"Achilles Heel test for era building","user":{"login":"schuemie","id":6713328,"avatar_url":"https://avatars.githubusercontent.com/u/6713328?v=3","gravatar_id":"","url":"https://api.github.com/users/schuemie","html_url":"https://github.com/schuemie","followers_url":"https://api.github.com/users/schuemie/followers","following_url":"https://api.github.com/users/schuemie/following{/other_user}","gists_url":"https://api.github.com/users/schuemie/gists{/gist_id}","starred_url":"https://api.github.com/users/schuemie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schuemie/subscriptions","organizations_url":"https://api.github.com/users/schuemie/orgs","repos_url":"https://api.github.com/users/schuemie/repos","events_url":"https://api.github.com/users/schuemie/events{/privacy}","received_events_url":"https://api.github.com/users/schuemie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OHDSI/Achilles/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-30T07:55:14Z","updated_at":"2015-01-30T07:55:14Z","closed_at":null,"body":"There are currently no test for whether the era building went OK, even though it is easy to make mistakes there. \r\n\r\nI'm currently using a simple test: I'm comparing the results of these two queries:\r\n```sql\r\nSELECT DISTINCT person_id, condition_concept_id FROM condition_occurrence;\r\nSELECT DISTINCT person_id, condition_concept_id FROM condition_era;\r\n```\r\nand they should be identical. (It would be easy to test this through a join I guess). If that doesn't scale to bigger databases, at least we could count the number of people with a condition and compare those counts. \r\nFor drug_era we'd first need to map to ingredients, but otherwise it would be the same."}}