-
Notifications
You must be signed in to change notification settings - Fork 1
/
upload_config.yaml
119 lines (102 loc) · 3.4 KB
/
upload_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
generic_list:
study_oid: S_PROTRAIT
study_identifier: ProTRAIT - Generic
event_oid: SE_GENERIC
form_oid: F_PROTRAIT_GEN_2
item_group_oid: IG_PROTR_GEN
identifier_colname: GEN_IDNUMBER
birthdate_colname: GEN_YEAR_BIRTH
birthdate_isyear: TRUE
gender_colname: GEN_GENDER
item_prefix: I_PROTR_
query: |
prefix rr: <http://www.w3.org/ns/r2rml#>
prefix ex: <http://example.com/ns#>
prefix map: <http://mapping.local/>
prefix sty: <http://purl.bioontology.org/ontology/STY/>
prefix sio: <http://semanticscience.org/resource/SIO_>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ncit: <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#>
prefix roo: <http://www.cancerdata.org/roo/>
prefix icd: <http://purl.bioontology.org/ontology/ICD10/>
prefix skos: <http://www.w3.org/2008/05/skos#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix uo: <http://purl.obolibrary.org/obo/UO_>
prefix time: <http://www.w3.org/2006/time#>
SELECT DISTINCT
?GEN_IDNUMBER
?GEN_GENDER
?GEN_AGE
?GEN_TREAT_CENTRE
?GEN_PLAN_COMPARISON
?GEN_YEAR_BIRTH
WHERE {
?Patient rdf:type ncit:C16960;
roo:is_born ?bYear.
?bYear roo:P100027 ?GEN_YEAR_BIRTH.
OPTIONAL{
?Patient rdf:type ncit:C16960;
roo:P100061 ?id.
?id roo:P100042 ?GEN_IDNUMBER.
?Patient roo:P100018 ?gender.
?gender roo:P100042 ?GenderValue.
BIND(
COALESCE(
IF (?GenderValue = "V ", "f", 1/0),
IF (?GenderValue = "M ", "m", 1/0),
"9" )
AS ?GEN_GENDER)
}
OPTIONAL{
?Patient roo:P100016 ?age.
?age roo:P100042 ?GEN_AGE.
FILTER (?GEN_AGE !=0)
FILTER (?GEN_AGE !=1)
FILTER (?GEN_AGE !=2)
FILTER (?GEN_AGE !=3)
FILTER (?GEN_AGE !=4)
FILTER (?GEN_AGE !=5)
FILTER (?GEN_AGE !=6)
FILTER (?GEN_AGE !=7)
FILTER (?GEN_AGE !=8)
FILTER (?GEN_AGE !=9)
FILTER (?GEN_AGE !=10)
FILTER (?GEN_AGE !=11)
FILTER (?GEN_AGE !=12)
FILTER (?GEN_AGE !=13)
FILTER (?GEN_AGE !=14)
FILTER (?GEN_AGE !=15)
FILTER (?GEN_AGE !=16)
FILTER (?GEN_AGE !=17)
FILTER (?GEN_AGE !=18)
}
OPTIONAL{
?Patient roo:P100039 ?treatingCentre.
?treatingCentre roo:local_value ?treatCentreValue. }
BIND(
COALESCE(
IF (?treatCentreValue = "Maastro Clinic", "3", 1/0),
IF (?treatCentreValue = "met name cochlea rechts van 14.4 naar 38.4 Gy (acceptabel) en brain Dmax van 46.6 naar 60.1 Gy (acceptabel)", "3", 1/0),
IF (?treatCentreValue = "null", "0", 1/0),
"9" )
AS ?GEN_TREAT_CENTRE)
OPTIONAL{
?Patient roo:P100024 ?radiotherapy.
?radiotherapy roo:has_planning_comparison ?plancomp.
?plancomp roo:P100042 ?genplancomp.
?genplancomp roo:local_value ?GEN_PLAN_COMP1.}
OPTIONAL{
?Patient roo:P100024 ?radiotherapy.
?radiotherapy roo:has_planning_comparison ?plancomp.
?plancomp roo:P100228 ?plancompdate.
?plancompdate roo:P100042 ?GEN_PLAN_COMP_DATE.}
BIND(BOUND(?GEN_PLAN_COMP_DATE) as ?GEN_PLAN_COMPARISON)
BIND(
COALESCE(
IF (?GEN_PLAN_COMPARISON = true, "1", 1/0),
IF (?GEN_PLAN_COMPARISON = false, "0", 1/0),
"9" )
AS ?GEN_PLAN_COMPARISON)
}