@casomoltd/nhs-pay 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -22
- package/dist/afc-band.d.ts +4 -4
- package/dist/afc-band.js +4 -4
- package/dist/afc-scales.d.ts +89 -60
- package/dist/afc-scales.js +166 -182
- package/dist/afc-scales.js.map +1 -1
- package/dist/allowances.js +11 -11
- package/dist/allowances.js.map +1 -1
- package/dist/award.d.ts +3 -3
- package/dist/award.js +21 -21
- package/dist/award.js.map +1 -1
- package/dist/circulars/afc-shapes.d.ts +41 -21
- package/dist/circulars/afc-shapes.js +9 -8
- package/dist/circulars/afc-shapes.js.map +1 -1
- package/dist/circulars/england-md-1-2026-r2.d.ts +13 -0
- package/dist/circulars/england-md-1-2026-r2.js +13 -0
- package/dist/circulars/england-md-1-2026-r2.js.map +1 -1
- package/dist/circulars/ni-hsc-afc-06-2025.d.ts +3 -2
- package/dist/circulars/ni-hsc-afc-06-2025.js +3 -2
- package/dist/circulars/ni-hsc-afc-06-2025.js.map +1 -1
- package/dist/circulars/ni-hsc-tc8-05-2025.d.ts +22 -0
- package/dist/circulars/ni-hsc-tc8-05-2025.js +22 -0
- package/dist/circulars/ni-hsc-tc8-05-2025.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2025-01.d.ts +20 -0
- package/dist/circulars/scotland-pcs-dd-2025-01.js +20 -0
- package/dist/circulars/scotland-pcs-dd-2025-01.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2026-01.d.ts +19 -0
- package/dist/circulars/scotland-pcs-dd-2026-01.js +30 -10
- package/dist/circulars/scotland-pcs-dd-2026-01.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2026-02.d.ts +10 -0
- package/dist/circulars/scotland-pcs-dd-2026-02.js +10 -0
- package/dist/circulars/scotland-pcs-dd-2026-02.js.map +1 -1
- package/dist/circulars/wales-mdw-01-2025.d.ts +17 -0
- package/dist/circulars/wales-mdw-01-2025.js +17 -0
- package/dist/circulars/wales-mdw-01-2025.js.map +1 -1
- package/dist/circulars/wales-mdw-01-2026.d.ts +20 -0
- package/dist/circulars/wales-mdw-01-2026.js +20 -0
- package/dist/circulars/wales-mdw-01-2026.js.map +1 -1
- package/dist/commutation.js +3 -2
- package/dist/commutation.js.map +1 -1
- package/dist/dental-grades.d.ts +25 -0
- package/dist/dental-grades.js +25 -0
- package/dist/dental-grades.js.map +1 -0
- package/dist/dental-scales.d.ts +5 -21
- package/dist/dental-scales.js +73 -72
- package/dist/dental-scales.js.map +1 -1
- package/dist/format.js +3 -2
- package/dist/format.js.map +1 -1
- package/dist/hcas-pcts.d.ts +1 -1
- package/dist/hcas-pcts.js +1 -1
- package/dist/hcas-pcts.js.map +1 -1
- package/dist/hcas-zone.d.ts +23 -0
- package/dist/hcas-zone.js +17 -0
- package/dist/hcas-zone.js.map +1 -0
- package/dist/hcas.d.ts +26 -18
- package/dist/hcas.js +45 -24
- package/dist/hcas.js.map +1 -1
- package/dist/index.d.ts +25 -16
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/medical-grades.d.ts +33 -0
- package/dist/medical-grades.js +33 -0
- package/dist/medical-grades.js.map +1 -0
- package/dist/medical-scales.d.ts +10 -33
- package/dist/medical-scales.js +104 -158
- package/dist/medical-scales.js.map +1 -1
- package/dist/member/input-period.d.ts +18 -5
- package/dist/member/input-period.js +24 -13
- package/dist/member/input-period.js.map +1 -1
- package/dist/pay-round.js +3 -3
- package/dist/pay-round.js.map +1 -1
- package/dist/pay-year.d.ts +17 -0
- package/dist/pay-year.js +20 -0
- package/dist/pay-year.js.map +1 -0
- package/dist/pension/ledger.d.ts +7 -0
- package/dist/pension/ledger.js +18 -11
- package/dist/pension/ledger.js.map +1 -1
- package/dist/pension.js +2 -1
- package/dist/pension.js.map +1 -1
- package/dist/post.d.ts +20 -21
- package/dist/post.js +54 -53
- package/dist/post.js.map +1 -1
- package/dist/published/england-afc.d.ts +72 -0
- package/dist/published/england-afc.js +86 -0
- package/dist/published/england-afc.js.map +1 -0
- package/dist/published/hcas-zones.d.ts +18 -0
- package/dist/published/hcas-zones.js +46 -0
- package/dist/published/hcas-zones.js.map +1 -0
- package/dist/published/wales-living-wage.d.ts +36 -0
- package/dist/published/wales-living-wage.js +30 -0
- package/dist/published/wales-living-wage.js.map +1 -0
- package/dist/regions.d.ts +25 -14
- package/dist/regions.js +61 -71
- package/dist/regions.js.map +1 -1
- package/dist/resolver.d.ts +46 -41
- package/dist/resolver.js +70 -142
- package/dist/resolver.js.map +1 -1
- package/dist/role.d.ts +3 -3
- package/dist/scale-point.d.ts +11 -7
- package/dist/scale-point.js +29 -1
- package/dist/scale-point.js.map +1 -1
- package/dist/scale-tables.d.ts +42 -60
- package/dist/scale-tables.js +65 -105
- package/dist/scale-tables.js.map +1 -1
- package/dist/scale-translators.d.ts +90 -0
- package/dist/scale-translators.js +97 -0
- package/dist/scale-translators.js.map +1 -0
- package/dist/scales.d.ts +164 -102
- package/dist/scales.js +242 -462
- package/dist/scales.js.map +1 -1
- package/dist/sources.d.ts +8 -12
- package/dist/sources.js +9 -15
- package/dist/sources.js.map +1 -1
- package/dist/take-home.js +1 -2
- package/dist/take-home.js.map +1 -1
- package/dist/values.d.ts +10 -3
- package/dist/values.js +11 -4
- package/dist/values.js.map +1 -1
- package/dist/working-week.d.ts +23 -8
- package/dist/working-week.js +55 -25
- package/dist/working-week.js.map +1 -1
- package/package.json +3 -3
- package/dist/bands.d.ts +0 -63
- package/dist/bands.js +0 -78
- package/dist/bands.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
// ── Scales ───────────────────────────────────────
|
|
2
|
-
export { afcBand1 } from './
|
|
3
|
-
export { AFC_BANDS, AFC_BAND_IDS
|
|
2
|
+
export { afcBand1 } from './scales.js';
|
|
3
|
+
export { AFC_BANDS, AFC_BAND_IDS } from './afc-band.js';
|
|
4
|
+
export { WALES_LIVING_WAGE } from './published/wales-living-wage.js';
|
|
5
|
+
export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, afcPointOf, getAfcScales, afcScaleSource, latestAfcYear, latestRoundLag, payRoundLag, isPayRoundInReach, isAwaitingPayAward, assertLatestRoundsInReach, afcPayYears, afcPayYearFor, AFC_PAY_YEAR_KINDS, } from './scales.js';
|
|
6
|
+
export { schemeYearOfPayYear } from './pay-year.js';
|
|
4
7
|
// ── Pension ──────────────────────────────────────
|
|
5
8
|
export { PensionTiers, getEmployerPensionRate, getPensionScheme, getPensionTiers, getPensionTiersVO, lookupPensionTier, pensionTierRate, } from './pension.js';
|
|
6
9
|
// ── Post & resolvers ─────────────────────────────
|
|
7
10
|
export { Post, NO_ADJUSTMENTS } from './post.js';
|
|
8
11
|
export { afcResolver, dentalResolver, medicalResolver } from './resolver.js';
|
|
9
12
|
// ── Medical & dental scales ──────────────────────
|
|
10
|
-
export { MEDICAL_GRADES, MEDICAL_GRADE_IDS
|
|
11
|
-
export {
|
|
13
|
+
export { MEDICAL_GRADES, MEDICAL_GRADE_IDS } from './medical-grades.js';
|
|
14
|
+
export { MEDICAL_FAMILY, MEDICAL_PAY_YEARS, getMedicalScales, latestMedicalSource, } from './medical-scales.js';
|
|
15
|
+
export { DENTAL_GRADES, DENTAL_GRADE_IDS } from './dental-grades.js';
|
|
16
|
+
export { DENTAL_FAMILY, DENTAL_PAY_YEARS, getDentalScales } from './dental-scales.js';
|
|
12
17
|
// ── Additional pension ───────────────────────────
|
|
13
18
|
export { ADDITIONAL_PENSION_LIMIT, ADDITIONAL_PENSION_PAYMENTS, ADDITIONAL_PENSION_UNIT, additionalPensionCost, additionalPensionToBuy, } from './additional-pension.js';
|
|
14
19
|
export { ADDITIONAL_PENSION_COVERS } from './gad/additional-pension-table.js';
|
|
@@ -67,21 +72,20 @@ export { isSchemeYearEnd, schemeYearAfter, schemeYearBefore, schemeYearClosedBy,
|
|
|
67
72
|
export { SEED_BASES, seedFromJoinDate, seedFromStatement, } from './pension/seed.js';
|
|
68
73
|
export { buildLedger } from './pension/ledger.js';
|
|
69
74
|
// ── HCAS ─────────────────────────────────────────
|
|
70
|
-
export { HCAS_ZONE_IDS,
|
|
75
|
+
export { HCAS_ZONE_IDS, isHcasZoneId } from './hcas-zone.js';
|
|
76
|
+
export { calculateHcasSupplement, englandHcasZones, grossSalary, hcasRateBand, } from './hcas.js';
|
|
71
77
|
// ── HCAS PCTs ────────────────────────────────────
|
|
72
78
|
export { getHcasPcts, getHcasZone, } from './hcas-pcts.js';
|
|
73
79
|
// ── Regions ──────────────────────────────────────
|
|
74
|
-
export { AFC_REGIONS, ZONE_TO_REGION, afcRegionToHcasZone, afcRegionToNation,
|
|
75
|
-
// ── Bands ────────────────────────────────────────
|
|
76
|
-
export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, afcPointOf, getAfcScales, } from './bands.js';
|
|
80
|
+
export { AFC_REGIONS, ZONE_TO_REGION, afcRegionToHcasZone, afcRegionToNation, afcRegionOf, baseAfcRegion, isAfcRegionId, resolveRegion, } from './regions.js';
|
|
77
81
|
// ── Take-home ────────────────────────────────────
|
|
78
82
|
export { nhsTakeHome } from './take-home.js';
|
|
79
83
|
// ── Working week ──────────────────────────────
|
|
80
|
-
export { afcWeekInForce, afcWeeklyHours, hoursPerYear } from './working-week.js';
|
|
84
|
+
export { afcWeekInForce, afcWeeklyHours, annualiseHourly, hoursPerYear, } from './working-week.js';
|
|
81
85
|
// ── Format ───────────────────────────────────────
|
|
82
86
|
export { fmtMoney, fmtPct, fmtSalary, formatGBP, formatGBPPrecise, formatPct, formatPctPrecise, yearLabel, } from './format.js';
|
|
83
87
|
// ── Re-exports from paye-calc ────────────────────
|
|
84
88
|
// Types that appear in our public API so consumers
|
|
85
89
|
// don't need a direct paye-calc import for NHS work.
|
|
86
|
-
export { TAX_REGIONS, TAX_YEARS, NATIONS, NATION_KEYS, TakeHomePay, GrossAnnual, PensionBasis, PensionPercent, StudentLoanPlan, nationToTaxRegion, getTaxYearConfig, } from '@casomoltd/paye-calc';
|
|
90
|
+
export { TAX_REGIONS, TAX_YEARS, YEAR_LABELS, NATIONS, NATION_KEYS, TakeHomePay, GrossAnnual, PensionBasis, PensionPercent, StudentLoanPlan, nationToTaxRegion, getTaxYearConfig, } from '@casomoltd/paye-calc';
|
|
87
91
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAErC,OAAO,EAAC,SAAS,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAC,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,cAAc,EACd,aAAa,EACb,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,WAAW,EACX,aAAa,EACb,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAElD,oDAAoD;AACpD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,cAAc,CAAC;AAUtB,oDAAoD;AACpD,OAAO,EAAC,IAAI,EAAE,cAAc,EAAC,MAAM,WAAW,CAAC;AAU/C,OAAO,EAAC,WAAW,EAAE,cAAc,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAc3E,oDAAoD;AACpD,OAA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Ac,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,GAC9D,MAAM,mBAAmB,CAAC;AAG3B,oDAAoD;AACpD,OAAO,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,oDAAoD;AACpD,mDAAmD;AACnD,qDAAqD;AACrD,OAAO,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,OAAO,EACP,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The doctor grades wired into the domain, in their own module so a
|
|
3
|
+
* module that names a grade (the award table, roles, the resolvers) need
|
|
4
|
+
* not import the translation layer in `medical-scales.ts`.
|
|
5
|
+
*/
|
|
6
|
+
/** Doctor grade identifiers wired into the domain. */
|
|
7
|
+
export declare const MEDICAL_GRADES: {
|
|
8
|
+
readonly resident: "resident";
|
|
9
|
+
readonly consultant: "consultant";
|
|
10
|
+
readonly specialtyDoctor: "specialty-doctor";
|
|
11
|
+
readonly specialist: "specialist";
|
|
12
|
+
readonly salariedGp: "salaried-gp";
|
|
13
|
+
readonly gpEducator: "gp-educator";
|
|
14
|
+
readonly locallyEmployedDoctor: "locally-employed-doctor";
|
|
15
|
+
readonly fho1: "fho1";
|
|
16
|
+
readonly fho2: "fho2";
|
|
17
|
+
readonly sho: "sho";
|
|
18
|
+
readonly spr: "spr";
|
|
19
|
+
readonly str: "str";
|
|
20
|
+
readonly specialtyRegistrarCore: "specialty-registrar-core";
|
|
21
|
+
readonly specialtyRegistrarFixed: "specialty-registrar-fixed";
|
|
22
|
+
readonly gpRegistrarSho: "gp-registrar-sho";
|
|
23
|
+
readonly gpRegistrarSpr: "gp-registrar-spr";
|
|
24
|
+
readonly gpRegistrarStr: "gp-registrar-str";
|
|
25
|
+
readonly staffGrade: "staff-grade";
|
|
26
|
+
readonly associateSpecialist: "associate-specialist";
|
|
27
|
+
readonly specialtyDoctor2008: "specialty-doctor-2008";
|
|
28
|
+
readonly associateSpecialist2008: "associate-specialist-2008";
|
|
29
|
+
readonly hospitalPractitioner: "hospital-practitioner";
|
|
30
|
+
};
|
|
31
|
+
export type MedicalGradeId = (typeof MEDICAL_GRADES)[keyof typeof MEDICAL_GRADES];
|
|
32
|
+
/** Ordered grade IDs — stable iteration/enumeration. */
|
|
33
|
+
export declare const MEDICAL_GRADE_IDS: MedicalGradeId[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The doctor grades wired into the domain, in their own module so a
|
|
3
|
+
* module that names a grade (the award table, roles, the resolvers) need
|
|
4
|
+
* not import the translation layer in `medical-scales.ts`.
|
|
5
|
+
*/
|
|
6
|
+
/** Doctor grade identifiers wired into the domain. */
|
|
7
|
+
export const MEDICAL_GRADES = {
|
|
8
|
+
resident: 'resident',
|
|
9
|
+
consultant: 'consultant',
|
|
10
|
+
specialtyDoctor: 'specialty-doctor',
|
|
11
|
+
specialist: 'specialist',
|
|
12
|
+
salariedGp: 'salaried-gp',
|
|
13
|
+
gpEducator: 'gp-educator',
|
|
14
|
+
locallyEmployedDoctor: 'locally-employed-doctor',
|
|
15
|
+
fho1: 'fho1',
|
|
16
|
+
fho2: 'fho2',
|
|
17
|
+
sho: 'sho',
|
|
18
|
+
spr: 'spr',
|
|
19
|
+
str: 'str',
|
|
20
|
+
specialtyRegistrarCore: 'specialty-registrar-core',
|
|
21
|
+
specialtyRegistrarFixed: 'specialty-registrar-fixed',
|
|
22
|
+
gpRegistrarSho: 'gp-registrar-sho',
|
|
23
|
+
gpRegistrarSpr: 'gp-registrar-spr',
|
|
24
|
+
gpRegistrarStr: 'gp-registrar-str',
|
|
25
|
+
staffGrade: 'staff-grade',
|
|
26
|
+
associateSpecialist: 'associate-specialist',
|
|
27
|
+
specialtyDoctor2008: 'specialty-doctor-2008',
|
|
28
|
+
associateSpecialist2008: 'associate-specialist-2008',
|
|
29
|
+
hospitalPractitioner: 'hospital-practitioner',
|
|
30
|
+
};
|
|
31
|
+
/** Ordered grade IDs — stable iteration/enumeration. */
|
|
32
|
+
export const MEDICAL_GRADE_IDS = Object.values(MEDICAL_GRADES);
|
|
33
|
+
//# sourceMappingURL=medical-grades.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"medical-grades.js","sourceRoot":"","sources":["../src/medical-grades.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sDAAsD;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,eAAe,EAAE,kBAAkB;IACnC,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,qBAAqB,EAAE,yBAAyB;IAChD,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,sBAAsB,EAAE,0BAA0B;IAClD,uBAAuB,EAAE,2BAA2B;IACpD,cAAc,EAAE,kBAAkB;IAClC,cAAc,EAAE,kBAAkB;IAClC,cAAc,EAAE,kBAAkB;IAClC,UAAU,EAAE,aAAa;IACzB,mBAAmB,EAAE,sBAAsB;IAC3C,mBAAmB,EAAE,uBAAuB;IAC5C,uBAAuB,EAAE,2BAA2B;IACpD,oBAAoB,EAAE,uBAAuB;CACrC,CAAC;AAKX,wDAAwD;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAC5B,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
package/dist/medical-scales.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* increment), so no pay step is collapsed away.
|
|
14
14
|
*
|
|
15
15
|
* Grades captured in the circulars but not yet wired here (add when a
|
|
16
|
-
*
|
|
16
|
+
* consumer needs them — they are one mapping line each): England's ultra-
|
|
17
17
|
* legacy closed grades SCMO (KB11), CMO (KB01), pre-2003 consultant
|
|
18
18
|
* (MC21), closed Specialist Registrar (MN25) and closed training
|
|
19
19
|
* variants (MN13/15/21/35/37/39); the second staff-grade scales
|
|
@@ -21,51 +21,28 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import type { Nation, PayYear } from '@casomoltd/paye-calc';
|
|
23
23
|
import type { DocumentSource } from './document-source.js';
|
|
24
|
-
import type {
|
|
25
|
-
|
|
26
|
-
export declare const MEDICAL_GRADES: {
|
|
27
|
-
readonly resident: "resident";
|
|
28
|
-
readonly consultant: "consultant";
|
|
29
|
-
readonly specialtyDoctor: "specialty-doctor";
|
|
30
|
-
readonly specialist: "specialist";
|
|
31
|
-
readonly salariedGp: "salaried-gp";
|
|
32
|
-
readonly gpEducator: "gp-educator";
|
|
33
|
-
readonly locallyEmployedDoctor: "locally-employed-doctor";
|
|
34
|
-
readonly fho1: "fho1";
|
|
35
|
-
readonly fho2: "fho2";
|
|
36
|
-
readonly sho: "sho";
|
|
37
|
-
readonly spr: "spr";
|
|
38
|
-
readonly str: "str";
|
|
39
|
-
readonly specialtyRegistrarCore: "specialty-registrar-core";
|
|
40
|
-
readonly specialtyRegistrarFixed: "specialty-registrar-fixed";
|
|
41
|
-
readonly gpRegistrarSho: "gp-registrar-sho";
|
|
42
|
-
readonly gpRegistrarSpr: "gp-registrar-spr";
|
|
43
|
-
readonly gpRegistrarStr: "gp-registrar-str";
|
|
44
|
-
readonly staffGrade: "staff-grade";
|
|
45
|
-
readonly associateSpecialist: "associate-specialist";
|
|
46
|
-
readonly specialtyDoctor2008: "specialty-doctor-2008";
|
|
47
|
-
readonly associateSpecialist2008: "associate-specialist-2008";
|
|
48
|
-
readonly hospitalPractitioner: "hospital-practitioner";
|
|
49
|
-
};
|
|
50
|
-
export type MedicalGradeId = (typeof MEDICAL_GRADES)[keyof typeof MEDICAL_GRADES];
|
|
51
|
-
/** Ordered grade IDs — stable iteration/enumeration. */
|
|
52
|
-
export declare const MEDICAL_GRADE_IDS: MedicalGradeId[];
|
|
24
|
+
import type { MedicalGradeId } from './medical-grades.js';
|
|
25
|
+
import type { GradeFamily, GradeMeta } from './scale-tables.js';
|
|
53
26
|
/** A doctor grade's scale points in a nation/year, with its range. */
|
|
54
27
|
export type MedicalGradeMeta = GradeMeta<MedicalGradeId>;
|
|
28
|
+
/** Every read over the medical tables. */
|
|
29
|
+
export declare const MEDICAL_FAMILY: GradeFamily<MedicalGradeId>;
|
|
55
30
|
/**
|
|
56
31
|
* Pay years this family publishes, newest first — derived from the
|
|
57
32
|
* data so a new pay round can't leave a hand-maintained list stale.
|
|
58
33
|
*/
|
|
59
34
|
export declare const MEDICAL_PAY_YEARS: readonly PayYear[];
|
|
60
35
|
/**
|
|
61
|
-
* Published doctor grades for a nation and
|
|
36
|
+
* Published doctor grades for a nation and pay year, each with its
|
|
62
37
|
* scale points and salary range. Both args required — no default;
|
|
63
38
|
* an absent grade set throws `ScaleUnavailable`.
|
|
64
39
|
*/
|
|
65
40
|
export declare function getMedicalScales(year: PayYear, nation: Nation): MedicalGradeMeta[];
|
|
66
41
|
/**
|
|
67
|
-
* The newest
|
|
68
|
-
* every grade
|
|
42
|
+
* The newest document of the newest year a nation publishes doctors'
|
|
43
|
+
* pay for, across every medical grade that year. It searches
|
|
44
|
+
* the medical tables only: a document that sets dental pay alone is not
|
|
45
|
+
* a candidate.
|
|
69
46
|
*
|
|
70
47
|
* For prose that cites the nation rather than one family's table.
|
|
71
48
|
* Newest by issue date, not by any hardcoded preference: Scotland
|
package/dist/medical-scales.js
CHANGED
|
@@ -13,50 +13,25 @@
|
|
|
13
13
|
* increment), so no pay step is collapsed away.
|
|
14
14
|
*
|
|
15
15
|
* Grades captured in the circulars but not yet wired here (add when a
|
|
16
|
-
*
|
|
16
|
+
* consumer needs them — they are one mapping line each): England's ultra-
|
|
17
17
|
* legacy closed grades SCMO (KB11), CMO (KB01), pre-2003 consultant
|
|
18
18
|
* (MC21), closed Specialist Registrar (MN25) and closed training
|
|
19
19
|
* variants (MN13/15/21/35/37/39); the second staff-grade scales
|
|
20
20
|
* (England MH03/05, NI M212).
|
|
21
21
|
*/
|
|
22
|
-
import { NATION_KEYS,
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
22
|
+
import { NATION_KEYS, YEAR_LABELS } from '@casomoltd/paye-calc';
|
|
23
|
+
import { invariant } from './errors.js';
|
|
24
|
+
import { MEDICAL_GRADE_IDS } from './medical-grades.js';
|
|
25
|
+
import { combineScales, fromDocument, gradeFamily, } from './scale-tables.js';
|
|
26
|
+
import { byCode, byStage, numbered, byGrade, byPayPoint, byScalePoint, range, salariesOfCode, stepped, } from './scale-translators.js';
|
|
25
27
|
import { HSC_TC8_05_2025, MD_W_01_2025, MD_W_01_2026, PC_MD_1_2026_R2, PCS_DD_2025_01, PCS_DD_2025_01_ADDENDUM, PCS_DD_2026_01, PCS_DD_2026_02, } from './sources.js';
|
|
26
|
-
import { ENGLAND_MD_1_2026_R2 as ENG } from './circulars/england-md-1-2026-r2.js';
|
|
27
|
-
import { SCOTLAND_PCS_DD_2026_01 as SCO } from './circulars/scotland-pcs-dd-2026-01.js';
|
|
28
|
-
import { SCOTLAND_PCS_DD_2025_01 as SCO25 } from './circulars/scotland-pcs-dd-2025-01.js';
|
|
29
|
-
import { SCOTLAND_PCS_DD_2026_02 as SCO2 } from './circulars/scotland-pcs-dd-2026-02.js';
|
|
30
|
-
import { WALES_MDW_01_2025 as WAL } from './circulars/wales-mdw-01-2025.js';
|
|
31
|
-
import { WALES_MDW_01_2026 as WAL26 } from './circulars/wales-mdw-01-2026.js';
|
|
32
|
-
import { NI_HSC_TC8_05_2025 as NI } from './circulars/ni-hsc-tc8-05-2025.js';
|
|
33
|
-
/** Doctor grade identifiers wired into the domain. */
|
|
34
|
-
export const MEDICAL_GRADES = {
|
|
35
|
-
resident: 'resident',
|
|
36
|
-
consultant: 'consultant',
|
|
37
|
-
specialtyDoctor: 'specialty-doctor',
|
|
38
|
-
specialist: 'specialist',
|
|
39
|
-
salariedGp: 'salaried-gp',
|
|
40
|
-
gpEducator: 'gp-educator',
|
|
41
|
-
locallyEmployedDoctor: 'locally-employed-doctor',
|
|
42
|
-
fho1: 'fho1',
|
|
43
|
-
fho2: 'fho2',
|
|
44
|
-
sho: 'sho',
|
|
45
|
-
spr: 'spr',
|
|
46
|
-
str: 'str',
|
|
47
|
-
specialtyRegistrarCore: 'specialty-registrar-core',
|
|
48
|
-
specialtyRegistrarFixed: 'specialty-registrar-fixed',
|
|
49
|
-
gpRegistrarSho: 'gp-registrar-sho',
|
|
50
|
-
gpRegistrarSpr: 'gp-registrar-spr',
|
|
51
|
-
gpRegistrarStr: 'gp-registrar-str',
|
|
52
|
-
staffGrade: 'staff-grade',
|
|
53
|
-
associateSpecialist: 'associate-specialist',
|
|
54
|
-
specialtyDoctor2008: 'specialty-doctor-2008',
|
|
55
|
-
associateSpecialist2008: 'associate-specialist-2008',
|
|
56
|
-
hospitalPractitioner: 'hospital-practitioner',
|
|
57
|
-
};
|
|
58
|
-
/** Ordered grade IDs — stable iteration/enumeration. */
|
|
59
|
-
export const MEDICAL_GRADE_IDS = Object.values(MEDICAL_GRADES);
|
|
28
|
+
import { ENGLAND_MD_1_2026_R2 as ENG, ENGLAND_MD_1_2026_R2_CODES as ENG_CODES, } from './circulars/england-md-1-2026-r2.js';
|
|
29
|
+
import { SCOTLAND_PCS_DD_2026_01 as SCO, SCOTLAND_PCS_DD_2026_01_CODES as SCO_CODES, } from './circulars/scotland-pcs-dd-2026-01.js';
|
|
30
|
+
import { SCOTLAND_PCS_DD_2025_01 as SCO25, SCOTLAND_PCS_DD_2025_01_CODES as SCO25_CODES, } from './circulars/scotland-pcs-dd-2025-01.js';
|
|
31
|
+
import { SCOTLAND_PCS_DD_2026_02 as SCO2, SCOTLAND_PCS_DD_2026_02_CODES as SCO2_CODES, } from './circulars/scotland-pcs-dd-2026-02.js';
|
|
32
|
+
import { WALES_MDW_01_2025 as WAL, WALES_MDW_01_2025_CODES as WAL_CODES, } from './circulars/wales-mdw-01-2025.js';
|
|
33
|
+
import { WALES_MDW_01_2026 as WAL26, WALES_MDW_01_2026_CODES as WAL26_CODES, } from './circulars/wales-mdw-01-2026.js';
|
|
34
|
+
import { NI_HSC_TC8_05_2025 as NI, NI_HSC_TC8_05_2025_CODES as NI_CODES, } from './circulars/ni-hsc-tc8-05-2025.js';
|
|
60
35
|
// ── Mapping helpers ─────────────────────────────
|
|
61
36
|
/** Consultant year-point rows → points labelled by threshold, with the
|
|
62
37
|
* year of completed service carried on the point (not baked into the
|
|
@@ -66,7 +41,8 @@ const consultantByYear = (rows) => rows.map((r) => ({
|
|
|
66
41
|
salary: r.salary,
|
|
67
42
|
yearsExperience: r.yearCompleted,
|
|
68
43
|
}));
|
|
69
|
-
|
|
44
|
+
// ── Per-nation translation ──────────────────────
|
|
45
|
+
const england2026 = fromDocument(PC_MD_1_2026_R2, {
|
|
70
46
|
resident: byStage(ENG.doctorsInTraining),
|
|
71
47
|
consultant: consultantByYear(ENG.consultant),
|
|
72
48
|
'specialty-doctor': byCode(ENG.specialtyDoctor),
|
|
@@ -74,76 +50,60 @@ const england = fromDocument(PC_MD_1_2026_R2, {
|
|
|
74
50
|
'salaried-gp': range(ENG.salariedGpRange),
|
|
75
51
|
'gp-educator': byCode(ENG.gpEducators),
|
|
76
52
|
'locally-employed-doctor': byCode(ENG.locallyEmployedDoctors),
|
|
77
|
-
'staff-grade': stepped(
|
|
78
|
-
'associate-specialist': stepped(
|
|
53
|
+
'staff-grade': stepped(salariesOfCode(ENG.closedGrades, ENG_CODES.staffGrade)),
|
|
54
|
+
'associate-specialist': stepped(salariesOfCode(ENG.closedGrades, ENG_CODES.associateSpecialist)),
|
|
79
55
|
'specialty-doctor-2008': byCode(ENG.specialtyDoctor2008),
|
|
80
56
|
'associate-specialist-2008': byCode(ENG.associateSpecialist2008),
|
|
81
57
|
});
|
|
82
58
|
// Non-training grades from PCS(DD)2026/02 (12 Aug 2026); training
|
|
83
59
|
// grades from PCS(DD)2026/01, which deferred the rest to it. The
|
|
84
60
|
// two together are Scotland's complete 2026/27 round.
|
|
85
|
-
const
|
|
61
|
+
const scotland2026 = combineScales(fromDocument(PCS_DD_2026_02, {
|
|
86
62
|
consultant: consultantByYear(SCO2.consultant),
|
|
87
|
-
'specialty-doctor': SCO2.specialtyDoctor2022
|
|
88
|
-
|
|
89
|
-
salary: r.salary,
|
|
90
|
-
yearsExperience: r.scalePoint,
|
|
91
|
-
})),
|
|
92
|
-
specialist: SCO2.specialist2022.map((r) => ({
|
|
93
|
-
label: r.scalePoint === 0 ? 'Minimum' : `Point ${r.scalePoint}`,
|
|
94
|
-
salary: r.salary,
|
|
95
|
-
yearsExperience: r.scalePoint,
|
|
96
|
-
})),
|
|
63
|
+
'specialty-doctor': byScalePoint(SCO2.specialtyDoctor2022),
|
|
64
|
+
specialist: byScalePoint(SCO2.specialist2022),
|
|
97
65
|
'specialty-doctor-2008': stepped(SCO2.specialtyDoctor2008),
|
|
98
66
|
'associate-specialist-2008': stepped(SCO2.associateSpecialist2008),
|
|
99
|
-
'associate-specialist': stepped(
|
|
100
|
-
'staff-grade': stepped(
|
|
67
|
+
'associate-specialist': stepped(salariesOfCode(SCO2.closedGrades, SCO2_CODES.associateSpecialistPre2008)),
|
|
68
|
+
'staff-grade': stepped(salariesOfCode(SCO2.closedGrades, SCO2_CODES.staffGradePre1997)),
|
|
101
69
|
'salaried-gp': range(SCO2.salariedGpRange),
|
|
102
|
-
'gp-educator': SCO2.associateAdvisers
|
|
103
|
-
label: r.grade, salary: r.salary,
|
|
104
|
-
})),
|
|
70
|
+
'gp-educator': byGrade(SCO2.associateAdvisers),
|
|
105
71
|
}), fromDocument(PCS_DD_2026_01, {
|
|
106
|
-
fho1: stepped(
|
|
107
|
-
fho2: stepped(
|
|
108
|
-
sho: stepped(
|
|
109
|
-
spr: stepped(
|
|
110
|
-
str: stepped(
|
|
111
|
-
'specialty-registrar-core': stepped(
|
|
112
|
-
'specialty-registrar-fixed': stepped(
|
|
113
|
-
'gp-registrar-sho': stepped(
|
|
114
|
-
'gp-registrar-spr': stepped(
|
|
115
|
-
'gp-registrar-str': stepped(
|
|
72
|
+
fho1: stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.foundationYear1)),
|
|
73
|
+
fho2: stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.foundationYear2)),
|
|
74
|
+
sho: stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.seniorHouseOfficer)),
|
|
75
|
+
spr: stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.specialistRegistrar)),
|
|
76
|
+
str: stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.specialtyRegistrarFull)),
|
|
77
|
+
'specialty-registrar-core': stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.specialtyRegistrarCore)),
|
|
78
|
+
'specialty-registrar-fixed': stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.specialtyRegistrarFixed)),
|
|
79
|
+
'gp-registrar-sho': stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.gpRegistrarSho)),
|
|
80
|
+
'gp-registrar-spr': stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.gpRegistrarSpr)),
|
|
81
|
+
'gp-registrar-str': stepped(salariesOfCode(SCO.trainingGrades, SCO_CODES.gpRegistrarStr)),
|
|
116
82
|
}));
|
|
117
|
-
const
|
|
83
|
+
const wales2025 = fromDocument(MD_W_01_2025, {
|
|
118
84
|
consultant: consultantByYear(WAL.consultant),
|
|
119
|
-
str: stepped(
|
|
120
|
-
'specialty-registrar-core': stepped(
|
|
121
|
-
'specialty-registrar-fixed': stepped(
|
|
122
|
-
fho1: stepped(
|
|
123
|
-
fho2: stepped(
|
|
85
|
+
str: stepped(salariesOfCode(WAL.trainingGrades, WAL_CODES.specialtyRegistrarFull)),
|
|
86
|
+
'specialty-registrar-core': stepped(salariesOfCode(WAL.trainingGrades, WAL_CODES.specialtyRegistrarCore)),
|
|
87
|
+
'specialty-registrar-fixed': stepped(salariesOfCode(WAL.trainingGrades, WAL_CODES.specialtyRegistrarFixed)),
|
|
88
|
+
fho1: stepped(salariesOfCode(WAL.trainingGrades, WAL_CODES.foundationYear1)),
|
|
89
|
+
fho2: stepped(salariesOfCode(WAL.trainingGrades, WAL_CODES.foundationYear2)),
|
|
124
90
|
'specialty-doctor': byCode(WAL.specialtyDoctor),
|
|
125
91
|
specialist: byCode(WAL.specialist),
|
|
126
92
|
'salaried-gp': stepped(WAL.salariedGp.salaries),
|
|
127
|
-
'staff-grade': stepped(
|
|
128
|
-
'associate-specialist': stepped(
|
|
93
|
+
'staff-grade': stepped(salariesOfCode(WAL.closedGrades, WAL_CODES.staffGrade)),
|
|
94
|
+
'associate-specialist': stepped(salariesOfCode(WAL.closedGrades, WAL_CODES.associateSpecialist)),
|
|
129
95
|
'specialty-doctor-2008': byCode(WAL.specialtyDoctor2008),
|
|
130
96
|
'associate-specialist-2008': byCode(WAL.associateSpecialist2008),
|
|
131
|
-
'hospital-practitioner': stepped(
|
|
97
|
+
'hospital-practitioner': stepped(salariesOfCode(WAL.closedGrades, WAL_CODES.hospitalPractitioner)),
|
|
132
98
|
});
|
|
133
|
-
const
|
|
134
|
-
fho1: stepped(
|
|
135
|
-
fho2: stepped(
|
|
136
|
-
str: stepped(
|
|
137
|
-
'specialty-registrar-fixed': stepped(
|
|
138
|
-
'specialty-registrar-core': stepped(
|
|
139
|
-
'specialty-doctor': NI.specialtyDoctor
|
|
140
|
-
|
|
141
|
-
yearsExperience: r.yearsExperience,
|
|
142
|
-
})),
|
|
143
|
-
specialist: NI.specialist.map((r) => ({
|
|
144
|
-
label: `Point ${r.payPoint}`, salary: r.salary,
|
|
145
|
-
yearsExperience: r.yearsExperience,
|
|
146
|
-
})),
|
|
99
|
+
const northernIreland2025 = fromDocument(HSC_TC8_05_2025, {
|
|
100
|
+
fho1: stepped(salariesOfCode(NI.residentGrades, NI_CODES.foundationYear1)),
|
|
101
|
+
fho2: stepped(salariesOfCode(NI.residentGrades, NI_CODES.foundationYear2)),
|
|
102
|
+
str: stepped(salariesOfCode(NI.residentGrades, NI_CODES.specialtyRegistrarFull)),
|
|
103
|
+
'specialty-registrar-fixed': stepped(salariesOfCode(NI.residentGrades, NI_CODES.specialtyRegistrarFixed)),
|
|
104
|
+
'specialty-registrar-core': stepped(salariesOfCode(NI.residentGrades, NI_CODES.coreTraining)),
|
|
105
|
+
'specialty-doctor': byPayPoint(NI.specialtyDoctor),
|
|
106
|
+
specialist: byPayPoint(NI.specialist),
|
|
147
107
|
consultant: NI.consultant.map((r) => ({
|
|
148
108
|
label: `Threshold ${r.threshold} · pt ${r.payPoint}`, salary: r.salary,
|
|
149
109
|
})),
|
|
@@ -152,8 +112,8 @@ const northernIreland = fromDocument(HSC_TC8_05_2025, {
|
|
|
152
112
|
'hospital-practitioner': numbered(NI.hospitalPractitioner),
|
|
153
113
|
'specialty-doctor-2008': byCode(NI.specialtyDoctor2008),
|
|
154
114
|
'associate-specialist-2008': byCode(NI.associateSpecialist2008),
|
|
155
|
-
'associate-specialist': stepped(
|
|
156
|
-
'staff-grade': stepped(
|
|
115
|
+
'associate-specialist': stepped(salariesOfCode(NI.closedGrades, NI_CODES.associateSpecialist)),
|
|
116
|
+
'staff-grade': stepped(salariesOfCode(NI.closedGrades, NI_CODES.staffGrade)),
|
|
157
117
|
});
|
|
158
118
|
/**
|
|
159
119
|
* Wales's 2026 Resident Contract — Annex A §1c, in force from
|
|
@@ -178,30 +138,37 @@ const northernIreland = fromDocument(HSC_TC8_05_2025, {
|
|
|
178
138
|
* one to park it in the medical scales would put it where no consumer
|
|
179
139
|
* would look.
|
|
180
140
|
*/
|
|
181
|
-
const walesResident2026 = (rows) =>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
141
|
+
const walesResident2026 = (rows) => {
|
|
142
|
+
// The two grade names are read by value, so check both are printed: a
|
|
143
|
+
// misspelt one would keep the dental row or flatten every registrar label.
|
|
144
|
+
for (const grade of [WAL26_CODES.dentalFoundationTrainee, WAL26_CODES.registrar]) {
|
|
145
|
+
invariant(rows.some((r) => r.grade === grade), `medical-scales: Wales 2026's resident table prints no "${grade}" row`);
|
|
146
|
+
}
|
|
147
|
+
return rows
|
|
148
|
+
.filter((r) => r.grade !== WAL26_CODES.dentalFoundationTrainee)
|
|
149
|
+
.map((r) => ({
|
|
150
|
+
label: r.grade === WAL26_CODES.registrar ? `Registrar ${r.spine}` : r.grade,
|
|
151
|
+
salary: r.salary,
|
|
152
|
+
}));
|
|
153
|
+
};
|
|
187
154
|
// Wales 2026/27 (M&D(W) 01/2026) — a full 3.5% uplift of the 2025 scales.
|
|
188
155
|
// The Associate Specialist MC01 code is removed in this circular, so unlike
|
|
189
|
-
// `
|
|
156
|
+
// `wales2025` there is no 'associate-specialist' entry here.
|
|
190
157
|
const wales2026 = fromDocument(MD_W_01_2026, {
|
|
191
158
|
resident: walesResident2026(WAL26.resident2026Contract),
|
|
192
159
|
consultant: consultantByYear(WAL26.consultant),
|
|
193
|
-
str: stepped(
|
|
194
|
-
'specialty-registrar-core': stepped(
|
|
195
|
-
'specialty-registrar-fixed': stepped(
|
|
196
|
-
fho1: stepped(
|
|
197
|
-
fho2: stepped(
|
|
160
|
+
str: stepped(salariesOfCode(WAL26.trainingGrades, WAL26_CODES.specialtyRegistrarFull)),
|
|
161
|
+
'specialty-registrar-core': stepped(salariesOfCode(WAL26.trainingGrades, WAL26_CODES.specialtyRegistrarCore)),
|
|
162
|
+
'specialty-registrar-fixed': stepped(salariesOfCode(WAL26.trainingGrades, WAL26_CODES.specialtyRegistrarFixed)),
|
|
163
|
+
fho1: stepped(salariesOfCode(WAL26.trainingGrades, WAL26_CODES.foundationYear1)),
|
|
164
|
+
fho2: stepped(salariesOfCode(WAL26.trainingGrades, WAL26_CODES.foundationYear2)),
|
|
198
165
|
'specialty-doctor': byCode(WAL26.specialtyDoctor),
|
|
199
166
|
specialist: byCode(WAL26.specialist),
|
|
200
167
|
'salaried-gp': stepped(WAL26.salariedGp.salaries),
|
|
201
|
-
'staff-grade': stepped(
|
|
168
|
+
'staff-grade': stepped(salariesOfCode(WAL26.closedGrades, WAL26_CODES.staffGrade)),
|
|
202
169
|
'specialty-doctor-2008': byCode(WAL26.specialtyDoctor2008),
|
|
203
170
|
'associate-specialist-2008': byCode(WAL26.associateSpecialist2008),
|
|
204
|
-
'hospital-practitioner': stepped(
|
|
171
|
+
'hospital-practitioner': stepped(salariesOfCode(WAL26.closedGrades, WAL26_CODES.hospitalPractitioner)),
|
|
205
172
|
});
|
|
206
173
|
// Scotland 2025/26 — a complete round in one circular (non-training
|
|
207
174
|
// from the main document, training grades from its addendum).
|
|
@@ -210,65 +177,59 @@ const wales2026 = fromDocument(MD_W_01_2026, {
|
|
|
210
177
|
// a new Scottish scale belongs in whichever of those published it.
|
|
211
178
|
const scotland2025 = combineScales(fromDocument(PCS_DD_2025_01, {
|
|
212
179
|
consultant: consultantByYear(SCO25.consultant),
|
|
213
|
-
'specialty-doctor': SCO25.specialtyDoctor2022
|
|
214
|
-
|
|
215
|
-
salary: r.salary,
|
|
216
|
-
yearsExperience: r.scalePoint,
|
|
217
|
-
})),
|
|
218
|
-
specialist: SCO25.specialist2022.map((r) => ({
|
|
219
|
-
label: r.scalePoint === 0 ? 'Minimum' : `Point ${r.scalePoint}`,
|
|
220
|
-
salary: r.salary,
|
|
221
|
-
yearsExperience: r.scalePoint,
|
|
222
|
-
})),
|
|
180
|
+
'specialty-doctor': byScalePoint(SCO25.specialtyDoctor2022),
|
|
181
|
+
specialist: byScalePoint(SCO25.specialist2022),
|
|
223
182
|
'specialty-doctor-2008': stepped(SCO25.specialtyDoctor2008),
|
|
224
183
|
'associate-specialist-2008': stepped(SCO25.associateSpecialist2008),
|
|
225
|
-
'associate-specialist': stepped(
|
|
226
|
-
'staff-grade': stepped(
|
|
184
|
+
'associate-specialist': stepped(salariesOfCode(SCO25.closedGrades, SCO25_CODES.associateSpecialistPre2008)),
|
|
185
|
+
'staff-grade': stepped(salariesOfCode(SCO25.closedGrades, SCO25_CODES.staffGradePre1997)),
|
|
227
186
|
'hospital-practitioner': numbered(SCO25.hospitalPractitioner),
|
|
228
187
|
'salaried-gp': range(SCO25.salariedGpRange),
|
|
229
|
-
'gp-educator': SCO25.associateAdvisers
|
|
230
|
-
label: r.grade, salary: r.salary,
|
|
231
|
-
})),
|
|
188
|
+
'gp-educator': byGrade(SCO25.associateAdvisers),
|
|
232
189
|
}), fromDocument(PCS_DD_2025_01_ADDENDUM, {
|
|
233
|
-
fho1: stepped(
|
|
234
|
-
fho2: stepped(
|
|
235
|
-
sho: stepped(
|
|
236
|
-
spr: stepped(
|
|
237
|
-
str: stepped(
|
|
238
|
-
'specialty-registrar-core': stepped(
|
|
239
|
-
'specialty-registrar-fixed': stepped(
|
|
240
|
-
'gp-registrar-sho': stepped(
|
|
241
|
-
'gp-registrar-spr': stepped(
|
|
242
|
-
'gp-registrar-str': stepped(
|
|
190
|
+
fho1: stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.foundationYear1)),
|
|
191
|
+
fho2: stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.foundationYear2)),
|
|
192
|
+
sho: stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.seniorHouseOfficer)),
|
|
193
|
+
spr: stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.specialistRegistrar)),
|
|
194
|
+
str: stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.specialtyRegistrarFull)),
|
|
195
|
+
'specialty-registrar-core': stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.specialtyRegistrarCore)),
|
|
196
|
+
'specialty-registrar-fixed': stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.specialtyRegistrarFixed)),
|
|
197
|
+
'gp-registrar-sho': stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.gpRegistrarSho)),
|
|
198
|
+
'gp-registrar-spr': stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.gpRegistrarSpr)),
|
|
199
|
+
'gp-registrar-str': stepped(salariesOfCode(SCO25.trainingGrades, SCO25_CODES.gpRegistrarStr)),
|
|
243
200
|
}));
|
|
244
201
|
const MEDICAL_SCALES = {
|
|
245
|
-
[
|
|
246
|
-
[NATION_KEYS.england]:
|
|
247
|
-
[NATION_KEYS.scotland]:
|
|
202
|
+
[YEAR_LABELS.Y2026_27]: {
|
|
203
|
+
[NATION_KEYS.england]: england2026,
|
|
204
|
+
[NATION_KEYS.scotland]: scotland2026,
|
|
248
205
|
[NATION_KEYS.wales]: wales2026,
|
|
249
206
|
},
|
|
250
|
-
[
|
|
251
|
-
[NATION_KEYS.wales]:
|
|
252
|
-
[NATION_KEYS.northernIreland]:
|
|
207
|
+
[YEAR_LABELS.Y2025_26]: {
|
|
208
|
+
[NATION_KEYS.wales]: wales2025,
|
|
209
|
+
[NATION_KEYS.northernIreland]: northernIreland2025,
|
|
253
210
|
[NATION_KEYS.scotland]: scotland2025,
|
|
254
211
|
},
|
|
255
212
|
};
|
|
213
|
+
/** Every read over the medical tables. */
|
|
214
|
+
export const MEDICAL_FAMILY = gradeFamily(MEDICAL_SCALES, MEDICAL_GRADE_IDS);
|
|
256
215
|
/**
|
|
257
216
|
* Pay years this family publishes, newest first — derived from the
|
|
258
217
|
* data so a new pay round can't leave a hand-maintained list stale.
|
|
259
218
|
*/
|
|
260
|
-
export const MEDICAL_PAY_YEARS =
|
|
219
|
+
export const MEDICAL_PAY_YEARS = MEDICAL_FAMILY.years;
|
|
261
220
|
/**
|
|
262
|
-
* Published doctor grades for a nation and
|
|
221
|
+
* Published doctor grades for a nation and pay year, each with its
|
|
263
222
|
* scale points and salary range. Both args required — no default;
|
|
264
223
|
* an absent grade set throws `ScaleUnavailable`.
|
|
265
224
|
*/
|
|
266
225
|
export function getMedicalScales(year, nation) {
|
|
267
|
-
return
|
|
226
|
+
return MEDICAL_FAMILY.scalesFor(year, nation);
|
|
268
227
|
}
|
|
269
228
|
/**
|
|
270
|
-
* The newest
|
|
271
|
-
* every grade
|
|
229
|
+
* The newest document of the newest year a nation publishes doctors'
|
|
230
|
+
* pay for, across every medical grade that year. It searches
|
|
231
|
+
* the medical tables only: a document that sets dental pay alone is not
|
|
232
|
+
* a candidate.
|
|
272
233
|
*
|
|
273
234
|
* For prose that cites the nation rather than one family's table.
|
|
274
235
|
* Newest by issue date, not by any hardcoded preference: Scotland
|
|
@@ -280,21 +241,6 @@ export function getMedicalScales(year, nation) {
|
|
|
280
241
|
* still the right thing to cite.
|
|
281
242
|
*/
|
|
282
243
|
export function latestMedicalSource(nation) {
|
|
283
|
-
|
|
284
|
-
let metas;
|
|
285
|
-
try {
|
|
286
|
-
metas = getMedicalScales(year, nation);
|
|
287
|
-
}
|
|
288
|
-
catch (error) {
|
|
289
|
-
if (!(error instanceof ScaleUnavailable))
|
|
290
|
-
throw error;
|
|
291
|
-
continue;
|
|
292
|
-
}
|
|
293
|
-
const [first, ...rest] = metas.map((m) => m.source);
|
|
294
|
-
if (first) {
|
|
295
|
-
return rest.reduce((a, b) => (b.issued > a.issued ? b : a), first);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
throw new ScaleUnavailable(nation, MEDICAL_PAY_YEARS[0]);
|
|
244
|
+
return MEDICAL_FAMILY.latestSource(nation);
|
|
299
245
|
}
|
|
300
246
|
//# sourceMappingURL=medical-scales.js.map
|