@htilabs/platform-common-models 0.8.8 → 0.9.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 (78) hide show
  1. package/README.md +44 -0
  2. package/dist/config/index.cjs +191 -0
  3. package/dist/config/index.cjs.map +1 -0
  4. package/dist/config/index.d.cts +101 -0
  5. package/dist/config/index.d.ts +101 -0
  6. package/dist/config/index.js +165 -0
  7. package/dist/config/index.js.map +1 -0
  8. package/dist/constants/index.cjs +5 -432
  9. package/dist/constants/index.cjs.map +1 -1
  10. package/dist/constants/index.d.cts +1 -1
  11. package/dist/constants/index.d.ts +1 -1
  12. package/dist/constants/index.js +5 -429
  13. package/dist/constants/index.js.map +1 -1
  14. package/dist/{cvcEntry-DaDrEuTa.d.cts → cvcEntry-0BIB9sen.d.cts} +44 -44
  15. package/dist/{cvcEntry-DaDrEuTa.d.ts → cvcEntry-0BIB9sen.d.ts} +44 -44
  16. package/dist/cvcs/index.cjs +5863 -7181
  17. package/dist/cvcs/index.cjs.map +1 -1
  18. package/dist/cvcs/index.d.cts +3127 -4581
  19. package/dist/cvcs/index.d.ts +3127 -4581
  20. package/dist/cvcs/index.js +5863 -7173
  21. package/dist/cvcs/index.js.map +1 -1
  22. package/dist/{index-C0J3f169.d.ts → index-CDoqrfc1.d.ts} +1 -1
  23. package/dist/{index-EPjPjR0z.d.cts → index-Zu_mOJRn.d.cts} +1 -1
  24. package/dist/index.cjs +1780 -3613
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +191 -544
  27. package/dist/index.d.ts +191 -544
  28. package/dist/index.js +5967 -7775
  29. package/dist/index.js.map +1 -1
  30. package/dist/models/index.d.cts +2 -2
  31. package/dist/models/index.d.ts +2 -2
  32. package/dist/{platform-auth-BSKYSDKe.d.cts → platform-auth-XVB9aHqR.d.cts} +3 -19
  33. package/dist/{platform-auth-BSKYSDKe.d.ts → platform-auth-XVB9aHqR.d.ts} +3 -19
  34. package/dist/schemas/index.cjs +9 -26
  35. package/dist/schemas/index.cjs.map +1 -1
  36. package/dist/schemas/index.d.cts +39 -35
  37. package/dist/schemas/index.d.ts +39 -35
  38. package/dist/schemas/index.js +9 -26
  39. package/dist/schemas/index.js.map +1 -1
  40. package/dist/types/index.d.cts +2 -2
  41. package/dist/types/index.d.ts +2 -2
  42. package/package.json +25 -19
  43. package/src/__tests__/__snapshots__/cvc-sot.snap +13 -77
  44. package/src/__tests__/cvc-sot-snapshot.test.ts +11 -62
  45. package/src/__tests__/cvc-structural.test.ts +2 -11
  46. package/src/__tests__/runtime-contract-validator.test.ts +556 -0
  47. package/src/config/fixtures/valid.yaml +90 -0
  48. package/src/config/index.ts +352 -0
  49. package/src/constants/ic.ts +3 -445
  50. package/src/cvcs/highestEducationLevelCompleted.v1.0.0.json +0 -9
  51. package/src/cvcs/hmisSex.v1.0.0.json +89 -0
  52. package/src/cvcs/identificationStatus.v1.0.0.json +0 -18
  53. package/src/cvcs/incomeBenefitsSources.v1.0.0.json +2 -31
  54. package/src/cvcs/index.ts +1 -17
  55. package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +96 -0
  56. package/src/cvcs/recencyBand.v1.0.0.json +57 -38
  57. package/src/cvcs/{serviceCategories.v1.1.0.json → serviceCategories.v1.0.0.json} +1091 -1091
  58. package/src/cvcs/serviceStates.v1.0.0.json +1 -23
  59. package/src/cvcs/sourceSubtype.v1.1.0.json +0 -36
  60. package/src/cvcs/verificationMethod.v1.0.0.json +0 -18
  61. package/src/generated/cvc-enums.ts +149 -572
  62. package/src/index.ts +20 -0
  63. package/src/schemas/common.ts +4 -0
  64. package/src/cvcs/activityType.v1.0.0.json +0 -143
  65. package/src/cvcs/assertionDomain.v1.0.0.json +0 -629
  66. package/src/cvcs/contactLinkType.v1.0.0.json +0 -89
  67. package/src/cvcs/hmisRelationshipToHoh.v1.0.0.json +0 -104
  68. package/src/cvcs/housingSubsidyTypes.v1.0.0.json +0 -159
  69. package/src/cvcs/htType.v1.0.0.json +0 -87
  70. package/src/cvcs/livingSituation.v1.0.0.json +0 -213
  71. package/src/cvcs/provenanceSourceId.v1.0.0.json +0 -134
  72. package/src/cvcs/radiusBucket.v1.0.0.json +0 -98
  73. package/src/cvcs/relationshipConcern.v1.0.0.json +0 -114
  74. package/src/cvcs/roiMethod.v1.0.0.json +0 -107
  75. package/src/cvcs/serviceAudience.v1.0.0.json +0 -96
  76. package/src/cvcs/sessionNoteVisibility.v1.0.0.json +0 -80
  77. package/src/cvcs/suggestionSource.v1.0.0.json +0 -71
  78. package/src/cvcs/victimAbuseTypes.v1.0.0.json +0 -276
