-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathenums.js
More file actions
762 lines (700 loc) · 15.6 KB
/
Copy pathenums.js
File metadata and controls
762 lines (700 loc) · 15.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
import { getAllCountries } from 'countries-and-timezones'
/**
* @readonly
* @enum {import('countries-and-timezones').Country}
*/
export const Country = Object.fromEntries(
Object.entries(getAllCountries()).map(([key, value]) => [key, value.name])
)
/**
* @readonly
* @enum {string}
*/
export const AcademicYear = {
2023: '2023 to 2024',
2024: '2024 to 2025',
2025: '2025 to 2026'
}
/**
* @readonly
* @enum {string}
*/
export const Adjustment = {
GuideDog: 'Has a guide dog',
Distraction: 'Needs a distraction while having the vaccination',
ExtendedAppointment: 'Needs an extended appointment',
FirstAppointment: 'Needs the first appointment',
LastAppointment: 'Needs the last appointment',
Privacy: 'Needs a private space',
HomeVisit: 'Needs a home visit',
Other: 'Other reasonable adjustment'
}
/**
* @readonly
* @enum {string}
*/
export const ArchiveRecordReason = {
Deceased: 'The child was reported as deceased',
Duplicate: 'It’s a duplicate',
Error: 'It was imported in error',
Moved: 'The child has moved out of the area',
Other: 'Other'
}
/**
* @readonly
* @enum {string}
*/
export const AuditEventType = {
Notice: 'Notice',
Pinned: 'Pinned session note',
Reminder: 'Reminder',
Record: 'Change to child record',
RecordNote: 'Note added to child record',
SessionNote: 'Session note'
}
/**
* @readonly
* @enum {string}
*/
export const ConsentOutcome = {
NotDelivered: 'Request failed',
NoResponse: 'No response',
Inconsistent: 'Conflicting consent',
Given: 'Consent given',
GivenForAlternativeInjection: 'Consent given for injected vaccine',
GivenForIntranasal: 'Consent given for nasal spray',
Declined: 'Follow up requested',
Refused: 'Consent refused',
FinalRefusal: 'Refusal confirmed'
}
/**
* @readonly
* @enum {string}
*/
export const ConsentVaccineCriteria = {
AlternativeFluInjectionOnly: 'Injection only',
AlternativeMMRInjectionOnly: 'Gelatine-free injection only',
IntranasalOnly: 'Nasal spray only',
IntranasalPreferred: 'Nasal spray preferred'
}
/**
* @readonly
* @enum {string}
*/
export const ConsentWindow = {
Opening: 'Opening',
Open: 'Open',
Closed: 'Closed',
None: 'Session not scheduled'
}
/**
* @readonly
* @enum {string}
*/
export const DownloadFormat = {
CSV: 'CSV',
CarePlus: 'XLSX for CarePlus (System C)',
SystmOne: 'XLSX for SystmOne (TPP)'
}
/**
* @readonly
* @enum {string}
*/
export const EthnicGroup = {
White: 'White',
Mixed: 'Mixed or multiple ethnic groups',
Asian: 'Asian or Asian British',
Black: 'Black, African, Caribbean or Black British',
Other: 'Other ethnic group',
Withheld: 'Prefer not to say'
}
/**
* @readonly
* @enum {string}
*/
export const EthnicBackgroundWhite = {
British: 'English, Welsh, Scottish, Northern Irish or British',
Irish: 'Irish',
GRT: 'Gypsy or Irish Traveller',
Other: 'Any other White background'
}
/**
* @readonly
* @enum {string}
*/
export const EthnicBackgroundMixed = {
WhiteBlack: 'White and Black Caribbean',
WhiteAfrican: 'White and Black African',
WhiteAsian: 'White and Asian',
Other: 'Any other mixed or multiple ethnic background'
}
/**
* @readonly
* @enum {string}
*/
export const EthnicBackgroundAsian = {
Indian: 'Indian',
Pakistani: 'Pakistani',
Bangladeshi: 'Bangladeshi',
Chinese: 'Chinese',
Other: 'Any other Asian background'
}
/**
* @readonly
* @enum {string}
*/
export const EthnicBackgroundBlack = {
African: 'African',
Caribbean: 'Caribbean',
Other: 'Any other Black, African or Caribbean background'
}
/**
* @readonly
* @enum {string}
*/
export const EthnicBackgroundOther = {
Arab: 'Arab',
Other: 'Any other ethnic group'
}
/**
* @typedef {EthnicBackgroundWhite | EthnicBackgroundMixed | EthnicBackgroundAsian | EthnicBackgroundBlack | EthnicBackgroundOther} EthnicBackground
*/
/**
* @readonly
* @enum {string}
*/
export const Gender = {
Female: 'Female',
Male: 'Male',
NotKnown: 'Not known',
NotSpecified: 'Not specified'
}
/**
* @readonly
* @enum {string}
*/
export const GillickCompetent = {
True: 'Child assessed as Gillick competent',
False: 'Child assessed as not Gillick competent'
}
/**
* @readonly
* @enum {string}
*/
export const Impairment = {
Vision: 'Vision',
Hearing: 'Hearing',
Mobility: 'Mobility',
Memory: 'Memory',
MentalHealth: 'Mental health',
Communicative: 'Social and/or communication differences',
Other: 'Other'
}
/**
* @readonly
* @enum {string}
*/
export const InstructionOutcome = {
Given: 'PSD added',
Needed: 'PSD not added'
}
/**
* @readonly
* @enum {string}
*/
export const LocationType = {
Clinic: 'Community clinic',
Home: 'At the child’s home',
School: 'School',
Other: 'Another location'
}
/**
* @readonly
* @enum {string}
*/
export const MoveSource = {
Cohort: 'Cohort record',
Consent: 'Consent response',
School: 'Class list',
External: 'Another SAIS team'
}
/**
* @readonly
* @enum {string}
*/
export const NoticeType = {
Deceased: 'Deceased',
Invalid: 'Invalid',
NoNotify: 'Do not notify parents',
Sensitive: 'Sensitive'
}
/**
* @readonly
* @enum {string}
*/
export const NotifyEmailStatus = {
Delivered: 'Delivered',
Permanent: 'Email address does not exist',
Temporary: 'Inbox not accepting messages right now',
Technical: 'Technical failure'
}
/**
* @readonly
* @enum {string}
*/
export const NotifySmsStatus = {
Delivered: 'Delivered',
Permanent: 'Not delivered',
Temporary: 'Phone not accepting messages right now',
Technical: 'Technical failure'
}
/**
* @readonly
* @enum {string}
*/
export const ParentalRelationship = {
Mum: 'Mum',
Dad: 'Dad',
Guardian: 'Guardian',
Fosterer: 'Foster carer',
Other: 'Other',
Unknown: 'Unknown'
}
/**
* @readonly
* @enum {string}
*/
export const PatientStatus = {
Ineligible: 'Not eligible',
Consent: 'Needs consent',
Refused: 'Has a refusal',
Triage: 'Needs triage',
Due: 'Due vaccination',
Deferred: 'Unable to vaccinate',
PartiallyVaccinated: 'Partially vaccinated',
Vaccinated: 'Fully vaccinated'
}
/**
* @readonly
* @enum {string}
*/
export const PatientConsentStatus = {
NotScheduled: 'No request scheduled',
Scheduled: 'Request scheduled',
NoDetails: 'No contact details',
NotDelivered: 'Request failed',
NoResponse: 'No response',
FollowUp: 'Follow-up requested'
}
/**
* @readonly
* @enum {string}
*/
export const PatientDueStatus = {
Only: 'Due vaccination',
First: 'Due 1st dose',
Second: 'Due 2nd dose',
Third: 'Due 3rd dose'
}
/**
* @readonly
* @enum {string}
*/
export const PatientRefusedStatus = {
Conflict: 'Conflicting consent',
Refusal: 'Parent refused'
}
/**
* @readonly
* @enum {string}
*/
export const PatientDeferredStatus = {
ChildAbsent: 'Child absent',
ChildRefused: 'Child refused',
ChildUnwell: 'Child unwell',
DoNotVaccinate: 'Contraindicated',
DelayVaccination: 'Delay vaccination',
InviteToClinic: 'Invited to clinic'
}
/**
* @readonly
* @enum {string}
*/
export const PatientVaccinatedStatus = {
Vaccinated: 'Vaccinated by team',
AlreadyVaccinated: 'Already vaccinated'
}
/**
* @readonly
* @enum {string}
*/
export const PreScreenQuestion = {
IsWell: 'is not acutely unwell',
IsPregnant: 'is not pregnant',
IsMedicated: 'is not taking any medication which prevents vaccination',
IsAsthmatic:
'if they have asthma, has not had a flare-up of symptoms in the past 72 hours, including wheezing or needing to use a reliever inhaler more than usual',
IsHappy: 'knows what the vaccination is for, and agrees to have it',
IsNotContraindicated:
'has no other contraindications which prevent vaccination'
}
/**
* @readonly
* @enum {string}
*/
export const ProgrammeType = {
_4in1: '4-in-1',
_5in1: '5-in-1',
_6in1: '6-in-1',
Flu: 'Flu',
HPV: 'HPV',
TdIPV: 'Td/IPV',
MenACWY: 'MenACWY',
MMR: 'MMR',
Other: 'A programme administered outside the UK'
}
/**
* @readonly
* @enum {string}
*/
export const SchoolTerm = {
Autumn: 'Autumn',
Spring: 'Spring',
Summer: 'Summer'
}
/**
* @readonly
* @enum {string}
*/
export const SessionPresetName = {
Flu: 'Flu',
HPV: 'HPV',
Doubles: 'Doubles',
MMR: 'MMR(V)'
}
/**
* @readonly
* @enum {string}
*/
export const SessionMMRConsent = {
Standard: 'Standard request',
Outbreak: 'Outbreak request'
}
/**
* @typedef {Object} SessionPreset
* @property {SessionPresetName} name - Session preset name
* @property {boolean} active - Whether preset is active
* @property {boolean} [adolescent] - Adolescent programme flag
* @property {Array<ProgrammeType>} programmeTypes - Preset programme types
* @property {SchoolTerm} term - School term to schedule session
*/
/**
* @readonly
* @enum {Array<SessionPreset>}
*/
export const SessionPresets = [
{
name: SessionPresetName.Flu,
active: true,
programmeTypes: [ProgrammeType.Flu],
term: SchoolTerm.Autumn
},
{
name: SessionPresetName.HPV,
active: true,
adolescent: true,
programmeTypes: [ProgrammeType.HPV],
term: SchoolTerm.Spring
},
{
name: SessionPresetName.Doubles,
active: true,
adolescent: true,
programmeTypes: [ProgrammeType.MenACWY, ProgrammeType.TdIPV],
term: SchoolTerm.Summer
},
{
name: SessionPresetName.MMR,
active: true,
programmeTypes: [ProgrammeType.MMR],
term: SchoolTerm.Spring
}
]
/**
* @readonly
* @enum {string}
*/
export const RecordVaccineCriteria = {
NoMMRPreference: 'No preference',
AlternativeFluInjectionOnly: 'Injected vaccine only',
AlternativeMMRInjectionOnly: 'Gelatine-free injection only',
IntranasalOnly: 'Nasal spray only',
IntranasalPreferred: 'Nasal spray preferred'
}
/**
* @readonly
* @enum {string}
*/
export const RegistrationOutcome = {
Pending: 'Not registered yet',
Present: 'Attending session',
Absent: 'Absent from session',
Complete: 'Completed session'
}
/**
* @readonly
* @enum {string}
*/
export const ReplyDecision = {
AlreadyVaccinated: 'Already vaccinated',
NoResponse: 'No response',
Given: 'Consent given',
OnlyAlternativeInjection: 'Consent given for flu injection',
OnlyMenACWY: 'Consent given for MenACWY only',
OnlyTdIPV: 'Consent given for Td/IPV only',
Declined: 'Follow up requested',
Refused: 'Consent refused'
}
/**
* @readonly
* @enum {string}
*/
export const ReplyMethod = {
Website: 'Online',
Phone: 'By phone',
Paper: 'Paper form',
InPerson: 'In person'
}
/**
* @readonly
* @enum {string}
*/
export const ReplyRefusal = {
Gelatine: 'Nasal vaccine contains gelatine',
GelatineMMR:
'Do not want my child to have the MMR vaccine that contains gelatine',
AlreadyVaccinated: 'Vaccine already received',
AlreadyVaccinatedMMR: 'Already had both doses of the MMR vaccination',
GettingElsewhere: 'Vaccine will be given elsewhere',
Medical: 'Medical reasons',
OutsideSchool: 'Do not want vaccination in school',
Personal: 'Personal choice',
Other: 'Other'
}
/**
* @readonly
* @enum {string}
*/
export const SchoolPhase = {
Nursery: 'Nursery',
Primary: 'Primary',
Secondary: 'Secondary',
Other: 'Other'
}
/**
* @readonly
* @enum {string}
*/
export const SchoolYearGroup = {
0: 'Reception',
1: 'Year 1',
2: 'Year 2',
3: 'Year 3',
4: 'Year 4',
5: 'Year 5',
6: 'Year 6',
7: 'Year 7',
8: 'Year 8',
9: 'Year 9',
10: 'Year 10',
11: 'Year 11',
12: 'Year 12',
13: 'Year 13'
}
/**
* @readonly
* @enum {string}
*/
export const ScreenVaccineCriteria = {
AlternativeFluInjectionOnly:
'The parent has consented to the injected vaccine only',
AlternativeMMRInjectionOnly:
'The parent has consented to the injected vaccine only',
IntranasalOnly: 'The parent has consented to the nasal spray only',
IntranasalPreferred:
'The parent has consented to the injected vaccine being offered if the nasal spray is not suitable'
}
/**
* @readonly
* @enum {string}
*/
export const ScreenOutcome = {
Vaccinate: 'Safe to vaccinate',
VaccinateAlternativeFluInjectionOnly: 'Safe to vaccinate with injection',
VaccinateAlternativeMMRInjectionOnly:
'Safe to vaccinate with gelatine-free injection',
VaccinateIntranasalOnly: 'Safe to vaccinate with nasal spray',
NeedsTriage: 'Needs triage',
InviteToClinic: 'Invited to clinic',
DelayVaccination: 'Delay vaccination',
DoNotVaccinate: 'Do not vaccinate'
}
/**
* @readonly
* @enum {string}
*/
export const SessionStatus = {
Active: 'In progress',
Unplanned: 'Not scheduled',
Planned: 'Scheduled',
Completed: 'Completed',
Closed: 'Closed'
}
/**
* @readonly
* @enum {string}
*/
export const SessionType = {
School: 'School session',
Clinic: 'Community clinic'
}
/**
* @readonly
* @enum {boolean|number}
*/
export const TeamDefaults = {
SessionOpenWeeks: 3,
SessionReminderWeeks: 1,
SessionRegistration: true
}
/**
* @readonly
* @enum {string}
*/
export const UploadType = {
Cohort: 'Child records',
School: 'Class list records',
Report: 'Vaccination records'
}
/**
* @readonly
* @enum {string}
*/
export const UploadStatus = {
Processing: 'Processing',
Failed: 'Failed',
Invalid: 'Invalid',
Devoid: 'No new records',
Review: 'Review and approve',
Approved: 'Approved'
}
/**
* @readonly
* @enum {string}
*/
export const UserRole = {
Nurse: 'Nurse',
NursePrescriber: 'Prescribing nurse',
Pharmacist: 'Pharmacist',
HCA: 'Healthcare assistant',
MedicalSecretary: 'Medical secretary',
DataConsumer: 'Data consumer'
}
/**
* @readonly
* @enum {string}
*/
export const VaccinationOutcome = {
Vaccinated: 'Vaccinated',
PartVaccinated: 'Partially vaccinated',
AlreadyVaccinated: 'Already had the vaccine',
ConsentRefused: 'Parent refused',
Refused: 'Child refused',
Absent: 'Child absent',
Unwell: 'Child unwell',
InviteToClinic: 'Invited to clinic',
DelayVaccination: 'Delay vaccination',
DoNotVaccinate: 'Contraindicated'
}
/**
* @readonly
* @enum {string}
*/
export const VaccinationMethod = {
Intranasal: 'Nasal spray',
Intramuscular: 'Intramuscular (IM) injection',
Subcutaneous: 'Subcutaneous injection'
}
/**
* @readonly
* @enum {string}
*/
export const VaccinationSite = {
Nose: 'Nose',
ArmLeftUpper: 'Left arm (upper position)',
ArmLeftLower: 'Left arm (lower position)',
ArmRightUpper: 'Right arm (upper position)',
ArmRightLower: 'Right arm (lower position)',
ThighLeft: 'Left thigh',
ThighRight: 'Right thigh',
Other: 'Other'
}
/**
* @readonly
* @enum {string}
*/
export const VaccinationProtocol = {
PGD: 'Patient Group Direction (PGD)',
PSD: 'Patient Specific Direction (PSD)',
National: 'National protocol'
}
/**
* @readonly
* @enum {string}
*/
export const VaccinationSyncStatus = {
CannotSync: 'Cannot sync',
NotSynced: 'Not synced',
Pending: 'Pending',
Synced: 'Synced',
Failed: 'Failed'
}
/**
* @readonly
* @enum {string}
*/
export const VaccineCriteria = {
AlternativeInjection: 'Gelatine-free injection',
Injection: 'Injection',
Intranasal: 'Nasal spray'
}
/**
* @readonly
* @enum {string}
*/
export const VaccineMethod = {
Injection: 'Injection',
Intranasal: 'Nasal spray'
}
/**
* @readonly
* @enum {string}
*/
export const VaccineSideEffect = {
AppetiteLoss: 'loss of appetite',
BlockedNose: 'a runny or blocked nose',
Bruising: 'bruising or itching at the site of the injection',
Dizzy: 'dizziness',
Drowsy: 'feeling drowsy',
Headache: 'a headache',
Irritable: 'feeling irritable',
PainArms: 'pain in the arms, hands, fingers',
PainSite: 'pain, swelling or itchiness where the injection was given',
Rash: 'a rash',
Sick: 'feeling or being sick',
SickFeeling: 'feeling sick (nausea)',
Tiredness: 'general tiredness',
Temperature: 'a high temperature',
TemperatureShiver: 'a high temperature, or feeling hot and shivery',
Unwell: 'generally feeling unwell'
}