-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGeneric_SQL_Adapter_Test.yml
More file actions
69 lines (69 loc) · 3.16 KB
/
Copy pathGeneric_SQL_Adapter_Test.yml
File metadata and controls
69 lines (69 loc) · 3.16 KB
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
id: Generic_SQL_Adapter
adapter: care.smith.top.top_phenotypic_query.adapter.sql.SQLAdapter
connection:
url: jdbc:h2:mem:generic_db;INIT=RUNSCRIPT FROM 'classpath:generic_schema.sql'
user: user
password: password
subjectQuery:
baseQuery: "SELECT subject_id, birth_date, sex FROM subject\nWHERE TRUE"
sexListPart: "\nAND sex IN ({values})"
birthdateIntervalPart: "\nAND birth_date {operator} {value}"
output:
id: subject_id
sex: sex
birthdate: birth_date
phenotypeQueries:
default:
baseQuery: "SELECT subject_id, created_at, unit, number_value, text_value, date_time_value, boolean_value FROM weight\nWHERE code_system || '|' || code IN ({codes}) AND (number_value IS NOT NULL OR text_value IS NOT NULL OR date_time_value IS NOT NULL OR boolean_value IS NOT NULL)"
numberValueIntervalPart: "\nAND number_value {operator} {value}"
numberValueListPart: "\nAND number_value IN ({values})"
dateTimeValueIntervalPart: "\nAND date_time_value {operator} {value}"
dateTimeValueListPart: "\nAND date_time_value IN ({values})"
textValueListPart: "\nAND text_value IN ({values})"
booleanValueListPart: "\nAND boolean_value IN ({values})"
dateTimeIntervalPart: "\nAND created_at {operator} {value}"
subjectsPart: "\nAND subject_id IN ({values})"
output:
subject: subject_id
numberValue: number_value
textValue: text_value
dateTimeValue: date_time_value
booleanValue: boolean_value
dateTime: created_at
observation:
baseQuery: "SELECT subject_id, created_at, unit, number_value, text_value, date_time_value, boolean_value FROM height\nWHERE code_system || '|' || code IN ({codes}) AND (number_value IS NOT NULL OR text_value IS NOT NULL OR date_time_value IS NOT NULL OR boolean_value IS NOT NULL)"
numberValueIntervalPart: "\nAND number_value {operator} {value}"
numberValueListPart: "\nAND number_value IN ({values})"
dateTimeValueIntervalPart: "\nAND date_time_value {operator} {value}"
dateTimeValueListPart: "\nAND date_time_value IN ({values})"
textValueListPart: "\nAND text_value IN ({values})"
booleanValueListPart: "\nAND boolean_value IN ({values})"
dateTimeIntervalPart: "\nAND created_at {operator} {value}"
subjectsPart: "\nAND subject_id IN ({values})"
output:
subject: subject_id
numberValue: number_value
textValue: text_value
dateTimeValue: date_time_value
booleanValue: boolean_value
dateTime: created_at
birthdateMapping:
code: http://loinc.org|21112-8
ageMapping:
code: http://loinc.org|30525-0
sexMapping:
code: http://loinc.org|46098-0
restrictionMappings:
- model: [ http://hl7.org/fhir/administrative-gender|female, http://hl7.org/fhir/administrative-gender|male ]
source: [ female, male ]
- model: [ http://hl7.org/fhir/administrative-gender|male ]
source: [ male ]
- model: [ http://hl7.org/fhir/administrative-gender|female ]
source: [ female ]
- model: [ http://hl7.org/fhir/administrative-gender|other ]
source: [ other ]
- model: [ http://hl7.org/fhir/administrative-gender|unknown ]
source: [ unknown ]
codeMappings:
- code: http://loinc.org|3137-7
unit: cm