{"action":"created","comment":{"url":"https://api.github.com/repos/all-of-us/workbench/pulls/comments/185986009","pull_request_review_id":117488129,"id":185986009,"diff_hunk":"@@ -123,21 +156,121 @@\n             TO_CLIENT_DBDOMAIN =\n             new Function<DbDomain, org.pmiops.workbench.model.DbDomain>() {\n                 @Override\n-                public org.pmiops.workbench.model.DbDomain apply(org.pmiops.workbench.cdr.model.DbDomain dbd) {\n+                public org.pmiops.workbench.model.DbDomain apply(DbDomain cdr) {\n                     return new org.pmiops.workbench.model.DbDomain()\n-                            .domainId(dbd.getDomainId())\n-                            .domainDisplay(dbd.getDomainDisplay())\n-                            .domainDesc(dbd.getDomainDesc())\n-                            .dbType(dbd.getDbType())\n-                            .domainRoute(dbd.getDomainRoute())\n-                            .conceptId(dbd.getConceptId())\n-                            .countValue(dbd.getCountValue());\n+                            .domainId(cdr.getDomainId())\n+                            .domainDisplay(cdr.getDomainDisplay())\n+                            .domainDesc(cdr.getDomainDesc())\n+                            .dbType(cdr.getDbType())\n+                            .domainRoute(cdr.getDomainRoute())\n+                            .conceptId(cdr.getConceptId())\n+                            .countValue(cdr.getCountValue());\n+                }\n+            };\n+\n+\n+\n+\n \n+    /**\n+     * Converter function from backend representation (used with Hibernate) to\n+     * client representation (generated by Swagger).\n+     */\n+    private static final Function<AchillesResult, org.pmiops.workbench.model.AchillesResult>\n+            TO_CLIENT_ACHILLES_RESULT =\n+            new Function<AchillesResult, org.pmiops.workbench.model.AchillesResult>() {\n+                @Override\n+                public org.pmiops.workbench.model.AchillesResult apply(AchillesResult o) {\n+\n+                    return new org.pmiops.workbench.model.AchillesResult()\n+                            .id(o.getId())\n+                            .analysisId(o.getAnalysisId())\n+                            .stratum1(o.getStratum1())\n+                            .stratum2(o.getStratum2())\n+                            .stratum3(o.getStratum3())\n+                            .stratum4(o.getStratum4())\n+                            .stratum5(o.getStratum5())\n+                            .stratum5Name(o.getStratum5Name())\n+                            .countValue(o.getCountValue());\n                 }\n             };\n \n \n+    /* Final api functions put on top */\n+    @Override\n+    public ResponseEntity<DbDomainListResponse> getDomainFilters() {\n+        List<DbDomain> domains=dbDomainDao.findByDbType(\"domain_filter\");\n+        DbDomainListResponse resp=new DbDomainListResponse();\n+        resp.setItems(domains.stream().map(TO_CLIENT_DBDOMAIN).collect(Collectors.toList()));\n+        return ResponseEntity.ok(resp);\n+    }\n+\n+    @Override\n+    public ResponseEntity<DbDomainListResponse> getSurveyList() {\n+        List<DbDomain> domains=dbDomainDao.findByDbTypeAndAndConceptIdNotNull(\"survey\");\n+        DbDomainListResponse resp=new DbDomainListResponse();\n+        resp.setItems(domains.stream().map(TO_CLIENT_DBDOMAIN).collect(Collectors.toList()));\n+        return ResponseEntity.ok(resp);\n+    }\n+\n+\n+\n+    @Override\n+    public ResponseEntity<QuestionConceptListResponse> getSurveyResults(String surveyConceptId) {\n+        /* Set up the age and gender names */\n+        // Too slow and concept names wrong so we hardcode list\n+        // List<Concept> genders = conceptDao.findByConceptClassId(\"Gender\");\n+        this.setAgeStratumNameMap();\n+        this.setGenderStratumNameMap();\n+        long longSurveyConceptId = Long.parseLong(surveyConceptId);\n+        List<QuestionConcept> questions = questionConceptDao.findSurveyQuestions(longSurveyConceptId);","path":"public-api/src/main/java/org/pmiops/workbench/publicapi/DataBrowserController.java","position":258,"original_position":258,"commit_id":"01c1cc94df0663d41c67baeaeff3f6c97e1fc542","original_commit_id":"01c1cc94df0663d41c67baeaeff3f6c97e1fc542","user":{"login":"biopete","id":7596004,"avatar_url":"https://avatars0.githubusercontent.com/u/7596004?v=4","gravatar_id":"","url":"https://api.github.com/users/biopete","html_url":"https://github.com/biopete","followers_url":"https://api.github.com/users/biopete/followers","following_url":"https://api.github.com/users/biopete/following{/other_user}","gists_url":"https://api.github.com/users/biopete/gists{/gist_id}","starred_url":"https://api.github.com/users/biopete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biopete/subscriptions","organizations_url":"https://api.github.com/users/biopete/orgs","repos_url":"https://api.github.com/users/biopete/repos","events_url":"https://api.github.com/users/biopete/events{/privacy}","received_events_url":"https://api.github.com/users/biopete/received_events","type":"User","site_admin":false},"body":"This is for results of entire survey. Client passes a survey concept id and we get all the questions and analyses with results for that surevy. \r\n\r\nWe will also have a search where results are returned for only questions matching the search results. ","created_at":"2018-05-04T03:41:12Z","updated_at":"2018-05-04T03:41:12Z","html_url":"https://github.com/all-of-us/workbench/pull/804#discussion_r185986009","pull_request_url":"https://api.github.com/repos/all-of-us/workbench/pulls/804","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/comments/185986009"},"html":{"href":"https://github.com/all-of-us/workbench/pull/804#discussion_r185986009"},"pull_request":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/804"}},"in_reply_to_id":185944299},"pull_request":{"url":"https://api.github.com/repos/all-of-us/workbench/pulls/804","id":185838476,"html_url":"https://github.com/all-of-us/workbench/pull/804","diff_url":"https://github.com/all-of-us/workbench/pull/804.diff","patch_url":"https://github.com/all-of-us/workbench/pull/804.patch","issue_url":"https://api.github.com/repos/all-of-us/workbench/issues/804","number":804,"state":"open","locked":false,"title":"Biopete/survey api","user":{"login":"biopete","id":7596004,"avatar_url":"https://avatars0.githubusercontent.com/u/7596004?v=4","gravatar_id":"","url":"https://api.github.com/users/biopete","html_url":"https://github.com/biopete","followers_url":"https://api.github.com/users/biopete/followers","following_url":"https://api.github.com/users/biopete/following{/other_user}","gists_url":"https://api.github.com/users/biopete/gists{/gist_id}","starred_url":"https://api.github.com/users/biopete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biopete/subscriptions","organizations_url":"https://api.github.com/users/biopete/orgs","repos_url":"https://api.github.com/users/biopete/repos","events_url":"https://api.github.com/users/biopete/events{/privacy}","received_events_url":"https://api.github.com/users/biopete/received_events","type":"User","site_admin":false},"body":"Survey api done to work on the new database.  Removed unused apis. \r\nTodo : Needs tests. They will come in next pr. \r\nTodo: The front end public ui can be merged next.\r\n","created_at":"2018-05-03T21:08:21Z","updated_at":"2018-05-04T03:41:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2452f56a15b56112443a43774bb881bef667d52","assignee":null,"assignees":[],"requested_reviewers":[{"login":"SrushtiGangireddy","id":21062724,"avatar_url":"https://avatars1.githubusercontent.com/u/21062724?v=4","gravatar_id":"","url":"https://api.github.com/users/SrushtiGangireddy","html_url":"https://github.com/SrushtiGangireddy","followers_url":"https://api.github.com/users/SrushtiGangireddy/followers","following_url":"https://api.github.com/users/SrushtiGangireddy/following{/other_user}","gists_url":"https://api.github.com/users/SrushtiGangireddy/gists{/gist_id}","starred_url":"https://api.github.com/users/SrushtiGangireddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SrushtiGangireddy/subscriptions","organizations_url":"https://api.github.com/users/SrushtiGangireddy/orgs","repos_url":"https://api.github.com/users/SrushtiGangireddy/repos","events_url":"https://api.github.com/users/SrushtiGangireddy/events{/privacy}","received_events_url":"https://api.github.com/users/SrushtiGangireddy/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/all-of-us/workbench/pulls/804/commits","review_comments_url":"https://api.github.com/repos/all-of-us/workbench/pulls/804/comments","review_comment_url":"https://api.github.com/repos/all-of-us/workbench/pulls/comments{/number}","comments_url":"https://api.github.com/repos/all-of-us/workbench/issues/804/comments","statuses_url":"https://api.github.com/repos/all-of-us/workbench/statuses/01c1cc94df0663d41c67baeaeff3f6c97e1fc542","head":{"label":"all-of-us:biopete/survey-api","ref":"biopete/survey-api","sha":"01c1cc94df0663d41c67baeaeff3f6c97e1fc542","user":{"login":"all-of-us","id":22846942,"avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"repo":{"id":95247186,"name":"workbench","full_name":"all-of-us/workbench","owner":{"login":"all-of-us","id":22846942,"avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/all-of-us/workbench","description":null,"fork":false,"url":"https://api.github.com/repos/all-of-us/workbench","forks_url":"https://api.github.com/repos/all-of-us/workbench/forks","keys_url":"https://api.github.com/repos/all-of-us/workbench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/all-of-us/workbench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/all-of-us/workbench/teams","hooks_url":"https://api.github.com/repos/all-of-us/workbench/hooks","issue_events_url":"https://api.github.com/repos/all-of-us/workbench/issues/events{/number}","events_url":"https://api.github.com/repos/all-of-us/workbench/events","assignees_url":"https://api.github.com/repos/all-of-us/workbench/assignees{/user}","branches_url":"https://api.github.com/repos/all-of-us/workbench/branches{/branch}","tags_url":"https://api.github.com/repos/all-of-us/workbench/tags","blobs_url":"https://api.github.com/repos/all-of-us/workbench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/all-of-us/workbench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/all-of-us/workbench/git/refs{/sha}","trees_url":"https://api.github.com/repos/all-of-us/workbench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/all-of-us/workbench/statuses/{sha}","languages_url":"https://api.github.com/repos/all-of-us/workbench/languages","stargazers_url":"https://api.github.com/repos/all-of-us/workbench/stargazers","contributors_url":"https://api.github.com/repos/all-of-us/workbench/contributors","subscribers_url":"https://api.github.com/repos/all-of-us/workbench/subscribers","subscription_url":"https://api.github.com/repos/all-of-us/workbench/subscription","commits_url":"https://api.github.com/repos/all-of-us/workbench/commits{/sha}","git_commits_url":"https://api.github.com/repos/all-of-us/workbench/git/commits{/sha}","comments_url":"https://api.github.com/repos/all-of-us/workbench/comments{/number}","issue_comment_url":"https://api.github.com/repos/all-of-us/workbench/issues/comments{/number}","contents_url":"https://api.github.com/repos/all-of-us/workbench/contents/{+path}","compare_url":"https://api.github.com/repos/all-of-us/workbench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/all-of-us/workbench/merges","archive_url":"https://api.github.com/repos/all-of-us/workbench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/all-of-us/workbench/downloads","issues_url":"https://api.github.com/repos/all-of-us/workbench/issues{/number}","pulls_url":"https://api.github.com/repos/all-of-us/workbench/pulls{/number}","milestones_url":"https://api.github.com/repos/all-of-us/workbench/milestones{/number}","notifications_url":"https://api.github.com/repos/all-of-us/workbench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/all-of-us/workbench/labels{/name}","releases_url":"https://api.github.com/repos/all-of-us/workbench/releases{/id}","deployments_url":"https://api.github.com/repos/all-of-us/workbench/deployments","created_at":"2017-06-23T18:44:24Z","updated_at":"2018-05-03T21:07:36Z","pushed_at":"2018-05-04T00:02:23Z","git_url":"git://github.com/all-of-us/workbench.git","ssh_url":"git@github.com:all-of-us/workbench.git","clone_url":"https://github.com/all-of-us/workbench.git","svn_url":"https://github.com/all-of-us/workbench","homepage":null,"size":105786,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":2,"open_issues":7,"watchers":5,"default_branch":"master"}},"base":{"label":"all-of-us:master","ref":"master","sha":"fdaf509e702eb88bbb46cf19a45313111977ca16","user":{"login":"all-of-us","id":22846942,"avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"repo":{"id":95247186,"name":"workbench","full_name":"all-of-us/workbench","owner":{"login":"all-of-us","id":22846942,"avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/all-of-us/workbench","description":null,"fork":false,"url":"https://api.github.com/repos/all-of-us/workbench","forks_url":"https://api.github.com/repos/all-of-us/workbench/forks","keys_url":"https://api.github.com/repos/all-of-us/workbench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/all-of-us/workbench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/all-of-us/workbench/teams","hooks_url":"https://api.github.com/repos/all-of-us/workbench/hooks","issue_events_url":"https://api.github.com/repos/all-of-us/workbench/issues/events{/number}","events_url":"https://api.github.com/repos/all-of-us/workbench/events","assignees_url":"https://api.github.com/repos/all-of-us/workbench/assignees{/user}","branches_url":"https://api.github.com/repos/all-of-us/workbench/branches{/branch}","tags_url":"https://api.github.com/repos/all-of-us/workbench/tags","blobs_url":"https://api.github.com/repos/all-of-us/workbench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/all-of-us/workbench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/all-of-us/workbench/git/refs{/sha}","trees_url":"https://api.github.com/repos/all-of-us/workbench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/all-of-us/workbench/statuses/{sha}","languages_url":"https://api.github.com/repos/all-of-us/workbench/languages","stargazers_url":"https://api.github.com/repos/all-of-us/workbench/stargazers","contributors_url":"https://api.github.com/repos/all-of-us/workbench/contributors","subscribers_url":"https://api.github.com/repos/all-of-us/workbench/subscribers","subscription_url":"https://api.github.com/repos/all-of-us/workbench/subscription","commits_url":"https://api.github.com/repos/all-of-us/workbench/commits{/sha}","git_commits_url":"https://api.github.com/repos/all-of-us/workbench/git/commits{/sha}","comments_url":"https://api.github.com/repos/all-of-us/workbench/comments{/number}","issue_comment_url":"https://api.github.com/repos/all-of-us/workbench/issues/comments{/number}","contents_url":"https://api.github.com/repos/all-of-us/workbench/contents/{+path}","compare_url":"https://api.github.com/repos/all-of-us/workbench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/all-of-us/workbench/merges","archive_url":"https://api.github.com/repos/all-of-us/workbench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/all-of-us/workbench/downloads","issues_url":"https://api.github.com/repos/all-of-us/workbench/issues{/number}","pulls_url":"https://api.github.com/repos/all-of-us/workbench/pulls{/number}","milestones_url":"https://api.github.com/repos/all-of-us/workbench/milestones{/number}","notifications_url":"https://api.github.com/repos/all-of-us/workbench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/all-of-us/workbench/labels{/name}","releases_url":"https://api.github.com/repos/all-of-us/workbench/releases{/id}","deployments_url":"https://api.github.com/repos/all-of-us/workbench/deployments","created_at":"2017-06-23T18:44:24Z","updated_at":"2018-05-03T21:07:36Z","pushed_at":"2018-05-04T00:02:23Z","git_url":"git://github.com/all-of-us/workbench.git","ssh_url":"git@github.com:all-of-us/workbench.git","clone_url":"https://github.com/all-of-us/workbench.git","svn_url":"https://github.com/all-of-us/workbench","homepage":null,"size":105786,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":2,"open_issues":7,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/804"},"html":{"href":"https://github.com/all-of-us/workbench/pull/804"},"issue":{"href":"https://api.github.com/repos/all-of-us/workbench/issues/804"},"comments":{"href":"https://api.github.com/repos/all-of-us/workbench/issues/804/comments"},"review_comments":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/804/comments"},"review_comment":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/all-of-us/workbench/pulls/804/commits"},"statuses":{"href":"https://api.github.com/repos/all-of-us/workbench/statuses/01c1cc94df0663d41c67baeaeff3f6c97e1fc542"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"biopete"}}