{"action":"reopened","issue":{"url":"https://api.github.com/repos/bp2014n2/i2b2/issues/190","labels_url":"https://api.github.com/repos/bp2014n2/i2b2/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/bp2014n2/i2b2/issues/190/comments","events_url":"https://api.github.com/repos/bp2014n2/i2b2/issues/190/events","html_url":"https://github.com/bp2014n2/i2b2/issues/190","id":77009989,"number":190,"title":"Wrong ResultSet DataType","user":{"login":"philipp94831","id":2177801,"avatar_url":"https://avatars.githubusercontent.com/u/2177801?v=3","gravatar_id":"","url":"https://api.github.com/users/philipp94831","html_url":"https://github.com/philipp94831","followers_url":"https://api.github.com/users/philipp94831/followers","following_url":"https://api.github.com/users/philipp94831/following{/other_user}","gists_url":"https://api.github.com/users/philipp94831/gists{/gist_id}","starred_url":"https://api.github.com/users/philipp94831/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipp94831/subscriptions","organizations_url":"https://api.github.com/users/philipp94831/orgs","repos_url":"https://api.github.com/users/philipp94831/repos","events_url":"https://api.github.com/users/philipp94831/events{/privacy}","received_events_url":"https://api.github.com/users/philipp94831/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bp2014n2/i2b2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/bp2014n2/i2b2/labels/ECL","name":"ECL","color":"fef2c0"},{"url":"https://api.github.com/repos/bp2014n2/i2b2/labels/HPCC","name":"HPCC","color":"fbca04"},{"url":"https://api.github.com/repos/bp2014n2/i2b2/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"SvenLehmann","id":7254100,"avatar_url":"https://avatars.githubusercontent.com/u/7254100?v=3","gravatar_id":"","url":"https://api.github.com/users/SvenLehmann","html_url":"https://github.com/SvenLehmann","followers_url":"https://api.github.com/users/SvenLehmann/followers","following_url":"https://api.github.com/users/SvenLehmann/following{/other_user}","gists_url":"https://api.github.com/users/SvenLehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/SvenLehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SvenLehmann/subscriptions","organizations_url":"https://api.github.com/users/SvenLehmann/orgs","repos_url":"https://api.github.com/users/SvenLehmann/repos","events_url":"https://api.github.com/users/SvenLehmann/events{/privacy}","received_events_url":"https://api.github.com/users/SvenLehmann/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/bp2014n2/i2b2/milestones/10","html_url":"https://github.com/bp2014n2/i2b2/milestones/Sprint%2012","labels_url":"https://api.github.com/repos/bp2014n2/i2b2/milestones/10/labels","id":1098195,"number":10,"title":"Sprint 12","description":"","creator":{"login":"philipp94831","id":2177801,"avatar_url":"https://avatars.githubusercontent.com/u/2177801?v=3","gravatar_id":"","url":"https://api.github.com/users/philipp94831","html_url":"https://github.com/philipp94831","followers_url":"https://api.github.com/users/philipp94831/followers","following_url":"https://api.github.com/users/philipp94831/following{/other_user}","gists_url":"https://api.github.com/users/philipp94831/gists{/gist_id}","starred_url":"https://api.github.com/users/philipp94831/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipp94831/subscriptions","organizations_url":"https://api.github.com/users/philipp94831/orgs","repos_url":"https://api.github.com/users/philipp94831/repos","events_url":"https://api.github.com/users/philipp94831/events{/privacy}","received_events_url":"https://api.github.com/users/philipp94831/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":4,"state":"open","created_at":"2015-05-06T08:04:14Z","updated_at":"2015-05-27T13:27:30Z","due_on":"2015-05-31T22:00:00Z","closed_at":null},"comments":0,"created_at":"2015-05-16T10:54:08Z","updated_at":"2015-05-27T13:27:30Z","closed_at":null,"body":"For Functions in SubSelect, wrong DataType is returned\n\n~~~sql\nSELECT patient_num, concept_cd_sub, count(*) AS counts FROM ( SELECT patient_num, substring(concept_cd from 1 for 7) AS concept_cd_sub FROM i2b2demodata.observation_fact WHERE concept_cd IN ( SELECT concept_cd FROM i2b2demodata.concept_dimension WHERE (concept_path LIKE '\\\\\\\\ATC\\\\\\\\%' OR concept_path LIKE '\\\\\\\\ICD\\\\\\\\%')) AND (start_date >= '2007-01-01T00:00:00' AND start_date <= '2008-01-01T00:00:00') AND (TRUE = TRUE OR patient_num IN ( SELECT patient_num FROM i2b2demodata.qt_patient_set_collection WHERE result_instance_id = -1))) observations GROUP BY patient_num, concept_cd_sub\n~~~\n\nconcept_cd_sub should return STRING50"}}