People - Data Analysis | GMC/GDC Numbers


Current Assumptions for TIS


Currently Held in DR


vwPerson by Status;

select status, count(*)
FROM [HEELIVE].[vwPerson]
group by status;


statusRowCount
Current108596
Inactive136398


With a NULL GMCNumber and a NULL or UNKNOWN GDCNumber;

select gmcnumber, gdcnumber, status, count(*)
FROM [HEELIVE].[vwPerson]
where status = 'Current'
and gmcnumber is null
group by gmcnumber, gdcnumber, status
order by 4 desc;


gmcnumbergdcnumberstatusRowCount
NULLNULLCurrent11180
NULLUNKNOWNCurrent7


95 People with duplicated GMCNumbers;

SELECT GMCNUMBER, STATUS, COUNT(*) 
FROM [HEELIVE].[vwPerson] 
GROUP BY GMCNUMBER, 
STATUS HAVING COUNT(*) > 1 
ORDER BY 3 DESC;


GMCNUMBERSTATUSRowCount
NULLCurrent13935
UNKNOWNInactive12922
NULLInactive6992
N/ACurrent2585
UNKNOWNCurrent2378
N/AInactive1048

Inactive1036

Current604
RetiredInactive23
RetiredCurrent19
NACurrent15
0Inactive9
1234567Inactive5
6066499Inactive5
0Inactive4
5208874Inactive3
L922264Inactive3
L962435Inactive3
0Current3
1111111Inactive3
L950202Inactive2
2578918Inactive2
L933034Inactive2
L950915Inactive2
555555Inactive2
uInactive2
L923059Inactive2
6071960Inactive2
4743116Inactive2
L910017Inactive2
888888Inactive2
L922242Inactive2
6145688Inactive2
3675689Inactive2
5193442Inactive2
4150394Inactive2
L99/940Inactive2
L950806Inactive2
L949777Inactive2
L912804Inactive2
4217028Inactive2
9999999Inactive2
5555555Inactive2
2818087Inactive2
5200431Inactive2
6054833Inactive2
4582038Inactive2
L980074Inactive2
L971362Inactive2
5203773Inactive2
6065661Inactive2
5200000Inactive2
L950644Inactive2
L960152Inactive2
6168983Inactive2
9876543Current2
7479912Current2
L941460Inactive2
L941327Inactive2
L970242Inactive2
4123901Current2
L952029Inactive2
6146557Inactive2
L951903Inactive2
L952273Inactive2
4Inactive2
L941604Inactive2
7072678Inactive2
L99/001Inactive2
L979407Inactive2
L940070Inactive2
8888888Inactive2
L920077Inactive2
4271945Inactive2
L960358Inactive2
L940300Inactive2
7293795Inactive2
L932379Inactive2
95/0516Inactive2
L923859Inactive2
4127321Inactive2
L962367Inactive2
6144659Inactive2
L950858Inactive2
4257820Inactive2
L962248Inactive2
L941738Inactive2
98/1208Inactive2
152636Inactive2
L971892Inactive2
L950934Inactive2
L98/127Inactive2
L962659Inactive2
L971128Inactive2
6091459Inactive2


39 People with duplicated GDCNumber;

SELECT GdCNUMBER, STATUS, COUNT(*) 
FROM [HEELIVE].[vwPerson] 
GROUP BY GdCNUMBER, 
STATUS HAVING COUNT(*) > 1 
ORDER BY 3 DESC;


GDCNUMBERSTATUSRowCount
NULLInactive111726
NULLCurrent85261
N/AInactive17709
N/ACurrent11163

Current5572
UNKNOWNInactive795
UNKNOWNCurrent738

Inactive413
67522Inactive2
49099Inactive2
196456Inactive2
67728Inactive2
66102Inactive2
83713Inactive2
66990Inactive2
65064Inactive2
100204Inactive2
211755Inactive2
67956Inactive2
54025Inactive2
192439Inactive2
172033Inactive2
52466Inactive2
68214Inactive2
76433Inactive2
154368Inactive2
66558Inactive2
58558Inactive2
79463Inactive2
81612Inactive2
59768Inactive2
258345Inactive2
68090Inactive2
84005Inactive2
53517Inactive2
63246Inactive2
64920Inactive2
84804Inactive2
79732Inactive2



People by Status, GMCNumber, GDCNumber and PublicHealthNumber

