insert into VCLib.T_ROLE_CLIENT_MODULES(ClientModuleID,LoadOrder,RoleClientModuleID,RoleID)
select cmn.ClientModuleID, rcm.LoadOrder, NEWID(), rcm.RoleID
from VCLib.T_ROLE_CLIENT_MODULES rcm
join VCLib.T_CLIENT_MODULES cm on cm.ClientModuleID = rcm.ClientModuleID
join VCLib.T_CLIENT_MODULES cmn on cmn.ModuleType = 'Custom_' + cm.ModuleType
where cm.ModuleType in ( 'DnDoctorClientModule', 'DispDoctorClientModule' )
