@htilabs/platform-common-models 0.13.0 → 0.14.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 (63) hide show
  1. package/dist/constants/index.cjs +106 -0
  2. package/dist/constants/index.cjs.map +1 -1
  3. package/dist/constants/index.d.cts +1 -1
  4. package/dist/constants/index.d.ts +1 -1
  5. package/dist/constants/index.js +98 -0
  6. package/dist/constants/index.js.map +1 -1
  7. package/dist/{cvcEntry-ctHTp2df.d.cts → cvcEntry-0BIB9sen.d.cts} +36 -36
  8. package/dist/{cvcEntry-ctHTp2df.d.ts → cvcEntry-0BIB9sen.d.ts} +36 -36
  9. package/dist/cvcs/index.cjs +562 -120
  10. package/dist/cvcs/index.cjs.map +1 -1
  11. package/dist/cvcs/index.d.cts +589 -121
  12. package/dist/cvcs/index.d.ts +589 -121
  13. package/dist/cvcs/index.js +562 -120
  14. package/dist/cvcs/index.js.map +1 -1
  15. package/dist/enums/index.cjs +22 -2
  16. package/dist/enums/index.cjs.map +1 -1
  17. package/dist/enums/index.d.cts +29 -9
  18. package/dist/enums/index.d.ts +29 -9
  19. package/dist/enums/index.js +22 -2
  20. package/dist/enums/index.js.map +1 -1
  21. package/dist/{index-4DiJrn7y.d.ts → index-CDoqrfc1.d.ts} +1 -1
  22. package/dist/{index-qreOzXYS.d.cts → index-Zu_mOJRn.d.cts} +1 -1
  23. package/dist/index.cjs +690 -122
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +3 -3
  26. package/dist/index.d.ts +3 -3
  27. package/dist/index.js +682 -122
  28. package/dist/index.js.map +1 -1
  29. package/dist/models/index.d.cts +2 -2
  30. package/dist/models/index.d.ts +2 -2
  31. package/dist/{platform-auth-Dv5fu0Fh.d.cts → platform-auth-CrF5U_JH.d.cts} +113 -3
  32. package/dist/{platform-auth-Dv5fu0Fh.d.ts → platform-auth-CrF5U_JH.d.ts} +113 -3
  33. package/dist/schemas/index.cjs +296 -0
  34. package/dist/schemas/index.cjs.map +1 -1
  35. package/dist/schemas/index.d.cts +11 -11
  36. package/dist/schemas/index.d.ts +11 -11
  37. package/dist/schemas/index.js +296 -0
  38. package/dist/schemas/index.js.map +1 -1
  39. package/dist/types/index.d.cts +2 -2
  40. package/dist/types/index.d.ts +2 -2
  41. package/package.json +26 -27
  42. package/src/__sot__/coreIndicatorFields.ts +4 -4
  43. package/src/__sot__/coreIndicators.pin.json +62 -2
  44. package/src/__sot__/scoringEmits.pin.json +9 -4
  45. package/src/__tests__/__snapshots__/cvc-sot.snap +11 -11
  46. package/src/__tests__/cvc-136-scoring-invariant.test.ts +89 -28
  47. package/src/__tests__/cvc-drift-gate.test.ts +165 -32
  48. package/src/__tests__/cvc-sot-snapshot.test.ts +21 -12
  49. package/src/__tests__/cvc-structural.test.ts +8 -8
  50. package/src/__tests__/incident-participation-roles-canon.test.ts +424 -0
  51. package/src/__tests__/referral-entity-category-canon.test.ts +383 -0
  52. package/src/constants/ic.ts +321 -3
  53. package/src/cvcs/{coreIndicators.v1.0.0.json → coreIndicators.v1.1.0.json} +93 -10
  54. package/src/cvcs/{highestEducationLevelCompleted.v1.0.0.json → highestEducationLevelCompleted.v1.1.0.json} +1 -1
  55. package/src/cvcs/incidentParticipationRoles.v1.1.0.json +433 -0
  56. package/src/cvcs/{incomeBenefitsSources.v1.0.0.json → incomeBenefitsSources.v1.1.0.json} +1 -1
  57. package/src/cvcs/index.ts +8 -8
  58. package/src/cvcs/{referralEntityCategory.v1.0.0.json → referralEntityCategory.v1.1.0.json} +192 -54
  59. package/src/cvcs/{serviceStates.v1.0.0.json → serviceStates.v1.1.0.json} +1 -1
  60. package/src/cvcs/{sourceSubtype.v1.1.0.json → sourceSubtype.v1.2.0.json} +1 -1
  61. package/src/cvcs/{verificationMethod.v1.0.0.json → verificationMethod.v1.1.0.json} +1 -1
  62. package/src/generated/cvc-enums.ts +29 -9
  63. package/src/cvcs/incidentParticipationRoles.v1.0.0.json +0 -212
