Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

TIS is using the [vwProgramme].ManagingDeanery field to determine the LocalOffice Programme Owner value in TIS, and will NI NOT be using the Hicom [vwLocalOffice] data.


The data reported belowing below has been taken from the Consolidated DR v1 on  

...

LocalOfficeNameProgrammeNumberProgrammeNameProgName
HEYHCHESTERFIELD STGP 015CHERSTERFIELD ST1 PROGRAMME 15CHESTERFIELD 
HEYHTrent FP 047047 - 2008 startersTrent 
HEYHTrent FP 008008 - 2009/10 startersTrent 
HEYHTrent FP 090090 - 2008/9/10 startersTrent 
HEYHTrent FP 048048 - 2008/9/10 startersTrent 
HEYHTrent FP 010010 - 2008/9/10 startersTrent 
HEYHTrent FP SA2 - 2008SA2 - 2008Trent 
HEYHTrent FP 086086 - 2008/9/10 startersTrent 
HEYHTrent FP 029029 - 2008/9/10 startersTrent 
HEYHTrent FP 027027 - 2008/9 startersTrent 
HEYHTrent FP 068(Ac)068(Ac) - 2009/10 startersTrent 
HEYHTrent FP 002002 - 2009/10 startersTrent 
HEYHTrent FP 013013 - 2008 startersTrent 
HEYHTrent FP 056056 - 2008/9 startersTrent 
HEYHTrent FP 031031 - 2008/9 startersTrent 
HEYHTrent FP 036036 - 2008/9 startersTrent 
HEYHRotation 49NGH F1Rotation 


...

ManagingDeanery to TIS LocalOffice Mapping

Using the following ManagingDeanery value to TIS LocalOffice Mapping;

Code Block
sql
sql

case when p.ManagingDeanerymanagingdeaneryletb = 'Health Education England North West' THEN 'HENW'
			when p.ManagingDeanerymanagingdeaneryletb = 'Health Education England West Midlands' THEN 'HEWM'
			when p.ManagingDeanerymanagingdeaneryletb = 'Health Education England Yorkshire and the Humber' THEN 'HEYH'
			when p.ManagingDeanerymanagingdeaneryletb = 'Health Education England North East' THEN 'HENE'
			when p.ManagingDeanerymanagingdeaneryletb = 'Health Education England East of England' THEN 'HEEOE'
			when p.ManagingDeanerymanagingdeaneryletb IN ('Health Education England South West',

									   'Peninsula Local Office - HESW',

									   'Severn Local Office - HESW') THEN 'HESW'
			when p.ManagingDeanerymanagingdeaneryletb IN ('Health Education England East Midlands',

									   'Yorkshire & Humber Deanery (North East)') THEN 'HEEM'
			when p.ManagingDeanerymanagingdeaneryletb IN ('Health Education England Kent, Surrey and Sussex',

									   'London LETBs',

								       'Health Education England North West London',

								       'Health Education England North North CentralCentral and East London',

								       'Health Education England South London') THEN 'HELASE'
			when p.ManagingDeanerymanagingdeaneryletb IN ('Health Education England Wessex', 'Health 
	                               'Health Education England Thames Valley') THEN 'HEWTV'
			else 'UNKNOWN'
		endend as mapped_lo

Using the above logic, leaves the following Programmes unable to determine the TIS LocalOffice

statusLocalOfficeNameManagingDeanerymapped_lorc
CurrentHEEOELondonUNKNOWN1
CurrentHEWMDefence Postgraduate Medical DeaneryUNKNOWN1
CurrentHEYHNULLUNKNOWN33
InactiveHEEMNULLUNKNOWN363
InactiveHELASENULLUNKNOWN15698
InactiveHESWNULLUNKNOWN637
InactiveHEWTVNULLUNKNOWN52
InactiveHEYHNULLUNKNOWN142

vwLocalOffice to vwProgramme MD.xlsx

