SSRS report to refer- http://reports.abpn.com/Reports/report/ABCC/ABCC%20(Operations)/CCAssessmentPathway_ABCCStatusPerformance_byDiplomate



-- First get approval Jenny and Kevin that are they6 allowed to switch

-- Switch a person from Exam to ABCC Pathway - ex - 166262

Queries are specific to the HD ticket - https://abpnit.freshdesk.com/a/tickets/6242, specifically the dates


BEGIN TRAN


Select * from  certificate Where person_key = 166262


Select * from CCEnrollmentCertificate WHERE CertificateId IN (


Select CertificateId from  certificate Where person_key = 166262


)

-- Swich CCAssessmentType to 1


UPDATE CCEnrollmentCertificate SET CCAssessmentType = 1, UpdatedBy = 'aagrawal', UpdatedDate = GetDate() WHERE CCEnrollmentCertificateId = 17586


-- ABCC Tables


Select * from AbccAssessment Where Person_key = 166262


USE [WebCAD]

GO


INSERT INTO [dbo].[AbccAssessment]

           ([Person_Key]

           ,[CertificateId]

           ,[StartDate]

           ,[EndDate]

           ,[Examination_Grade_Key]

           ,[AbccAssessmentStatusId]

           ,[CreatedBy]

           ,[CreatedDate]

           ,[UpdatedBy]

           ,[UpdatedDate])

     VALUES

           (166262,

            59416,

           '01/01/2018',

           '12/31/2027',

           3,

           2,

           'aagrawal',

           GetDate(),

           'aagrawal',

           GetDate())

GO


Select * from TestTaker_Status


Select * from AbccAssessment WHERE YEAR(StartDate) = 2025


Select * from AbccAssessmentModule WHERE AbccAssessmentId = 11057


USE [WebCAD]

GO



USE [WebCAD]

GO


INSERT INTO [dbo].[AbccAssessmentModule]

           ([AbccAssessmentId]

           ,[StartDate]

           ,[EndDate]

           ,[OasisLearningTrackId]

           ,[Examination_Grade_Key]

           ,[CreatedBy]

           ,[CreatedDate]

           ,[UpdatedBy]

           ,[UpdatedDate]

           ,[IsCatchUp]

           ,[AttestationDate])

     VALUES

           (94686

           ,'01/01/2025'

           ,'12/31/2027'

           ,265

           ,3

           ,'aagrawal'

           ,GetDate()

           ,'aagrawal'

           ,GetDate()

           ,1

           ,null)

GO




Select * from OasisLearningTrack Where Certification_Key = 19 AND Year(EndDate) = 2027


ROLLBACK TRAN