@@ -173,7 +173,7 @@ export type ServiceCategoryKey = keyof typeof ServiceCategoryKeys;
173
173
  /**
174
174
  * Key → positional code map for the `service_states` CVC domain.
175
175
  *
176
- * Domain: `service_states` · Version: 1.0.0 · Entries: 17
176
+ * Domain: `service_states` · Version: 1.1.0 · Entries: 17
177
177
  */
178
178
  export const ServiceStateKeys = {
179
179
  missingness_root: "049-000-000-000-000-000-000",
@@ -218,7 +218,7 @@ export type ServiceMechanismKey = keyof typeof ServiceMechanismKeys;
218
218
  /**
219
219
  * Key → positional code map for the `incident_participation_roles` CVC domain.
220
220
  *
221
- * Domain: `incident_participation_roles` · Version: 1.0.0 · Entries: 20
221
+ * Domain: `incident_participation_roles` · Version: 1.1.0 · Entries: 31
222
222
  */
223
223
  export const IncidentParticipationRoleKeys = {
224
224
  missingness_root: "069-000-000-000-000-000-000",
@@ -241,6 +241,17 @@ export const IncidentParticipationRoleKeys = {
241
241
  other_incident_responder: "069-004-004-000-000-000-000",
242
242
  responding_officer: "069-004-005-000-000-000-000",
243
243
  legal_professional: "069-004-006-000-000-000-000",
244
+ prosecutor: "069-004-006-001-000-000-000",
245
+ vsp_staff: "069-004-007-000-000-000-000",
246
+ healthcare_provider_staff: "069-004-008-000-000-000-000",
247
+ law_enforcement_personnel: "069-004-009-000-000-000-000",
248
+ lead_investigator: "069-004-009-001-000-000-000",
249
+ investigator: "069-004-009-002-000-000-000",
250
+ analyst: "069-004-009-003-000-000-000",
251
+ le_officer: "069-004-009-004-000-000-000",
252
+ other_response_personnel: "069-004-010-000-000-000-000",
253
+ data_entry_staff: "069-004-011-000-000-000-000",
254
+ task_force: "069-004-012-000-000-000-000",
244
255
  } as const;
245
256
 
246
257
  export type IncidentParticipationRoleKey = keyof typeof IncidentParticipationRoleKeys;
@@ -838,7 +849,7 @@ export type ContactSafetyStatusKey = keyof typeof ContactSafetyStatusKeys;
838
849
  /**
839
850
  * Key → positional code map for the `highest_education_level_completed` CVC domain.
840
851
  *
841
- * Domain: `highest_education_level_completed` · Version: 1.0.0 · Entries: 13
852
+ * Domain: `highest_education_level_completed` · Version: 1.1.0 · Entries: 13
842
853
  */
843
854
  export const HighestEducationLevelCompletedKeys = {
844
855
  missingness_root: "180-000-000-000-000-000-000",
@@ -1378,7 +1389,7 @@ export type LocationTypeKey = keyof typeof LocationTypeKeys;
1378
1389
  /**
1379
1390
  * Key → positional code map for the `referral_entity_category` CVC domain.
1380
1391
  *
1381
- * Domain: `referral_entity_category` · Version: 1.0.0 · Entries: 43
1392
+ * Domain: `referral_entity_category` · Version: 1.1.0 · Entries: 46
1382
1393
  */
1383
1394
  export const ReferralEntityCategoryKeys = {
1384
1395
  missingness_root: "048-000-000-000-000-000-000",
@@ -1407,14 +1418,17 @@ export const ReferralEntityCategoryKeys = {
1407
1418
  other_law_enforcement: "048-007-003-005-000-000-000",
1408
1419
  courts_prosecution: "048-007-004-000-000-000-000",
1409
1420
  correction_probation: "048-007-005-000-000-000-000",
1421
+ adult_protective_services: "048-007-006-000-000-000-000",
1410
1422
  health_behavioral_health: "048-008-000-000-000-000-000",
1411
1423
  inpatient_psychiatric_facility: "048-008-001-000-000-000-000",
1412
1424
  healthcare_provider: "048-008-002-000-000-000-000",
1413
1425
  education: "048-009-000-000-000-000-000",
1426
+ school_academic_institution: "048-009-001-000-000-000-000",
1414
1427
  victim_community_service_providers: "048-010-000-000-000-000-000",
1415
1428
  child_advocacy_center: "048-010-001-000-000-000-000",
1416
1429
  victim_service_provider: "048-010-002-000-000-000-000",
1417
1430
  community_based_service_provider: "048-010-003-000-000-000-000",
1431
+ legal_services_provider: "048-010-004-000-000-000-000",
1418
1432
  coordination_governance: "048-011-000-000-000-000-000",
1419
1433
  mdt: "048-011-001-000-000-000-000",
1420
1434
  coalition: "048-011-002-000-000-000-000",
@@ -1431,7 +1445,7 @@ export type ReferralEntityCategoryKey = keyof typeof ReferralEntityCategoryKeys;
1431
1445
  /**
1432
1446
  * Key → positional code map for the `income_benefits_sources` CVC domain.
1433
1447
  *
1434
- * Domain: `income_benefits_sources` · Version: 1.0.0 · Entries: 41
1448
+ * Domain: `income_benefits_sources` · Version: 1.1.0 · Entries: 41
1435
1449
  */
1436
1450
  export const IncomeBenefitsSourcesKeys = {
1437
1451
  missingness_root: "171-000-000-000-000-000-000",
@@ -1581,7 +1595,7 @@ export type SourceCategoryKey = keyof typeof SourceCategoryKeys;
1581
1595
  /**
1582
1596
  * Key → positional code map for the `source_subtype` CVC domain.
1583
1597
  *
1584
- * Domain: `source_subtype` · Version: 1.1.0 · Entries: 39
1598
+ * Domain: `source_subtype` · Version: 1.2.0 · Entries: 39
1585
1599
  */
1586
1600
  export const SourceSubtypeKeys = {
1587
1601
  missingness_root: "141-000-000-000-000-000-000",
@@ -1703,7 +1717,7 @@ export type TimeScopeKey = keyof typeof TimeScopeKeys;
1703
1717
  /**
1704
1718
  * Key → positional code map for the `verification_method` CVC domain.
1705
1719
  *
1706
- * Domain: `verification_method` · Version: 1.0.0 · Entries: 11
1720
+ * Domain: `verification_method` · Version: 1.1.0 · Entries: 11
1707
1721
  */
1708
1722
  export const VerificationMethodKeys = {
1709
1723
  missingness_root: "143-000-000-000-000-000-000",
@@ -4263,9 +4277,9 @@ export const DhStateKeys = {
4263
4277
  export type DhStateKey = keyof typeof DhStateKeys;
4264
4278
 
4265
4279
  /**
4266
- * Key → positional code map for the `core_indicators` CVC domain (CVC-136; 214 canonical indicator codes re-sourced from prototype `data/core_indicators.yaml` @ 622410b + 2 scoring-ahead codes @hti/scoring emits before the codebook adopted them = 216 substantive). Entries carry `family` / `polarity` / `severity` / `isAlert` / `alertWhen`; the alert list is a DERIVED VIEW over `isAlert`, not a rival taxonomy.
4280
+ * Key → positional code map for the `core_indicators` CVC domain (CVC-136; 220 canonical indicator codes re-sourced from prototype `data/core_indicators.yaml` @ c53378f, reconciled against @hti/scoring `emits_by_code` @ 9c209cf; the 2 former scoring-ahead `_youth` codes are DEPRECATED read-only rows — `selectable: false`, `supersededBy` their canonical siblings — kept because PAVE 2.0 still writes them = 222 substantive; SOT v1.1.0). Entries carry `family` / `polarity` / `severity` / `isAlert` / `alertWhen`; the alert list is a DERIVED VIEW over `isAlert`, not a rival taxonomy.
4267
4281
  *
4268
- * Domain: `core_indicators` · Version: 1.0.0 · Entries: 220
4282
+ * Domain: `core_indicators` · Version: 1.1.0 · Entries: 226
4269
4283
  */
4270
4284
  export const CoreIndicatorKeys = {
4271
4285
  missingness_root: "136-000-000-000-000-000-000",
@@ -4488,6 +4502,12 @@ export const CoreIndicatorKeys = {
4488
4502
  sexualized_content_online_performance_activity: "136-214-000-000-000-000-000",
4489
4503
  trauma_perpetrator_is_current_manager: "136-215-000-000-000-000-000",
4490
4504
  active_protective_order: "136-216-000-000-000-000-000",
4505
+ disclosed_fear_at_intake: "136-217-000-000-000-000-000",
4506
+ does_not_control_housing: "136-218-000-000-000-000-000",
4507
+ oppressive_home_life: "136-219-000-000-000-000-000",
4508
+ recent_separation: "136-220-000-000-000-000-000",
4509
+ survival_sex: "136-221-000-000-000-000-000",
4510
+ unable_to_speak_freely: "136-222-000-000-000-000-000",
4491
4511
  } as const;
4492
4512
 
4493
4513
  export type CoreIndicatorKey = keyof typeof CoreIndicatorKeys;
@@ -1,212 +0,0 @@
1
- {
2
- "domain": "incident_participation_roles",
3
- "name": "Core Incident Participation Roles",
4
- "version": "1.0.0",
5
- "levels": {
6
- "0": "Unknown or Missing",
7
- "1": "Group",
8
- "2": "Role"
9
- },
10
- "entries": [
11
- {
12
- "code": "069-000-000-000-000-000-000",
13
- "key": "missingness_root",
14
- "title": "Unknown, Redacted, or Missing",
15
- "selectable": false,
16
- "parentCode": null,
17
- "childCodes": [
18
- "069-000-000-000-000-000-001",
19
- "069-000-000-000-000-000-002",
20
- "069-000-000-000-000-000-003"
21
- ],
22
- "definition": "Root group for values indicating absent, withheld, or uncollected data."
23
- },
24
- {
25
- "code": "069-000-000-000-000-000-001",
26
- "key": "unknown",
27
- "title": "Unknown",
28
- "selectable": true,
29
- "parentCode": "069-000-000-000-000-000-000",
30
- "childCodes": [],
31
- "definition": "Value is unknown at time of entry."
32
- },
33
- {
34
- "code": "069-000-000-000-000-000-002",
35
- "key": "anonymous",
36
- "title": "Anonymous",
37
- "selectable": true,
38
- "parentCode": "069-000-000-000-000-000-000",
39
- "childCodes": [],
40
- "definition": "Value is intentionally withheld or redacted."
41
- },
42
- {
43
- "code": "069-000-000-000-000-000-003",
44
- "key": "data_not_collected",
45
- "title": "Data not collected",
46
- "selectable": true,
47
- "parentCode": "069-000-000-000-000-000-000",
48
- "childCodes": [],
49
- "definition": "No attempt was made to collect the value."
50
- },
51
- {
52
- "code": "069-001-000-000-000-000-000",
53
- "key": "client_group",
54
- "title": "Client",
55
- "selectable": false,
56
- "parentCode": null,
57
- "childCodes": [
58
- "069-001-001-000-000-000-000"
59
- ],
60
- "definition": "Group of participation roles identifying the person the incident record is about."
61
- },
62
- {
63
- "code": "069-001-001-000-000-000-000",
64
- "key": "client_subject",
65
- "title": "Client (subject)",
66
- "selectable": true,
67
- "parentCode": "069-001-000-000-000-000-000",
68
- "childCodes": [],
69
- "definition": "The participant who is the subject of the incident record (the client for whom the episode is framed)."
70
- },
71
- {
72
- "code": "069-002-000-000-000-000-000",
73
- "key": "caller_reporter_group",
74
- "title": "Caller / Reporter",
75
- "selectable": false,
76
- "parentCode": null,
77
- "childCodes": [
78
- "069-002-001-000-000-000-000",
79
- "069-002-002-000-000-000-000",
80
- "069-002-003-000-000-000-000"
81
- ],
82
- "definition": "Group of participation roles identifying who contacted or reported the incident to the program."
83
- },
84
- {
85
- "code": "069-002-001-000-000-000-000",
86
- "key": "caller_self",
87
- "title": "Caller (self)",
88
- "selectable": true,
89
- "parentCode": "069-002-000-000-000-000-000",
90
- "childCodes": [],
91
- "definition": "Caller contacting the program on their own behalf."
92
- },
93
- {
94
- "code": "069-002-002-000-000-000-000",
95
- "key": "caller_third_party",
96
- "title": "Caller (third party)",
97
- "selectable": true,
98
- "parentCode": "069-002-000-000-000-000-000",
99
- "childCodes": [],
100
- "definition": "Caller contacting the program on behalf of someone else."
101
- },
102
- {
103
- "code": "069-002-003-000-000-000-000",
104
- "key": "reporter",
105
- "title": "Reporter",
106
- "selectable": true,
107
- "parentCode": "069-002-000-000-000-000-000",
108
- "childCodes": [],
109
- "definition": "Participant who filed a formal report about the incident."
110
- },
111
- {
112
- "code": "069-003-000-000-000-000-000",
113
- "key": "support_network_group",
114
- "title": "Support network",
115
- "selectable": false,
116
- "parentCode": null,
117
- "childCodes": [
118
- "069-003-001-000-000-000-000",
119
- "069-003-002-000-000-000-000"
120
- ],
121
- "definition": "Group of participation roles identifying people from the client's personal support network."
122
- },
123
- {
124
- "code": "069-003-001-000-000-000-000",
125
- "key": "family_member_or_guardian",
126
- "title": "Family member or guardian",
127
- "selectable": true,
128
- "parentCode": "069-003-000-000-000-000-000",
129
- "childCodes": [],
130
- "definition": "Family member or legal guardian of the client."
131
- },
132
- {
133
- "code": "069-003-002-000-000-000-000",
134
- "key": "friend_or_peer",
135
- "title": "Friend or peer",
136
- "selectable": true,
137
- "parentCode": "069-003-000-000-000-000-000",
138
- "childCodes": [],
139
- "definition": "Friend or peer in the client's support network."
140
- },
141
- {
142
- "code": "069-004-000-000-000-000-000",
143
- "key": "system_professional_group",
144
- "title": "System / professional participants",
145
- "selectable": false,
146
- "parentCode": null,
147
- "childCodes": [
148
- "069-004-001-000-000-000-000",
149
- "069-004-002-000-000-000-000",
150
- "069-004-003-000-000-000-000",
151
- "069-004-004-000-000-000-000",
152
- "069-004-005-000-000-000-000",
153
- "069-004-006-000-000-000-000"
154
- ],
155
- "definition": "Group of participation roles identifying system-side professionals involved in the incident."
156
- },
157
- {
158
- "code": "069-004-001-000-000-000-000",
159
- "key": "service_provider_staff",
160
- "title": "Service provider staff",
161
- "selectable": true,
162
- "parentCode": "069-004-000-000-000-000-000",
163
- "childCodes": [],
164
- "definition": "Staff of a service provider program or agency involved in the incident."
165
- },
166
- {
167
- "code": "069-004-002-000-000-000-000",
168
- "key": "medical_provider_staff",
169
- "title": "Medical provider staff",
170
- "selectable": true,
171
- "parentCode": "069-004-000-000-000-000-000",
172
- "childCodes": [],
173
- "definition": "Staff of a medical provider (hospital, clinic) involved in the incident."
174
- },
175
- {
176
- "code": "069-004-003-000-000-000-000",
177
- "key": "data_entry",
178
- "title": "Data Entry / Editor",
179
- "selectable": true,
180
- "parentCode": "069-004-000-000-000-000-000",
181
- "childCodes": [],
182
- "definition": "A participant performing data entry or record editing for the incident — typically program staff entering or updating the record rather than participating substantively in the incident response."
183
- },
184
- {
185
- "code": "069-004-004-000-000-000-000",
186
- "key": "other_incident_responder",
187
- "title": "VSP or Other Incident Responder",
188
- "selectable": true,
189
- "parentCode": "069-004-000-000-000-000-000",
190
- "childCodes": [],
191
- "definition": "A participant acting as a Victim Service Provider (VSP) or other non-law-enforcement responder present at the incident (e.g., crisis advocate on scene)."
192
- },
193
- {
194
- "code": "069-004-005-000-000-000-000",
195
- "key": "responding_officer",
196
- "title": "LE Responding Officer",
197
- "selectable": true,
198
- "parentCode": "069-004-000-000-000-000-000",
199
- "childCodes": [],
200
- "definition": "A participant acting as a law-enforcement responding officer on the incident (patrol officer, detective, or equivalent sworn personnel)."
201
- },
202
- {
203
- "code": "069-004-006-000-000-000-000",
204
- "key": "legal_professional",
205
- "title": "Legal professional",
206
- "selectable": true,
207
- "parentCode": "069-004-000-000-000-000-000",
208
- "childCodes": [],
209
- "definition": "An attorney or other legal professional (e.g., legal advocate, paralegal) acting in a legal capacity in relation to the incident."
210
- }
211
- ]
212
- }