@@ -65,8 +65,7 @@
65
65
  "selectable": false,
66
66
  "parentCode": null,
67
67
  "childCodes": [
68
- "171-001-001-000-000-000-000",
69
- "171-001-002-000-000-000-000"
68
+ "171-001-001-000-000-000-000"
70
69
  ],
71
70
  "definition": "Income from wages, salary, tips, gig/contract work, or other paid employment."
72
71
  },
@@ -79,15 +78,6 @@
79
78
  "childCodes": [],
80
79
  "definition": "Income from wages, salary, tips, gig/contract work, or other paid employment. Includes informal earned income that is not supported by official documentation."
81
80
  },
82
- {
83
- "code": "171-001-002-000-000-000-000",
84
- "key": "informal_income",
85
- "title": "Informal / undocumented income",
86
- "selectable": true,
87
- "parentCode": "171-001-000-000-000-000-000",
88
- "childCodes": [],
89
- "definition": "Informal or undocumented income, e.g. cash work or side activity not captured by formal employment or a benefit program."
90
- },
91
81
  {
92
82
  "code": "171-002-000-000-000-000-000",
93
83
  "key": "cash_benefit",
@@ -336,8 +326,7 @@
336
326
  "parentCode": null,
337
327
  "childCodes": [
338
328
  "171-004-001-000-000-000-000",
339
- "171-004-002-000-000-000-000",
340
- "171-004-003-000-000-000-000"
329
+ "171-004-002-000-000-000-000"
341
330
  ],
342
331
  "definition": "Income received as interpersonal transfers or support payments (e.g., child support, spousal support)."
343
332
  },
@@ -359,15 +348,6 @@
359
348
  "childCodes": [],
360
349
  "definition": "All periodic payments received from an ex-spouse as alimony or spousal support. Excludes one-time property settlements."
361
350
  },
362
- {
363
- "code": "171-004-003-000-000-000-000",
364
- "key": "family_friend_support",
365
- "title": "Family / friend financial support",
366
- "selectable": true,
367
- "parentCode": "171-004-000-000-000-000-000",
368
- "childCodes": [],
369
- "definition": "Informal financial support from family or friends, not a documented benefit program."
370
- },
371
351
  {
372
352
  "code": "171-005-000-000-000-000-000",
373
353
  "key": "other_unspecified",
@@ -407,15 +387,6 @@
407
387
  "parentCode": "171-005-000-000-000-000-000",
408
388
  "childCodes": [],
409
389
  "definition": "Income received as a stipend, scholarship refund, training allowance, or other education-related payment that can function as income for living expenses. Funder-specific exclusions may apply (e.g., SSVF)."
410
- },
411
- {
412
- "code": "171-006-000-000-000-000-000",
413
- "key": "victim_compensation",
414
- "title": "Crime victim compensation",
415
- "selectable": true,
416
- "parentCode": null,
417
- "childCodes": [],
418
- "definition": "Income or benefits from a state or federal crime-victim compensation program (e.g. VOCA-funded victim compensation)."
419
390
  }
420
391
  ]
421
392
  }
package/src/cvcs/index.ts CHANGED
@@ -19,7 +19,7 @@
19
19
  * See locked spec §2 (envelope shape) and §9.2 (entry shape).
20
20
  */
21
21
 