with q as (
select status, 
	   case when gmcnumber = 'UNKNOWN' THEN gmcnumber
			when gmcnumber = 'N/A' THEN gmcnumber
			when gmcnumber = 'Retired' THEN gmcnumber
			when gmcnumber IS NULL THEN gmcnumber
			else 'Valid' 
	  end gmcnumber_c, gmcnumber,
	  case when gdcnumber = 'UNKNOWN' THEN gdcnumber
			when gdcnumber = 'N/A' THEN gdcnumber
			when gdcnumber = 'Retired' THEN gdcnumber
			when gdcnumber IS NULL THEN gdcnumber
			else 'Valid' 
	  end gdcnumber_c, gdcnumber, 
	  case when publichealthnumber = 'UNKNOWN' THEN publichealthnumber
			when publichealthnumber = 'N/A' THEN publichealthnumber
			when publichealthnumber = 'Retired' THEN publichealthnumber
			when publichealthnumber IS NULL THEN publichealthnumber
			else 'Valid' 
	  end publichealthnumber_c, publichealthnumber 
from [HEELIVE].[vwPerson])
select status, gmcnumber_c, gdcnumber_c, publichealthnumber_c, count(*) as rc
from q
group by status, gmcnumber_c, gdcnumber_c, publichealthnumber_c
order by 5 desc;
statusgmcnumber_cgdcnumber_cpublichealthnumber_crc
InactiveValidNULLNULL97063
CurrentValidNULLNULL76965
InactiveValidN/ANULL17195
InactiveUNKNOWNNULLNULL11869
CurrentNULLNULLNULL11237
CurrentValidN/ANULL9429
InactiveNULLValidNULL4833
CurrentNULLValidNULL3192
InactiveNULLNULLNULL2890
CurrentValidValidNULL2562
CurrentUNKNOWNNULLNULL2060
CurrentN/AN/AN/A1553
InactiveN/AValidNULL646
InactiveUNKNOWNUNKNOWNValid369
CurrentN/ANULLNULL362
InactiveUNKNOWNN/ANULL350
CurrentN/AUNKNOWNNULL348
CurrentUNKNOWNUNKNOWNNULL283
InactiveUNKNOWNUNKNOWNNULL217
InactiveValidValidNULL183
InactiveN/ANULLNULL156
CurrentN/AValidNULL156
InactiveNULLNULLValid153
CurrentNULLNULLValid134
InactiveNULLUNKNOWNNULL129
InactiveN/AN/AValid103
InactiveUNKNOWNValidNULL86
CurrentN/AN/ANULL76
InactiveN/AUNKNOWNNULL56
CurrentN/AN/AValid56
InactiveN/AN/AN/A54
CurrentNULLUNKNOWNNULL52
CurrentValidUNKNOWNNULL48
CurrentN/ANULLValid36
InactiveN/ANULLValid23
InactiveRetiredNULLNULL23
InactiveUNKNOWNNULLValid20
CurrentRetiredNULLNULL19
InactiveValidUNKNOWNNULL18
CurrentUNKNOWNValidNULL18
InactiveNULLN/AValid17
CurrentUNKNOWNN/ANULL15
InactiveUNKNOWNN/AValid9
CurrentUNKNOWNUNKNOWNValid7
InactiveNULLNULLUNKNOWN7
CurrentNULLNULLUNKNOWN5
InactiveN/AValidN/A4
InactiveUNKNOWNUNKNOWNUNKNOWN3
InactiveValidN/An/a3
CurrentUNKNOWNNULLValid3
InactiveN/AN/Aunknown3
CurrentValidN/AN/A3
CurrentUNKNOWNValidValid2
CurrentNULLValidN/A2
CurrentN/AValidN/A2
InactiveValidUNKNOWNN/A2
CurrentNULLN/AValid1
InactiveUNKNOWNUNKNOWNN/A1
InactiveNULLValidN/A1
CurrentUNKNOWNN/AN/A1
CurrentNULLValidValid1
CurrentValidNULLValid1
CurrentN/AValidValid1
CurrentValidN/AValid1
CurrentValidUNKNOWNN/A1
InactiveValidNULLValid1
InactiveValidN/AValid1
InactiveN/AN/ANULL1
InactiveN/AUNKNOWNn/a1
InactiveN/AValidValid1
InactiveValidValidN/A1


193 People with a valid GMC and GDC Numbers, that are valid and different, of which 81 have a current status

