conceptql 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +226 -117
  3. data/LICENSE +21 -0
  4. data/README.md +35 -83
  5. data/bin/conceptql +2 -1
  6. data/bin/conceptql_utils +6 -0
  7. data/config/multiple_vocabularies.csv +4 -0
  8. data/config/provenance.yml +489 -0
  9. data/config/race.yml +50 -0
  10. data/config/vocabularies.csv +87 -0
  11. data/lib/conceptql/behaviors/code_lister.rb +23 -0
  12. data/lib/conceptql/behaviors/drugish.rb +17 -0
  13. data/lib/conceptql/behaviors/labish.rb +19 -0
  14. data/lib/conceptql/behaviors/metadatable.rb +226 -73
  15. data/lib/conceptql/behaviors/provenanceable.rb +26 -0
  16. data/lib/conceptql/behaviors/single_event.rb +11 -0
  17. data/lib/conceptql/behaviors/timeless.rb +11 -0
  18. data/lib/conceptql/behaviors/utilizable.rb +206 -0
  19. data/lib/conceptql/behaviors/windowable.rb +27 -0
  20. data/lib/conceptql/cli.rb +117 -108
  21. data/lib/conceptql/columnizer.rb +75 -0
  22. data/lib/conceptql/data_model/base.rb +462 -0
  23. data/lib/conceptql/data_model/gdm.rb +155 -0
  24. data/lib/conceptql/data_model/gdm_wide.rb +42 -0
  25. data/lib/conceptql/data_model/omopv4_plus.rb +12 -0
  26. data/lib/conceptql/data_model.rb +30 -0
  27. data/lib/conceptql/database.rb +214 -0
  28. data/lib/conceptql/date_adjuster.rb +66 -18
  29. data/lib/conceptql/diagram.rb +243 -0
  30. data/lib/conceptql/lexicon/lexicon_gdm.rb +47 -0
  31. data/lib/conceptql/lexicon/lexicon_no_db.rb +49 -0
  32. data/lib/conceptql/lexicon/lexicon_ohdsi.rb +63 -0
  33. data/lib/conceptql/lexicon/lexicon_strategy.rb +116 -0
  34. data/lib/conceptql/lexicon.rb +111 -0
  35. data/lib/conceptql/nodifier.rb +65 -24
  36. data/lib/conceptql/operators/after.rb +34 -14
  37. data/lib/conceptql/operators/any_overlap.rb +8 -6
  38. data/lib/conceptql/operators/before.rb +34 -10
  39. data/lib/conceptql/operators/binary_operator_operator.rb +66 -23
  40. data/lib/conceptql/operators/casting_operator.rb +51 -36
  41. data/lib/conceptql/operators/co_reported.rb +111 -0
  42. data/lib/conceptql/operators/concurrent_within.rb +69 -0
  43. data/lib/conceptql/operators/contains.rb +12 -8
  44. data/lib/conceptql/operators/count.rb +17 -9
  45. data/lib/conceptql/operators/date_range.rb +48 -14
  46. data/lib/conceptql/operators/death.rb +14 -4
  47. data/lib/conceptql/operators/dedup.rb +31 -0
  48. data/lib/conceptql/operators/during.rb +7 -12
  49. data/lib/conceptql/operators/episode.rb +146 -0
  50. data/lib/conceptql/operators/equal.rb +9 -3
  51. data/lib/conceptql/operators/ethnicity.rb +49 -0
  52. data/lib/conceptql/operators/except.rb +19 -12
  53. data/lib/conceptql/operators/filter.rb +23 -8
  54. data/lib/conceptql/operators/first.rb +16 -3
  55. data/lib/conceptql/operators/from.rb +52 -4
  56. data/lib/conceptql/operators/gender.rb +34 -11
  57. data/lib/conceptql/operators/hospice.rb +19 -0
  58. data/lib/conceptql/operators/hospitalization.rb +19 -0
  59. data/lib/conceptql/operators/information_periods.rb +36 -0
  60. data/lib/conceptql/operators/invalid.rb +35 -0
  61. data/lib/conceptql/operators/last.rb +16 -3
  62. data/lib/conceptql/operators/match.rb +91 -0
  63. data/lib/conceptql/operators/multiple_vocabularies.rb +172 -0
  64. data/lib/conceptql/operators/numeric.rb +65 -23
  65. data/lib/conceptql/operators/numeric_filter.rb +68 -0
  66. data/lib/conceptql/operators/occurrence.rb +153 -32
  67. data/lib/conceptql/operators/one_in_two_out.rb +237 -38
  68. data/lib/conceptql/operators/operator.rb +624 -178
  69. data/lib/conceptql/operators/pass_thru.rb +17 -3
  70. data/lib/conceptql/operators/person.rb +18 -6
  71. data/lib/conceptql/operators/person_filter.rb +9 -3
  72. data/lib/conceptql/operators/place_of_service_filter.rb +43 -0
  73. data/lib/conceptql/operators/provenance.rb +55 -0
  74. data/lib/conceptql/operators/provider_filter.rb +62 -0
  75. data/lib/conceptql/operators/race.rb +55 -7
  76. data/lib/conceptql/operators/read.rb +168 -0
  77. data/lib/conceptql/operators/recall.rb +49 -14
  78. data/lib/conceptql/operators/snf.rb +19 -0
  79. data/lib/conceptql/operators/sum.rb +29 -12
  80. data/lib/conceptql/operators/temporal_operator.rb +108 -16
  81. data/lib/conceptql/operators/time_window.rb +20 -32
  82. data/lib/conceptql/operators/trim_date.rb +71 -0
  83. data/lib/conceptql/operators/trim_date_end.rb +28 -40
  84. data/lib/conceptql/operators/trim_date_start.rb +28 -41
  85. data/lib/conceptql/operators/union.rb +67 -6
  86. data/lib/conceptql/operators/vocabulary.rb +151 -0
  87. data/lib/conceptql/paths.rb +41 -0
  88. data/lib/conceptql/query.rb +191 -26
  89. data/lib/conceptql/query_modifiers/gdm/admission_date_query_modifier.rb +46 -0
  90. data/lib/conceptql/query_modifiers/gdm/drug_query_modifier.rb +54 -0
  91. data/lib/conceptql/query_modifiers/gdm/lab_query_modifier.rb +57 -0
  92. data/lib/conceptql/query_modifiers/gdm/pos_query_modifier.rb +46 -0
  93. data/lib/conceptql/query_modifiers/gdm/provenance_query_modifier.rb +45 -0
  94. data/lib/conceptql/query_modifiers/gdm/provider_query_modifier.rb +53 -0
  95. data/lib/conceptql/query_modifiers/gdm_wide/admission_date_query_modifier.rb +42 -0
  96. data/lib/conceptql/query_modifiers/gdm_wide/drug_query_modifier.rb +52 -0
  97. data/lib/conceptql/query_modifiers/gdm_wide/lab_query_modifier.rb +55 -0
  98. data/lib/conceptql/query_modifiers/gdm_wide/pos_query_modifier.rb +37 -0
  99. data/lib/conceptql/query_modifiers/gdm_wide/provenance_query_modifier.rb +38 -0
  100. data/lib/conceptql/query_modifiers/omopv4_plus/admission_date_query_modifier.rb +45 -0
  101. data/lib/conceptql/query_modifiers/omopv4_plus/drug_query_modifier.rb +80 -0
  102. data/lib/conceptql/query_modifiers/omopv4_plus/pos_query_modifier.rb +47 -0
  103. data/lib/conceptql/query_modifiers/omopv4_plus/provenance_query_modifier.rb +45 -0
  104. data/lib/conceptql/query_modifiers/omopv4_plus/provider_query_modifier.rb +26 -0
  105. data/lib/conceptql/query_modifiers/query_modifier.rb +20 -0
  106. data/lib/conceptql/rdbms/duckdb.rb +25 -0
  107. data/lib/conceptql/rdbms/generic.rb +120 -0
  108. data/lib/conceptql/rdbms/postgres.rb +51 -0
  109. data/lib/conceptql/rdbms/spark.rb +22 -0
  110. data/lib/conceptql/rdbms.rb +22 -0
  111. data/lib/conceptql/scope.rb +481 -31
  112. data/lib/conceptql/sql_formatters/formatter.rb +25 -0
  113. data/lib/conceptql/sql_formatters.rb +22 -0
  114. data/lib/conceptql/utils.rb +113 -0
  115. data/lib/conceptql/utils_cli.rb +17 -0
  116. data/lib/conceptql/version.rb +3 -1
  117. data/lib/conceptql/visitors/metadata_extractor.rb +54 -0
  118. data/lib/conceptql/vocabularies/behaviors/costish.rb +24 -0
  119. data/lib/conceptql/vocabularies/behaviors/gdmish.rb +19 -0
  120. data/lib/conceptql/vocabularies/behaviors/omopish.rb +32 -0
  121. data/lib/conceptql/vocabularies/dynamic_vocabularies.rb +63 -0
  122. data/lib/conceptql/vocabularies/entry.rb +138 -0
  123. data/lib/conceptql/vocabularies/vocabulary_class_factory.rb +85 -0
  124. data/lib/conceptql/window/base.rb +26 -0
  125. data/lib/conceptql/window/date_range.rb +25 -0
  126. data/lib/conceptql/window/table.rb +116 -0
  127. data/lib/conceptql/window.rb +72 -0
  128. data/lib/conceptql.rb +65 -2
  129. data/lib/sequel/extensions/pg_ctas_explain.rb +22 -0
  130. data/lib/sequel/extensions/pg_vacuum_table.rb +23 -0
  131. data/schemas/gdm.yml +882 -0
  132. data/schemas/gdm_wide.yml +757 -0
  133. data/schemas/ohdsi_vocabs.yml +143 -0
  134. data/schemas/omopv4_plus.yml +729 -0
  135. data/schemas/omopv4_plus_more_ignorables.tsv +13 -0
  136. metadata +267 -207
  137. data/.gitignore +0 -23
  138. data/Gemfile +0 -4
  139. data/Guardfile +0 -56
  140. data/LICENSE.txt +0 -22
  141. data/Rakefile +0 -1
  142. data/conceptql.gemspec +0 -32
  143. data/doc/ConceptQL Specification (alpha).pdf +0 -0
  144. data/doc/diagram_0.png +0 -0
  145. data/doc/implementation_notes.md +0 -39
  146. data/doc/spec.md +0 -1344
  147. data/lib/conceptql/behaviors/debuggable.rb +0 -70
  148. data/lib/conceptql/behaviors/dottable.rb +0 -103
  149. data/lib/conceptql/behaviors/preppable.rb +0 -20
  150. data/lib/conceptql/converter.rb +0 -65
  151. data/lib/conceptql/debugger.rb +0 -48
  152. data/lib/conceptql/fake_grapher.rb +0 -20
  153. data/lib/conceptql/graph.rb +0 -52
  154. data/lib/conceptql/graph_nodifier.rb +0 -203
  155. data/lib/conceptql/logger.rb +0 -10
  156. data/lib/conceptql/operators/complement.rb +0 -38
  157. data/lib/conceptql/operators/concept.rb +0 -70
  158. data/lib/conceptql/operators/condition_type.rb +0 -71
  159. data/lib/conceptql/operators/cpt.rb +0 -25
  160. data/lib/conceptql/operators/drug_type_concept.rb +0 -21
  161. data/lib/conceptql/operators/from_seer_visits.rb +0 -23
  162. data/lib/conceptql/operators/hcpcs.rb +0 -25
  163. data/lib/conceptql/operators/icd10.rb +0 -28
  164. data/lib/conceptql/operators/icd9.rb +0 -28
  165. data/lib/conceptql/operators/icd9_procedure.rb +0 -25
  166. data/lib/conceptql/operators/intersect.rb +0 -34
  167. data/lib/conceptql/operators/loinc.rb +0 -25
  168. data/lib/conceptql/operators/medcode.rb +0 -28
  169. data/lib/conceptql/operators/medcode_procedure.rb +0 -27
  170. data/lib/conceptql/operators/ndc.rb +0 -29
  171. data/lib/conceptql/operators/observation_by_enttype.rb +0 -29
  172. data/lib/conceptql/operators/observation_period.rb +0 -30
  173. data/lib/conceptql/operators/overlapped_by.rb +0 -23
  174. data/lib/conceptql/operators/overlaps.rb +0 -19
  175. data/lib/conceptql/operators/place_of_service_code.rb +0 -24
  176. data/lib/conceptql/operators/procedure_occurrence.rb +0 -25
  177. data/lib/conceptql/operators/prodcode.rb +0 -29
  178. data/lib/conceptql/operators/rxnorm.rb +0 -24
  179. data/lib/conceptql/operators/snomed.rb +0 -24
  180. data/lib/conceptql/operators/snomed_condition.rb +0 -26
  181. data/lib/conceptql/operators/source_vocabulary_operator.rb +0 -58
  182. data/lib/conceptql/operators/standard_vocabulary_operator.rb +0 -45
  183. data/lib/conceptql/operators/started_by.rb +0 -22
  184. data/lib/conceptql/operators/to_seer_visits.rb +0 -24
  185. data/lib/conceptql/operators/visit.rb +0 -15
  186. data/lib/conceptql/operators/visit_occurrence.rb +0 -30
  187. data/lib/conceptql/tree.rb +0 -53
  188. data/lib/conceptql/utils/temp_table.rb +0 -72
  189. data/spec/conceptql/behaviors/dottable_spec.rb +0 -99
  190. data/spec/conceptql/converter_spec.rb +0 -51
  191. data/spec/conceptql/date_adjuster_spec.rb +0 -68
  192. data/spec/conceptql/operators/after_spec.rb +0 -16
  193. data/spec/conceptql/operators/before_spec.rb +0 -16
  194. data/spec/conceptql/operators/casting_operator_spec.rb +0 -68
  195. data/spec/conceptql/operators/complement_spec.rb +0 -15
  196. data/spec/conceptql/operators/concept_spec.rb +0 -40
  197. data/spec/conceptql/operators/condition_type_spec.rb +0 -128
  198. data/spec/conceptql/operators/contains_spec.rb +0 -19
  199. data/spec/conceptql/operators/cpt_spec.rb +0 -29
  200. data/spec/conceptql/operators/date_range_spec.rb +0 -33
  201. data/spec/conceptql/operators/death_spec.rb +0 -10
  202. data/spec/conceptql/operators/during_spec.rb +0 -30
  203. data/spec/conceptql/operators/except_spec.rb +0 -15
  204. data/spec/conceptql/operators/first_spec.rb +0 -35
  205. data/spec/conceptql/operators/from_spec.rb +0 -13
  206. data/spec/conceptql/operators/gender_spec.rb +0 -27
  207. data/spec/conceptql/operators/hcpcs_spec.rb +0 -29
  208. data/spec/conceptql/operators/icd10_spec.rb +0 -34
  209. data/spec/conceptql/operators/icd9_procedure_spec.rb +0 -29
  210. data/spec/conceptql/operators/icd9_spec.rb +0 -34
  211. data/spec/conceptql/operators/intersect_spec.rb +0 -28
  212. data/spec/conceptql/operators/last_spec.rb +0 -36
  213. data/spec/conceptql/operators/loinc_spec.rb +0 -29
  214. data/spec/conceptql/operators/medcode_procedure_spec.rb +0 -34
  215. data/spec/conceptql/operators/medcode_spec.rb +0 -34
  216. data/spec/conceptql/operators/observation_period_spec.rb +0 -10
  217. data/spec/conceptql/operators/occurrence_spec.rb +0 -87
  218. data/spec/conceptql/operators/overlapped_by_spec.rb +0 -32
  219. data/spec/conceptql/operators/overlaps_spec.rb +0 -21
  220. data/spec/conceptql/operators/person_filter_spec.rb +0 -15
  221. data/spec/conceptql/operators/person_spec.rb +0 -10
  222. data/spec/conceptql/operators/place_of_service_code_spec.rb +0 -24
  223. data/spec/conceptql/operators/procedure_occurrence_spec.rb +0 -10
  224. data/spec/conceptql/operators/prodcode_spec.rb +0 -35
  225. data/spec/conceptql/operators/query_double.rb +0 -20
  226. data/spec/conceptql/operators/query_double_spec.rb +0 -7
  227. data/spec/conceptql/operators/race_spec.rb +0 -21
  228. data/spec/conceptql/operators/rxnorm_spec.rb +0 -29
  229. data/spec/conceptql/operators/snomed_spec.rb +0 -29
  230. data/spec/conceptql/operators/source_vocabulary_operator_spec.rb +0 -35
  231. data/spec/conceptql/operators/standard_vocabulary_operator_spec.rb +0 -35
  232. data/spec/conceptql/operators/started_by_spec.rb +0 -22
  233. data/spec/conceptql/operators/temporal_operator_spec.rb +0 -51
  234. data/spec/conceptql/operators/time_window_spec.rb +0 -77
  235. data/spec/conceptql/operators/union_spec.rb +0 -21
  236. data/spec/conceptql/operators/visit_occurrence_spec.rb +0 -10
  237. data/spec/conceptql/query_spec.rb +0 -22
  238. data/spec/conceptql/tree_spec.rb +0 -50
  239. data/spec/doubles/stream_for_casting_double.rb +0 -9
  240. data/spec/doubles/stream_for_occurrence_double.rb +0 -25
  241. data/spec/doubles/stream_for_temporal_double.rb +0 -6
  242. data/spec/spec_helper.rb +0 -102
