@htilabs/platform-common-models 0.5.3-beta.4 → 0.7.0-beta.1
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.
- package/README.md +44 -0
- package/dist/config/index.cjs +191 -0
- package/dist/config/index.cjs.map +1 -0
- package/dist/config/index.d.cts +101 -0
- package/dist/config/index.d.ts +101 -0
- package/dist/config/index.js +165 -0
- package/dist/config/index.js.map +1 -0
- package/dist/constants/index.cjs +46 -5
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +42 -5
- package/dist/constants/index.js.map +1 -1
- package/dist/cvcs/index.cjs +6874 -2
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +7562 -66
- package/dist/cvcs/index.d.ts +7562 -66
- package/dist/cvcs/index.js +6833 -1
- package/dist/cvcs/index.js.map +1 -1
- package/dist/index.cjs +7742 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1009 -3
- package/dist/index.d.ts +1009 -3
- package/dist/index.js +7656 -6
- package/dist/index.js.map +1 -1
- package/dist/{platform-auth-CjC57132.d.cts → platform-auth-C97LpsRd.d.cts} +8 -4
- package/dist/{platform-auth-CjC57132.d.ts → platform-auth-C97LpsRd.d.ts} +8 -4
- package/dist/schemas/index.cjs +43 -6
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +4 -0
- package/dist/schemas/index.d.ts +4 -0
- package/dist/schemas/index.js +43 -6
- package/dist/schemas/index.js.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +9 -2
- package/src/__tests__/__snapshots__/cvc-sot.snap +160 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +319 -0
- package/src/__tests__/cvc-structural.test.ts +40 -0
- package/src/__tests__/runtime-contract-validator.test.ts +556 -0
- package/src/config/fixtures/valid.yaml +90 -0
- package/src/config/index.ts +352 -0
- package/src/constants/ic.ts +49 -6
- package/src/cvcs/administeringJurisdiction.v1.0.0.json +105 -0
- package/src/cvcs/ageBinReporting.v1.0.0.json +114 -0
- package/src/cvcs/contactInfoTypes.v1.0.0.json +250 -0
- package/src/cvcs/contactSafetyStatus.v1.0.0.json +69 -0
- package/src/cvcs/employmentStatus.v1.0.0.json +302 -0
- package/src/cvcs/enrollmentApplicationStatus.v1.0.0.json +123 -0
- package/src/cvcs/eyeColor.v1.0.0.json +114 -0
- package/src/cvcs/facilitatorEntityType.v1.0.0.json +141 -0
- package/src/cvcs/facilitatorLabelUsedInSource.v1.0.0.json +159 -0
- package/src/cvcs/facilitatorSubrole.v1.0.0.json +381 -0
- package/src/cvcs/frequencyCadence.v1.0.0.json +114 -0
- package/src/cvcs/genderIdentity.v1.0.0.json +128 -0
- package/src/cvcs/hairColor.v1.0.0.json +105 -0
- package/src/cvcs/hasTattoos.v1.0.0.json +69 -0
- package/src/cvcs/highestEducationLevelCompleted.v1.0.0.json +124 -0
- package/src/cvcs/hmisSex.v1.0.0.json +89 -0
- package/src/cvcs/homelessStatus.v1.0.0.json +98 -0
- package/src/cvcs/incomeBenefitsSources.v1.0.0.json +392 -0
- package/src/cvcs/index.ts +80 -0
- package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +96 -0
- package/src/cvcs/juvenileJusticeInvolvementStatus.v1.0.0.json +78 -0
- package/src/cvcs/locationType.v1.0.0.json +168 -0
- package/src/cvcs/maritalStatusLegal.v1.0.0.json +96 -0
- package/src/cvcs/militaryBranch.v1.0.0.json +85 -0
- package/src/cvcs/militaryStatus.v1.0.0.json +67 -0
- package/src/cvcs/nameType.v1.0.0.json +123 -0
- package/src/cvcs/offenderStatus.v1.0.0.json +96 -0
- package/src/cvcs/offenderStatusFamily.v1.0.0.json +87 -0
- package/src/cvcs/orientationIdentity.v1.0.0.json +97 -0
- package/src/cvcs/personRelationships.v1.0.0.json +924 -0
- package/src/cvcs/preferredContactMethod.v1.0.0.json +46 -0
- package/src/cvcs/pronouns.v1.0.0.json +87 -0
- package/src/cvcs/recencyBand.v1.0.0.json +124 -0
- package/src/cvcs/referralEntityCategory.v1.0.0.json +439 -0
- package/src/cvcs/relationshipStatusCurrent.v1.0.0.json +69 -0
- package/src/cvcs/relationshipTies.v1.0.0.json +291 -0
- package/src/cvcs/sexProviderSubrole.v1.0.0.json +78 -0
- package/src/cvcs/sharePurpose.v1.0.0.json +82 -0
- package/src/cvcs/smtType.v1.0.0.json +114 -0
- package/src/cvcs/tribes.v1.0.0.json +492 -0
- package/src/cvcs/victimStatusFamily.v1.0.0.json +96 -0
- package/src/generated/cvc-enums.ts +1048 -0
- package/src/index.ts +20 -0
- package/src/schemas/common.ts +4 -0
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { P as PlatformToolValue, F as FunctionStatusValue, R as RoleLevelValue, S as ShareViewValue, a as PermissionStateValue } from '../platform-auth-C97LpsRd.cjs';
|
|
2
|
+
export { A as AccommodationValue, b as AgeBinReportingValue, c as AppScopeValue, d as ApparentAgeValue, D as DataQualityValue, e as FormStatusValue, f as FormTypeValue, I as IC13Category, g as IC13Value, h as IC22Value, i as IC23Value, j as IC24Value, k as IC25Value, l as IC49ReferralOutcomeValue, m as IC49ReferralVerificationValue, n as IC49Value, o as IC4Value, p as IC56Value, q as IC57Value, r as IC58Value, s as IC59Value, t as IC5Value, u as IncidentInvolvementRoleValue, v as IncidentParticipationRoleValue, w as InteractionTypeValue, M as MinorAdultStatusValue, x as PersonDisplayCategoryValue, y as PersonRoleValue, z as PersonTypeValue, Q as QuestionFormatValue, B as QuickStartTemplateId, C as RecordStateValue, E as RelationshipConcernValue, G as RelationshipDynamicValue, H as SessionStateValue, J as SubmissionStateValue, U as UserStatusValue } from '../platform-auth-C97LpsRd.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @htilabs/platform-common-models — Platform Authorization Types
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { P as PlatformToolValue, F as FunctionStatusValue, R as RoleLevelValue, S as ShareViewValue, a as PermissionStateValue } from '../platform-auth-C97LpsRd.js';
|
|
2
|
+
export { A as AccommodationValue, b as AgeBinReportingValue, c as AppScopeValue, d as ApparentAgeValue, D as DataQualityValue, e as FormStatusValue, f as FormTypeValue, I as IC13Category, g as IC13Value, h as IC22Value, i as IC23Value, j as IC24Value, k as IC25Value, l as IC49ReferralOutcomeValue, m as IC49ReferralVerificationValue, n as IC49Value, o as IC4Value, p as IC56Value, q as IC57Value, r as IC58Value, s as IC59Value, t as IC5Value, u as IncidentInvolvementRoleValue, v as IncidentParticipationRoleValue, w as InteractionTypeValue, M as MinorAdultStatusValue, x as PersonDisplayCategoryValue, y as PersonRoleValue, z as PersonTypeValue, Q as QuestionFormatValue, B as QuickStartTemplateId, C as RecordStateValue, E as RelationshipConcernValue, G as RelationshipDynamicValue, H as SessionStateValue, J as SubmissionStateValue, U as UserStatusValue } from '../platform-auth-C97LpsRd.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @htilabs/platform-common-models — Platform Authorization Types
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htilabs/platform-common-models",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-beta.1",
|
|
4
4
|
"description": "Shared constants, types, and models for HTI Labs applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -46,6 +46,11 @@
|
|
|
46
46
|
"types": "./dist/cvcs/index.d.ts",
|
|
47
47
|
"import": "./dist/cvcs/index.js",
|
|
48
48
|
"require": "./dist/cvcs/index.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./config": {
|
|
51
|
+
"types": "./dist/config/index.d.ts",
|
|
52
|
+
"import": "./dist/config/index.js",
|
|
53
|
+
"require": "./dist/config/index.cjs"
|
|
49
54
|
}
|
|
50
55
|
},
|
|
51
56
|
"files": [
|
|
@@ -73,6 +78,7 @@
|
|
|
73
78
|
"vitest": "^1.6.1"
|
|
74
79
|
},
|
|
75
80
|
"dependencies": {
|
|
81
|
+
"yaml": "^2.7.0",
|
|
76
82
|
"zod": "^3.22.0"
|
|
77
83
|
},
|
|
78
84
|
"peerDependencies": {
|
|
@@ -100,6 +106,7 @@
|
|
|
100
106
|
"codegen:cvc:check": "tsx scripts/codegen-cvc-enums.ts --check",
|
|
101
107
|
"seed:cvc": "tsx scripts/seed-cvc.ts",
|
|
102
108
|
"seed:cvc:all": "tsx scripts/seed-all-cvcs.ts",
|
|
103
|
-
"test:seed": "node --import tsx --test scripts/seed-cvc.test.ts"
|
|
109
|
+
"test:seed": "node --import tsx --test scripts/seed-cvc.test.ts",
|
|
110
|
+
"test:guard": "node --import tsx --test scripts/lib/confirmTargetDb.test.ts"
|
|
104
111
|
}
|
|
105
112
|
}
|
|
@@ -29,6 +29,166 @@
|
|
|
29
29
|
"primary_language": {
|
|
30
30
|
"count": 191,
|
|
31
31
|
"hash": "06afa3df45954272fa2bbb2a2dc4e82bae84067c131c98b5fda94852c65a1960"
|
|
32
|
+
},
|
|
33
|
+
"orientation_identity": {
|
|
34
|
+
"count": 9,
|
|
35
|
+
"hash": "26fea3a3e73d505c05e2b2fab1e6c7563dde201f880769e67524e4804eb38b21"
|
|
36
|
+
},
|
|
37
|
+
"pronouns": {
|
|
38
|
+
"count": 8,
|
|
39
|
+
"hash": "11231796c7331acda998ded505d03aa3527a68821ccd6db03bce78a06680550d"
|
|
40
|
+
},
|
|
41
|
+
"gender_identity": {
|
|
42
|
+
"count": 12,
|
|
43
|
+
"hash": "a7f8134861fa37cfb045aa4d373126863212cef59494a4ed2cca45635380acc2"
|
|
44
|
+
},
|
|
45
|
+
"tribes": {
|
|
46
|
+
"count": 53,
|
|
47
|
+
"hash": "2209e03196160ae5cb7bbee18c30826e91869b8bb7397c445b2720c8637e23bb"
|
|
48
|
+
},
|
|
49
|
+
"name_type": {
|
|
50
|
+
"count": 12,
|
|
51
|
+
"hash": "5f389067668fe3ceedbadb2817a462566f485a80e14cb566cce7ff599cfc08e7"
|
|
52
|
+
},
|
|
53
|
+
"age_bin_reporting": {
|
|
54
|
+
"count": 11,
|
|
55
|
+
"hash": "079851dd29384d3bdae71a9a5b3bd5f65b0a547925a4a336307b4e1c10a3dd7d"
|
|
56
|
+
},
|
|
57
|
+
"juvenile_justice_involvement_status": {
|
|
58
|
+
"count": 7,
|
|
59
|
+
"hash": "eef42ded4e4e23cae16cc2d3b12f3b3fcaa6441044a1b4472d2de1c07e3fa749"
|
|
60
|
+
},
|
|
61
|
+
"eye_color": {
|
|
62
|
+
"count": 11,
|
|
63
|
+
"hash": "a098ee3c556423107e29c8f0ee163167b65e338ce265343ec6ad980fc2b30109"
|
|
64
|
+
},
|
|
65
|
+
"smt_type": {
|
|
66
|
+
"count": 11,
|
|
67
|
+
"hash": "03e2c36c0ebeb50384a5a75c1e25e5b5956b858d312fe8bdf2484e79c6eaab30"
|
|
68
|
+
},
|
|
69
|
+
"offender_status": {
|
|
70
|
+
"count": 9,
|
|
71
|
+
"hash": "3d8902e42fb813800d580f7a1027465be3879e3fc69ce7740983215075b485eb"
|
|
72
|
+
},
|
|
73
|
+
"offender_status_family": {
|
|
74
|
+
"count": 8,
|
|
75
|
+
"hash": "473c36a157bd33d76adb4a55aa07abb1bcea6ecf96aa67b6675edc6d2304a4a4"
|
|
76
|
+
},
|
|
77
|
+
"military_status": {
|
|
78
|
+
"count": 6,
|
|
79
|
+
"hash": "e83be2143f48455a2203b266786ba14c359f05d68e1c38d539d7953c94f8829d"
|
|
80
|
+
},
|
|
81
|
+
"military_branch": {
|
|
82
|
+
"count": 8,
|
|
83
|
+
"hash": "9a2172332f6742025619a0199349d98189e80fc1bd2f11c4c7ce2b7aabec048d"
|
|
84
|
+
},
|
|
85
|
+
"contact_info_types": {
|
|
86
|
+
"count": 24,
|
|
87
|
+
"hash": "bd5d65f095c570354a9881dd3083655f005c3cc406969b395548082b6a801939"
|
|
88
|
+
},
|
|
89
|
+
"contact_safety_status": {
|
|
90
|
+
"count": 6,
|
|
91
|
+
"hash": "8aae59799013ec2d66f0477b44e1b3d556d00a6b908b5d0e0117e4e9a41ce5aa"
|
|
92
|
+
},
|
|
93
|
+
"highest_education_level_completed": {
|
|
94
|
+
"count": 12,
|
|
95
|
+
"hash": "a8ba9ca9af5c9f4ac5f900065f9356a935ca0543bf182f871cae61db9a276172"
|
|
96
|
+
},
|
|
97
|
+
"preferred_contact_method": {
|
|
98
|
+
"count": 4,
|
|
99
|
+
"hash": "c3fcaec7ef08f185748463adc1e73dc6a1ff196601f16a6453f737577f3dfd90"
|
|
100
|
+
},
|
|
101
|
+
"share_purpose": {
|
|
102
|
+
"count": 8,
|
|
103
|
+
"hash": "ccefed1af82759ca59ad45e3850119db87e3411db57d9ce3039d874474498422"
|
|
104
|
+
},
|
|
105
|
+
"facilitator_entity_type": {
|
|
106
|
+
"count": 14,
|
|
107
|
+
"hash": "5582356db3a40b2469e535b54567bf3478450c2d3f2dd5e79546fd4e45e4649a"
|
|
108
|
+
},
|
|
109
|
+
"facilitator_subrole": {
|
|
110
|
+
"count": 37,
|
|
111
|
+
"hash": "c485a18a9388f5b3f623649f8205766bf8d1c94d1675c57d6c2a5ba6f470ecbd"
|
|
112
|
+
},
|
|
113
|
+
"marital_status_legal": {
|
|
114
|
+
"count": 9,
|
|
115
|
+
"hash": "42ba438ed57454f0f086d18c0a38eb2c0a67d023f5bb0b12f07f26e838bb6047"
|
|
116
|
+
},
|
|
117
|
+
"relationship_status_current": {
|
|
118
|
+
"count": 6,
|
|
119
|
+
"hash": "6153aaafaed7b54b95f8ff2094179c27f4441340af9f56f382714f8c50cf7a9f"
|
|
120
|
+
},
|
|
121
|
+
"has_tattoos": {
|
|
122
|
+
"count": 6,
|
|
123
|
+
"hash": "44caa98cdf4645f888cc4ad755dd0485b057e06ae3171349ab7aecd6c56761f2"
|
|
124
|
+
},
|
|
125
|
+
"facilitator_label_used_in_source": {
|
|
126
|
+
"count": 16,
|
|
127
|
+
"hash": "0c128b8163548278a4f122ad75e9d9b426eae8526a22fe142bde20c84163b496"
|
|
128
|
+
},
|
|
129
|
+
"homeless_status": {
|
|
130
|
+
"count": 9,
|
|
131
|
+
"hash": "c7093f057ed962129f31ad097859563e2247a9c32a02738da8e4f1c21a723724"
|
|
132
|
+
},
|
|
133
|
+
"victim_status_family": {
|
|
134
|
+
"count": 9,
|
|
135
|
+
"hash": "ef428c8866b33236cbd13a6cc245e7669d9f905e12d26f53916e6c0da47bc672"
|
|
136
|
+
},
|
|
137
|
+
"hair_color": {
|
|
138
|
+
"count": 10,
|
|
139
|
+
"hash": "6691e96fb44f3046708deaa476ddc441f9394cd1bc21ce86d75b76eb777a6827"
|
|
140
|
+
},
|
|
141
|
+
"sex_provider_subrole": {
|
|
142
|
+
"count": 7,
|
|
143
|
+
"hash": "97ad69f7658583462ee92db4db45bb2d6c9c7982e9ffd3c333cc46031a1f8236"
|
|
144
|
+
},
|
|
145
|
+
"relationship_ties": {
|
|
146
|
+
"count": 28,
|
|
147
|
+
"hash": "29fb041c4d1b40260e4a448a0501eb580d29606479628a6807a833b52212f3c3"
|
|
148
|
+
},
|
|
149
|
+
"person_relationships": {
|
|
150
|
+
"count": 89,
|
|
151
|
+
"hash": "84aba45400f1b773dd6f022abe6e02a74a02f6ca183658719017eba2fd98a7ee"
|
|
152
|
+
},
|
|
153
|
+
"employment_status": {
|
|
154
|
+
"count": 29,
|
|
155
|
+
"hash": "d07aa6a02da59218f6efee7d039ca19774a7a50c20f2b9f460e299fb8bb43308"
|
|
156
|
+
},
|
|
157
|
+
"location_type": {
|
|
158
|
+
"count": 17,
|
|
159
|
+
"hash": "72d6fd6e89c8ffd2f2ab1682a3ed2ea52d73cfb41c635f7af6334078c0f4b959"
|
|
160
|
+
},
|
|
161
|
+
"referral_entity_category": {
|
|
162
|
+
"count": 43,
|
|
163
|
+
"hash": "f78d52bf1960fb88e12cefb895a3defbdba971abda49618216460ae330f4addb"
|
|
164
|
+
},
|
|
165
|
+
"income_benefits_sources": {
|
|
166
|
+
"count": 38,
|
|
167
|
+
"hash": "f75a79ccd10cecdd37acf056d550f60eb86b8ef52b9b3f34bed49ef04c44dffc"
|
|
168
|
+
},
|
|
169
|
+
"enrollment_application_status": {
|
|
170
|
+
"count": 12,
|
|
171
|
+
"hash": "cb3c44d28a8503e6539c8e92813abc50673e14de9b87f9a92f002ce2bbc78230"
|
|
172
|
+
},
|
|
173
|
+
"administering_jurisdiction": {
|
|
174
|
+
"count": 10,
|
|
175
|
+
"hash": "4c7bb1b8cf0b00dd65a9a8f696f520e6d2d3dca102f6684376e783d0e058fef1"
|
|
176
|
+
},
|
|
177
|
+
"frequency_cadence": {
|
|
178
|
+
"count": 11,
|
|
179
|
+
"hash": "09d81031a2534830f3956bd49514985e4e9d67304d03fa21f3d7da3fd779c66e"
|
|
180
|
+
},
|
|
181
|
+
"recency_band": {
|
|
182
|
+
"count": 12,
|
|
183
|
+
"hash": "457483e1672882aa90675a7264f5517a236e32a318153c9d1f8ade0c1579b8ac"
|
|
184
|
+
},
|
|
185
|
+
"juvenile_justice_episode_type": {
|
|
186
|
+
"count": 9,
|
|
187
|
+
"hash": "cefaec0cabd9ddbe3e824d43ab2fa149bdbed5c0d7a810b4156f72e6da8b4a50"
|
|
188
|
+
},
|
|
189
|
+
"hmis_sex": {
|
|
190
|
+
"count": 8,
|
|
191
|
+
"hash": "3f42a6f2f507bd404ae0906b2238f53055908e086d12b3039fcc9817dce2192d"
|
|
32
192
|
}
|
|
33
193
|
}
|
|
34
194
|
}
|
|
@@ -92,6 +92,325 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
92
92
|
domain: "primary_language",
|
|
93
93
|
expectedCount: 191,
|
|
94
94
|
},
|
|
95
|
+
// CVC-16 — 4 flat orientation categories (Bisexual, Gay or Lesbian,
|
|
96
|
+
// Other/self-described, Straight) + 1 missingness root + 4 canonical
|
|
97
|
+
// missingness children (includes PNA for sensitive-data parity with
|
|
98
|
+
// sibling demographic/identity CVCs) = 9.
|
|
99
|
+
{
|
|
100
|
+
file: "orientationIdentity.v1.0.0.json",
|
|
101
|
+
domain: "orientation_identity",
|
|
102
|
+
expectedCount: 9,
|
|
103
|
+
},
|
|
104
|
+
// CVC-147 — 4 flat pronoun categories (He/Him, She/Her, They/Them,
|
|
105
|
+
// Other/self-described) + 1 missingness root + 3 canonical missingness
|
|
106
|
+
// children (no PNA; Notion codebook explicitly lists only UNK/ANON/DNC) = 8.
|
|
107
|
+
{
|
|
108
|
+
file: "pronouns.v1.0.0.json",
|
|
109
|
+
domain: "pronouns",
|
|
110
|
+
expectedCount: 8,
|
|
111
|
+
},
|
|
112
|
+
// CVC-17 — 5 Level-1 gender categories (female, male, non_binary, other,
|
|
113
|
+
// transgender) + 2 Level-2 transgender subtypes (FTM, MTF) + 1 missingness
|
|
114
|
+
// root + 4 canonical missingness children (includes PNA per Notion) = 12.
|
|
115
|
+
{
|
|
116
|
+
file: "genderIdentity.v1.0.0.json",
|
|
117
|
+
domain: "gender_identity",
|
|
118
|
+
expectedCount: 12,
|
|
119
|
+
},
|
|
120
|
+
// CVC-148 — flat starter list of 38 OK tribes + 4 NE tribes + 6 umbrella
|
|
121
|
+
// "(specify)" entries + 1 selectable Other/write-in + 1 missingness root +
|
|
122
|
+
// 3 canonical missingness children (no PNA; Notion codebook explicitly
|
|
123
|
+
// lists only UNK/ANON/DNC, matching pronouns precedent) = 53. Hierarchy
|
|
124
|
+
// flattened per co-8ff.1.4 DECISION (Notion levels inconsistent; sibling
|
|
125
|
+
// race_ethnicity is also flat).
|
|
126
|
+
{
|
|
127
|
+
file: "tribes.v1.0.0.json",
|
|
128
|
+
domain: "tribes",
|
|
129
|
+
expectedCount: 53,
|
|
130
|
+
},
|
|
131
|
+
// CVC-1 — 8 flat Level-1 name-type entries (6 alias categories + 2 full
|
|
132
|
+
// valid name categories; Notion's "Level 1" vs "Level 2" split is semantic
|
|
133
|
+
// only, represented flat at L1 per the raceEthnicity pattern) + 1
|
|
134
|
+
// missingness root + 3 canonical missingness children (no PNA — Notion
|
|
135
|
+
// lacks a PNA row for name_type) = 12.
|
|
136
|
+
{
|
|
137
|
+
file: "nameType.v1.0.0.json",
|
|
138
|
+
domain: "name_type",
|
|
139
|
+
expectedCount: 12,
|
|
140
|
+
},
|
|
141
|
+
// CVC-51 — 5 VOCA/OVC age bins (age_0_12, age_13_17, age_18_24,
|
|
142
|
+
// age_25_59, age_60_plus) + 2 VOCA source-coupled reporting values
|
|
143
|
+
// (not_reported, not_tracked — preserved as first-class L1 entries for
|
|
144
|
+
// Reporting & Regulations fidelity) + 1 missingness root + 3 canonical
|
|
145
|
+
// missingness children = 11.
|
|
146
|
+
{
|
|
147
|
+
file: "ageBinReporting.v1.0.0.json",
|
|
148
|
+
domain: "age_bin_reporting",
|
|
149
|
+
expectedCount: 11,
|
|
150
|
+
},
|
|
151
|
+
// CVC-95 — 3 flat Level-1 involvement-status entries (current, never,
|
|
152
|
+
// previous) + 1 missingness root + 3 HMIS-aligned missingness children
|
|
153
|
+
// (unknown, prefer_not_to_answer, data_not_collected — NOT anonymous;
|
|
154
|
+
// triad preserved per CVC-95 Phase-4-Revise decision to align with
|
|
155
|
+
// HMIS R12) = 7.
|
|
156
|
+
{
|
|
157
|
+
file: "juvenileJusticeInvolvementStatus.v1.0.0.json",
|
|
158
|
+
domain: "juvenile_justice_involvement_status",
|
|
159
|
+
expectedCount: 7,
|
|
160
|
+
},
|
|
161
|
+
// CVC-150 — 7 flat Level-1 eye color entries (black, blue, brown, gray,
|
|
162
|
+
// green, hazel, other) + 1 missingness root + 3 canonical missingness
|
|
163
|
+
// children (no PNA; eye color is observed/recorded, not self-reported,
|
|
164
|
+
// per Notion guidance — matches pronouns/tribes precedent for UNK/ANON/DNC
|
|
165
|
+
// triad) = 11.
|
|
166
|
+
{
|
|
167
|
+
file: "eyeColor.v1.0.0.json",
|
|
168
|
+
domain: "eye_color",
|
|
169
|
+
expectedCount: 11,
|
|
170
|
+
},
|
|
171
|
+
// CVC-153 — 7 flat Level-1 SMT (Scars/Marks/Tattoos) types + 1 missingness
|
|
172
|
+
// root + 3 canonical missingness children = 11.
|
|
173
|
+
{
|
|
174
|
+
file: "smtType.v1.0.0.json",
|
|
175
|
+
domain: "smt_type",
|
|
176
|
+
expectedCount: 11,
|
|
177
|
+
},
|
|
178
|
+
// CVC-164 — 5 flat Level-1 offender-status procedural stages (suspected,
|
|
179
|
+
// person_of_interest, cleared_excluded, charged, convicted; progression is
|
|
180
|
+
// semantic, not hierarchical — all parentCode=null per co-8ff DECISION) + 1
|
|
181
|
+
// missingness root + 3 canonical missingness children (no PNA per Notion
|
|
182
|
+
// codebook) = 9. (Bead FACT comment stated 8 = 3 missingness + 5 substantive,
|
|
183
|
+
// but omitted the mandatory missingness_root; corrected to 9 to match the
|
|
184
|
+
// sibling offender_status_family pattern.)
|
|
185
|
+
{
|
|
186
|
+
file: "offenderStatus.v1.0.0.json",
|
|
187
|
+
domain: "offender_status",
|
|
188
|
+
expectedCount: 9,
|
|
189
|
+
},
|
|
190
|
+
// CVC-167 — 4 flat Level-1 offender-status family entries + 1 missingness
|
|
191
|
+
// root + 3 canonical missingness children = 8.
|
|
192
|
+
{
|
|
193
|
+
file: "offenderStatusFamily.v1.0.0.json",
|
|
194
|
+
domain: "offender_status_family",
|
|
195
|
+
expectedCount: 8,
|
|
196
|
+
},
|
|
197
|
+
// CVC-121 — 4 flat Level-1 military-status entries + 1 missingness root +
|
|
198
|
+
// 1 canonical missingness child (unknown only per Notion v3.0) = 6.
|
|
199
|
+
{
|
|
200
|
+
file: "militaryStatus.v1.0.0.json",
|
|
201
|
+
domain: "military_status",
|
|
202
|
+
expectedCount: 6,
|
|
203
|
+
},
|
|
204
|
+
// CVC-120 — 6 flat Level-1 military-branch entries (Army, Navy, Air Force,
|
|
205
|
+
// Marines, Coast Guard, Space Force) + 1 missingness root + 1 canonical
|
|
206
|
+
// missingness child (unknown only per Notion v3.0; matches sibling CVC-121
|
|
207
|
+
// variant — no PNA/DNC, relies on parent field core_veteran gating) = 8.
|
|
208
|
+
{
|
|
209
|
+
file: "militaryBranch.v1.0.0.json",
|
|
210
|
+
domain: "military_branch",
|
|
211
|
+
expectedCount: 8,
|
|
212
|
+
},
|
|
213
|
+
// CVC-149 — 4 Level-1 type parents + 7 app subtypes + 9 social_media
|
|
214
|
+
// subtypes + 1 missingness root + 3 canonical missingness children = 24.
|
|
215
|
+
{
|
|
216
|
+
file: "contactInfoTypes.v1.0.0.json",
|
|
217
|
+
domain: "contact_info_types",
|
|
218
|
+
expectedCount: 24,
|
|
219
|
+
},
|
|
220
|
+
// CVC-155 — 2 flat Level-1 safety-status entries + 1 missingness root +
|
|
221
|
+
// 3 canonical missingness children = 6.
|
|
222
|
+
{
|
|
223
|
+
file: "contactSafetyStatus.v1.0.0.json",
|
|
224
|
+
domain: "contact_safety_status",
|
|
225
|
+
expectedCount: 6,
|
|
226
|
+
},
|
|
227
|
+
// CVC-180 — 7 flat Level-1 Census/ACS attainment entries + 1 missingness
|
|
228
|
+
// root + 4 canonical missingness children (includes PNA) = 12.
|
|
229
|
+
{
|
|
230
|
+
file: "highestEducationLevelCompleted.v1.0.0.json",
|
|
231
|
+
domain: "highest_education_level_completed",
|
|
232
|
+
expectedCount: 12,
|
|
233
|
+
},
|
|
234
|
+
// CVC-185 — 4 flat preferred-contact-method entries. No missingness entries
|
|
235
|
+
// (variant 0 per Notion: absence encodes "no preference") = 4.
|
|
236
|
+
{
|
|
237
|
+
file: "preferredContactMethod.v1.0.0.json",
|
|
238
|
+
domain: "preferred_contact_method",
|
|
239
|
+
expectedCount: 4,
|
|
240
|
+
},
|
|
241
|
+
// CVC-84 — 8 flat Level-1 intent-based share purposes. No missingness
|
|
242
|
+
// sentinels (variant 0, share_purpose is always known at sharing time) = 8.
|
|
243
|
+
{
|
|
244
|
+
file: "sharePurpose.v1.0.0.json",
|
|
245
|
+
domain: "share_purpose",
|
|
246
|
+
expectedCount: 8,
|
|
247
|
+
},
|
|
248
|
+
// CVC-165 — 10 flat Level-1 entity/establishment types (Notion codebook DB,
|
|
249
|
+
// v1.0) + 1 missingness root + 3 canonical missingness children (no PNA;
|
|
250
|
+
// Notion codebook lists only ANON/DNC/UNK) = 14.
|
|
251
|
+
{
|
|
252
|
+
file: "facilitatorEntityType.v1.0.0.json",
|
|
253
|
+
domain: "facilitator_entity_type",
|
|
254
|
+
expectedCount: 14,
|
|
255
|
+
},
|
|
256
|
+
// CVC-162 — 13 Level-1 primary-function categories + 20 Level-2 specific
|
|
257
|
+
// sub-roles (per live Notion codebook query, not bead FACT comment which
|
|
258
|
+
// undercounted L2 at 17) + 1 missingness root + 3 canonical missingness
|
|
259
|
+
// children (no PNA; Notion codebook explicitly lists only ANON/DNC/UNK) = 37.
|
|
260
|
+
{
|
|
261
|
+
file: "facilitatorSubrole.v1.0.0.json",
|
|
262
|
+
domain: "facilitator_subrole",
|
|
263
|
+
expectedCount: 37,
|
|
264
|
+
},
|
|
265
|
+
// CVC-156 — 5 flat Level-1 legal marital-status entries + 1 missingness
|
|
266
|
+
// root + 3 canonical missingness children = 9.
|
|
267
|
+
{
|
|
268
|
+
file: "maritalStatusLegal.v1.0.0.json",
|
|
269
|
+
domain: "marital_status_legal",
|
|
270
|
+
expectedCount: 9,
|
|
271
|
+
},
|
|
272
|
+
// CVC-157 — 2 flat Level-1 partnered-state codes + 1 missingness root + 3
|
|
273
|
+
// canonical missingness children = 6.
|
|
274
|
+
{
|
|
275
|
+
file: "relationshipStatusCurrent.v1.0.0.json",
|
|
276
|
+
domain: "relationship_status_current",
|
|
277
|
+
expectedCount: 6,
|
|
278
|
+
},
|
|
279
|
+
// CVC-152 — 2 flat Level-1 presence entries + 1 missingness root + 3
|
|
280
|
+
// canonical missingness children = 6.
|
|
281
|
+
{
|
|
282
|
+
file: "hasTattoos.v1.0.0.json",
|
|
283
|
+
domain: "has_tattoos",
|
|
284
|
+
expectedCount: 6,
|
|
285
|
+
},
|
|
286
|
+
// CVC-166 — 12 flat Level-1 source-label entries + 1 missingness root + 3
|
|
287
|
+
// canonical missingness children = 16.
|
|
288
|
+
{
|
|
289
|
+
file: "facilitatorLabelUsedInSource.v1.0.0.json",
|
|
290
|
+
domain: "facilitator_label_used_in_source",
|
|
291
|
+
expectedCount: 16,
|
|
292
|
+
},
|
|
293
|
+
// CVC-96 — 3 flat Level-1 homeless-status entries + 1 missingness root +
|
|
294
|
+
// 5 HMIS R-series missingness children (CEO DECISION on co-8ff.5.4) = 9.
|
|
295
|
+
{
|
|
296
|
+
file: "homelessStatus.v1.0.0.json",
|
|
297
|
+
domain: "homeless_status",
|
|
298
|
+
expectedCount: 9,
|
|
299
|
+
},
|
|
300
|
+
// CVC-20 — 5 flat Level-1 victim-status family entries + 1 missingness
|
|
301
|
+
// root + 3 canonical missingness children = 9.
|
|
302
|
+
{
|
|
303
|
+
file: "victimStatusFamily.v1.0.0.json",
|
|
304
|
+
domain: "victim_status_family",
|
|
305
|
+
expectedCount: 9,
|
|
306
|
+
},
|
|
307
|
+
// CVC-151 — 6 flat Level-1 hair color entries + 1 missingness root + 3
|
|
308
|
+
// canonical missingness children = 10.
|
|
309
|
+
{
|
|
310
|
+
file: "hairColor.v1.0.0.json",
|
|
311
|
+
domain: "hair_color",
|
|
312
|
+
expectedCount: 10,
|
|
313
|
+
},
|
|
314
|
+
// CVC-161 — 3 flat Level-1 provider-subrole codes + 1 missingness root +
|
|
315
|
+
// 3 canonical missingness children = 7.
|
|
316
|
+
{
|
|
317
|
+
file: "sexProviderSubrole.v1.0.0.json",
|
|
318
|
+
domain: "sex_provider_subrole",
|
|
319
|
+
expectedCount: 7,
|
|
320
|
+
},
|
|
321
|
+
// CVC-158 — hierarchical relationship ties = 28.
|
|
322
|
+
{
|
|
323
|
+
file: "relationshipTies.v1.0.0.json",
|
|
324
|
+
domain: "relationship_ties",
|
|
325
|
+
expectedCount: 28,
|
|
326
|
+
},
|
|
327
|
+
// CVC-126 — 3-level person_relationships hierarchy = 1 missingness_root + 2
|
|
328
|
+
// L0 missingness (anonymous, data_not_collected; Notion codebook explicitly
|
|
329
|
+
// omits `unknown` at L0 — the L2 `relationship_unknown` code carries that
|
|
330
|
+
// semantic instead; no PNA) + 8 L1 topics + 35 L2 canonical relationship
|
|
331
|
+
// types + 40 L3 directional role labels + 3 L3 pet-branch roles = 89.
|
|
332
|
+
{
|
|
333
|
+
file: "personRelationships.v1.0.0.json",
|
|
334
|
+
domain: "person_relationships",
|
|
335
|
+
expectedCount: 89,
|
|
336
|
+
},
|
|
337
|
+
// CVC-179 — employment_status: 1 missingness_root + 5 HMIS missingness
|
|
338
|
+
// (unknown, anonymous, data_not_collected, client_doesnt_know,
|
|
339
|
+
// client_refused) + 3 L1 primary (employed, unemployed,
|
|
340
|
+
// not_in_labor_force) + 7 L2 under employed (full_time, part_time,
|
|
341
|
+
// seasonal_sporadic, self_employed, informal_cash_gig, multiple_jobs,
|
|
342
|
+
// unpaid_family_worker) + 5 L2 under unemployed (looking_for_work,
|
|
343
|
+
// actively_seeking, first_time_job_seeker, recently_laid_off,
|
|
344
|
+
// long_term_unemployed) + 8 L2 under NILF (not_looking_for_work,
|
|
345
|
+
// unable_to_work, student, caregiver, disabled, retired,
|
|
346
|
+
// discouraged_worker, other_reason) = 29.
|
|
347
|
+
{
|
|
348
|
+
file: "employmentStatus.v1.0.0.json",
|
|
349
|
+
domain: "employment_status",
|
|
350
|
+
expectedCount: 29,
|
|
351
|
+
},
|
|
352
|
+
// CVC-191 — 13 flat Level-1 location types + 1 missingness root + 3
|
|
353
|
+
// canonical missingness children = 17.
|
|
354
|
+
{
|
|
355
|
+
file: "locationType.v1.0.0.json",
|
|
356
|
+
domain: "location_type",
|
|
357
|
+
expectedCount: 17,
|
|
358
|
+
},
|
|
359
|
+
// CVC-48 — hierarchical referral entity categories = 43.
|
|
360
|
+
{
|
|
361
|
+
file: "referralEntityCategory.v1.0.0.json",
|
|
362
|
+
domain: "referral_entity_category",
|
|
363
|
+
expectedCount: 43,
|
|
364
|
+
},
|
|
365
|
+
// CVC-171 — 5 L1 type groups + 28 L2 source codes + 5 missingness = 38.
|
|
366
|
+
{
|
|
367
|
+
file: "incomeBenefitsSources.v1.0.0.json",
|
|
368
|
+
domain: "income_benefits_sources",
|
|
369
|
+
expectedCount: 38,
|
|
370
|
+
},
|
|
371
|
+
// CVC-175 — 8 flat Level-1 enrollment lifecycle statuses + 1 missingness
|
|
372
|
+
// root + 3 canonical missingness children = 12.
|
|
373
|
+
{
|
|
374
|
+
file: "enrollmentApplicationStatus.v1.0.0.json",
|
|
375
|
+
domain: "enrollment_application_status",
|
|
376
|
+
expectedCount: 12,
|
|
377
|
+
},
|
|
378
|
+
// CVC-177 — administering_jurisdiction.
|
|
379
|
+
{
|
|
380
|
+
file: "administeringJurisdiction.v1.0.0.json",
|
|
381
|
+
domain: "administering_jurisdiction",
|
|
382
|
+
expectedCount: 10,
|
|
383
|
+
},
|
|
384
|
+
// CVC-176 — frequency_cadence.
|
|
385
|
+
{
|
|
386
|
+
file: "frequencyCadence.v1.0.0.json",
|
|
387
|
+
domain: "frequency_cadence",
|
|
388
|
+
expectedCount: 11,
|
|
389
|
+
},
|
|
390
|
+
// CVC-137 — 7 flat Level-1 recency bands + 1 missingness root + 4
|
|
391
|
+
// canonical missingness children (adds `prefer_not_to_answer` for
|
|
392
|
+
// demographic PNA semantics) = 12.
|
|
393
|
+
{
|
|
394
|
+
file: "recencyBand.v1.0.0.json",
|
|
395
|
+
domain: "recency_band",
|
|
396
|
+
expectedCount: 12,
|
|
397
|
+
},
|
|
398
|
+
// CVC-197 — 5 flat Level-1 episode types + 1 missingness root + 3
|
|
399
|
+
// canonical missingness children (no PNA for juvenile justice episode) = 9.
|
|
400
|
+
{
|
|
401
|
+
file: "juvenileJusticeEpisodeType.v1.0.0.json",
|
|
402
|
+
domain: "juvenile_justice_episode_type",
|
|
403
|
+
expectedCount: 9,
|
|
404
|
+
},
|
|
405
|
+
// CVC-67 — 2 flat L1 selectable (female, male) + missingness_root
|
|
406
|
+
// + 5 missingness children: 3 canonical (unknown, anonymous,
|
|
407
|
+
// data_not_collected) + 2 HMIS-specific (client_doesn_t_know,
|
|
408
|
+
// client_prefers_not_to_answer) at 004/005 = 8.
|
|
409
|
+
{
|
|
410
|
+
file: "hmisSex.v1.0.0.json",
|
|
411
|
+
domain: "hmis_sex",
|
|
412
|
+
expectedCount: 8,
|
|
413
|
+
},
|
|
95
414
|
] as const;
|
|
96
415
|
|
|
97
416
|
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
@@ -55,6 +55,46 @@ const SOT_FILES: readonly SotFile[] = [
|
|
|
55
55
|
{ file: "incidentInvolvementRoles.v1.0.0.json", expectedDomain: "incident_involvement_roles" },
|
|
56
56
|
{ file: "raceEthnicity.v1.0.0.json", expectedDomain: "race_ethnicity" },
|
|
57
57
|
{ file: "primaryLanguage.v1.0.0.json", expectedDomain: "primary_language" },
|
|
58
|
+
{ file: "orientationIdentity.v1.0.0.json", expectedDomain: "orientation_identity" },
|
|
59
|
+
{ file: "pronouns.v1.0.0.json", expectedDomain: "pronouns" },
|
|
60
|
+
{ file: "genderIdentity.v1.0.0.json", expectedDomain: "gender_identity" },
|
|
61
|
+
{ file: "tribes.v1.0.0.json", expectedDomain: "tribes" },
|
|
62
|
+
{ file: "nameType.v1.0.0.json", expectedDomain: "name_type" },
|
|
63
|
+
{ file: "ageBinReporting.v1.0.0.json", expectedDomain: "age_bin_reporting" },
|
|
64
|
+
{ file: "juvenileJusticeInvolvementStatus.v1.0.0.json", expectedDomain: "juvenile_justice_involvement_status" },
|
|
65
|
+
{ file: "eyeColor.v1.0.0.json", expectedDomain: "eye_color" },
|
|
66
|
+
{ file: "smtType.v1.0.0.json", expectedDomain: "smt_type" },
|
|
67
|
+
{ file: "offenderStatus.v1.0.0.json", expectedDomain: "offender_status" },
|
|
68
|
+
{ file: "offenderStatusFamily.v1.0.0.json", expectedDomain: "offender_status_family" },
|
|
69
|
+
{ file: "militaryStatus.v1.0.0.json", expectedDomain: "military_status" },
|
|
70
|
+
{ file: "militaryBranch.v1.0.0.json", expectedDomain: "military_branch" },
|
|
71
|
+
{ file: "contactInfoTypes.v1.0.0.json", expectedDomain: "contact_info_types" },
|
|
72
|
+
{ file: "contactSafetyStatus.v1.0.0.json", expectedDomain: "contact_safety_status" },
|
|
73
|
+
{ file: "highestEducationLevelCompleted.v1.0.0.json", expectedDomain: "highest_education_level_completed" },
|
|
74
|
+
{ file: "preferredContactMethod.v1.0.0.json", expectedDomain: "preferred_contact_method" },
|
|
75
|
+
{ file: "sharePurpose.v1.0.0.json", expectedDomain: "share_purpose" },
|
|
76
|
+
{ file: "facilitatorEntityType.v1.0.0.json", expectedDomain: "facilitator_entity_type" },
|
|
77
|
+
{ file: "facilitatorSubrole.v1.0.0.json", expectedDomain: "facilitator_subrole" },
|
|
78
|
+
{ file: "maritalStatusLegal.v1.0.0.json", expectedDomain: "marital_status_legal" },
|
|
79
|
+
{ file: "relationshipStatusCurrent.v1.0.0.json", expectedDomain: "relationship_status_current" },
|
|
80
|
+
{ file: "hasTattoos.v1.0.0.json", expectedDomain: "has_tattoos" },
|
|
81
|
+
{ file: "facilitatorLabelUsedInSource.v1.0.0.json", expectedDomain: "facilitator_label_used_in_source" },
|
|
82
|
+
{ file: "homelessStatus.v1.0.0.json", expectedDomain: "homeless_status" },
|
|
83
|
+
{ file: "victimStatusFamily.v1.0.0.json", expectedDomain: "victim_status_family" },
|
|
84
|
+
{ file: "hairColor.v1.0.0.json", expectedDomain: "hair_color" },
|
|
85
|
+
{ file: "sexProviderSubrole.v1.0.0.json", expectedDomain: "sex_provider_subrole" },
|
|
86
|
+
{ file: "relationshipTies.v1.0.0.json", expectedDomain: "relationship_ties" },
|
|
87
|
+
{ file: "personRelationships.v1.0.0.json", expectedDomain: "person_relationships" },
|
|
88
|
+
{ file: "employmentStatus.v1.0.0.json", expectedDomain: "employment_status" },
|
|
89
|
+
{ file: "locationType.v1.0.0.json", expectedDomain: "location_type" },
|
|
90
|
+
{ file: "referralEntityCategory.v1.0.0.json", expectedDomain: "referral_entity_category" },
|
|
91
|
+
{ file: "incomeBenefitsSources.v1.0.0.json", expectedDomain: "income_benefits_sources" },
|
|
92
|
+
{ file: "enrollmentApplicationStatus.v1.0.0.json", expectedDomain: "enrollment_application_status" },
|
|
93
|
+
{ file: "administeringJurisdiction.v1.0.0.json", expectedDomain: "administering_jurisdiction" },
|
|
94
|
+
{ file: "frequencyCadence.v1.0.0.json", expectedDomain: "frequency_cadence" },
|
|
95
|
+
{ file: "recencyBand.v1.0.0.json", expectedDomain: "recency_band" },
|
|
96
|
+
{ file: "juvenileJusticeEpisodeType.v1.0.0.json", expectedDomain: "juvenile_justice_episode_type" },
|
|
97
|
+
{ file: "hmisSex.v1.0.0.json", expectedDomain: "hmis_sex" },
|
|
58
98
|
] as const;
|
|
59
99
|
|
|
60
100
|
function loadSot(file: string): unknown {
|