@casomoltd/nhs-pay 0.4.15 → 0.6.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.
Files changed (64) hide show
  1. package/README.md +134 -3
  2. package/dist/award.d.ts +32 -0
  3. package/dist/award.js +59 -0
  4. package/dist/award.js.map +1 -0
  5. package/dist/bands.d.ts +14 -24
  6. package/dist/bands.js +18 -138
  7. package/dist/bands.js.map +1 -1
  8. package/dist/circulars/england-md-1-2026r.d.ts +257 -0
  9. package/dist/circulars/england-md-1-2026r.js +302 -0
  10. package/dist/circulars/england-md-1-2026r.js.map +1 -0
  11. package/dist/circulars/ni-hsc-tc8-05-2025.d.ts +166 -0
  12. package/dist/circulars/ni-hsc-tc8-05-2025.js +249 -0
  13. package/dist/circulars/ni-hsc-tc8-05-2025.js.map +1 -0
  14. package/dist/circulars/scotland-pcs-dd-2026-01.d.ts +34 -0
  15. package/dist/circulars/scotland-pcs-dd-2026-01.js +96 -0
  16. package/dist/circulars/scotland-pcs-dd-2026-01.js.map +1 -0
  17. package/dist/circulars/wales-mdw-01-2025.d.ts +130 -0
  18. package/dist/circulars/wales-mdw-01-2025.js +221 -0
  19. package/dist/circulars/wales-mdw-01-2025.js.map +1 -0
  20. package/dist/dental-scales.d.ts +44 -0
  21. package/dist/dental-scales.js +103 -0
  22. package/dist/dental-scales.js.map +1 -0
  23. package/dist/errors.d.ts +44 -0
  24. package/dist/errors.js +71 -0
  25. package/dist/errors.js.map +1 -0
  26. package/dist/format.d.ts +1 -2
  27. package/dist/format.js +1 -2
  28. package/dist/format.js.map +1 -1
  29. package/dist/hcas-pcts.js +1 -1
  30. package/dist/hcas-pcts.js.map +1 -1
  31. package/dist/hcas.d.ts +17 -7
  32. package/dist/hcas.js +23 -10
  33. package/dist/hcas.js.map +1 -1
  34. package/dist/index.d.ts +16 -4
  35. package/dist/index.js +12 -3
  36. package/dist/index.js.map +1 -1
  37. package/dist/medical-scales.d.ts +64 -0
  38. package/dist/medical-scales.js +148 -0
  39. package/dist/medical-scales.js.map +1 -0
  40. package/dist/pension.d.ts +43 -14
  41. package/dist/pension.js +138 -30
  42. package/dist/pension.js.map +1 -1
  43. package/dist/post.d.ts +50 -0
  44. package/dist/post.js +65 -0
  45. package/dist/post.js.map +1 -0
  46. package/dist/regions.d.ts +0 -5
  47. package/dist/regions.js +0 -19
  48. package/dist/regions.js.map +1 -1
  49. package/dist/resolver.d.ts +56 -0
  50. package/dist/resolver.js +116 -0
  51. package/dist/resolver.js.map +1 -0
  52. package/dist/role.d.ts +51 -0
  53. package/dist/role.js +13 -0
  54. package/dist/role.js.map +1 -0
  55. package/dist/scale-tables.d.ts +63 -0
  56. package/dist/scale-tables.js +87 -0
  57. package/dist/scale-tables.js.map +1 -0
  58. package/dist/scales.d.ts +13 -9
  59. package/dist/scales.js +100 -72
  60. package/dist/scales.js.map +1 -1
  61. package/dist/values.d.ts +19 -0
  62. package/dist/values.js +13 -0
  63. package/dist/values.js.map +1 -0
  64. package/package.json +1 -1
package/README.md CHANGED
@@ -1,8 +1,24 @@
1
1
  # @casomoltd/nhs-pay
2
2
 