data/schemas/gdm.yml ADDED
@@ -0,0 +1,882 @@
1
+ ---
2
+ :patients:
3
+ :columns:
4
+ :id:
5
+ :type: :Bigint
6
+ :primary_key: true
7
+ :comment: Surrogate key for record
8
+ :null: false
9
+ :gender_concept_id:
10
+ :type: :Bigint
11
+ :comment:
12
+ FK reference to the [concepts](#concepts) table for the unique gender
13
+ of the patient
14
+ :foreign_key: concepts
15
+ :birth_date:
16
+ :type: Date
17
+ :comment: Date of birth (yyyy-mm-dd)
18
+ :race_concept_id:
19
+ :type: :Bigint
20
+ :comment:
21
+ FK reference to the [concepts](#concepts) table for the unique race
22
+ of the patient
23
+ :foreign_key: concepts
24
+ :ethnicity_concept_id:
25
+ :type: :Bigint
26
+ :comment:
27
+ FK reference to the [concepts](#concepts) table for the ethnicity
28
+ of the patient
29
+ :foreign_key: concepts
30
+ :address_id:
31
+ :type: :Bigint
32
+ :comment:
33
+ FK reference to the place of residency for the patient in the location
34
+ table, where the detailed address information is stored
35
+ :foreign_key: addresses
36
+ :practitioner_id:
37
+ :type: :Bigint
38
+ :comment:
39
+ FK reference to the primary care practitioner the patient is seeing
40
+ in the [practitioners](#practitioners) table
41
+ :foreign_key: practitioners
42
+ :patient_id_source_value:
43
+ :type: String
44
+ :comment: Originial patient identifier defined in the source data
45
+ :null: false
46
+ :patient_details:
47
+ :columns:
48
+ :id:
49
+ :type: :Bigint
50
+ :primary_key: true
51
+ :comment: Surrogate key for record
52
+ :null: false
53
+ :patient_id:
54
+ :type: :Bigint
55
+ :comment: FK reference to [patients](#patients) table
56
+ :foreign_key: patients
57
+ :null: false
58
+ :start_date:
59
+ :type: Date
60
+ :comment: Start date of record (yyyy-mm-dd)
61
+ :null: false
62
+ :end_date:
63
+ :type: Date
64
+ :comment: Start date of record (yyyy-mm-dd)
65
+ :value_as_number:
66
+ :type: Float
67
+ :comment:
68
+ The patient detail result stored as a number, applicable to patient
69
+ detail where the result is expressed as a numeric value
70
+ :value_as_string:
71
+ :type: String
72
+ :comment:
73
+ The patient detail result stored as a string, applicable to patient
74
+ details where the result is expressed as verbatim text
75
+ :value_as_concept_id:
76
+ :type: :Bigint
77
+ :comment:
78
+ FK reference to [concepts](#concepts) table for the result associated
79
+ with the patient detail
80
+ :foreign_key: concepts
81
+ :patient_detail_concept_id:
82
+ :type: :Bigint
83
+ :comment:
84
+ FK reference to [concepts](#concepts) table for the code assigned
85
+ to the record
86
+ :foreign_key: concepts
87
+ :null: false
88
+ :patient_detail_source_value:
89
+ :type: String
90
+ :comment: Source code from raw data
91
+ :null: false
92
+ :patient_detail_vocabulary_id:
93
+ :type: String
94
+ :comment: Vocabulary the patient detail comes from
95
+ :foreign_key: vocabularies
96
+ :null: false
97
+ :practitioners:
98
+ :columns:
99
+ :id:
100
+ :type: :Bigint
101
+ :primary_key: true
102
+ :comment: Surrogate key for record
103
+ :null: false
104
+ :practitioner_name:
105
+ :type: String
106
+ :comment: Practitioner's name, if available
107
+ :primary_identifier:
108
+ :type: String
109
+ :comment: Primary practitioner identifier
110
+ :null: false
111
+ :primary_identifier_type:
112
+ :type: String
113
+ :comment:
114
+ Type of identifier specified in primary identifier field (UPIN, NPI,
115
+ etc)
116
+ :null: false
117
+ :secondary_identifier:
118
+ :type: String
119
+ :comment: Secondary practitioner identifier (Optional)
120
+ :secondary_identifier_type:
121
+ :type: String
122
+ :comment:
123
+ Type of identifier specified in secondary identifier field (UPIN,
124
+ NPI, etc)
125
+ :specialty_concept_id:
126
+ :type: :Bigint
127
+ :comment:
128
+ FK reference to an identifier in the [concepts](#concepts) table for
129
+ specialty
130
+ :foreign_key: concepts
131
+ :address_id:
132
+ :type: :Bigint
133
+ :comment:
134
+ FK reference to the address of the location where the practitioner
135
+ is practicing
136
+ :foreign_key: addresses
137
+ :birth_date:
138
+ :type: Date
139
+ :comment: Date of birth (yyyy-mm-dd)
140
+ :gender_concept_id:
141
+ :type: :Bigint
142
+ :comment:
143
+ FK reference to an identifier in the [concepts](#concepts) table for
144
+ the unique gender of the practitioner
145
+ :foreign_key: concepts
146
+ :facilities:
147
+ :columns:
148
+ :id:
149
+ :type: :Bigint
150
+ :primary_key: true
151
+ :comment: Surrogate key for record
152
+ :null: false
153
+ :facility_name:
154
+ :type: String
155
+ :comment: Facility name, if available
156
+ :primary_identifier:
157
+ :type: String
158
+ :comment: Primary facility identifier
159
+ :null: false
160
+ :primary_identifier_type:
161
+ :type: String
162
+ :comment:
163
+ Type of identifier specified in primary identifier field (UPIN, NPI,
164
+ etc)
165
+ :null: false
166
+ :secondary_identifier:
167
+ :type: String
168
+ :comment: Secondary facility identifier (Optional)
169
+ :secondary_identifier_type:
170
+ :type: String
171
+ :comment:
172
+ Type of identifier specified in secondary identifier field (UPIN,
173
+ NPI, etc)
174
+ :facility_type_concept_id:
175
+ :type: :Bigint
176
+ :comment:
177
+ FK reference to [concepts](#concepts) table representing the facility
178
+ type
179
+ :foreign_key: concepts
180
+ :specialty_concept_id:
181
+ :type: :Bigint
182
+ :comment:
183
+ A foreign key to an identifier in the [concepts](#concepts) table
184
+ for specialty
185
+ :foreign_key: concepts
186
+ :address_id:
187
+ :type: :Bigint
188
+ :comment: A foreign key to the address of the location of the facility
189
+ :foreign_key: addresses
190
+ :collections:
191
+ :columns:
192
+ :id:
193
+ :type: :Bigint
194
+ :primary_key: true
195
+ :comment: Surrogate key for record
196
+ :null: false
197
+ :patient_id:
198
+ :type: :Bigint
199
+ :comment: FK to reference to [patients](#patients) table
200
+ :foreign_key: patients
201
+ :null: false
202
+ :start_date:
203
+ :type: Date
204
+ :comment: Start date of record (yyyy-mm-dd)
205
+ :null: false
206
+ :end_date:
207
+ :type: Date
208
+ :comment: End date of record (yyyy-mm-dd)
209
+ :null: false
210
+ :duration:
211
+ :type: Float
212
+ :comment: Duration of collection. (e.g. hospitalization length of stay)
213
+ :duration_unit_concept_id:
214
+ :type: :Bigint
215
+ :comment:
216
+ FK reference to [concepts](#concepts) table representing the unit
217
+ of duration (hours, days, weeks etc.)
218
+ :facility_id:
219
+ :type: :Bigint
220
+ :comment: FK reference to [facilities](#facilities) table
221
+ :foreign_key: facilities
222
+ :admission_detail_id:
223
+ :type: :Bigint
224
+ :comment: FK reference to [admission_details](#admission_details) table
225
+ :foreign_key: admission_details
226
+ :collection_type_concept_id:
227
+ :type: :Bigint
228
+ :comment:
229
+ FK reference to [concepts](#concepts) table representing the type
230
+ of collection this record represents
231
+ :foreign_key: concepts
232
+ :contexts_practitioners:
233
+ :columns:
234
+ :context_id:
235
+ :type: :Bigint
236
+ :comment: FK reference to [contexts](#contexts) table
237
+ :foreign_key: contexts
238
+ :null: false
239
+ :practitioner_id:
240
+ :type: :Bigint
241
+ :comment: FK reference to [practitioners](#practitioners) table
242
+ :foreign_key: practitioners
243
+ :null: false
244
+ :role_type_concept_id:
245
+ :type: :Bigint
246
+ :comment:
247
+ FK reference to the [concepts](#concepts) table representing roles
248
+ [practitioners](#practitioners) can play in an encounter
249
+ :foreign_key: concepts
250
+ :specialty_type_concept_id:
251
+ :type: :Bigint
252
+ :comment:
253
+ FK reference to [concepts](#concepts) table representing the practitioner's
254
+ specialty type for the services/diagnoses associated with this record
255
+ :foreign_key: concepts
256
+ :contexts:
257
+ :columns:
258
+ :id:
259
+ :type: :Bigint
260
+ :primary_key: true
261
+ :comment: Surrogate key for record
262
+ :null: false
263
+ :collection_id:
264
+ :type: :Bigint
265
+ :comment: FK reference to [collections](#collections) table
266
+ :foreign_key: collections
267
+ :null: false
268
+ :patient_id:
269
+ :type: :Bigint
270
+ :comment: FK to reference to [patients](#patients) table
271
+ :foreign_key: patients
272
+ :null: false
273
+ :start_date:
274
+ :type: Date
275
+ :comment: Start date of record (yyyy-mm-dd)
276
+ :null: false
277
+ :end_date:
278
+ :type: Date
279
+ :comment: End date of record (yyyy-mm-dd)
280
+ :facility_id:
281
+ :type: :Bigint
282
+ :comment: FK reference to [facilities](#facilities) table
283
+ :foreign_key: facilities
284
+ :care_site_type_concept_id:
285
+ :type: :Bigint
286
+ :comment:
287
+ FK reference to [concepts](#concepts) table representing the care
288
+ site type within the facility
289
+ :foreign_key: concepts
290
+ :pos_concept_id:
291
+ :type: :Bigint
292
+ :comment:
293
+ FK reference to [concepts](#concepts) table representing the place
294
+ of service associated with this record
295
+ :foreign_key: concepts
296
+ :source_type_concept_id:
297
+ :type: :Bigint
298
+ :comment:
299
+ FK reference to [concepts](#concepts) table representing the file
300
+ name (e.g MEDPAR). If data represents a subset of a file, concatenate the
301
+ name of the file used and subset (e.g MEDPAR_SNF)
302
+ :foreign_key: concepts
303
+ :null: false
304
+ :service_specialty_type_concept_id:
305
+ :type: :Bigint
306
+ :comment:
307
+ FK reference to [concepts](#concepts) table representing the specialty
308
+ type for the services/diagnoses associated with this record
309
+ :foreign_key: concepts
310
+ :record_type_concept_id:
311
+ :type: :Bigint
312
+ :comment:
313
+ FK reference to [concepts](#concepts) table representing the type
314
+ of [contexts](#contexts) the record represents (line, claim, etc.)
315
+ :foreign_key: concepts
316
+ :null: false
317
+ :clinical_codes:
318
+ :columns:
319
+ :id:
320
+ :type: :Bigint
321
+ :primary_key: true
322
+ :comment: Surrogate key for record
323
+ :null: false
324
+ :collection_id:
325
+ :type: :Bigint
326
+ :comment: FK reference to [collections](#collections) table
327
+ :foreign_key: collections
328
+ :null: false
329
+ :context_id:
330
+ :type: :Bigint
331
+ :comment: FK reference to [contexts](#contexts) table
332
+ :foreign_key: contexts
333
+ :null: false
334
+ :patient_id:
335
+ :type: :Bigint
336
+ :comment: FK reference to [patients](#patients) table
337
+ :foreign_key: patients
338
+ :null: false
339
+ :start_date:
340
+ :type: Date
341
+ :comment: Start date of record (yyyy-mm-dd)
342
+ :null: false
343
+ :end_date:
344
+ :type: Date
345
+ :comment: End date of record (yyyy-mm-dd)
346
+ :null: false
347
+ :clinical_code_concept_id:
348
+ :type: :Bigint
349
+ :comment:
350
+ FK reference to [concepts](#concepts) table for the code assigned
351
+ to the record
352
+ :foreign_key: concepts
353
+ :null: false
354
+ :quantity:
355
+ :type: :Bigint
356
+ :comment: Quantity, if available (e.g., procedures)
357
+ :seq_num:
358
+ :type: Integer
359
+ :comment:
360
+ The sequence number for the variable assigned (e.g. dx3 gets sequence
361
+ number 3)
362
+ :provenance_concept_id:
363
+ :type: :Bigint
364
+ :comment:
365
+ "Additional type information (ex: primary, admitting, problem list,
366
+ etc)"
367
+ :foreign_key: concepts
368
+ :clinical_code_source_value:
369
+ :type: String
370
+ :comment: Source code from raw data
371
+ :null: false
372
+ :clinical_code_vocabulary_id:
373
+ :type: String
374
+ :comment: FK reference to the vocabulary the clinical code comes from
375
+ :foreign_key: vocabularies
376
+ :null: false
377
+ :measurement_detail_id:
378
+ :type: :Bigint
379
+ :comment: FK reference to [measurement_details](#measurement_details) table
380
+ :foreign_key: measurement_details
381
+ :drug_exposure_detail_id:
382
+ :type: :Bigint
383
+ :comment: FK reference to [drug_exposure_details](#drug_exposure_details) table
384
+ :foreign_key: drug_exposure_details
385
+ :measurement_details:
386
+ :columns:
387
+ :id:
388
+ :type: :Bigint
389
+ :primary_key: true
390
+ :comment: Surrogate key for record
391
+ :null: false
392
+ :patient_id:
393
+ :type: :Bigint
394
+ :comment: FK reference to [patients](#patients) table
395
+ :foreign_key: patients
396
+ :null: false
397
+ :result_as_number:
398
+ :type: Float
399
+ :comment:
400
+ The observation result stored as a number, applicable to observations
401
+ where the result is expressed as a numeric value
402
+ :result_as_string:
403
+ :type: String
404
+ :comment:
405
+ The observation result stored as a string, applicable to observations
406
+ where the result is expressed as verbatim text
407
+ :result_as_concept_id:
408
+ :type: :Bigint
409
+ :comment:
410
+ FK reference to [concepts](#concepts) table for the result associated
411
+ with the detail_concept_id (e.g., positive/negative, present/absent, low/high,
412
+ etc.)
413
+ :foreign_key: concepts
414
+ :result_modifier_concept_id:
415
+ :type: :Bigint
416
+ :comment:
417
+ FK reference to [concepts](#concepts) table for result modifier (=,
418
+ <, >, etc.)
419
+ :foreign_key: concepts
420
+ :unit_concept_id:
421
+ :type: :Bigint
422
+ :comment:
423
+ FK reference to [concepts](#concepts) table for the measurement units
424
+ (e.g., mmol/L, mg/dL, etc.)
425
+ :foreign_key: concepts
426
+ :normal_range_low:
427
+ :type: Float
428
+ :comment: Lower bound of the normal reference range assigned by the laboratory
429
+ :normal_range_high:
430
+ :type: Float
431
+ :comment: Upper bound of the normal reference range assigned by the laboratory
432
+ :normal_range_low_modifier_concept_id:
433
+ :type: :Bigint
434
+ :comment:
435
+ FK reference to [concepts](#concepts) table for result modifier (=,
436
+ <, >, etc.)
437
+ :foreign_key: concepts
438
+ :normal_range_high_modifier_concept_id:
439
+ :type: :Bigint
440
+ :comment:
441
+ FK reference to [concepts](#concepts) table for result modifier (=,
442
+ <, >, etc.)
443
+ :foreign_key: concepts
444
+ :drug_exposure_details:
445
+ :columns:
446
+ :id:
447
+ :type: :Bigint
448
+ :primary_key: true
449
+ :comment: Surrogate key for record
450
+ :null: false
451
+ :patient_id:
452
+ :type: :Bigint
453
+ :comment: FK to reference to [patients](#patients) table
454
+ :foreign_key: patients
455
+ :null: false
456
+ :refills:
457
+ :type: Integer
458
+ :comment:
459
+ The number of refills after the initial prescription; the initial
460
+ prescription is not counted (i.e., values start with 0)
461
+ :days_supply:
462
+ :type: Integer
463
+ :comment:
464
+ The number of days of supply as recorded in the original prescription
465
+ or dispensing record
466
+ :number_per_day:
467
+ :type: Float
468
+ :comment: The number of pills taken per day
469
+ :dose_form_concept_id:
470
+ :type: :Bigint
471
+ :comment:
472
+ FK reference to [concepts](#concepts) table for the form of the drug
473
+ (capsule, injection, etc.)
474
+ :foreign_key: concepts
475
+ :dose_unit_concept_id:
476
+ :type: :Bigint
477
+ :comment:
478
+ FK reference to [concepts](#concepts) table for the units in which
479
+ the dose_value is expressed
480
+ :foreign_key: concepts
481
+ :route_concept_id:
482
+ :type: :Bigint
483
+ :comment:
484
+ FK reference to [concepts](#concepts) table for route in which drug
485
+ is given
486
+ :foreign_key: concepts
487
+ :dose_value:
488
+ :type: Float
489
+ :comment: Numeric value for the dose of the drug
490
+ :strength_source_value:
491
+ :type: String
492
+ :comment:
493
+ Drug strength as reported in the raw data. This can include both dose
494
+ value and units
495
+ :ingredient_source_value:
496
+ :type: String
497
+ :comment: Ingredient/Generic name of drug as reported in the raw data
498
+ :drug_name_source_value:
499
+ :type: String
500
+ :comment: Product/Brand name of drug as reported in the raw data
501
+ :payer_reimbursements:
502
+ :columns:
503
+ :id:
504
+ :type: :Bigint
505
+ :primary_key: true
506
+ :comment: Surrogate key for record
507
+ :context_id:
508
+ :type: :Bigint
509
+ :comment: FK reference to context table
510
+ :foreign_key: contexts
511
+ :null: false
512
+ :patient_id:
513
+ :type: :Bigint
514
+ :comment: FK to reference to [patients](#patients) table
515
+ :foreign_key: patients
516
+ :null: false
517
+ :clinical_code_id:
518
+ :type: :Bigint
519
+ :comment:
520
+ FK reference to [clinical_codes](#clinical_codes) table to be used
521
+ if a specific code is the direct cause for the reimbursement
522
+ :foreign_key: clinical_codes
523
+ :currency_concept_id:
524
+ :type: :Bigint
525
+ :comment:
526
+ FK reference to [concepts](#concepts) table for the 3-letter code
527
+ used to delineate international currencies (e.g., USD = US Dollar)
528
+ :foreign_key: concepts
529
+ :null: false
530
+ :total_charged:
531
+ :type: Float
532
+ :comment:
533
+ The total amount charged by the provider of the good/service (e.g.
534
+ hospital, physician pharmacy, dme provider) billed to a payer. This information
535
+ is usually provided in claims data.
536
+ :total_paid:
537
+ :type: Float
538
+ :comment:
539
+ "The total amount paid from all payers for the expenses of the service/device/drug.
540
+ This field is calculated using the following formula: paid_by_payer + paid_by_patient
541
+ + paid_by_primary. In claims data, this field is considered the calculated
542
+ field the payer expects the provider to get reimbursed for the service/device/drug
543
+ from the payer and from the patient, based on the payer's contractual obligations."
544
+ :paid_by_payer:
545
+ :type: Float
546
+ :comment:
547
+ "The amount paid by the Payer for the service/device/drug. In claims
548
+ data, generally there is one field representing the total payment from the
549
+ payer for the service/device/drug. However, this field could be a calculated
550
+ field if the source data provides separate payment information for the ingredient
551
+ cost and the dispensing fee. If the paid_ingredient_cost or paid_dispensing_fee
552
+ fields are populated with nonzero values, the paid_by_payer field is calculated
553
+ using the following formula: paid_ingredient_cost + paid_dispensing_fee. If
554
+ there is more than one Payer in the source data, several cost records indicate
555
+ that fact. The Payer reporting this reimbursement should be indicated under
556
+ the payer_plan_id field."
557
+ :paid_by_patient:
558
+ :type: Float
559
+ :comment:
560
+ "The total amount paid by the patient as a share of the expenses.
561
+ This field is most often used in claims data to report the contracted amount
562
+ the patient is responsible for reimbursing the provider for said service/device/drug.
563
+ This is a calculated field using the following formula: paid_patient_copay
564
+ + paid_patient_coinsurance + paid_patient_deductible. If the source data has
565
+ actual patient payments (e.g. the patient payment is not a derivative of the
566
+ payer claim and there is verification the patient paid an amount to the provider),
567
+ then the patient payment should have it's own cost record with a payer_plan_id
568
+ set to 0 to indicate the payer is actually the patient, and the actual patient
569
+ payment should be noted under the total_paid field. The paid_by_patient field
570
+ is only used for reporting a patient's responsibility reported on an insurance
571
+ claim."
572
+ :paid_patient_copay:
573
+ :type: Float
574
+ :comment:
575
+ The amount paid by the patient as a fixed contribution to the expenses.
576
+ paid_patient_copay does contribute to the paid_by_patient variable. The paid_patient_copay
577
+ field is only used for reporting a patient's copay amount reported on an insurance
578
+ claim.
579
+ :paid_patient_coinsurance:
580
+ :type: Float
581
+ :comment:
582
+ The amount paid by the patient as a joint assumption of risk. Typically,
583
+ this is a percentage of the expenses defined by the Payer Plan after the patient's
584
+ deductible is exceeded. paid_patient_coinsurance does contribute to the paid_by_patient
585
+ variable. The paid_patient_coinsurance field is only used for reporting a
586
+ patient's coinsurance amount reported on an insurance claim.
587
+ :paid_patient_deductible:
588
+ :type: Float
589
+ :comment:
590
+ The amount paid by the patient that is counted toward the deductible
591
+ defined by the Payer Plan. paid_patient_deductible does contribute to the
592
+ paid_by_patient variable. The paid_patient_deductible field is only used for
593
+ reporting a patient's deductible amount reported on an insurance claim.
594
+ :paid_by_primary:
595
+ :type: Float
596
+ :comment:
597
+ The amount paid by a primary Payer through the coordination of benefits.
598
+ paid_by_primary does contribute to the total_paid variable. The paid_by_primary
599
+ field is only used for reporting a patient's primary insurance payment amount
600
+ reported on the secondary payer insurance claim. If the source data has actual
601
+ primary insurance payments (e.g. the primary insurance payment is not a derivative
602
+ of the payer claim and there is verification another insurance company paid
603
+ an amount to the provider), then the primary insurance payment should have
604
+ it's own cost record with a payer_plan_id set to the applicable payer, and
605
+ the actual primary insurance payment should be noted under the paid_by_payer
606
+ field.
607
+ :paid_ingredient_cost:
608
+ :type: Float
609
+ :comment:
610
+ The amount paid by the Payer to a pharmacy for the drug, excluding
611
+ the amount paid for dispensing the drug. paid_ingredient_cost contributes
612
+ to the paid_by_payer field if this field is populated with a nonzero value.
613
+ :paid_dispensing_fee:
614
+ :type: Float
615
+ :comment:
616
+ The amount paid by the Payer to a pharmacy for dispensing a drug,
617
+ excluding the amount paid for the drug ingredient. paid_dispensing_fee contributes
618
+ to the paid_by_payer field if this field is populated with a nonzero value.
619
+ :information_period_id:
620
+ :type: :Bigint
621
+ :comment: FK reference to the [information_periods](#information_periods) table
622
+ :amount_allowed:
623
+ :type: Float
624
+ :comment:
625
+ "The contracted amount agreed between the payer and provider. This
626
+ information is generally available in claims data. This is similar to the
627
+ total_paid amount in that it shows what the payer expects the provider to
628
+ be reimbursed after the payer and patient pay. This differs from the total_paid
629
+ amount in that it is not a calculated field, but a field available directly
630
+ in claims data. Use case: This will capture non-covered services. Non-covered
631
+ services are indicated by an amount allowed and patient responsibility variables
632
+ (copay, coinsurance, deductible) will be equal $0 in the source data. This
633
+ means the patient is responsible for the total_charged value. The amount_allowed
634
+ field is payer specific and the payer should be indicated by the payer_plan_id
635
+ field."
636
+ :costs:
637
+ :columns:
638
+ :id:
639
+ :type: :Bigint
640
+ :primary_key: true
641
+ :comment: Surrogate key for record
642
+ :null: false
643
+ :context_id:
644
+ :type: :Bigint
645
+ :comment: FK reference to context table
646
+ :foreign_key: contexts
647
+ :null: false
648
+ :patient_id:
649
+ :type: :Bigint
650
+ :comment: FK reference to [patients](#patients) table
651
+ :foreign_key: patients
652
+ :null: false
653
+ :clinical_code_id:
654
+ :type: :Bigint
655
+ :comment:
656
+ FK reference to [clinical_codes](#clinical_codes) table to be used
657
+ if a specific code is the direct cause for the reimbursement
658
+ :foreign_key: clinical_codes
659
+ :currency_concept_id:
660
+ :type: :Bigint
661
+ :comment:
662
+ FK reference to [concepts](#concepts) table for the 3-letter code
663
+ used to delineate international currencies (e.g., USD = US Dollar)
664
+ :foreign_key: concepts
665
+ :null: false
666
+ :cost_base:
667
+ :type: String
668
+ :comment:
669
+ Defines the basis for the cost in the table (e.g., 2013 for a specific
670
+ cost-to-charge ratio, or a specific cost from an external cost
671
+ :null: false
672
+ :value:
673
+ :type: Float
674
+ :comment: Cost value
675
+ :null: false
676
+ :value_type_concept_id:
677
+ :type: :Bigint
678
+ :comment:
679
+ FK reference to [concepts](#concepts) table to concept that defines
680
+ the type of economic information in the value field (e.g., cost-to-charge
681
+ ratio, calculated cost, reported cost)
682
+ :foreign_key: concepts
683
+ :null: false
684
+ :addresses:
685
+ :columns:
686
+ :id:
687
+ :type: :Bigint
688
+ :primary_key: true
689
+ :comment: Surrogate key for record
690
+ :null: false
691
+ :address_1:
692
+ :type: String
693
+ :comment: Typically used for street address
694
+ :address_2:
695
+ :type: String
696
+ :comment:
697
+ Typically used for additional detail such as building, suite, floor,
698
+ etc.
699
+ :city:
700
+ :type: String
701
+ :comment: The city field as it appears in the source data
702
+ :state:
703
+ :type: String
704
+ :comment: The state field as it appears in the source data
705
+ :zip:
706
+ :type: String
707
+ :comment: The zip or postal code
708
+ :county:
709
+ :type: String
710
+ :comment: The county, if available
711
+ :census_tract:
712
+ :type: String
713
+ :comment: The census tract if available
714
+ :hsa:
715
+ :type: String
716
+ :comment:
717
+ The Health Service Area, if available (originally defined by the National
718
+ Center for Health Statistics)
719
+ :country:
720
+ :type: String
721
+ :comment: The country if necessary
722
+ :deaths:
723
+ :columns:
724
+ :id:
725
+ :type: :Bigint
726
+ :primary_key: true
727
+ :comment: Surrogate key for record
728
+ :null: false
729
+ :patient_id:
730
+ :type: :Bigint
731
+ :comment: FK reference to [patients](#patients) table
732
+ :foreign_key: patients
733
+ :null: false
734
+ :date:
735
+ :type: Date
736
+ :comment: Date of death (yyyy-mm-dd)
737
+ :null: false
738
+ :cause_concept_id:
739
+ :type: :Bigint
740
+ :comment:
741
+ FK reference to [concepts](#concepts) table for cause of death (typically
742
+ ICD-9 or ICD-10 code)
743
+ :foreign_key: concepts
744
+ :cause_type_concept_id:
745
+ :type: :Bigint
746
+ :comment:
747
+ FK reference to [concepts](#concepts) table for the type of cause
748
+ of death (e.g. primary, secondary, etc. )
749
+ :foreign_key: concepts
750
+ :practitioner_id:
751
+ :type: :Bigint
752
+ :comment: FK reference to [practitioners](#practitioners) table
753
+ :foreign_key: practitioners
754
+ :information_periods:
755
+ :columns:
756
+ :id:
757
+ :type: :Bigint
758
+ :primary_key: true
759
+ :comment: Surrogate key for record
760
+ :null: false
761
+ :patient_id:
762
+ :type: :Bigint
763
+ :comment: FK reference to [patients](#patients) table
764
+ :foreign_key: patients
765
+ :null: false
766
+ :start_date:
767
+ :type: Date
768
+ :comment: Start date of record (yyyy-mm-dd)
769
+ :null: false
770
+ :end_date:
771
+ :type: Date
772
+ :comment: End date of record (yyyy-mm-dd)
773
+ :null: false
774
+ :information_type_concept_id:
775
+ :type: :Bigint
776
+ :comment:
777
+ FK reference to [concepts](#concepts) table representing the information
778
+ type (e.g., insurance coverage, hospital data, up-to-standard date)
779
+ :foreign_key: concepts
780
+ :null: false
781
+ :admission_details:
782
+ :columns:
783
+ :id:
784
+ :type: :Bigint
785
+ :primary_key: true
786
+ :comment: Surrogate key for record
787
+ :null: false
788
+ :patient_id:
789
+ :type: :Bigint
790
+ :comment: FK reference to [patients](#patients) table
791
+ :foreign_key: patients
792
+ :null: false
793
+ :admission_date:
794
+ :type: Date
795
+ :comment: Date of admission (yyyy-mm-dd)
796
+ :null: false
797
+ :discharge_date:
798
+ :type: Date
799
+ :comment: Date of discharge (yyyy-mm-dd)
800
+ :null: false
801
+ :admit_source_concept_id:
802
+ :type: :Bigint
803
+ :comment:
804
+ Database specific code indicating source of admission (e.g., ER visit,
805
+ transfer, etc.)
806
+ :discharge_location_concept_id:
807
+ :type: :Bigint
808
+ :comment:
809
+ Database specific code indicating discharge location (e.g., death,
810
+ home, transfer, long-term care, etc.)
811
+ :admission_type_concept_id:
812
+ :type: :Bigint
813
+ :comment:
814
+ FK reference to [concepts](#concepts) table representing the type
815
+ of admission the record is (Emergency, Elective, etc.)
816
+ :foreign_key: concepts
817
+ :concepts:
818
+ :columns:
819
+ :id:
820
+ :type: :Bigint
821
+ :primary_key: true
822
+ :comment: Surrogate key for record (this is the concept_id)
823
+ :null: false
824
+ :vocabulary_id:
825
+ :type: String
826
+ :comment:
827
+ FK reference to the vocabularies table for the vocabulary associated
828
+ with the concept (see OMOP or UMLS)
829
+ :foreign_key: vocabularies
830
+ :null: false
831
+ :concept_code:
832
+ :type: String
833
+ :comment:
834
+ Actual code as text string from the source vocabulary (e.g., "410.00"
835
+ for ICD-9)
836
+ :null: false
837
+ :concept_text:
838
+ :type: String
839
+ :comment: Text descriptor associated with the concept_code
840
+ :null: false
841
+ :vocabularies:
842
+ :columns:
843
+ :id:
844
+ :type: String
845
+ :primary_key: true
846
+ :comment: Short name of the vocabulary which acts as a natural key for record
847
+ :null: false
848
+ :omopv4_vocabulary_id:
849
+ :type: Integer
850
+ :comment: Old ID used in OMOPv4
851
+ :null: false
852
+ :vocabulary_name:
853
+ :type: String
854
+ :comment: Full name of the vocabulary
855
+ :null: false
856
+ :domain:
857
+ :type: String
858
+ :comment: Domain to which the majority of the vocabulary is assigned
859
+ :concepts_count:
860
+ :type: Integer
861
+ :comment:
862
+ Number of row in the [concepts](#concepts) table assigned to this
863
+ vocabulary
864
+ :is_clinical_vocabulary:
865
+ :type: TrueClass
866
+ :comment: Are concepts from this vocabulary stored in [clinical_codes](#clinical_codes)?
867
+ :mappings:
868
+ :columns:
869
+ :concept_1_id:
870
+ :type: :Bigint
871
+ :comment: FK reference to [concepts](#concepts) table for the source concept
872
+ :foreign_key: concepts
873
+ :null: false
874
+ :relationship_id:
875
+ :type: String
876
+ :comment: The type or nature of the relationship (e.g., "is_a")
877
+ :null: false
878
+ :concept_2_id:
879
+ :type: :Bigint
880
+ :comment: FK reference to [concepts](#concepts) table for the destination concept
881
+ :foreign_key: concepts
882
+ :null: false