1#!/usr/bin/env cwl-runner
2### Full Medicaid Processing Pipeline
3# Copyright (c) 2021. Harvard University
4#
5# Developed by Research Software Engineering,
6# Faculty of Arts and Sciences, Research Computing (FAS RC)
7# Author: Michael A Bouzinier
8#
9# Licensed under the Apache License, Version 2.0 (the "License");
10# you may not use this file except in compliance with the License.
11# You may obtain a copy of the License at
12#
13# http://www.apache.org/licenses/LICENSE-2.0
14#
15# Unless required by applicable law or agreed to in writing, software
16# distributed under the License is distributed on an "AS IS" BASIS,
17# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18# See the License for the specific language governing permissions and
19# limitations under the License.
20#
21
22cwlVersion: v1.2
23class: Workflow
24
25requirements:
26 SubworkflowFeatureRequirement: {}
27 StepInputExpressionRequirement: {}
28 InlineJavascriptRequirement: {}
29
30doc: |
31 This workflow prcoesses already ingested Medicaid data
32 See [documentation](../Medicaid.md) for detailed
33 information.
34
35inputs:
36 database:
37 type: File
38 doc: Path to database connection file, usually database.ini
39 connection_name:
40 type: string
41 doc: The name of the section in the database.ini file
42 registry:
43 type: File
44
45steps:
46 index_ps:
47 run: index.cwl
48 in:
49 registry: registry
50 domain:
51 valueFrom: "cms"
52 table:
53 valueFrom: "ps"
54 database: database
55 connection_name: connection_name
56 incremental:
57 valueFrom: $(true)
58 out: [log, errors]
59
60 vacuum_ps:
61 run: vacuum.cwl
62 in:
63 depends_on: index_ps/log
64 registry: registry
65 domain:
66 valueFrom: "cms"
67 table:
68 valueFrom: "ps"
69 database: database
70 connection_name: connection_name
71 out: [log, errors]
72
73 create_beneficiaries:
74 run: matview.cwl
75 doc: Creates `Beneficiaries` Table
76 in:
77 depends_on: vacuum_ps/log
78 table:
79 valueFrom: "beneficiaries"
80 database: database
81 connection_name: connection_name
82 incremental:
83 valueFrom: $(true)
84 out:
85 - create_log
86 - index_log
87 - vacuum_log
88 - create_err
89 - index_err
90 - vacuum_err
91
92 create_monthly_view:
93 run: matview.cwl
94 doc: Creates internally used `Monthly View`
95 in:
96 depends_on: create_beneficiaries/vacuum_log
97 table:
98 valueFrom: "monthly"
99 database: database
100 connection_name: connection_name
101 incremental:
102 valueFrom: $(true)
103 out:
104 - create_log
105 - index_log
106 - vacuum_log
107 - create_err
108 - index_err
109 - vacuum_err
110
111 create_enrollments:
112 run: matview.cwl
113 doc: Creates `Enrollment` Table
114 in:
115 depends_on: create_monthly_view/vacuum_log
116 table:
117 valueFrom: "enrollments"
118 database: database
119 connection_name: connection_name
120 incremental:
121 valueFrom: $(true)
122 out:
123 - create_log
124 - index_log
125 - vacuum_log
126 - create_err
127 - index_err
128 - vacuum_err
129
130 create_eligibility:
131 run: matview.cwl
132 doc: Creates `Eligibility` Table
133 in:
134 depends_on: create_enrollments/vacuum_log
135 table:
136 valueFrom: "eligibility"
137 database: database
138 connection_name: connection_name
139 incremental:
140 valueFrom: $(true)
141 out:
142 - create_log
143 - index_log
144 - vacuum_log
145 - create_err
146 - index_err
147 - vacuum_err
148
149
150outputs:
151 ps_index_log:
152 type: File
153 outputSource: index_ps/log
154 ps_vacuum_log:
155 type: File
156 outputSource: vacuum_ps/log
157 ben_create_log:
158 type: File
159 outputSource: create_beneficiaries/create_log
160 ben_index_log:
161 type: File
162 outputSource: create_beneficiaries/index_log
163 ben_vacuum_log:
164 type: File
165 outputSource: create_beneficiaries/vacuum_log
166 mnth_create_log:
167 type: File
168 outputSource: create_monthly_view/create_log
169 mnth_index_log:
170 type: File
171 outputSource: create_monthly_view/index_log
172 mnth_vacuum_log:
173 type: File
174 outputSource: create_monthly_view/vacuum_log
175 enrlm_create_log:
176 type: File
177 outputSource: create_enrollments/create_log
178 enrlm_index_log:
179 type: File
180 outputSource: create_enrollments/index_log
181 enrlm_vacuum_log:
182 type: File
183 outputSource: create_enrollments/vacuum_log
184 elgb_create_log:
185 type: File
186 outputSource: create_eligibility/create_log
187 elgb_index_log:
188 type: File
189 outputSource: create_eligibility/index_log
190 elgb_vacuum_log:
191 type: File
192 outputSource: create_eligibility/vacuum_log
193
194 ps_index_err:
195 type: File
196 outputSource: index_ps/errors
197 ps_vacuum_err:
198 type: File
199 outputSource: vacuum_ps/errors
200 ben_create_err:
201 type: File
202 outputSource: create_beneficiaries/create_err
203 ben_index_err:
204 type: File
205 outputSource: create_beneficiaries/index_err
206 ben_vacuum_err:
207 type: File
208 outputSource: create_beneficiaries/vacuum_err
209 mnth_create_err:
210 type: File
211 outputSource: create_monthly_view/create_err
212 mnth_index_err:
213 type: File
214 outputSource: create_monthly_view/index_err
215 mnth_vacuum_err:
216 type: File
217 outputSource: create_monthly_view/vacuum_err
218 enrlm_create_err:
219 type: File
220 outputSource: create_enrollments/create_err
221 enrlm_index_err:
222 type: File
223 outputSource: create_enrollments/index_err
224 enrlm_vacuum_err:
225 type: File
226 outputSource: create_enrollments/vacuum_err
227 elgb_create_err:
228 type: File
229 outputSource: create_eligibility/create_err
230 elgb_index_err:
231 type: File
232 outputSource: create_eligibility/index_err
233 elgb_vacuum_err:
234 type: File
235 outputSource: create_eligibility/vacuum_err