This repository has been archived by the owner on Apr 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
validation0.nlpql
117 lines (94 loc) · 2.69 KB
/
validation0.nlpql
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
limit 100;
phenotype "Validation 0" version "1";
include ClarityCore version "1.0" called Clarity;
documentset ValidationDoc:
Clarity.createDocumentSet({
"report_types":["CLARITYNLP_VALIDATION_0"]
});
///////////////////////////////////////////////////////////////////////////////
//
// RACE FINDER
//
///////////////////////////////////////////////////////////////////////////////
define Race:
Clarity.RaceFinderTask({
documentset: [ValidationDoc]
});
///////////////////////////////////////////////////////////////////////////////
//
// MEASUREMENT FINDER
//
///////////////////////////////////////////////////////////////////////////////
termset LesionTerms: [
"lesion"
];
define Measurement:
Clarity.MeasurementFinder({
documentset: [ValidationDoc],
termset: [LesionTerms]
});
///////////////////////////////////////////////////////////////////////////////
//
// PROVIDER ASSERTION
//
///////////////////////////////////////////////////////////////////////////////
termset FeverTerms: [
"fever"
];
define hasFever:
Clarity.ProviderAssertion({
documentset: [ValidationDoc],
termset: [FeverTerms]
});
///////////////////////////////////////////////////////////////////////////////
//
// TERM PROXIMITY
//
///////////////////////////////////////////////////////////////////////////////
termset ProstateTerms: [
"prostate"
];
define hasProstateCancer:
Clarity.TermProximityTask({
documentset: [ValidationDoc],
"termset1": [ProstateTerms],
"termset2": "cancer, Gleason, Gleason's, Gleasons",
"word_distance": 5,
"any_order": "True"
});
///////////////////////////////////////////////////////////////////////////////
//
// VALUE EXTRACTION
//
///////////////////////////////////////////////////////////////////////////////
termset EjectionFractionTerms: [
"ejection fraction",
"lvef"
];
define EjectionFraction:
Clarity.ValueExtraction({
documentset: [ValidationDoc],
termset:[EjectionFractionTerms],
minimum_value: "10",
maximum_value: "85"
});
///////////////////////////////////////////////////////////////////////////////
//
// GLEASON SCORE
//
///////////////////////////////////////////////////////////////////////////////
define GleasonScore:
Clarity.GleasonScoreTask({
documentset: [ValidationDoc]
});
///////////////////////////////////////////////////////////////////////////////
//
// TNM STAGER
//
///////////////////////////////////////////////////////////////////////////////
define TNMCode:
Clarity.TNMStager ({
documentset: [ValidationDoc]
});
// logical Context (Patient, Document)
context Patient;