{"action":"created","issue":{"url":"https://api.github.com/repos/wanghaisheng/OHDSI-Research/issues/4","labels_url":"https://api.github.com/repos/wanghaisheng/OHDSI-Research/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/wanghaisheng/OHDSI-Research/issues/4/comments","events_url":"https://api.github.com/repos/wanghaisheng/OHDSI-Research/issues/4/events","html_url":"https://github.com/wanghaisheng/OHDSI-Research/issues/4","id":55022693,"number":4,"title":"CDM数据模型","user":{"login":"wanghaisheng","id":2363295,"avatar_url":"https://avatars.githubusercontent.com/u/2363295?v=3","gravatar_id":"","url":"https://api.github.com/users/wanghaisheng","html_url":"https://github.com/wanghaisheng","followers_url":"https://api.github.com/users/wanghaisheng/followers","following_url":"https://api.github.com/users/wanghaisheng/following{/other_user}","gists_url":"https://api.github.com/users/wanghaisheng/gists{/gist_id}","starred_url":"https://api.github.com/users/wanghaisheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanghaisheng/subscriptions","organizations_url":"https://api.github.com/users/wanghaisheng/orgs","repos_url":"https://api.github.com/users/wanghaisheng/repos","events_url":"https://api.github.com/users/wanghaisheng/events{/privacy}","received_events_url":"https://api.github.com/users/wanghaisheng/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"wanghaisheng","id":2363295,"avatar_url":"https://avatars.githubusercontent.com/u/2363295?v=3","gravatar_id":"","url":"https://api.github.com/users/wanghaisheng","html_url":"https://github.com/wanghaisheng","followers_url":"https://api.github.com/users/wanghaisheng/followers","following_url":"https://api.github.com/users/wanghaisheng/following{/other_user}","gists_url":"https://api.github.com/users/wanghaisheng/gists{/gist_id}","starred_url":"https://api.github.com/users/wanghaisheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanghaisheng/subscriptions","organizations_url":"https://api.github.com/users/wanghaisheng/orgs","repos_url":"https://api.github.com/users/wanghaisheng/repos","events_url":"https://api.github.com/users/wanghaisheng/events{/privacy}","received_events_url":"https://api.github.com/users/wanghaisheng/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-01-21T14:05:58Z","updated_at":"2015-01-29T13:46:57Z","closed_at":null,"body":"OMOP上的常见查询示例\r\n普通表的\r\nhttp://cdmqueries.omop.org\r\n针对术语的\r\nhttp://vocabqueries.omop.org/home"},"comment":{"url":"https://api.github.com/repos/wanghaisheng/OHDSI-Research/issues/comments/72025906","html_url":"https://github.com/wanghaisheng/OHDSI-Research/issues/4#issuecomment-72025906","issue_url":"https://api.github.com/repos/wanghaisheng/OHDSI-Research/issues/4","id":72025906,"user":{"login":"wanghaisheng","id":2363295,"avatar_url":"https://avatars.githubusercontent.com/u/2363295?v=3","gravatar_id":"","url":"https://api.github.com/users/wanghaisheng","html_url":"https://github.com/wanghaisheng","followers_url":"https://api.github.com/users/wanghaisheng/followers","following_url":"https://api.github.com/users/wanghaisheng/following{/other_user}","gists_url":"https://api.github.com/users/wanghaisheng/gists{/gist_id}","starred_url":"https://api.github.com/users/wanghaisheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanghaisheng/subscriptions","organizations_url":"https://api.github.com/users/wanghaisheng/orgs","repos_url":"https://api.github.com/users/wanghaisheng/repos","events_url":"https://api.github.com/users/wanghaisheng/events{/privacy}","received_events_url":"https://api.github.com/users/wanghaisheng/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T13:46:57Z","updated_at":"2015-01-29T13:46:57Z","body":"## 数据模型的约定\r\n\r\n在CDM中采用了大量的隐式显式的约定做法。开发人员需要理解这样的一些约定。\r\n\r\n###  数据模型的一般约定\r\n\r\nCDM是与平台无关的，数据类型是通过ANSI SQL数据类型(VARCHAR, INTEGER, FLOAT, DATE, TIME, CLOB)来定义的。只有VARCHAR类型才指定了精度。这个精度只是说字符串的最小长度，在CDM中具体实现中可以对其进行扩展。CDM中对日期时间格式并不约束。对于CDM的标准化查询可能因CDM的具体实现、日期时间的配置各异。\r\n\r\n大多数情况下，每个表中都有一个 “_id”字段, 可以在其他表中用作外键。\r\n\r\n#### 字段的一般约定\r\n\r\n不同表中的不同字段名称遵循以下规则:\r\n<table class=\"inline\">\r\n\t<thead>\r\n\t<tr class=\"row0\">\r\n\t\t<th class=\"col0\">标记</th><th class=\"col1\">描述</th>\r\n\t</tr>\r\n\t</thead>\r\n\t<tbody><tr class=\"row1\">\r\n\t\t<td class=\"col0\">&lt;entity&gt;_SOURCE_VALUE</td><td class=\"col1\">Verbatim information from the source data, typically used in ETL to map to CONCEPT_ID, and not to be used by any standard analytics. For example, condition_source_value = ‘787.02’ was the ICD-9 code captured as a diagnosis from the administrative claim</td>\r\n\t</tr>\r\n\t<tr class=\"row2\">\r\n\t\t<td class=\"col0\">&lt;entity&gt;_ID</td><td class=\"col1\">Unique identifiers for key entities, which can serve as foreign keys to establish relationships across entities For example, person_id uniquely identifies each individual. visit_occurrence_id uniquely identifies a PERSON encounter at a point of care.</td>\r\n\t</tr>\r\n\t<tr class=\"row3\">\r\n\t\t<td class=\"col0\">&lt;entity&gt;_CONCEPT_ID</td><td class=\"col1\">Foreign key into the Standardized Vocabularies (i.e. the standard_concept attribute for the corresponding term is true), which serves as the primary basis for all standardized analytics For example, condition_concept_id = 31967 contains reference value for SNOMED concept of ‘Nausea’</td>\r\n\t</tr>\r\n\t<tr class=\"row4\">\r\n\t\t<td class=\"col0\">&lt;entity&gt;_SOURCE_CONCEPT_ID</td><td class=\"col1\">Foreign key into the Standardized Vocabularies representing the concept and terminology used in the source data, when applicable For example, condition_source_concept_id = 35708202 denotes the concept of ‘Nausea’ in the MedDRA terminology; the analogous condition_concept_id might be 31967, since SNOMED-CT is the Standardized Vocabularies for most clinical diagnoses and findings.</td>\r\n\t</tr>\r\n\t<tr class=\"row5\">\r\n\t\t<td class=\"col0\">&lt;entity&gt;_TYPE_CONCEPT_ID</td><td class=\"col1\">Delineates the origin of the source information, standardized within the Standardized Vocabularies For example, drug_type_concept_id can allow analysts to discriminate between ‘Pharmacy dispensing’ and ‘Prescription written’</td>\r\n\t</tr>\r\n</tbody></table>"}}