You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+8
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,11 @@
1
+
# Samply.Focus v0.8.0 2024-11-04
2
+
3
+
In this release, we are supporting 4 types of SQL queries for Exliquid and Organoids
4
+
5
+
## Major changes
6
+
* Allowlist of SQL queries
7
+
8
+
1
9
# Samply.Focus v0.7.0 2024-09-24
2
10
3
11
In this release, we are extending the supported data backends beyond CQL-enabled FHIR stores. We now support PostgreSQL as well. Usage instructions are included in the Readme.
select 'MetPredict' as project, 'pat_pdos_leq_3' as field, (select count(distinct pat_pseudonym) from t8 where n_organoids <= 3) as value
50
+
union
51
+
-- patients having 4 organoids
52
+
select 'MetPredict' as project, 'pat_pdos_4' as field, (select count(distinct pat_pseudonym) from t8 where n_organoids = 4) as value
53
+
union
54
+
-- patients having 5 organoids
55
+
select 'MetPredict' as project, 'pat_pdos_5' as field, (select count(distinct pat_pseudonym) from t8 where n_organoids = 5) as value
56
+
union
57
+
-- patients having > 5 organoids
58
+
select 'MetPredict' as project, 'pat_pdos_gt_5' as field, (select count(distinct pat_pseudonym) from t8 where n_organoids > 5) as value
59
+
union
60
+
-- the total number of patients
61
+
select 'MetPredict' as project, 'n_patients' as field, (select count(distinct pat_pseudonym) from t2) as value
62
+
union
63
+
-- the total number of organoids
64
+
select 'MetPredict' as project, 'n_organoids' as field, (select count(distinct organoid_id) from t2) as value
65
+
union
66
+
select 'MetPredict' as project, 'gender_male' as field, (select count(distinct pat_pseudonym) from t2 where gender = 'male') as value
67
+
union
68
+
select 'MetPredict' as project, 'gender_female' as field, (select count(distinct pat_pseudonym) from t2 where gender = 'female') as value
69
+
union
70
+
select 'MetPredict' as project, '<=30' as field, (select count(distinct pat_pseudonym) from t2 where age_at_enrollment <= 30) as value
71
+
union
72
+
select 'MetPredict' as project, '31-40' as field, (select count(distinct pat_pseudonym) from t2 where age_at_enrollment >= 31 and age_at_enrollment <= 40) as value
73
+
union
74
+
select 'MetPredict' as project, '41-50' as field, (select count(distinct pat_pseudonym) from t2 where age_at_enrollment >= 41 and age_at_enrollment <= 50) as value
75
+
union
76
+
select 'MetPredict' as project, '51-60' as field, (select count(distinct pat_pseudonym) from t2 where age_at_enrollment >= 51 and age_at_enrollment <= 60) as value
77
+
union
78
+
select 'MetPredict' as project, '>=61' as field, (select count(distinct pat_pseudonym) from t2 where age_at_enrollment >= 61) as value;
define function SampleType(specimen FHIR.Specimen):
26
+
case FHIRHelpers.ToCode(specimen.type.coding.where(system ='https://fhir.bbmri.de/CodeSystem/SampleMaterialType').first())
27
+
when Code 'plasma-edta'from SampleMaterialType then 'blood-plasma'
28
+
when Code 'plasma-citrat'from SampleMaterialType then 'blood-plasma'
29
+
when Code 'plasma-heparin'from SampleMaterialType then 'blood-plasma'
30
+
when Code 'plasma-cell-free'from SampleMaterialType then 'blood-plasma'
31
+
when Code 'plasma-other'from SampleMaterialType then 'blood-plasma'
32
+
when Code 'plasma'from SampleMaterialType then 'blood-plasma'
33
+
when Code 'tissue-formalin'from SampleMaterialType then 'tissue-ffpe'
34
+
when Code 'tumor-tissue-ffpe'from SampleMaterialType then 'tissue-ffpe'
35
+
when Code 'normal-tissue-ffpe'from SampleMaterialType then 'tissue-ffpe'
36
+
when Code 'other-tissue-ffpe'from SampleMaterialType then 'tissue-ffpe'
37
+
when Code 'tumor-tissue-frozen'from SampleMaterialType then 'tissue-frozen'
38
+
when Code 'normal-tissue-frozen'from SampleMaterialType then 'tissue-frozen'
39
+
when Code 'other-tissue-frozen'from SampleMaterialType then 'tissue-frozen'
40
+
when Code 'tissue-paxgene-or-else'from SampleMaterialType then 'tissue-other'
41
+
when Code 'derivative'from SampleMaterialType then 'derivative-other'
42
+
when Code 'liquid'from SampleMaterialType then 'liquid-other'
43
+
when Code 'tissue'from SampleMaterialType then 'tissue-other'
44
+
when Code 'serum'from SampleMaterialType then 'blood-serum'
45
+
when Code 'cf-dna'from SampleMaterialType then 'dna'
46
+
when Code 'g-dna'from SampleMaterialType then 'dna'
47
+
when Code 'blood-plasma'from SampleMaterialType then 'blood-plasma'
48
+
when Code 'tissue-ffpe'from SampleMaterialType then 'tissue-ffpe'
49
+
when Code 'tissue-frozen'from SampleMaterialType then 'tissue-frozen'
50
+
when Code 'tissue-other'from SampleMaterialType then 'tissue-other'
51
+
when Code 'derivative-other'from SampleMaterialType then 'derivative-other'
52
+
when Code 'liquid-other'from SampleMaterialType then 'liquid-other'
53
+
when Code 'blood-serum'from SampleMaterialType then 'blood-serum'
54
+
when Code 'dna'from SampleMaterialType then 'dna'
55
+
when Code 'buffy-coat'from SampleMaterialType then 'buffy-coat'
56
+
when Code 'urine'from SampleMaterialType then 'urine'
57
+
when Code 'ascites'from SampleMaterialType then 'ascites'
58
+
when Code 'saliva'from SampleMaterialType then 'saliva'
59
+
when Code 'csf-liquor'from SampleMaterialType then 'csf-liquor'
60
+
when Code 'bone-marrow'from SampleMaterialType then 'bone-marrow'
61
+
when Code 'peripheral-blood-cells-vital'from SampleMaterialType then 'peripheral-blood-cells-vital'
62
+
when Code 'stool-faeces'from SampleMaterialType then 'stool-faeces'
63
+
when Code 'rna'from SampleMaterialType then 'rna'
64
+
when Code 'whole-blood'from SampleMaterialType then 'whole-blood'
65
+
when Code 'swab'from SampleMaterialType then 'swab'
66
+
when Code 'dried-whole-blood'from SampleMaterialType then 'dried-whole-blood'
67
+
when null then 'Unknown'
68
+
else 'Unknown'
69
+
end
70
+
define Specimen:
71
+
if InInitialPopulation then [Specimen] S where (((((FHIRHelpers.ToDateTime(S.collection.collected) between @1900-01-01and @2024-10-25) )) and (((((S.extension.where(url='https://fhir.bbmri.de/StructureDefinition/StorageTemperature').value.coding.code contains 'temperature2to10'))))))) else {} as List<Specimen>
72
+
73
+
define Diagnosis:
74
+
if InInitialPopulation then [Condition] else {} as List<Condition>
75
+
76
+
define function DiagnosisCode(condition FHIR.Condition):
((((((Patient.gender='male')))) and ((((((exists[Condition: Code 'C61'from icd10]) or (exists[Condition: Code 'C61'from icd10gm]) or (exists[Condition: Code 'C61'from icd10gmnew])) or (exists from [Specimen] S where (S.extension.where(url='https://fhir.bbmri.de/StructureDefinition/SampleDiagnosis').value.coding.code contains 'C61')))))) and (( AgeInYears() between Ceiling(10) and Ceiling(90)))) or (((exists from [Specimen] S
89
+
whereFHIRHelpers.ToDateTime(S.collection.collected) between @1900-01-01and @2024-10-25 )) and ((((exists from [Specimen] S where (S.extension.where(url='https://fhir.bbmri.de/StructureDefinition/StorageTemperature').value.coding contains Code 'temperature2to10'from StorageTemperature) ))))))
0 commit comments