with q as (
select status, 
	   case when gmcnumber = 'UNKNOWN' THEN gmcnumber
			when gmcnumber = 'N/A' THEN gmcnumber
			when gmcnumber = 'Retired' THEN gmcnumber
			when gmcnumber IS NULL THEN gmcnumber
			else 'Valid' 
	  end gmcnumber_c, gmcnumber,
	  case when gdcnumber = 'UNKNOWN' THEN gdcnumber
			when gdcnumber = 'N/A' THEN gdcnumber
			when gdcnumber = 'Retired' THEN gdcnumber
			when gdcnumber IS NULL THEN gdcnumber
			else 'Valid' 
	  end gdcnumber_c, gdcnumber, 
	  case when publichealthnumber = 'UNKNOWN' THEN publichealthnumber
			when publichealthnumber = 'N/A' THEN publichealthnumber
			when publichealthnumber = 'Retired' THEN publichealthnumber
			when publichealthnumber IS NULL THEN publichealthnumber
			else 'Valid' 
	  end publichealthnumber_c, publichealthnumber 
from [HEELIVE].[vwPerson])
select status, gmcnumber_c, gdcnumber_c, publichealthnumber_c, count(*) as rc
from q
where gmcnumber_c = 'Valid'
and gdcnumber_c = 'Valid'
and gmcnumber <> gdcnumber
group by status, gmcnumber_c, gdcnumber_c, publichealthnumber_c
order by 5 desc;


statusgmcnumber_cgdcnumber_cpublichealthnumber_crc
InactiveValidValidNULL111
CurrentValidValidNULL81
InactiveValidValidN/A1


These are the 81 Current people with a GMC and GDC Numbers;

with q as (
select status, 
	   case when gmcnumber = 'UNKNOWN' THEN gmcnumber
			when gmcnumber = 'N/A' THEN gmcnumber
			when gmcnumber = 'Retired' THEN gmcnumber
			when gmcnumber IS NULL THEN gmcnumber
			else 'Valid' 
	  end gmcnumber_c, gmcnumber,
	  case when gdcnumber = 'UNKNOWN' THEN gdcnumber
			when gdcnumber = 'N/A' THEN gdcnumber
			when gdcnumber = 'Retired' THEN gdcnumber
			when gdcnumber IS NULL THEN gdcnumber
			else 'Valid' 
	  end gdcnumber_c, gdcnumber, 
	  case when publichealthnumber = 'UNKNOWN' THEN publichealthnumber
			when publichealthnumber = 'N/A' THEN publichealthnumber
			when publichealthnumber = 'Retired' THEN publichealthnumber
			when publichealthnumber IS NULL THEN publichealthnumber
			else 'Valid' 
	  end publichealthnumber_c, publichealthnumber 
from [HEELIVE].[vwPerson])
select status, gmcnumber, gdcnumber, publichealthnumber
from q
where gmcnumber_c = 'Valid'
and gdcnumber_c = 'Valid'
and gmcnumber <> gdcnumber
and status = 'Current'


statusgmcnumbergdcnumberpublichealthnumber
Current6050333243960NULL
Current7082028170339NULL
Current607566771819NULL
Current614556577929NULL
Current615562979672NULL
Current727146585966NULL
Current605406271259NULL
Current7038887109982NULL
Current7558397191759NULL
Current3130485D 53723NULL
Current450224566539NULL
Current3284834D 55386NULL
Current7071773145892NULL
Current701439679337NULL
Current429583361623NULL
Current349394656181NULL
Current602942771139NULL
Current727190383886NULL
Current7088837102512NULL
Current707886481287NULL
Current6165405111822NULL
Current610340369486NULL
Current603930468421NULL
Current409235360427NULL
Current609985172293NULL
Current704346376527NULL
Current708510182297NULL
Current6151754116606NULL
Current6026637193169NULL
Current614723278999NULL
Current610515983951NULL
Current252308063471NULL
Current358754481487NULL
Current470341777987NULL
Current232446344960NULL
Current468068275154NULL
Current603131371020NULL
Current713836385446NULL
Current6160757259246NULL
Current354559958622NULL
Current332439255633NULL
Current701439580550NULL
Current419396261530NULL
Current7038884104928NULL
Current401469660496NULL
Current7484406249390NULL
Current461819366578NULL
Current602514669339NULL
Current3196579D 57053NULL
Current454515066926NULL
Current4202033D 60023NULL
Current7482436232108NULL
Current616684282361NULL
Current7047254160410NULL
Current2565712D 47694NULL
Current705008881221NULL
Current607325873270NULL
Current6102810228938NULL
Current300160250644NULL
Current420047161635NULL
Current6129007101076NULL
Current436230672715NULL
Current605495698321NULL
Current457592464886NULL
Current425751462606NULL
Current116198116198NULL
Current6053146245106NULL
Current6159134245416NULL
Current708385370719NULL
Current327376454270NULL
Current713416483151NULL
Current7263521170119NULL
Current701436776259NULL
Current324011750840NULL
Current7461832208506NULL
Current436512764484NULL
Current473529069055NULL
Current474526669686NULL
Current727185583252NULL
Current6054983211655NULL
Current6162303244971NULL