22
- import serviceCategoriesSot from "./serviceCategories.v1.1.0.json" with { type: "json" };
22
+ import serviceCategoriesSot from "./serviceCategories.v1.0.0.json" with { type: "json" };
23
23
  import serviceStatesSot from "./serviceStates.v1.0.0.json" with { type: "json" };
24
24
  import serviceMechanismsSot from "./serviceMechanisms.v1.0.0.json" with { type: "json" };
25
25
  import incidentParticipationRolesSot from "./incidentParticipationRoles.v1.0.0.json" with { type: "json" };
@@ -138,14 +138,6 @@ import threadTypeSot from "./threadType.v1.0.0.json" with { type: "json" };
138
138
  import signatureTypeSot from "./signatureType.v1.0.0.json" with { type: "json" };
139
139
  import verificationStatusSot from "./verificationStatus.v1.0.0.json" with { type: "json" };
140
140
  import visaTypeSot from "./visaType.v1.0.0.json" with { type: "json" };
141
- import livingSituationSot from "./livingSituation.v1.0.0.json" with { type: "json" };
142
- import serviceAudienceSot from "./serviceAudience.v1.0.0.json" with { type: "json" };
143
- import hmisRelationshipToHohSot from "./hmisRelationshipToHoh.v1.0.0.json" with { type: "json" };
144
- import victimAbuseTypesSot from "./victimAbuseTypes.v1.0.0.json" with { type: "json" };
145
- import htTypeSot from "./htType.v1.0.0.json" with { type: "json" };
146
- import relationshipConcernSot from "./relationshipConcern.v1.0.0.json" with { type: "json" };
147
- import recencyBandSot from "./recencyBand.v1.0.0.json" with { type: "json" };
148
- import housingSubsidyTypesSot from "./housingSubsidyTypes.v1.0.0.json" with { type: "json" };
149
141
 
