-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yaml
318 lines (292 loc) · 8.59 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# subclass_depth: 3 # default is 3 uncomment to override for fhir json schema
# This limits the top level objects the system will render
# For some output targets, e.g. PFB order of output is important, parents must be rendered before children
dependency_order:
#
# gen3 scaffolding required objects
#
- _definitions.yaml
- _terms.yaml
- Program
- Project
#
# FHIR objects
#
- Organization
# - Location
- Practitioner
- PractitionerRole
- ResearchStudy
- Patient
- ResearchSubject
- Substance
- Specimen
# - Encounter
- Observation
- DiagnosticReport
- Condition
- Medication
- MedicationAdministration
# - MedicationStatement
# - MedicationRequest
- Procedure
- DocumentReference
- Task
- ImagingStudy
- FamilyMemberHistory
- BodyStructure
# - Immunization
# Properties to 'pluck' from nested objects and render in the parent object
nested_objects:
Patient:
- address.postalCode
Specimen:
- processing.additive
- processing.method
DocumentReference:
- content.attachment.contentType
- content.attachment.extension.md5
- content.attachment.size
- content.attachment.url
Task:
- input.valueReference
- output.valueReference
Medication:
- ingredient.item
# Specify which entities you want to add to a FHIR entities model
extensions:
Patient:
- http://hl7.org/fhir/us/core/STU6/StructureDefinition-us-core-race.json
- http://hl7.org/fhir/us/core/STU6/StructureDefinition-us-core-ethnicity.json
- http://hl7.org/fhir/us/core/STU6/StructureDefinition-us-core-tribal-affiliation.json
- http://hl7.org/fhir/us/core/STU6/StructureDefinition-us-core-birthsex.json
- http://hl7.org/fhir/us/core/STU6/StructureDefinition-us-core-genderIdentity.json
- http://synthetichealth.github.io/synthea/disability-adjusted-life-years
- http://synthetichealth.github.io/synthea/quality-adjusted-life-years
- https://hl7.org/fhir/extensions/StructureDefinition-patient-birthPlace.json
- https://hl7.org/fhir/extensions/StructureDefinition-patient-mothersMaidenName.json
# Constrain the parent destination links from a Node for the Simplified Model.
limit_links:
Observation:
- ResearchStudy
- Patient
- Specimen
Encounter:
- Patient
DocumentReference:
- Patient
- Specimen
- ResearchStudy
- Observation
Practitioner: []
ResearchStudy:
- Project
- ResearchStudy
FamilyMemberHistory:
- Patient
Procedure:
- Patient
- Practitioner
- Procedure
MedicationAdministration:
- Patient
- Medication
# Add these extra properties to the simplified schema
# These may be used to add extra scalar properties to the simplified schema as well as constrain edge destination types.
extra_properties:
Patient:
us_core_race_ombCategory_coding:
description: extension
type: array
items:
type: string
us_core_ethnicity_ombCategory_coding:
description: extension
type: array
items:
type: string
us_core_race_text:
description: extension
type: string
patient_birthPlace_resourceType:
description: nested
type: string
patient_birthPlace_city:
description: nested
type: string
us_core_ethnicity_text:
description: nested
type: string
patient_birthPlace_state:
description: nested
type: string
patient_birthPlace_country:
description: nested
type: string
# Add gen3 file scaffolding expected properties
DocumentReference:
$ref: "_definitions.yaml#/data_file_properties"
data_category:
term:
$ref: "_terms.yaml#/data_category"
type: string
data_type:
term:
$ref: "_terms.yaml#/data_type"
type: string
data_format:
term:
$ref: "_terms.yaml#/data_format"
type: string
auth_resource_path:
type: string
description: Gen3 scaffolding
# # from content attachment
# content_url:
# type: string
# description: from content attachment
# content_contentType:
# type: string
# description: from content attachment
# content_size:
# type: number
# description: from content attachment
# content_md5:
# type: string
# description: from content attachment
# from denormalization
patient_id:
type: string
description: Denormalized patient id
patient_identifier:
description: Denormalized patient identifier
type: array
items:
type: string
specimen_identifier:
description: Denormalized specimen identifier
type: array
items:
type: string
task_identifier:
description: Denormalized task identifier
type: array
items:
type: string
subject:
description: Who/what is the subject of the document.
$ref: Reference.yaml
backref: subject_DocumentReference
enum_reference_types:
- ResearchStudy
- Patient
- Specimen
- Observation
title: The item that this DocumentReference is about.
# a link that does not exist in the FHIR schema, in this case from ResearchStudy to Project
ResearchStudy:
gen3_project:
description: The Gen3 project this study belongs to. Used to generate link.
$ref: Reference.yaml
backref: research_study
enum_reference_types:
- Project
title: The Gen3 project this study belongs to.
# Create edges from references typed as ANY
# In this case Task we hint that Task inputs will point to Specimen and outputs point to DocumentReferences
# see:
# * https://build.fhir.org/task-definitions.html#Task.input.value_x_
# * https://build.fhir.org/task-definitions.html#Task.output.value_x_
Task:
specimen:
description: The specimen input to this task. Used to generate link.
$ref: Reference.yaml
backref: task
enum_reference_types:
- Specimen
title: The specimen input to this task.
document_reference:
description: The output from this task. Used to generate link.
$ref: Reference.yaml
backref: task
enum_reference_types:
- DocumentReference
title: The output from this task.
# explicitly limit edge `focus` to ResearchStudy
Observation:
focus:
backref: focus_observation
description: The actual focus of an observation when it is not the patient of
record representing something or someone associated with the patient such as
a spouse, parent, fetus, or donor.
element_property: true
enum_reference_types:
- ResearchStudy
items:
$ref: Reference.yaml
title: What the observation is about, when it is not about the subject of record
type: array
patient_identifier:
description: Denormalized patient identifier
type: array
items:
type: string
specimen_identifier:
description: Denormalized specimen identifier
type: array
items:
type: string
condition_identifier:
description: Denormalized condition identifier
type: array
items:
type: string
# add a link from a sub-object collection.bodySite
Specimen:
bodySite:
backref: specimen
$ref: CodeableReference.yaml
binding_description: SNOMED CT Body site concepts
binding_strength: example
binding_uri: http://hl7.org/fhir/ValueSet/body-site
binding_version: null
description: Anatomical location from which the specimen was collected (if subject
is a patient). This is the target site. This element is not used for environmental
specimens.
element_property: true
enum_reference_types:
- BodyStructure
title: Anatomical collection site
patient_identifier:
description: Denormalized patient identifier
type: array
items:
type: string
# Add a `category` field to the simplified schema: defaults to Clinical
categories:
DocumentReference: data_file
Location: Administrative
Organization: Administrative
Patient: Administrative
Practitioner: Administrative
PractitionerRole: Administrative
ResearchStudy: Administrative
ResearchSubject: Administrative
Specimen: Biospecimen
Task: Analysis
# Ignore these properties in all objects
ignored_properties:
- contained
- meta
- implicitRules
- language
- contained
- modifierExtension
- assigner
- fhir_comments
- text
# Rename these properties
renamed_properties:
label: label_ # https://cdis.slack.com/archives/CDDPLU1NU/p1682393064223499
for: for_fhir # https://github.com/nazrulworld/fhir.resources/blob/main/fhir/resources/task.py#L145
class: class_fhir