3
- NHS Agenda for Change pay scales, pension tiers, regions,
4
- HCAS supplements, and take-home calculator. Built on top of
5
- `@casomoltd/paye-calc`.
3
+ NHS pay scales — Agenda for Change plus medical & dental —
4
+ with pension tiers, regions, HCAS supplements, and a take-home
5
+ calculator. Built on top of `@casomoltd/paye-calc`.
6
+
7
+ ## About Casomo
8
+
9
+ Casomo is a [registered UK limited company][companies-house]
10
+ founded and directed by
11
+ [David Mohamad](https://github.com/dkmohamad). It builds focused
12
+ software tools and offers engineering consulting. This library
13
+ powers the NHS pay calculators and explainers on
14
+ [casomo.co.uk](https://casomo.co.uk) — where the differentiator is
15
+ showing **take-home** pay (after tax, NI and pension), not just the
16
+ gross figures most published sources stop at.
17
+
18
+ - **Portfolio** — [casomo.co.uk](https://casomo.co.uk)
19
+ - **Consulting** — [casomoltd.com](https://casomoltd.com)
20
+
21
+ [companies-house]: https://find-and-update.company-information.service.gov.uk/company/15030496
6
22
 
7
23
  ## Install
8
24
 
@@ -75,6 +91,32 @@ fmtSalary(31049); // '£31,049'
75
91
  fmtPct(8.3); // '8.3%'
76
92
  ```
77
93
 
94
+ ### Take-home for a doctor or dentist
95
+
96
+ Medical and dental grades resolve the same way as AfC, via a
97
+ per-family resolver. `getMedicalScales(year, nation)` lists the
98
+ grades published for a nation and year; `fromScalePoint` builds a
99
+ `Post` (gross, pension tier, tax, NI, take-home) from one point.
100
+
101
+ ```ts
102
+ import {getMedicalScales, medicalResolver} from '@casomoltd/nhs-pay';
103
+
104
+ const grades = getMedicalScales('2026-27', 'england');
105
+ const consultant = grades.find((g) => g.grade === 'consultant')!;
106
+ const top = consultant.points.at(-1)!; // 'Threshold 4 · 19y'
107
+
108
+ const post = medicalResolver.fromScalePoint(
109
+ 'consultant', top.label, 'england', '2026-27',
110
+ );
111
+ console.log(post.salary); // basic pay
112
+ console.log(post.pensionRate); // member contribution %
113
+ console.log(post.takeHome.net); // annual net after tax + NI + pension
114
+ ```
115
+
116
+ `getDentalScales` / `dentalResolver` mirror this for salaried
117
+ dental grades. Both fail loud (`ScaleUnavailable`) for an
118
+ unpublished nation/year or grade rather than defaulting.
119
+
78
120
  ## API reference
79
121
 
80
122
  ### Scales (`scales.ts`)
@@ -154,6 +196,25 @@ fmtPct(8.3); // '8.3%'
154
196
  | -------------- | ------------------------------------- |
155
197
  | `nhsTakeHome` | Pre-configured TakeHomePay for NHS |
156
198
 
199
+ ### Medical & dental (`medical-scales.ts`, `dental-scales.ts`, `resolver.ts`)
200
+
201
+ | Export | Description |
202
+ | ------------------ | --------------------------------------------- |
203
+ | `getMedicalScales` | Doctor grades for a nation/year, with points |
204
+ | `getDentalScales` | Salaried dental grades for a nation/year |
205
+ | `medicalResolver` | Build a `Post` from a doctor grade + point |
206
+ | `dentalResolver` | Build a `Post` from a dental grade + point |
207
+
208
+ Each resolver exposes `fromScalePoint(grade, pointLabel, nation,
209
+ year)`, `fromSalary`, `availableGrades(nation, year)` and
210
+ `latestYearFor(grade, nation)`. See
211
+ [Medical & dental pay scales](#medical--dental-pay-scales) for how
212
+ the data is sourced and modelled.
213
+
214
+ **Types:** `MedicalGradeId`, `DentalGradeId`, `MedicalGradeMeta`,
215
+ `DentalGradeMeta`, `MedicalRole`, `DentalRole`, `Role`, `Post`,
216
+ `GradeMeta`
217
+
157
218
  ### Format (`format.ts`)
158
219
 
159
220
  | Export | Description |
@@ -227,6 +288,70 @@ pay letter (6 Jan 2026).
227
288
  [pension-2526]: https://www.nhsbsa.nhs.uk/nhs-pensions-contribution-rates-202526
228
289
  [nlw]: https://www.gov.uk/national-minimum-wage-rates
229
290
 
291
+ ## Medical & dental pay scales
292
+
293
+ Doctors and dentists are paid on a separate set of pay circulars —
294
+ one per nation — from Agenda for Change. This library encodes them
295
+ so it can render **take-home** (not just gross) for medical and
296
+ dental grades, which is what most published sources omit.
297
+
298
+ | Nation | Circular | Year | Source |
299
+ | ------ | -------- | ---- | ------ |
300
+ | England | M&D 1/2026R | 2026/27 | [NHS Employers][md-eng] |
301
+ | Scotland | PCS(DD)2026/01 | 2026/27 (training grades only) | [NHS Scotland][md-sco] |
302
+ | Wales | M&D(W) 01/2025 | 2025/26 | [NHS Wales][md-wal] |
303
+ | Northern Ireland | HSC(TC8) 05/2025 | 2025/26 | [DoH NI][md-ni] |
304
+
305
+ [md-eng]: https://www.nhsemployers.org/articles/pay-and-conditions-circulars-medical-and-dental-staff
306
+ [md-sco]: https://www.publications.scot.nhs.uk/files/pcs-dd-2026-01.pdf
307
+ [md-wal]: https://www.nhs.wales/hpb/nhs-pay-and-conditions/
308
+ [md-ni]: https://www.health-ni.gov.uk/publications/hsc-tc8-052025
309
+
310
+ NI 2025/26 pension member tiers (HSC — distinct thresholds *and*
311
+ rates from NHSBSA) are sourced from [HSC Pensions][hsc-pension].
312
+
313
+ [hsc-pension]: https://hscpensions.hscni.net/
314
+
315
+ ### How the data is modelled
316
+
317
+ The circulars vary widely in structure (nodal training points,
318
+ consultant thresholds, SAS experience bands, GP ranges, dental
319
+ spines), so the data is built in three layers that decouple
320
+ transcription fidelity from the uniform domain model:
321
+
322
+ 1. **Verbatim circular** (`src/circulars/*.ts`) — one file per PDF,
323
+ each table transcribed 1:1 in source order with a row shape that
324
+ mirrors that table's own columns, under a comment citing the
325
+ Annex / section / page. Every table in the circular is either
326
+ transcribed or **recorded with a reason** for skipping it, so
327
+ nothing is silently dropped and each file diffs against the PDF
328
+ top-to-bottom.
329
+ 2. **Translation layer** (`src/medical-scales.ts`,
330
+ `src/dental-scales.ts`) — selects which scales feed the
331
+ calculator and maps each verbatim row to a canonical scale point.
332
+ Inclusive by default: closed-to-new-entrant grades, devolved
333
+ training variants, GP registrars and the Community Dental Service
334
+ are all wired.
335
+ 3. **Canonical domain** (`getMedicalScales` / `getDentalScales` +
336
+ `medicalResolver` / `dentalResolver`) — a uniform
337
+ `(grade, nation, year) → scale points` view, identical in shape
338
+ to the AfC resolver.
339
+
340
+ **Scope.** *(a)* every basic-pay salary scale, including
341
+ closed-to-new-entrant grades still paid to incumbents, plus *(b)*
342
+ earnings-affecting supplements expressed as an annual £ (Clinical
343
+ Impact / Excellence awards, DPH and intensity supplements). Pure
344
+ expense tables (mileage, fees) and self-employed GDS/UDA dentist
345
+ contract income are out of scope.
346
+
347
+ **Year mismatch is honest.** England and Scotland have published
348
+ 2026/27; Wales and NI's latest M&D circulars are 2025/26. Each grade
349
+ resolves at its own cited year and `latestYearFor(grade, nation)`
350
+ reports it — figures are never silently carried forward. Scotland's
351
+ 2026/27 circular covers training grades only (consultant / SAS / GP
352
+ scales are promulgated in a separate addendum), so those grades fail
353
+ loud until the addendum is transcribed.
354
+
230
355
  ## Test fixtures
231
356
 
232
357
  `tests/fixtures/band-take-home.csv` — 90 golden-value rows
@@ -246,6 +371,8 @@ Pension, tax, NI and net values are computed by
246
371
 
247
372
  ## Tax years
248
373
 
374
+ AfC scale + pension coverage (all four nations):
375
+
249
376
  | Year | Scales | Pension |
250
377
  | ------- | ------ | ------- |
251
378
  | 2023-24 | Yes | Yes |
@@ -253,6 +380,10 @@ Pension, tax, NI and net values are computed by
253
380
  | 2025-26 | Yes | Yes |
254
381
  | 2026-27 | Yes | Yes |
255
382
 
383
+ Medical & dental coverage is per-nation (England/Scotland 2026/27,
384
+ Wales/NI 2025/26) — see
385
+ [Medical & dental pay scales](#medical--dental-pay-scales).
386
+
256
387
  ## Development
257
388
 
258
389
  ```bash
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Agenda for Change headline pay awards (consolidated % uplift) by
3
+ * nation and year.
4
+ *
5
+ * The negotiated award is published data, NOT derivable from the
6
+ * scale points: per-point rounding diverges from the headline (e.g.
7
+ * Scotland's 3.75% award computes as ~3.8% from a single band's
8
+ * min-point delta), and staged awards have no single scale ratio. So
9
+ * the award lives here as a cited constant, one per (nation, year),
10
+ * each nation recorded independently because the four nations
11
+ * negotiate separately.
12
+ *
13
+ * Sources (also pinned per-row in tests/fixtures/afc-awards.csv):
14
+ * - England & Wales: NHS Employers pay circulars —
15
+ * 2025/26 https://www.nhsemployers.org/articles/pay-scales-202526
16
+ * 2026/27 https://www.nhsemployers.org/articles/pay-scales-202627
17
+ * - Scotland: NHS Scotland circular PCS(AFC)2026/1 — 4.25% for
18
+ * 2025-26 (average 4.4% after the inflation guarantee) and 3.75%
19
+ * for 2026-27:
20
+ * https://www.publications.scot.nhs.uk/files/pcs2026-afc-01.pdf
21
+ * - Northern Ireland: Department of Health (NI) accepted the UK PRB
22
+ * award, aligned with England (3.6% / 3.3%); 2026/27 subject to
23
+ * local implementation.
24
+ */
25
+ import type { Nation, TaxYear } from '@casomoltd/paye-calc';
26
+ /**
27
+ * The AfC headline pay award for a nation and year, as a percentage
28
+ * (e.g. `3.75` for 3.75%). Throws {@link AwardUnavailable} for an
29
+ * unrecorded combination rather than defaulting — the caller must
30
+ * name the nation (no silent fallback).
31
+ */
32
+ export declare function afcAward(year: TaxYear, nation: Nation): number;
package/dist/award.js ADDED
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Agenda for Change headline pay awards (consolidated % uplift) by
3
+ * nation and year.
4
+ *
5
+ * The negotiated award is published data, NOT derivable from the
6
+ * scale points: per-point rounding diverges from the headline (e.g.
7
+ * Scotland's 3.75% award computes as ~3.8% from a single band's
8
+ * min-point delta), and staged awards have no single scale ratio. So
9
+ * the award lives here as a cited constant, one per (nation, year),
10
+ * each nation recorded independently because the four nations
11
+ * negotiate separately.
12
+ *
13
+ * Sources (also pinned per-row in tests/fixtures/afc-awards.csv):
14
+ * - England & Wales: NHS Employers pay circulars —
15
+ * 2025/26 https://www.nhsemployers.org/articles/pay-scales-202526
16
+ * 2026/27 https://www.nhsemployers.org/articles/pay-scales-202627
17
+ * - Scotland: NHS Scotland circular PCS(AFC)2026/1 — 4.25% for
18
+ * 2025-26 (average 4.4% after the inflation guarantee) and 3.75%
19
+ * for 2026-27:
20
+ * https://www.publications.scot.nhs.uk/files/pcs2026-afc-01.pdf
21
+ * - Northern Ireland: Department of Health (NI) accepted the UK PRB
22
+ * award, aligned with England (3.6% / 3.3%); 2026/27 subject to
23
+ * local implementation.
24
+ */
25
+ import { NATION_KEYS, TAX_YEARS } from '@casomoltd/paye-calc';
26
+ import { AwardUnavailable } from './errors.js';
27
+ /** Headline consolidated AfC uplift (%), by nation and year. */
28
+ const AFC_AWARDS = {
29
+ [NATION_KEYS.england]: {
30
+ [TAX_YEARS.Y2025_26]: 3.6,
31
+ [TAX_YEARS.Y2026_27]: 3.3,
32
+ },
33
+ [NATION_KEYS.wales]: {
34
+ [TAX_YEARS.Y2025_26]: 3.6,
35
+ [TAX_YEARS.Y2026_27]: 3.3,
36
+ },
37
+ [NATION_KEYS.scotland]: {
38
+ [TAX_YEARS.Y2025_26]: 4.25,
39
+ [TAX_YEARS.Y2026_27]: 3.75,
40
+ },
41
+ [NATION_KEYS.northernIreland]: {
42
+ [TAX_YEARS.Y2025_26]: 3.6,
43
+ [TAX_YEARS.Y2026_27]: 3.3,
44
+ },
45
+ };
46
+ /**
47
+ * The AfC headline pay award for a nation and year, as a percentage
48
+ * (e.g. `3.75` for 3.75%). Throws {@link AwardUnavailable} for an
49
+ * unrecorded combination rather than defaulting — the caller must
50
+ * name the nation (no silent fallback).
51
+ */
52
+ export function afcAward(year, nation) {
53
+ const pct = AFC_AWARDS[nation][year];
54
+ if (pct === undefined) {
55
+ throw new AwardUnavailable(year, nation);
56
+ }
57
+ return pct;
58
+ }
59
+ //# sourceMappingURL=award.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"award.js","sourceRoot":"","sources":["../src/award.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAE7C,gEAAgE;AAChE,MAAM,UAAU,GAGZ;IACF,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QACrB,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG;QACzB,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG;KAC1B;IACD,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;QACnB,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG;QACzB,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG;KAC1B;IACD,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE;QACtB,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,IAAI;QAC1B,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,IAAI;KAC3B;IACD,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE;QAC7B,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG;QACzB,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG;KAC1B;CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAa,EAAE,MAAc;IACpD,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,MAAM,IAAI,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
package/dist/bands.d.ts CHANGED
@@ -1,42 +1,32 @@
1
1
  /**
2
- * Merge layer — combines static band metadata with
3
- * year-specific salary data and pension tiers.
2
+ * Merge layer — joins each AfC band id with its
3
+ * year-specific salary points and the year's pension
4
+ * tiers.
4
5
  *
5
- * Role descriptions sourced from NHS Employers:
6
- * https://www.nhsemployers.org/articles/pay-scales-202526
6
+ * Presentation copy (labels, slugs, role descriptions)
7
+ * is a hub-site concern and lives there, not in this
8
+ * domain library.
7
9
  */
8
10
  import type { TaxYear, Nation } from '@casomoltd/paye-calc';
9
11
  import type { AfcBandId, ScalePoint, HcasZones } from './scales.js';
10
- import type { PensionTier } from './pension.js';
11
- export interface AfcBandInfo {
12
- slug: string;
13
- label: string;
14
- roles: string;
15
- roleContext: string;
16
- }
17
- export declare const AFC_BAND_INFO: Record<AfcBandId, AfcBandInfo>;
12
+ import type { SalaryRange } from './values.js';
18
13
  export interface AfcBandMeta {
19
14
  band: AfcBandId;
20
- slug: string;
21
- label: string;
22
- roles: string;
23
- roleContext: string;
24
15
  points: ScalePoint[];
25
- salaryMin: number;
26
- salaryMax: number;
16
+ salary: SalaryRange;
27
17
  }
28
18
  export interface AfcScaleData {
29
19
  bands: AfcBandMeta[];
30
20
  hcas: HcasZones;
31
- pensionTiers: PensionTier[];
32
21
  }
33
22
  /** Current financial year for band pages. */
34
23
  export declare const AFC_CURRENT_YEAR: "2026-27";
35
24
  /** Previous financial year for comparison. */
36
25
  export declare const AFC_PREVIOUS_YEAR: "2025-26";
37
26
  /** Load AFC scale data — synchronous, no file I/O.
38
- * Scotland has its own scale tables; Wales applies
39
- * a living wage floor to the England/NI base.
40
- * Omit `nation` for backward-compatible England
41
- * figures. */
42
- export declare function getAfcScales(year?: TaxYear, nation?: Nation): AfcScaleData;
27
+ * Scotland has its own scale tables; Wales applies a living wage
28
+ * floor to the England/NI base. `year` and `nation` are both
29
+ * required — the accessor never defaults a locale, since a
30
+ * forgotten `nation` would silently return England figures for
31
+ * every region (the exact bug this signature prevents). */
32
+ export declare function getAfcScales(year: TaxYear, nation: Nation): AfcScaleData;
package/dist/bands.js CHANGED
@@ -1,161 +1,41 @@
1
1
  /**
2
- * Merge layer — combines static band metadata with
3
- * year-specific salary data and pension tiers.
2
+ * Merge layer — joins each AfC band id with its
3
+ * year-specific salary points and the year's pension
4
+ * tiers.
4
5
  *
5
- * Role descriptions sourced from NHS Employers:
6
- * https://www.nhsemployers.org/articles/pay-scales-202526
6
+ * Presentation copy (labels, slugs, role descriptions)
7
+ * is a hub-site concern and lives there, not in this
8
+ * domain library.
7
9
  */
8
10
  import { TAX_YEARS } from '@casomoltd/paye-calc';
9
- import { AFC_BAND_IDS, applyWalesFloor, getScalesForYear, } from './scales.js';
10
- import { getPensionTiers } from './pension.js';
11
- export const AFC_BAND_INFO = {
12
- '2': {
13
- slug: 'nhs-band-2-pay',
14
- label: 'Band 2',
15
- roles: 'Healthcare assistants,'
16
- + ' housekeeping, security',
17
- roleContext: 'Entry-level support roles including'
18
- + ' domestic support workers,'
19
- + ' housekeeping assistants, drivers,'
20
- + ' security officers and healthcare'
21
- + ' assistants.',
22
- },
23
- '3': {
24
- slug: 'nhs-band-3-pay',
25
- label: 'Band 3',
26
- roles: 'Emergency care assistants,'
27
- + ' therapy support workers',
28
- roleContext: 'Experienced support roles such as'
29
- + ' emergency care assistants and'
30
- + ' occupational therapy support'
31
- + ' workers.',
32
- },
33
- '4': {
34
- slug: 'nhs-band-4-pay',
35
- label: 'Band 4',
36
- roles: 'Assistant practitioners,'
37
- + ' pharmacy technicians',
38
- roleContext: 'Roles requiring specialist training'
39
- + ' including assistant practitioners,'
40
- + ' pharmacy technicians, dental nurses'
41
- + ' and trainee psychological wellbeing'
42
- + ' practitioners.',
43
- },
44
- '5': {
45
- slug: 'nhs-band-5-pay',
46
- label: 'Band 5',
47
- roles: 'Newly qualified nurses,'
48
- + ' midwives, therapists',
49
- roleContext: 'The entry point for newly qualified'
50
- + ' clinical professionals including'
51
- + ' nurses, operating department'
52
- + ' practitioners, podiatrists and'
53
- + ' therapeutic radiographers.',
54
- },
55
- '6': {
56
- slug: 'nhs-band-6-pay',
57
- label: 'Band 6',
58
- roles: 'Senior nurses,'
59
- + ' specialist practitioners',
60
- roleContext: 'Experienced clinical and specialist'
61
- + ' roles such as school nurses,'
62
- + ' paramedics, estates officers and'
63
- + ' health records managers.',
64
- },
65
- '7': {
66
- slug: 'nhs-band-7-pay',
67
- label: 'Band 7',
68
- roles: 'Team leaders,'
69
- + ' advanced practitioners',
70
- roleContext: 'Advanced and management roles'
71
- + ' including communications managers,'
72
- + ' estates managers and advanced'
73
- + ' speech and language therapists.',
74
- },
75
- '8a': {
76
- slug: 'nhs-band-8a-pay',
77
- label: 'Band 8a',
78
- roles: 'Modern matrons, nurse consultants',
79
- roleContext: 'Senior specialist and management'
80
- + ' roles such as consultant'
81
- + ' prosthetists, dental laboratory'
82
- + ' managers, modern matrons and nurse'
83
- + ' consultants.',
84
- },
85
- '8b': {
86
- slug: 'nhs-band-8b-pay',
87
- label: 'Band 8b',
88
- roles: 'Heads of service, strategic managers',
89
- roleContext: 'Strategic management and senior'
90
- + ' clinical leadership including heads'
91
- + ' of education, clinical physiology'
92
- + ' service managers and head'
93
- + ' orthoptists.',
94
- },
95
- '8c': {
96
- slug: 'nhs-band-8c-pay',
97
- label: 'Band 8c',
98
- roles: 'Heads of HR,'
99
- + ' consultant clinical scientists',
100
- roleContext: 'Senior leadership roles such as'
101
- + ' heads of human resources,'
102
- + ' consultant clinical scientists and'
103
- + ' consultant paramedics.',
104
- },
105
- '8d': {
106
- slug: 'nhs-band-8d-pay',
107
- label: 'Band 8d',
108
- roles: 'Chief nurses, chief finance managers',
109
- roleContext: 'Executive-level clinical and'
110
- + ' corporate roles including consultant'
111
- + ' psychologists, chief nurses and'
112
- + ' chief finance managers.',
113
- },
114
- '9': {
115
- slug: 'nhs-band-9-pay',
116
- label: 'Band 9',
117
- roles: 'Directors, chief officers',
118
- roleContext: 'The most senior AfC roles including'
119
- + ' podiatric surgery consultants, chief'
120
- + ' finance managers and directors of'
121
- + ' estates and facilities.',
122
- },
123
- };
11
+ import { AFC_BAND_IDS, getScalesForYear, } from './scales.js';
124
12
  /** Current financial year for band pages. */
125
13
  export const AFC_CURRENT_YEAR = TAX_YEARS.Y2026_27;
126
14
  /** Previous financial year for comparison. */
127
15
  export const AFC_PREVIOUS_YEAR = TAX_YEARS.Y2025_26;
128
16
  /** Load AFC scale data — synchronous, no file I/O.
129
- * Scotland has its own scale tables; Wales applies
130
- * a living wage floor to the England/NI base.
131
- * Omit `nation` for backward-compatible England
132
- * figures. */
133
- export function getAfcScales(year = AFC_CURRENT_YEAR, nation) {
17
+ * Scotland has its own scale tables; Wales applies a living wage
18
+ * floor to the England/NI base. `year` and `nation` are both
19
+ * required — the accessor never defaults a locale, since a
20
+ * forgotten `nation` would silently return England figures for
21
+ * every region (the exact bug this signature prevents). */
22
+ export function getAfcScales(year, nation) {
134
23
  const scaleYear = getScalesForYear(year, nation);
135
- const pensionTiers = getPensionTiers(year);
136
24
  const bands = AFC_BAND_IDS.map((band) => {
137
- const info = AFC_BAND_INFO[band];
138
- const basePoints = scaleYear.scales[band];
139
- const points = nation === 'wales'
140
- ? basePoints.map((pt) => {
141
- const salary = applyWalesFloor(pt.salary, year);
142
- return salary !== pt.salary
143
- ? { ...pt, salary } : pt;
144
- })
145
- : basePoints;
25
+ const points = scaleYear.scales[band];
146
26
  const salaries = points.map((p) => p.salary);
147
27
  return {
148
28
  band,
149
- ...info,
150
29
  points,
151
- salaryMin: Math.min(...salaries),
152
- salaryMax: Math.max(...salaries),
30
+ salary: {
31
+ min: Math.min(...salaries),
32
+ max: Math.max(...salaries),
33
+ },
153
34
  };
154
35
  });
155
36
  return {
156
37
  bands,
157
38
  hcas: scaleYear.hcas,
158
- pensionTiers,
159
39
  };
160
40
  }
161
41
  //# sourceMappingURL=bands.js.map
package/dist/bands.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bands.js","sourceRoot":"","sources":["../src/bands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAM/C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAW7C,MAAM,CAAC,MAAM,aAAa,GAEtB;IACF,GAAG,EAAE;QACH,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,QAAQ;QACf,KAAK,EACH,wBAAwB;cACtB,yBAAyB;QAC7B,WAAW,EACT,qCAAqC;cACnC,4BAA4B;cAC5B,oCAAoC;cACpC,mCAAmC;cACnC,cAAc;KACnB;IACD,GAAG,EAAE;QACH,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,QAAQ;QACf,KAAK,EACH,4BAA4B;cAC1B,0BAA0B;QAC9B,WAAW,EACT,mCAAmC;cACjC,gCAAgC;cAChC,+BAA+B;cAC/B,WAAW;KAChB;IACD,GAAG,EAAE;QACH,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,QAAQ;QACf,KAAK,EACH,0BAA0B;cACxB,uBAAuB;QAC3B,WAAW,EACT,qCAAqC;cACnC,qCAAqC;cACrC,sCAAsC;cACtC,sCAAsC;cACtC,iBAAiB;KACtB;IACD,GAAG,EAAE;QACH,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,QAAQ;QACf,KAAK,EACH,yBAAyB;cACvB,uBAAuB;QAC3B,WAAW,EACT,qCAAqC;c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