-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheivr_full_detail.int
213 lines (202 loc) · 4.75 KB
/
eivr_full_detail.int
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
version "1";
object 'TSKL' "Main" {
contents = {
`Task_1`
}
};
object 'TASK' "Task_1" {
inputs = {
`SQL-1-SQL`,
`SQL-2-SQL`,
`FileIn-Months-FIN`
},
output = `Builder-1-BLD`,
processes = {
`Sort-1-SRT`,
`Sort-2-SRT`,
`Join-1-JOI`,
`CAL-Dates`,
`Lookup-Months-LKP`,
`CAL-Other`
}
};
object 'INPT' "SQL-1-SQL" {
//+ coordinatex = `33`,
//+ coordinatey = `8`,
input_type = `sql`,
sql_source = `callcenter`,
sql_query = `select * from eivr_call_log order by callid, calldate, calltimestart;`,
aliases = {
`calldate=Call Date`,
`callid=Call ID`,
`calltimeend=Call Time End`,
`calltimestart=Call Time Start`,
`channel=Channel`,
`client=Client`,
`patientage=Patient Age`,
`patientdob=Patient DOB`,
`patientnumber=Patient Number`,
`paymentsystem=Payment System`
}
};
object 'INPT' "SQL-2-SQL" {
//+ coordinatex = `33`,
//+ coordinatey = `83`,
input_type = `sql`,
sql_query = `select a.*, b.locatordesc from eivr_call_details a left join eivr_locator_desc`
` b on a.locatorid = b.locatorid and a.locatoraction = b.locatoraction order`
` by a.callid, a.id`,
sql_source = `callcenter`,
aliases = {
`callid=Call ID`,
`locatoraction=Locator Action`,
`locatordesc=Locator Description`,
`locatorid=Locator ID`,
`locatortime=Loctor Time`
}
};
object 'INPT' "FileIn-Months-FIN" {
//+ coordinatex = `358`,
//+ coordinatey = `108`,
input_type = `filein`,
file_type = `column_headers`,
delimiter = `\t`,
union = `true`,
filename = `../../DI_TrackIT/data/Months.txt`
};
object 'PROC' "Sort-1-SRT" {
//+ coordinatex = `233`,
//+ coordinatey = `8`,
process_type = `sort`,
input = `CAL-Dates`,
sort_columns = { `Call ID` }
};
object 'PROC' "Sort-2-SRT" {
//+ coordinatex = `233`,
//+ coordinatey = `83`,
process_type = `sort`,
input = `SQL-2-SQL`,
sort_columns = { `Call ID` }
};
object 'PROC' "Join-1-JOI" {
//+ coordinatex = `333`,
//+ coordinatey = `33`,
process_type = `join`,
inputs = {
`Sort-1-SRT`,
`Sort-2-SRT`
},
joins = { `Call ID`, `Call ID` }
};
object 'PROC' "CAL-Dates" {
//+ coordinatex = `133`,
//+ coordinatey = `8`,
process_type = `calc`,
calcs = {
{
name = `Call Date Year-Month`,
value = `concat(substr(Call Date,1,4), "-", substr(Call Date,5,2))`
},
{
name = `Call Month`,
value = `substr(Call Date,5,2)`
},
{
name = `Call Year`,
value = `substr(Call Date,1,4)`
},
{
name = `Call Day`,
value = `substr(Call Date,7,2)`
},
{
name = `Call Time-Hour`,
value = `substr(Call Time Start,1,2)`
},
{
name = `Call Time-Minute`,
value = `substr(Call Time Start,4,2)`
},
{
name = `Call Date`,
value = `concat(substr(Call Date,1,4), "-", substr(Call Date,5,2), "-", substr(Call`
` Date,7,2))`,
update = `true`
}
},
input = `SQL-1-SQL`
};
object 'PROC' "Lookup-Months-LKP" {
//+ coordinatex = `433`,
//+ coordinatey = `33`,
process_type = `lookup`,
inputs = {
`Join-1-JOI`,
`FileIn-Months-FIN`
},
multijoins = {
{`Call Month`, `MonthNum` }
}
};
object 'PROC' "CAL-Other" {
//+ coordinatex = `533`,
//+ coordinatey = `33`,
process_type = `calc`,
input = `Lookup-Months-LKP`,
calcs = {
{
name = `Call Month Name`,
value = `MonthName`
},
{
name = `Call Quarter Year-Qtr`,
value = `concat(Call Year,"-",Quarter)`
},
{
name = `Call Week Year-Week`,
value = `week_date(concat(Call Year, "-", Call Month, "-", Call Day))`
},
{
name = `Locator ID-Desc`,
value = `concat(Locator ID, "-", if(Locator Description = "",Locator Action, Locator`
` Description))`
}
}
};
object 'OUTP' "Builder-1-BLD" {
//+ coordinatex = `633`,
//+ coordinatey = `33`,
output_type = `builder`,
input = `CAL-Other`,
builtin = `true`,
dimensions = {
`Call Date Year-Month`,
`Client`,
`Call ID`,
`Channel`,
`Patient Number`,
`Call Date`,
`Call Time-Hour`,
`Call Time-Minute`,
`Patient Age`,
`Payment System`,
`Locator ID-Desc`
},
output = `../models/eIVR.mdl`,
journal = `../logs/eivr_build`,
info = {
`Patient Age:Patient Number`,
`Call Time Start:Call ID`,
`Call Time End:Call ID`,
`Call Year:Call Date Year-Month`,
`Call Month Name:Call Date Year-Month`,
`Call Quarter Year-Qtr:Call Date Year-Month`,
`Call Week Year-Week:Call Date`,
`Locator Action:Locator ID-Desc`,
`Locator ID:Locator ID-Desc`,
`Locator Description:Locator ID-Desc`,
`Loctor Time:Locator ID-Desc`
},
dates = { `Call Date` },
formats = { `Call Date:YYYYMMDD` }
};