Skip to content

Commit 9f91312

Browse files
committed
defining validation rules using yaml
1 parent b2f7e15 commit 9f91312

File tree

5 files changed

+2239
-60
lines changed

5 files changed

+2239
-60
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ __pycache__/
33
archive/
44
output.json
55
data/validated_reference_dataset.xlsx
6+
7+
# YAML validation rules instead of Python
8+
# rules_config.yaml
9+
# validation_rules_yaml.py
10+
# tests/test_sql_logic_yaml.py

rules_config.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
common_rules:
2+
randomized_patients:
3+
type: integer
4+
min: 0
5+
trial_status:
6+
type: string
7+
allowed: ["recruitment", "ongoing", "completed"]
8+
active_sites:
9+
type: integer
10+
min: 0
11+
active_patients:
12+
type: integer
13+
min: 0
14+
15+
queries: {} # not necessary for these queries
16+
# active_sites_positive:
17+
# rules:
18+
# active_sites:
19+
# type: integer
20+
# min: 0
21+
# randomized_patients_positive:
22+
# rules:
23+
# randomized_patients:
24+
# type: integer
25+
# min: 0
26+
# trial_status:
27+
# type: string
28+
# allowed: ["recruitment", "ongoing", "completed"]
29+

0 commit comments

Comments
 (0)