People with a valid Public Health number and GMC or GDC Number;

with q as (
select status, 
	   case when gmcnumber = 'UNKNOWN' THEN gmcnumber
			when gmcnumber = 'N/A' THEN gmcnumber
			when gmcnumber = 'Retired' THEN gmcnumber
			when gmcnumber IS NULL THEN gmcnumber
			else 'Valid' 
	  end gmcnumber_c, gmcnumber,
	  case when gdcnumber = 'UNKNOWN' THEN gdcnumber
			when gdcnumber = 'N/A' THEN gdcnumber
			when gdcnumber = 'Retired' THEN gdcnumber
			when gdcnumber IS NULL THEN gdcnumber
			else 'Valid' 
	  end gdcnumber_c, gdcnumber, 
	  case when publichealthnumber = 'UNKNOWN' THEN publichealthnumber
			when publichealthnumber = 'N/A' THEN publichealthnumber
			when publichealthnumber = 'Retired' THEN publichealthnumber
			when publichealthnumber IS NULL THEN publichealthnumber
			else 'Valid' 
	  end publichealthnumber_c, publichealthnumber 
from [HEELIVE].[vwPerson])
select status, gmcnumber_c, gdcnumber_c, publichealthnumber_c, count(*) as rc
from q
where publichealthnumber_c = 'Valid'
group by status, gmcnumber_c, gdcnumber_c, publichealthnumber_c
order by 5 desc;

There are only 940 people rows with a valid Public Health Number, of which only 2 Current Person rows have a valid GMC Number

statusgmcnumber_cgdcnumber_cpublichealthnumber_crc
InactiveUNKNOWNUNKNOWNValid369
InactiveNULLNULLValid153
CurrentNULLNULLValid134
InactiveN/AN/AValid103
CurrentN/AN/AValid56
CurrentN/ANULLValid36
InactiveN/ANULLValid23
InactiveUNKNOWNNULLValid20
InactiveNULLN/AValid17
InactiveUNKNOWNN/AValid9
CurrentUNKNOWNUNKNOWNValid7
CurrentUNKNOWNNULLValid3
CurrentUNKNOWNValidValid2
CurrentValidNULLValid1
CurrentValidN/AValid1
CurrentN/AValidValid1
CurrentNULLN/AValid1
CurrentNULLValidValid1
InactiveN/AValidValid1
InactiveValidNULLValid1
InactiveValidN/AValid1


These are the 2 current people rows with a GMC and Public Health Number

with q as (
select status, 
	   case when gmcnumber = 'UNKNOWN' THEN gmcnumber
			when gmcnumber = 'N/A' THEN gmcnumber
			when gmcnumber = 'Retired' THEN gmcnumber
			when gmcnumber IS NULL THEN gmcnumber
			else 'Valid' 
	  end gmcnumber_c, gmcnumber,
	  case when gdcnumber = 'UNKNOWN' THEN gdcnumber
			when gdcnumber = 'N/A' THEN gdcnumber
			when gdcnumber = 'Retired' THEN gdcnumber
			when gdcnumber IS NULL THEN gdcnumber
			else 'Valid' 
	  end gdcnumber_c, gdcnumber, 
	  case when publichealthnumber = 'UNKNOWN' THEN publichealthnumber
			when publichealthnumber = 'N/A' THEN publichealthnumber
			when publichealthnumber = 'Retired' THEN publichealthnumber
			when publichealthnumber IS NULL THEN publichealthnumber
			else 'Valid' 
	  end publichealthnumber_c, publichealthnumber 
from [HEELIVE].[vwPerson])
select status, gmcnumber, gdcnumber_c, publichealthnumber
from q
where publichealthnumber_c = 'Valid'
and gmcnumber_c = 'Valid'
and status = 'Current'


statusgmcnumbergdcnumber_cpublichealthnumber
Current4399768N/A54190
Current7503361NULL7145047578



For Discussion 

#
CommentOwner
1Do we need to flag trainees who are missing data in any way in TIS?
Joanne Watson (Unlicensed)
2