@htilabs/platform-common-models 0.8.7 → 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 (77) 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 -28
  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 -27
  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 +3 -1321
  17. package/dist/cvcs/index.cjs.map +1 -1
  18. package/dist/cvcs/index.d.cts +1195 -2649
  19. package/dist/cvcs/index.d.ts +1195 -2649
  20. package/dist/cvcs/index.js +3 -1313
  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 +121 -1550
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +48 -401
  27. package/dist/index.d.ts +48 -401
  28. package/dist/index.js +120 -1526
  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-BdnJUisw.d.cts → platform-auth-XVB9aHqR.d.cts} +3 -16
  33. package/dist/{platform-auth-BdnJUisw.d.ts → platform-auth-XVB9aHqR.d.ts} +3 -16
  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 +12 -76
  44. package/src/__tests__/cvc-sot-snapshot.test.ts +10 -61
  45. package/src/__tests__/cvc-structural.test.ts +0 -9
  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 -31
  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 +0 -16
  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/serviceStates.v1.0.0.json +1 -23
  58. package/src/cvcs/sourceSubtype.v1.1.0.json +0 -36
  59. package/src/cvcs/verificationMethod.v1.0.0.json +0 -18
  60. package/src/generated/cvc-enums.ts +6 -429
  61. package/src/index.ts +20 -0
  62. package/src/schemas/common.ts +4 -0
  63. package/src/cvcs/activityType.v1.0.0.json +0 -143
  64. package/src/cvcs/assertionDomain.v1.0.0.json +0 -629
  65. package/src/cvcs/contactLinkType.v1.0.0.json +0 -89
  66. package/src/cvcs/hmisRelationshipToHoh.v1.0.0.json +0 -104
  67. package/src/cvcs/housingSubsidyTypes.v1.0.0.json +0 -159
  68. package/src/cvcs/htType.v1.0.0.json +0 -87
  69. package/src/cvcs/livingSituation.v1.0.0.json +0 -213
  70. package/src/cvcs/provenanceSourceId.v1.0.0.json +0 -134
  71. package/src/cvcs/radiusBucket.v1.0.0.json +0 -98
  72. package/src/cvcs/relationshipConcern.v1.0.0.json +0 -114
  73. package/src/cvcs/roiMethod.v1.0.0.json +0 -107
  74. package/src/cvcs/serviceAudience.v1.0.0.json +0 -96
  75. package/src/cvcs/sessionNoteVisibility.v1.0.0.json +0 -80
  76. package/src/cvcs/suggestionSource.v1.0.0.json +0 -71
  77. package/src/cvcs/victimAbuseTypes.v1.0.0.json +0 -276
@@ -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
  }
@@ -72,9 +72,7 @@
72
72
  "049-007-001-000-000-000-000",
73
73
  "049-007-002-000-000-000-000",
74
74
  "049-007-003-000-000-000-000",
75
- "049-007-004-000-000-000-000",
76
- "049-007-005-000-000-000-000",
77
- "049-007-006-000-000-000-000"
75
+ "049-007-004-000-000-000-000"
78
76
  ],
79
77
  "definition": "Program could not provide the service."
80
78
  },
@@ -114,26 +112,6 @@
114
112
  "childCodes": [],
115
113
  "definition": "Program could not provide the Service for a reason other than eligibility, capacity, or resources."
116
114
  },
117
- {
118
- "code": "049-007-005-000-000-000-000",
119
- "key": "unable_to_provide_service_fit",
120
- "title": "Unable due to service fit",
121
- "selectable": true,
122
- "parentCode": "049-007-000-000-000-000-000",
123
- "childCodes": [],
124
- "definition": "Program's services were not an appropriate fit for the client's presenting needs.",
125
- "provisional": true
126
- },
127
- {
128
- "code": "049-007-006-000-000-000-000",
129
- "key": "unable_to_provide_access_barrier",
130
- "title": "Unable due to access barrier",
131
- "selectable": true,
132
- "parentCode": "049-007-000-000-000-000-000",
133
- "childCodes": [],
134
- "definition": "An access barrier (e.g. language, transportation, location, hours, technology) prevented service delivery.",
135
- "provisional": true
136
- },
137
115
  {
138
116
  "code": "049-000-000-000-000-000-000",
139
117
  "key": "missingness_root",
@@ -325,42 +325,6 @@
325
325
  "parentCode": null,
326
326
  "childCodes": [],
327
327
  "definition": "The subject directly discloses the information. Source category: human. Use when the primary origin is the subject's own account (interview, intake, assessment)."
328
- },
329
- {
330
- "code": "141-032-000-000-000-000-000",
331
- "key": "advocate_capture",
332
- "title": "Advocate capture",
333
- "selectable": true,
334
- "parentCode": null,
335
- "childCodes": [],
336
- "definition": "Value captured or entered directly by an advocate in a PAVE capture surface (default advocate-authored subtype). Source category: human."
337
- },
338
- {
339
- "code": "141-033-000-000-000-000-000",
340
- "key": "advocate_assessment",
341
- "title": "Advocate assessment",
342
- "selectable": true,
343
- "parentCode": null,
344
- "childCodes": [],
345
- "definition": "Advocate structured assessment or functional-role judgment recorded in a PAVE surface (distinct from raw advocate_capture). Source category: human."
346
- },
347
- {
348
- "code": "141-034-000-000-000-000-000",
349
- "key": "child_welfare_episode_edit",
350
- "title": "Child welfare episode edit",
351
- "selectable": true,
352
- "parentCode": null,
353
- "childCodes": [],
354
- "definition": "Advocate add/update/archive of a child-welfare system-involvement episode log (assertion_domain child_welfare_involvement). Source category: human."
355
- },
356
- {
357
- "code": "141-035-000-000-000-000-000",
358
- "key": "juvenile_justice_episode_edit",
359
- "title": "Juvenile justice episode edit",
360
- "selectable": true,
361
- "parentCode": null,
362
- "childCodes": [],
363
- "definition": "Advocate add/update/archive of a juvenile-justice system-involvement episode log (assertion_domain juvenile_justice_involvement). Source category: human."
364
328
  }
365
329
  ]
366
330
  }
@@ -91,24 +91,6 @@
91
91
  "parentCode": null,
92
92
  "childCodes": [],
93
93
  "definition": "A supervisor (or designated reviewer) reviewed the assertion and marked it verified under an operational review process. Use when verification is granted via human review workflow. Pair with verified_by_user_id and verified_at, and capture any required support_strength policy. Not equivalent to legal confirmation; scope is operational."
94
- },
95
- {
96
- "code": "143-006-000-000-000-000-000",
97
- "key": "rules",
98
- "title": "Rules / algorithm match",
99
- "selectable": true,
100
- "parentCode": null,
101
- "childCodes": [],
102
- "definition": "Verification via a deterministic rule or algorithm match (GDR §5.7 — system-derived)."
103
- },
104
- {
105
- "code": "143-007-000-000-000-000-000",
106
- "key": "still_reaches",
107
- "title": "Still reaches",
108
- "selectable": true,
109
- "parentCode": null,
110
- "childCodes": [],
111
- "definition": "Verification that the contact or relationship still reaches / is live (GDR §5.7 liveness confirmation)."
112
94
  }
113
95
  ]
114
96
  }