Code Block
sql
sql
select p.status, lop.LocalOfficeName, p.ProgrammeNumber, p.ProgrammeName, p.ManagingDeanery, 
	   case when p.ManagingDeanery = 'Health Education England North West' THEN 'HENW'
			when p.ManagingDeanery = 'Health Education England West Midlands' THEN 'HEWM'
			when p.ManagingDeanery = 'Health Education England Yorkshire and the Humber' THEN 'HEYH'
			when p.ManagingDeanery = 'Health Education England North East' THEN 'HENE'
			when p.ManagingDeanery = 'Health Education England East of England' THEN 'HEEOE'
			when p.ManagingDeanery IN ('Health Education England South West', 
									   'Peninsula Local Office - HESW', 
									   'Severn Local Office - HESW') THEN 'HESW'
			when p.ManagingDeanery IN ('Health Education England East Midlands', 
									   'Yorkshire & Humber Deanery (North East)') THEN 'HEEM'
			when p.ManagingDeanery IN ('Health Education England Kent, Surrey and Sussex', 
									   'London LETBs', 
								       'Health Education England North West London', 
								       'Health Education England North Central and East London', 
								       'Health Education England South London') THEN 'HELASE'
			when p.ManagingDeanery IN ('Health Education England Wessex', 'Health
   Education England Thames Valley') THEN 'HEWTV' 			else 'UNKNOWN' 		end as mapped_lo from [HEELIVE]                         'Health Education England Thames Valley') THEN 'HEWTV'
			else 'UNKNOWN'
		end as mapped_lo
from [HEELIVE].[vwProgramme] as p
join [HEELIVE].[vwLocalOffice] as lop on (lop.ItemType = 'Programme' and lop.UniqueID = p.programmeid)
--where status = 'Current'
--and managingdeanery is not null
order by 6,1,2 desc

select p.status, lop.LocalOfficeName, p.ManagingDeanery, 
	   case when p.ManagingDeanery = 'Health Education England North West' THEN 'HENW'
			when p.ManagingDeanery = 'Health Education England West Midlands' THEN 'HEWM'
			when p.ManagingDeanery = 'Health Education England Yorkshire and the Humber' THEN 'HEYH'
			when p.ManagingDeanery = 'Health Education England North East' THEN 'HENE'
			when p.ManagingDeanery = 'Health Education England East of England' THEN 'HEEOE'
			when p.ManagingDeanery IN ('Health Education England South West', 
									   'Peninsula Local Office - HESW', 
									   'Severn Local Office - HESW') THEN 'HESW'
			when p.ManagingDeanery IN ('Health Education England East Midlands', 
									   'Yorkshire & Humber Deanery (North East)') THEN 'HEEM'
			when p.ManagingDeanery IN ('Health Education England Kent, Surrey and Sussex', 
									   'London LETBs', 
								       'Health Education England North West London', 
								       'Health Education England North Central and East London', 
								       'Health Education England South London') THEN 'HELASE'
			when p.ManagingDeanery IN ('Health Education England Wessex', 
                                       'Health Education England Thames Valley') THEN 'HEWTV'
			else 'UNKNOWN'
		end as mapped_lo, count(*) as rc
from [HEELIVE].[vwProgramme] as p
join [HEELIVE].[vwLocalOffice] as lop on (lop.ItemType = 'Programme' and lop.UniqueID = p.programmeid)
--where status = 'Current'
--and managingdeanery is not null
--order by 6,1,2 desc
group by p.status, lop.LocalOfficeName, p.ManagingDeanery, 
	   case when p.ManagingDeanery = 'Health Education England North West' THEN 'HENW'
			when p.ManagingDeanery = 'Health Education England West Midlands' THEN 'HEWM'
			when p.ManagingDeanery = 'Health Education England Yorkshire and the Humber' THEN 'HEYH'
			when p.ManagingDeanery = 'Health Education England North East' THEN 'HENE'
			when p.ManagingDeanery = 'Health Education England East of England' THEN 'HEEOE'
			when p.ManagingDeanery IN ('Health Education England South West', 
									   'Peninsula Local Office - HESW', 
									   'Severn Local Office - HESW') THEN 'HESW'
			when p.ManagingDeanery IN ('Health Education England East Midlands', 
									   'Yorkshire & Humber Deanery (North East)') THEN 'HEEM'
			when p.ManagingDeanery IN ('Health Education England Kent, Surrey and Sussex', 
									   'London LETBs', 
								       'Health Education England North West London', 
								       'Health Education England North Central and East London', 
								       'Health Education England South London') THEN 'HELASE'
			when p.ManagingDeanery IN ('Health Education England Wessex', 
                                       'Health Education England Thames Valley') THEN 'HEWTV'
			else 'UNKNOWN'
		end

...