-- select * from hib.[amendmentdocumenttemplateworkflowtemplate] order by workflowtemplateid,documenttemplateid

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

/*
If only additional Independent data source(s) are added and one of the NDS documents listed below are changed, send the amendment to NDS for review as well. 
•	Research Request Memo
•	Research Study Institutional Review Board (IRB) Approval Letter
•	Sample Informed Consent and HIPAA Authorization
•	Research and Development (RD) Committee Approval Letter
•	IRB Approval of Waiver of HIPAA-Compliant Authorization 
•	Research Protocol
•	CDW-Domain Checklist 

--NDS-affected documents
select * from hib.documenttemplate where [name] like '%Research Request Memo%'												--documenttemplateid=4
select * from hib.documenttemplate where [name] like '%Research Study Institutional Review Board (IRB) Approval Letter%'	--documenttemplateid=5
select * from hib.documenttemplate where [name] like '%Sample Informed Consent and HIPAA Authorization%'					--documenttemplateid=7
select * from hib.documenttemplate where [name] like '%Research and Development (RD) Committee Approval Letter%'			--documenttemplateid=9
select * from hib.documenttemplate where [name] like '%IRB Approval of Waiver of HIPAA-Compliant Authorization%'			--documenttemplateid=13
select * from hib.documenttemplate where [name] like '%Research Protocol%'													--documenttemplateid=18
select * from hib.documenttemplate where [name] like '%CDW-Domain Checklist%'												--documenttemplateid=19	--verify this document template name (doesn't line up with the new BRD)
*/

--NDS-affected documents
Insert into hib.[amendmentdocumenttemplateworkflowtemplate] (documenttemplateid, workflowtemplateid)
values (4,1)
Insert into hib.[amendmentdocumenttemplateworkflowtemplate] (documenttemplateid, workflowtemplateid)
values (5,1)
Insert into hib.[amendmentdocumenttemplateworkflowtemplate] (documenttemplateid, workflowtemplateid)
values (7,1)
Insert into hib.[amendmentdocumenttemplateworkflowtemplate] (documenttemplateid, workflowtemplateid)
values (9,1)
Insert into hib.[amendmentdocumenttemplateworkflowtemplate] (documenttemplateid, workflowtemplateid)
values (13,1)
Insert into hib.[amendmentdocumenttemplateworkflowtemplate] (documenttemplateid, workflowtemplateid)
values (18,1)
Insert into hib.[amendmentdocumenttemplateworkflowtemplate] (documenttemplateid, workflowtemplateid)
values (19,1)