150
142
  export {
151
143
  serviceCategoriesSot,
@@ -267,12 +259,4 @@ export {
267
259
  signatureTypeSot,
268
260
  verificationStatusSot,
269
261
  visaTypeSot,
270
- livingSituationSot,
271
- serviceAudienceSot,
272
- hmisRelationshipToHohSot,
273
- victimAbuseTypesSot,
274
- htTypeSot,
275
- relationshipConcernSot,
276
- recencyBandSot,
277
- housingSubsidyTypesSot,
278
262
  };
@@ -0,0 +1,96 @@
1
+ {
2
+ "domain": "juvenile_justice_episode_type",
3
+ "name": "Core Juvenile Justice Episode Type",
4
+ "version": "1.0.0",
5
+ "levels": {
6
+ "0": "Unknown or Missing",
7
+ "1": "Episode Type"
8
+ },
9
+ "entries": [
10
+ {
11
+ "code": "197-000-000-000-000-000-000",
12
+ "key": "missingness_root",
13
+ "title": "Unknown, Redacted, or Missing",
14
+ "selectable": false,
15
+ "parentCode": null,
16
+ "childCodes": [
17
+ "197-000-000-000-000-000-001",
18
+ "197-000-000-000-000-000-002",
19
+ "197-000-000-000-000-000-003"
20
+ ],
21
+ "definition": "Root group for values indicating absent, withheld, or uncollected data."
22
+ },
23
+ {
24
+ "code": "197-000-000-000-000-000-001",
25
+ "key": "unknown",
26
+ "title": "Unknown",
27
+ "selectable": true,
28
+ "parentCode": "197-000-000-000-000-000-000",
29
+ "childCodes": [],
30
+ "definition": "Value is unknown at time of entry."
31
+ },
32
+ {
33
+ "code": "197-000-000-000-000-000-002",
34
+ "key": "anonymous",
35
+ "title": "Anonymous",
36
+ "selectable": true,
37
+ "parentCode": "197-000-000-000-000-000-000",
38
+ "childCodes": [],
39
+ "definition": "Value is intentionally withheld or redacted."
40
+ },
41
+ {
42
+ "code": "197-000-000-000-000-000-003",
43
+ "key": "data_not_collected",
44
+ "title": "Data not collected",
45
+ "selectable": true,
46
+ "parentCode": "197-000-000-000-000-000-000",
47
+ "childCodes": [],
48
+ "definition": "No attempt was made to collect the value."
49
+ },
50
+ {
51
+ "code": "197-001-000-000-000-000-000",
52
+ "key": "detention_stay",
53
+ "title": "Detention stay",
54
+ "selectable": true,
55
+ "parentCode": null,
56
+ "childCodes": [],
57
+ "definition": "A period of confinement in a juvenile detention facility."
58
+ },
59
+ {
60
+ "code": "197-002-000-000-000-000-000",
61
+ "key": "diversion_program",
62
+ "title": "Diversion program",
63
+ "selectable": true,
64
+ "parentCode": null,
65
+ "childCodes": [],
66
+ "definition": "Participation in a program that diverts a youth away from formal juvenile court processing."
67
+ },
68
+ {
69
+ "code": "197-003-000-000-000-000-000",
70
+ "key": "pending_adjudication",
71
+ "title": "Pending charges / adjudication process",
72
+ "selectable": true,
73
+ "parentCode": null,
74
+ "childCodes": [],
75
+ "definition": "An open juvenile case awaiting adjudication."
76
+ },
77
+ {
78
+ "code": "197-004-000-000-000-000-000",
79
+ "key": "probation_supervision",
80
+ "title": "Probation / community supervision (juvenile)",
81
+ "selectable": true,
82
+ "parentCode": null,
83
+ "childCodes": [],
84
+ "definition": "Court-ordered supervision of a youth in the community rather than in confinement."
85
+ },
86
+ {
87
+ "code": "197-005-000-000-000-000-000",
88
+ "key": "residential_jj_placement",
89
+ "title": "Residential JJ placement",
90
+ "selectable": true,
91
+ "parentCode": null,
92
+ "childCodes": [],
93
+ "definition": "Placement in a residential juvenile justice facility (e.g. training school, residential treatment)."
94
+ }
95
+ ]
96
+ }
@@ -1,105 +1,124 @@
1
1
  {
2
2
  "domain": "recency_band",
3
- "name": "Core Recency Band (PROVISIONAL CVC-232 — pending codebook ratification)",
3
+ "name": "Core Recency Band",
4
4
  "version": "1.0.0",
5
5
  "levels": {
6
6
  "0": "Unknown or Missing",
7
- "1": "Recency band"
7
+ "1": "Recency Band"
8
8
  },
9
9
  "entries": [
10
10
  {
11
- "code": "232-000-000-000-000-000-000",
11
+ "code": "137-000-000-000-000-000-000",
12
12
  "key": "missingness_root",
13
13
  "title": "Unknown, Redacted, or Missing",
14
14
  "selectable": false,
15
15
  "parentCode": null,
16
16
  "childCodes": [
17
- "232-000-000-000-000-000-001",
18
- "232-000-000-000-000-000-002",
19
- "232-000-000-000-000-000-003"
17
+ "137-000-000-000-000-000-001",
18
+ "137-000-000-000-000-000-002",
19
+ "137-000-000-000-000-000-003",
20
+ "137-000-000-000-000-000-004"
20
21
  ],
21
22
  "definition": "Root group for values indicating absent, withheld, or uncollected data."
22
23
  },
23
24
  {
24
- "code": "232-000-000-000-000-000-001",
25
+ "code": "137-000-000-000-000-000-001",
25
26
  "key": "unknown",
26
- "title": "Unknown / not captured",
27
+ "title": "Unknown",
27
28
  "selectable": true,
28
- "parentCode": "232-000-000-000-000-000-000",
29
+ "parentCode": "137-000-000-000-000-000-000",
29
30
  "childCodes": [],
30
- "definition": "The recency band is unknown or cannot be determined from the available information."
31
+ "definition": "Value is unknown at time of entry."
31
32
  },
32
33
  {
33
- "code": "232-000-000-000-000-000-002",
34
+ "code": "137-000-000-000-000-000-002",
34
35
  "key": "anonymous",
35
- "title": "Anonymous / declined to answer",
36
+ "title": "Anonymous",
36
37
  "selectable": true,
37
- "parentCode": "232-000-000-000-000-000-000",
38
+ "parentCode": "137-000-000-000-000-000-000",
38
39
  "childCodes": [],
39
- "definition": "The recency band may be withheld by preference or due to redaction; identity is anonymous or redacted."
40
+ "definition": "Value is intentionally withheld or redacted."
40
41
  },
41
42
  {
42
- "code": "232-000-000-000-000-000-003",
43
+ "code": "137-000-000-000-000-000-003",
43
44
  "key": "data_not_collected",
44
45
  "title": "Data not collected",
45
46
  "selectable": true,
46
- "parentCode": "232-000-000-000-000-000-000",
47
+ "parentCode": "137-000-000-000-000-000-000",
47
48
  "childCodes": [],
48
- "definition": "No attempt was made to collect the recency band."
49
+ "definition": "No attempt was made to collect the value."
49
50
  },
50
51
  {
51
- "code": "232-001-000-000-000-000-000",
52
- "key": "within_3_months",
53
- "title": "Within the last 3 months",
52
+ "code": "137-000-000-000-000-000-004",
53
+ "key": "prefer_not_to_answer",
54
+ "title": "Client prefers not to answer",
55
+ "selectable": true,
56
+ "parentCode": "137-000-000-000-000-000-000",
57
+ "childCodes": [],
58
+ "definition": "Client was offered the opportunity to self-identify and explicitly declined to provide the value."
59
+ },
60
+ {
61
+ "code": "137-001-000-000-000-000-000",
62
+ "key": "less_than_3_years",
63
+ "title": "Less than 3 years ago",
54
64
  "selectable": true,
55
65
  "parentCode": null,
56
66
  "childCodes": [],
57
- "definition": "The event or condition occurred within the most recent 3 months (0 up to and including 3 months before time_as_of)."
67
+ "definition": "The asserted event occurred less than 3 years ago."
58
68
  },
59
69
  {
60
- "code": "232-002-000-000-000-000-000",
70
+ "code": "137-002-000-000-000-000-000",
61
71
  "key": "months_3_to_6",
62
- "title": "3 to 6 months ago",
72
+ "title": "3-6 months ago",
63
73
  "selectable": true,
64
74
  "parentCode": null,
65
75
  "childCodes": [],
66
- "definition": "The event or condition occurred more than 3 and up to and including 6 months before time_as_of."
76
+ "definition": "The asserted event occurred between 3 and 6 months ago."
67
77
  },
68
78
  {
69
- "code": "232-003-000-000-000-000-000",
79
+ "code": "137-003-000-000-000-000-000",
70
80
  "key": "months_6_to_12",
71
- "title": "6 to 12 months ago",
81
+ "title": "6-12 months ago",
72
82
  "selectable": true,
73
83
  "parentCode": null,
74
84
  "childCodes": [],
75
- "definition": "The event or condition occurred more than 6 and up to and including 12 months before time_as_of."
85
+ "definition": "The asserted event occurred between 6 and 12 months ago."
76
86
  },
77
87
  {
78
- "code": "232-004-000-000-000-000-000",
88
+ "code": "137-004-000-000-000-000-000",
79
89
  "key": "one_year_or_more",
80
- "title": "1 year or more ago",
90
+ "title": "One year or more",
81
91
  "selectable": true,
82
92
  "parentCode": null,
83
93
  "childCodes": [],
84
- "definition": "The event or condition occurred at least 1 year before time_as_of. Use a finer-grained band (years_3_to_10 or ten_plus_years) when the source supports it."
94
+ "definition": "The asserted event occurred one year or more ago (without further granularity)."
85
95
  },
86
96
  {
87
- "code": "232-005-000-000-000-000-000",
88
- "key": "years_3_to_10",
89
- "title": "3 to 10 years ago",
97
+ "code": "137-005-000-000-000-000-000",
98
+ "key": "ten_plus_years",
99
+ "title": "10+ years ago",
90
100
  "selectable": true,
91
101
  "parentCode": null,
92
102
  "childCodes": [],
93
- "definition": "The event or condition occurred more than 3 and up to and including 10 years before time_as_of."
103
+ "definition": "The asserted event occurred 10 or more years ago."
94
104
  },
95
105
  {
96
- "code": "232-006-000-000-000-000-000",
97
- "key": "ten_plus_years",
98
- "title": "More than 10 years ago",
106
+ "code": "137-006-000-000-000-000-000",
107
+ "key": "within_3_months",
108
+ "title": "Within past 3 months",
109
+ "selectable": true,
110
+ "parentCode": null,
111
+ "childCodes": [],
112
+ "definition": "The asserted event occurred within the past 3 months."
113
+ },
114
+ {
115
+ "code": "137-007-000-000-000-000-000",
116
+ "key": "years_3_to_10",
117
+ "title": "3-10 years ago",
99
118
  "selectable": true,
100
119
  "parentCode": null,
101
120
  "childCodes": [],
102
- "definition": "The event or condition occurred more than 10 years before time_as_of."
121
+ "definition": "The asserted event occurred between 3 and 10 years ago."
103
122
  }
104
123
  ]
105
124
  }