{"action":"created","comment":{"url":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/comments/185213810","pull_request_review_id":116555160,"id":185213810,"diff_hunk":"@@ -64,34 +58,29 @@ class Measure\n     field :populations_cql_map, type: Hash\n     field :observations, type: Array\n \n-    field :value_set_oids, type: Array, default: []\n-    field :value_set_oid_version_objects, type: Array, default: []\n-\n-    field :complexity, type: Hash\n-\n     # Relations to other model classes\n-    belongs_to :user\n-    belongs_to :bundle, class_name: 'HealthDataStandards::CQM::Bundle'\n-    has_and_belongs_to_many :patients, inverse_of: nil\n-    has_one :package, class_name: 'CqlMeasurePackage', inverse_of: :measure, dependent: :destroy\n+    belongs_to :bundle, class_name: 'HealthDataStandards::CQM::Bundle' # Cypress-specific, until we migrate the Bundle into cqm-models\n+    has_one :package, class_name: 'CqlMeasurePackage', inverse_of: :measure, dependent: :destroy # Bonnie-specific\n+    has_and_belongs_to_many :patients\n+\n+    # Store this references as an Array on the Measure object,\n+    # but don't care about the inverse relationship (e.g. we never really care \n+    # about getting all the measures from a ValueSet object,\n+    # hence the 'inverse_of: nil')\n+    has_and_belongs_to_many :value_sets, inverse_of: nil\n \n     scope :by_measure_id, ->(id) { where('measure_id' => id) }\n     scope :by_type, ->(type) { where('type' => type) }\n     scope :by_user, ->(user) { where user_id: user.id }\n \n     index 'user_id' => 1\n+    index 'hqmf_id' => 1","path":"app/models/qdm/tacoma/measure.rb","position":77,"original_position":77,"commit_id":"9ee1224b3da0905ab5e6a43fe71a6310e087e933","original_commit_id":"9ee1224b3da0905ab5e6a43fe71a6310e087e933","user":{"login":"hossenlopp","id":11613067,"avatar_url":"https://avatars1.githubusercontent.com/u/11613067?v=4","gravatar_id":"","url":"https://api.github.com/users/hossenlopp","html_url":"https://github.com/hossenlopp","followers_url":"https://api.github.com/users/hossenlopp/followers","following_url":"https://api.github.com/users/hossenlopp/following{/other_user}","gists_url":"https://api.github.com/users/hossenlopp/gists{/gist_id}","starred_url":"https://api.github.com/users/hossenlopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hossenlopp/subscriptions","organizations_url":"https://api.github.com/users/hossenlopp/orgs","repos_url":"https://api.github.com/users/hossenlopp/repos","events_url":"https://api.github.com/users/hossenlopp/events{/privacy}","received_events_url":"https://api.github.com/users/hossenlopp/received_events","type":"User","site_admin":false},"body":"`hqmf_id` wouldn't be a useful index.\r\n\r\nA compound index on `user_id` and `hqmf_set_id` would be useful since it's the most common query in bonnie.\r\n`index 'user_id' => 1, 'hqmf_set_id' => 1`","created_at":"2018-05-01T12:47:07Z","updated_at":"2018-05-01T12:55:41Z","html_url":"https://github.com/projecttacoma/cqm-models/pull/33#discussion_r185213810","pull_request_url":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/33","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/comments/185213810"},"html":{"href":"https://github.com/projecttacoma/cqm-models/pull/33#discussion_r185213810"},"pull_request":{"href":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/33","id":185164740,"html_url":"https://github.com/projecttacoma/cqm-models/pull/33","diff_url":"https://github.com/projecttacoma/cqm-models/pull/33.diff","patch_url":"https://github.com/projecttacoma/cqm-models/pull/33.patch","issue_url":"https://api.github.com/repos/projecttacoma/cqm-models/issues/33","number":33,"state":"open","locked":false,"title":"Measure/ValueSet object updates","user":{"login":"okeefm","id":49001,"avatar_url":"https://avatars1.githubusercontent.com/u/49001?v=4","gravatar_id":"","url":"https://api.github.com/users/okeefm","html_url":"https://github.com/okeefm","followers_url":"https://api.github.com/users/okeefm/followers","following_url":"https://api.github.com/users/okeefm/following{/other_user}","gists_url":"https://api.github.com/users/okeefm/gists{/gist_id}","starred_url":"https://api.github.com/users/okeefm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okeefm/subscriptions","organizations_url":"https://api.github.com/users/okeefm/orgs","repos_url":"https://api.github.com/users/okeefm/repos","events_url":"https://api.github.com/users/okeefm/events{/privacy}","received_events_url":"https://api.github.com/users/okeefm/received_events","type":"User","site_admin":false},"body":"NOTE: This should not be merged until the Individual Result PR is merged.\r\n\r\nThis Pull Request fixes a number of issues on the `Valueset`, `Concept`, `Measure`, and `MeasurePackage` objects:\r\n\r\n* Objects that should not be in the `QDM` namespace (because they're not QDM datatypes) have been moved into the `Tacoma` module in Ruby\r\n* Changed `mString`, `mBoolean`, etc. to `String`, `Boolean` etc. where necessary on the JS side, so no more `mString`-like variable names should exist.\r\n* Commented various `Measure` ID fields\r\n* Removed `measure_id` as it seemed duplicative of other ID fields. Bonnie reviewer should review this and ensure it's true. If it is duplicative, we can create a method/ called `measure_id` that returns the other field.\r\n* Changed `Valueset` handling in `Measure`, and field names in `Valueset`/`Concept` to comply with @hossenlopp's documentation\r\n* Removed a number of Cypress/Bonnie specific fields, in favor of adding those in the specific projects where needed.\r\n* Made a number of changes requested by @hossenlopp in his Measure object review. NOTE: There are still a couple of `Hash`/`Mixed` object refactors in progress that will be added here.\r\n* I will run `yarn run dist` and update gem versions once the Results object PR is in, so we don't have to do it multiple times.\r\n\r\nPull requests into cqm-models require the following. Submitter and reviewer should :white_check_mark: when done. For items that are not-applicable, note it's not-applicable (\"N/A\") and :white_check_mark:.\r\n\r\n**Submitter:**\r\n- [x] This pull request describes why these changes were made.\r\n- [x] Internal ticket for this PR: N/A\r\n- [x] Internal ticket links to this PR N/A\r\n- [x] Code diff has been done and been reviewed\r\n- [x] Tests are included and test edge cases N/A\r\n- [x] Tests have been run locally and pass\r\n- [ ] If there were any JavaScript changes, this PR has updated the `dist` directory using `npm run dist`\r\n- [ ] If applicable, the library version number in `package.json` and `cqm-models.gemspec` has been updated\r\n\r\n**Bonnie Reviewer:**\r\n\r\nName: @hossenlopp \r\n- [ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose\r\n- [ ] The tests appropriately test the new code, including edge cases\r\n- [ ] You have tried to break the code\r\n\r\n**Cypress Reviewer:**\r\n\r\nName: @dczulada\r\n- [ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose\r\n- [ ] The tests appropriately test the new code, including edge cases\r\n- [ ] You have tried to break the code\r\n","created_at":"2018-05-01T11:48:02Z","updated_at":"2018-05-01T12:55:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"774adcdde87856847bc2a60376d9c3da49cb2628","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/33/commits","review_comments_url":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/33/comments","review_comment_url":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projecttacoma/cqm-models/issues/33/comments","statuses_url":"https://api.github.com/repos/projecttacoma/cqm-models/statuses/9ee1224b3da0905ab5e6a43fe71a6310e087e933","head":{"label":"projecttacoma:measure_object_updates","ref":"measure_object_updates","sha":"9ee1224b3da0905ab5e6a43fe71a6310e087e933","user":{"login":"projecttacoma","id":5497023,"avatar_url":"https://avatars2.githubusercontent.com/u/5497023?v=4","gravatar_id":"","url":"https://api.github.com/users/projecttacoma","html_url":"https://github.com/projecttacoma","followers_url":"https://api.github.com/users/projecttacoma/followers","following_url":"https://api.github.com/users/projecttacoma/following{/other_user}","gists_url":"https://api.github.com/users/projecttacoma/gists{/gist_id}","starred_url":"https://api.github.com/users/projecttacoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecttacoma/subscriptions","organizations_url":"https://api.github.com/users/projecttacoma/orgs","repos_url":"https://api.github.com/users/projecttacoma/repos","events_url":"https://api.github.com/users/projecttacoma/events{/privacy}","received_events_url":"https://api.github.com/users/projecttacoma/received_events","type":"Organization","site_admin":false},"repo":{"id":116036894,"name":"cqm-models","full_name":"projecttacoma/cqm-models","owner":{"login":"projecttacoma","id":5497023,"avatar_url":"https://avatars2.githubusercontent.com/u/5497023?v=4","gravatar_id":"","url":"https://api.github.com/users/projecttacoma","html_url":"https://github.com/projecttacoma","followers_url":"https://api.github.com/users/projecttacoma/followers","following_url":"https://api.github.com/users/projecttacoma/following{/other_user}","gists_url":"https://api.github.com/users/projecttacoma/gists{/gist_id}","starred_url":"https://api.github.com/users/projecttacoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecttacoma/subscriptions","organizations_url":"https://api.github.com/users/projecttacoma/orgs","repos_url":"https://api.github.com/users/projecttacoma/repos","events_url":"https://api.github.com/users/projecttacoma/events{/privacy}","received_events_url":"https://api.github.com/users/projecttacoma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecttacoma/cqm-models","description":null,"fork":false,"url":"https://api.github.com/repos/projecttacoma/cqm-models","forks_url":"https://api.github.com/repos/projecttacoma/cqm-models/forks","keys_url":"https://api.github.com/repos/projecttacoma/cqm-models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecttacoma/cqm-models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecttacoma/cqm-models/teams","hooks_url":"https://api.github.com/repos/projecttacoma/cqm-models/hooks","issue_events_url":"https://api.github.com/repos/projecttacoma/cqm-models/issues/events{/number}","events_url":"https://api.github.com/repos/projecttacoma/cqm-models/events","assignees_url":"https://api.github.com/repos/projecttacoma/cqm-models/assignees{/user}","branches_url":"https://api.github.com/repos/projecttacoma/cqm-models/branches{/branch}","tags_url":"https://api.github.com/repos/projecttacoma/cqm-models/tags","blobs_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecttacoma/cqm-models/statuses/{sha}","languages_url":"https://api.github.com/repos/projecttacoma/cqm-models/languages","stargazers_url":"https://api.github.com/repos/projecttacoma/cqm-models/stargazers","contributors_url":"https://api.github.com/repos/projecttacoma/cqm-models/contributors","subscribers_url":"https://api.github.com/repos/projecttacoma/cqm-models/subscribers","subscription_url":"https://api.github.com/repos/projecttacoma/cqm-models/subscription","commits_url":"https://api.github.com/repos/projecttacoma/cqm-models/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecttacoma/cqm-models/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecttacoma/cqm-models/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecttacoma/cqm-models/contents/{+path}","compare_url":"https://api.github.com/repos/projecttacoma/cqm-models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecttacoma/cqm-models/merges","archive_url":"https://api.github.com/repos/projecttacoma/cqm-models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecttacoma/cqm-models/downloads","issues_url":"https://api.github.com/repos/projecttacoma/cqm-models/issues{/number}","pulls_url":"https://api.github.com/repos/projecttacoma/cqm-models/pulls{/number}","milestones_url":"https://api.github.com/repos/projecttacoma/cqm-models/milestones{/number}","notifications_url":"https://api.github.com/repos/projecttacoma/cqm-models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecttacoma/cqm-models/labels{/name}","releases_url":"https://api.github.com/repos/projecttacoma/cqm-models/releases{/id}","deployments_url":"https://api.github.com/repos/projecttacoma/cqm-models/deployments","created_at":"2018-01-02T16:51:52Z","updated_at":"2018-04-30T15:54:39Z","pushed_at":"2018-05-01T11:48:02Z","git_url":"git://github.com/projecttacoma/cqm-models.git","ssh_url":"git@github.com:projecttacoma/cqm-models.git","clone_url":"https://github.com/projecttacoma/cqm-models.git","svn_url":"https://github.com/projecttacoma/cqm-models","homepage":null,"size":1501,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"projecttacoma:results_object","ref":"results_object","sha":"546346fe3a07e48c13c7de6ee8b09ccb44724327","user":{"login":"projecttacoma","id":5497023,"avatar_url":"https://avatars2.githubusercontent.com/u/5497023?v=4","gravatar_id":"","url":"https://api.github.com/users/projecttacoma","html_url":"https://github.com/projecttacoma","followers_url":"https://api.github.com/users/projecttacoma/followers","following_url":"https://api.github.com/users/projecttacoma/following{/other_user}","gists_url":"https://api.github.com/users/projecttacoma/gists{/gist_id}","starred_url":"https://api.github.com/users/projecttacoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecttacoma/subscriptions","organizations_url":"https://api.github.com/users/projecttacoma/orgs","repos_url":"https://api.github.com/users/projecttacoma/repos","events_url":"https://api.github.com/users/projecttacoma/events{/privacy}","received_events_url":"https://api.github.com/users/projecttacoma/received_events","type":"Organization","site_admin":false},"repo":{"id":116036894,"name":"cqm-models","full_name":"projecttacoma/cqm-models","owner":{"login":"projecttacoma","id":5497023,"avatar_url":"https://avatars2.githubusercontent.com/u/5497023?v=4","gravatar_id":"","url":"https://api.github.com/users/projecttacoma","html_url":"https://github.com/projecttacoma","followers_url":"https://api.github.com/users/projecttacoma/followers","following_url":"https://api.github.com/users/projecttacoma/following{/other_user}","gists_url":"https://api.github.com/users/projecttacoma/gists{/gist_id}","starred_url":"https://api.github.com/users/projecttacoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecttacoma/subscriptions","organizations_url":"https://api.github.com/users/projecttacoma/orgs","repos_url":"https://api.github.com/users/projecttacoma/repos","events_url":"https://api.github.com/users/projecttacoma/events{/privacy}","received_events_url":"https://api.github.com/users/projecttacoma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecttacoma/cqm-models","description":null,"fork":false,"url":"https://api.github.com/repos/projecttacoma/cqm-models","forks_url":"https://api.github.com/repos/projecttacoma/cqm-models/forks","keys_url":"https://api.github.com/repos/projecttacoma/cqm-models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecttacoma/cqm-models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecttacoma/cqm-models/teams","hooks_url":"https://api.github.com/repos/projecttacoma/cqm-models/hooks","issue_events_url":"https://api.github.com/repos/projecttacoma/cqm-models/issues/events{/number}","events_url":"https://api.github.com/repos/projecttacoma/cqm-models/events","assignees_url":"https://api.github.com/repos/projecttacoma/cqm-models/assignees{/user}","branches_url":"https://api.github.com/repos/projecttacoma/cqm-models/branches{/branch}","tags_url":"https://api.github.com/repos/projecttacoma/cqm-models/tags","blobs_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecttacoma/cqm-models/statuses/{sha}","languages_url":"https://api.github.com/repos/projecttacoma/cqm-models/languages","stargazers_url":"https://api.github.com/repos/projecttacoma/cqm-models/stargazers","contributors_url":"https://api.github.com/repos/projecttacoma/cqm-models/contributors","subscribers_url":"https://api.github.com/repos/projecttacoma/cqm-models/subscribers","subscription_url":"https://api.github.com/repos/projecttacoma/cqm-models/subscription","commits_url":"https://api.github.com/repos/projecttacoma/cqm-models/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecttacoma/cqm-models/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecttacoma/cqm-models/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecttacoma/cqm-models/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecttacoma/cqm-models/contents/{+path}","compare_url":"https://api.github.com/repos/projecttacoma/cqm-models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecttacoma/cqm-models/merges","archive_url":"https://api.github.com/repos/projecttacoma/cqm-models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecttacoma/cqm-models/downloads","issues_url":"https://api.github.com/repos/projecttacoma/cqm-models/issues{/number}","pulls_url":"https://api.github.com/repos/projecttacoma/cqm-models/pulls{/number}","milestones_url":"https://api.github.com/repos/projecttacoma/cqm-models/milestones{/number}","notifications_url":"https://api.github.com/repos/projecttacoma/cqm-models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecttacoma/cqm-models/labels{/name}","releases_url":"https://api.github.com/repos/projecttacoma/cqm-models/releases{/id}","deployments_url":"https://api.github.com/repos/projecttacoma/cqm-models/deployments","created_at":"2018-01-02T16:51:52Z","updated_at":"2018-04-30T15:54:39Z","pushed_at":"2018-05-01T11:48:02Z","git_url":"git://github.com/projecttacoma/cqm-models.git","ssh_url":"git@github.com:projecttacoma/cqm-models.git","clone_url":"https://github.com/projecttacoma/cqm-models.git","svn_url":"https://github.com/projecttacoma/cqm-models","homepage":null,"size":1501,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/33"},"html":{"href":"https://github.com/projecttacoma/cqm-models/pull/33"},"issue":{"href":"https://api.github.com/repos/projecttacoma/cqm-models/issues/33"},"comments":{"href":"https://api.github.com/repos/projecttacoma/cqm-models/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projecttacoma/cqm-models/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/projecttacoma/cqm-models/statuses/9ee1224b3da0905ab5e6a43fe71a6310e087e933"}},"author_association":"OWNER"}}
{"actor":{"display_login":"hossenlopp"}}