--select * from hib.[datasourceworkflowtemplate]

--; Delete all entries in the [datasourceworkflowtemplate] table
Delete from hib.[datasourceworkflowtemplate]

/*
<h5><strong>Corporate Data Warehouse (CDW)</strong></h5>
<b>SQL Format</b><br />
<div class="plus-thirty">
	<label for="1022" class="label-bottom"><input type="checkbox" data-id="1022" name="1022" disabled> CDW Production Domains (Must complete CDW Production Domain Checklist)</label><br />
	<label for="1023" class="label-bottom"><input type="checkbox" data-id="1023" name="1023" disabled> CDW Raw Domains (Must complete CDW Raw Domain Checklist)</label><br />
	<label for="1024" class="label-bottom"><input type="checkbox" data-id="1024" name="1024" disabled> CDW DSS NDE</label><br />
	<label for="1025" class="label-bottom"><input type="checkbox" data-id="1025" name="1025" disabled> TIU Text Notes (Requires Real SSN Approval)</label><br />
	<label for="1026" class="label-bottom"><input type="checkbox" data-id="1026" name="1026" disabled> Vital Status</label><br />
</div>
	                 
<br class="clear" />
                     
<b>SAS Format</b><br />
<div class="plus-thirty">
	<label for="1027" class="label-bottom"><input type="checkbox" data-id="1027" name="1027" disabled> BIRLS</label><br />
	<label for="1028" class="label-bottom"><input type="checkbox" data-id="1028" name="1028" disabled> DSS NDE (legacy)</label><br />
	<label for="1029" class="label-bottom""><input type="checkbox" data-id="1029" name="1029" disabled> MedSAS Files including VetsNet Files</label><br />
	<label for="6" class="label-bottom"><input type="checkbox" data-id="6" name="6" disabled> Vital Status Files with Scrambled SSN</label><br />
	<label for="3" class="label-bottom"><input type="checkbox" data-id="3" name="3" disabled> Vital Status File Real SSN Crosswalk File</label><br />
</div>

<h5><strong>Mainframe - Access</strong></h5>
<label for="7" class="label-bottom"><input type="checkbox" data-id="7" name="7" disabled> BIRLS Real SSN (110JJ02)</label><br />
<label for="1030" class="label-bottom"><input type="checkbox" data-id="1030" name="1030" disabled> MedSAS including VetsNet Files for National Level Real SSN (1100TT01)</label><br />
<label for="1031" class="label-bottom"><input type="checkbox" data-id="1031" name="1031" disabled> MedSAS Files for VISN Level Real SSN (1100TT05)</label><br />
<label for="12" class="label-bottom"><input type="checkbox" data-id="12" name="12" disabled> Vital Status Files with Scrambled SSN (110NN06)</label><br />
<label for="11" class="label-bottom"><input type="checkbox" data-id="11" name="11" disabled> Vital Status File Real SSN Crosswalk File (110TT20)</label><br />

<h5><strong>Other Data</strong></h5>
<label for="1001"  class="label-bottom"><input type="checkbox" data-id="1001" name="1001" disabled> CAPRI/VistAWeb (Requires Real SSN Approval)</label><br />
<label for="8"  class="label-bottom"><input type="checkbox" data-id="8" name="8" disabled> DSS Web Reports</label><br />
<label for="1036" class="label-bottom"><input type="checkbox" data-id="1036" name="1036" disabled> Homeless Registry</label><br />
<label for="1032" class="label-bottom"><input type="checkbox" data-id="1032" name="1032" disabled> Legacy Data Warehouses (i.e. VISN 21)</label><br />
<label for="1033" class="label-bottom"><input type="checkbox" data-id="1033" name="1033" disabled> OEF/OIF Roster File <span><b>(DUA required for internal data distribution/use)</b></span></label><br />
<label for="1034" class="label-bottom"><input type="checkbox" data-id="1034" name="1034" disabled> Surgery Quality Data Users Group (SQDUG)</label><br />
<label for="13" class="label-bottom"><input type="checkbox" data-id="13" name="13" disabled> VSSC Web Reports</label><br />

<h5><strong>Data Access Systems</strong></h5>
<label for="1035" class="label-bottom"><input type="checkbox" data-id="1035" name="1035" disabled> SAS Grid</label><br />
*/

--NDS
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1022,1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1023, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1024, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1025, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1026, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1027, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1028, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1029, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (6, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (3, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (7, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1030, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1031, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (12, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (11, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1001, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (8, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1036, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1032, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (13, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1037, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1038, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1039, 1)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1040, 1)


--Surgery (Independent Workflow)
Insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1034, 2)


--OEF/OIF (Independent Workflow)
insert into hib.[datasourceworkflowtemplate] (datasourceid, workflowtemplateid)
values (1033, 3)	--OEF/OIF Roster File


--select * from hib.[datasourceworkflowtemplate] order by workflowtemplateid
--select * from hib.[datasourceworkflowtemplate] dswt left join hib.[workflowtemplate] t on dswt.workflowtemplateid=t.id order by workflowtemplateid
--select * from hib.[datasourceworkflowtemplate] dswt left join hib.[workflowtemplate] t on dswt.workflowtemplateid=t.id left join hib.datasource ds on dswt.datasourceid=ds.id order by workflowtemplateid
