@htilabs/platform-common-models 0.9.0 → 0.12.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/dist/config/index.cjs +4 -0
- package/dist/config/index.cjs.map +1 -1
- package/dist/config/index.d.cts +16 -1
- package/dist/config/index.d.ts +16 -1
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -1
- package/dist/constants/index.cjs +473 -182
- 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 +470 -170
- package/dist/constants/index.js.map +1 -1
- package/dist/cvc-Cp4uWnAa.d.cts +298 -0
- package/dist/cvc-Cp4uWnAa.d.ts +298 -0
- package/dist/cvcs/index.cjs +21798 -811
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +25138 -2212
- package/dist/cvcs/index.d.ts +25138 -2212
- package/dist/cvcs/index.js +21736 -810
- package/dist/cvcs/index.js.map +1 -1
- package/dist/enums/index.cjs +4557 -0
- package/dist/enums/index.cjs.map +1 -0
- package/dist/enums/index.d.cts +5257 -0
- package/dist/enums/index.d.ts +5257 -0
- package/dist/enums/index.js +4354 -0
- package/dist/enums/index.js.map +1 -0
- package/dist/index.cjs +24053 -1052
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3072
- package/dist/index.d.ts +5 -3072
- package/dist/index.js +23928 -1039
- package/dist/index.js.map +1 -1
- package/dist/mongo/index.cjs +383 -0
- package/dist/mongo/index.cjs.map +1 -0
- package/dist/mongo/index.d.cts +221 -0
- package/dist/mongo/index.d.ts +221 -0
- package/dist/mongo/index.js +351 -0
- package/dist/mongo/index.js.map +1 -0
- package/dist/{platform-auth-XVB9aHqR.d.cts → platform-auth-Dv5fu0Fh.d.cts} +22 -77
- package/dist/{platform-auth-XVB9aHqR.d.ts → platform-auth-Dv5fu0Fh.d.ts} +22 -77
- package/dist/schemas/index.cjs +30 -157
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.js +30 -157
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/index.cjs +0 -3
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +0 -3
- package/dist/services/index.js.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/index.cjs +58 -0
- package/dist/validation/index.cjs.map +1 -1
- package/dist/validation/index.d.cts +82 -283
- package/dist/validation/index.d.ts +82 -283
- package/dist/validation/index.js +57 -0
- package/dist/validation/index.js.map +1 -1
- package/package.json +18 -1
- package/src/__sot__/README.md +91 -0
- package/src/__sot__/coreIndicatorFields.ts +331 -0
- package/src/__sot__/coreIndicators.pin.json +2149 -0
- package/src/__sot__/cvcIndex.pin.json +272 -0
- package/src/__sot__/scoringEmits.pin.json +176 -0
- package/src/__tests__/__snapshots__/cvc-sot.snap +260 -40
- package/src/__tests__/core-information-scope-invariant.test.ts +134 -0
- package/src/__tests__/cvc-136-scoring-invariant.test.ts +328 -0
- package/src/__tests__/cvc-181-182-country-parity.test.ts +163 -0
- package/src/__tests__/cvc-drift-gate.test.ts +1036 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +191 -18
- package/src/__tests__/cvc-status-parser.test.ts +150 -0
- package/src/__tests__/cvc-structural.test.ts +70 -1
- package/src/__tests__/mongo-verifier.test.ts +502 -0
- package/src/config/index.ts +8 -2
- package/src/constants/ic.ts +629 -206
- package/src/constants/service-catalog.ts +4 -2
- package/src/cvcs/activityType.v1.0.0.json +143 -0
- package/src/cvcs/adminRoles.v1.0.0.json +153 -0
- package/src/cvcs/administeringJurisdiction.v1.0.0.json +40 -40
- package/src/cvcs/ageBinReporting.v1.0.0.json +40 -40
- package/src/cvcs/assertionDomain.v1.1.0.json +647 -0
- package/src/cvcs/assertionStatus.v1.0.0.json +80 -0
- package/src/cvcs/carCorrectionReason.v1.0.0.json +89 -0
- package/src/cvcs/caseShareState.v1.0.0.json +62 -0
- package/src/cvcs/{checkInPhase.v1.0.0.json → checkInPhase.v1.1.0.json} +20 -2
- package/src/cvcs/childChangeType.v1.0.0.json +152 -0
- package/src/cvcs/citizenship.v1.0.0.json +3062 -0
- package/src/cvcs/contactInfoTypes.v1.0.0.json +40 -40
- package/src/cvcs/contactLinkType.v1.0.0.json +89 -0
- package/src/cvcs/coreDhState.v1.0.0.json +113 -0
- package/src/cvcs/coreFunctions.v1.0.0.json +746 -0
- package/src/cvcs/coreIndicators.v1.0.0.json +2918 -0
- package/src/cvcs/coreInformationScope.v1.0.0.json +1165 -0
- package/src/cvcs/coreReferralOutcome.v1.0.0.json +71 -0
- package/src/cvcs/countries.v1.0.0.json +3077 -0
- package/src/cvcs/createdBySystem.v1.0.0.json +89 -0
- package/src/cvcs/criminalOrgCategory.v1.0.0.json +116 -0
- package/src/cvcs/determinationHelperCategories.v1.0.0.json +1166 -0
- package/src/cvcs/employmentStatus.v1.0.0.json +60 -60
- package/src/cvcs/exploitationType.v1.0.0.json +106 -0
- package/src/cvcs/facilitatorEntityType.v1.0.0.json +40 -40
- package/src/cvcs/highestEducationLevelCompleted.v1.0.0.json +55 -46
- package/src/cvcs/hivStatus.v1.0.0.json +71 -0
- package/src/cvcs/hmisCurrentLivingSituation.v1.0.0.json +409 -0
- package/src/cvcs/hmisRelationshipToHoh.v1.0.0.json +104 -0
- package/src/cvcs/homelessStatus.v1.0.0.json +27 -27
- package/src/cvcs/housingSubsidyTypes.v1.0.0.json +161 -0
- package/src/cvcs/htType.v1.0.0.json +87 -0
- package/src/cvcs/identificationStatus.v1.0.0.json +18 -0
- package/src/cvcs/immigrationLegalStatusChangeType.v1.0.0.json +143 -0
- package/src/cvcs/incarcerationEpisodeType.v1.0.0.json +106 -0
- package/src/cvcs/incidentInvolvementRoles.v1.0.0.json +40 -40
- package/src/cvcs/incidentParticipationRoles.v1.0.0.json +47 -37
- package/src/cvcs/incomeBenefitsSources.v1.0.0.json +31 -2
- package/src/cvcs/index.ts +138 -1
- package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +28 -18
- package/src/cvcs/juvenileJusticeInvolvementStatus.v1.0.0.json +32 -32
- package/src/cvcs/livingSituation.v1.0.0.json +213 -0
- package/src/cvcs/mentalHealthStatus.v1.0.0.json +71 -0
- package/src/cvcs/militaryBranch.v1.0.0.json +20 -20
- package/src/cvcs/militaryStatus.v1.0.0.json +20 -20
- package/src/cvcs/minorAdultStatus.v1.0.0.json +80 -0
- package/src/cvcs/nameType.v1.0.0.json +40 -40
- package/src/cvcs/needsAssessmentChangeType.v1.0.0.json +134 -0
- package/src/cvcs/offenderStatus.v1.0.0.json +40 -40
- package/src/cvcs/offenderStatusFamily.v1.0.0.json +36 -36
- package/src/cvcs/personRelationships.v1.0.0.json +67 -2
- package/src/cvcs/poPetitionBasis.v1.0.0.json +96 -0
- package/src/cvcs/poStatus.v1.0.0.json +144 -0
- package/src/cvcs/poViolationStatus.v1.0.0.json +76 -0
- package/src/cvcs/programEnrollmentChangeType.v1.0.0.json +134 -0
- package/src/cvcs/provenanceSourceId.v1.0.0.json +134 -0
- package/src/cvcs/radiusBucket.v1.0.0.json +110 -0
- package/src/cvcs/recencyBand.v1.0.0.json +104 -39
- package/src/cvcs/referralEntityCategory.v1.0.0.json +40 -40
- package/src/cvcs/referralOrigin.v1.0.0.json +26 -0
- package/src/cvcs/relationshipConcern.v1.0.0.json +123 -0
- package/src/cvcs/riskCategory.v1.0.0.json +134 -0
- package/src/cvcs/riskIdentificationMilestone.v1.0.0.json +109 -0
- package/src/cvcs/riskSeverityBand.v1.0.0.json +139 -0
- package/src/cvcs/roiMethod.v1.0.0.json +107 -0
- package/src/cvcs/roiScope.v1.0.0.json +296 -0
- package/src/cvcs/roiStatus.v1.0.0.json +106 -0
- package/src/cvcs/romanticRelationshipChangeType.v1.0.0.json +162 -0
- package/src/cvcs/serviceAudience.v1.0.0.json +96 -0
- package/src/cvcs/serviceCategories.v1.0.0.json +44 -44
- package/src/cvcs/serviceDeliveryChannel.v1.0.0.json +147 -0
- package/src/cvcs/serviceMechanisms.v1.0.0.json +36 -36
- package/src/cvcs/serviceStates.v1.0.0.json +55 -33
- package/src/cvcs/sessionNoteVisibility.v1.0.0.json +80 -0
- package/src/cvcs/sessionTemplate.v1.0.0.json +283 -0
- package/src/cvcs/sexProviderSubrole.v1.0.0.json +35 -28
- package/src/cvcs/sharePurpose.v1.0.0.json +80 -12
- package/src/cvcs/smtType.v1.0.0.json +40 -40
- package/src/cvcs/sourceCategory.v1.1.0.json +8 -1
- package/src/cvcs/sourceInstrument.v1.0.0.json +458 -0
- package/src/cvcs/sourceSubtype.v1.1.0.json +36 -0
- package/src/cvcs/sourceSystem.v1.0.0.json +203 -0
- package/src/cvcs/specialNeedsDisabilities.v1.0.0.json +143 -0
- package/src/cvcs/subjectType.v1.0.0.json +80 -0
- package/src/cvcs/suggestionSource.v1.0.0.json +71 -0
- package/src/cvcs/traffickingRelevantRole.v1.0.0.json +104 -0
- package/src/cvcs/userRoles.v1.0.0.json +203 -0
- package/src/cvcs/verificationMethod.v1.0.0.json +18 -0
- package/src/cvcs/victimAbuseTypes.v1.0.0.json +276 -0
- package/src/cvcs/victimStatusFamily.v1.0.0.json +40 -40
- package/src/cvcs/whyNots.v1.0.0.json +385 -0
- package/src/generated/cvc-enums.ts +2318 -10
- package/src/mongo/catalog.ts +65 -0
- package/src/mongo/contract.ts +157 -0
- package/src/mongo/index.ts +343 -0
- package/src/mongo/similarity.ts +133 -0
- package/src/mongo/uri.ts +53 -0
- package/src/services/cvcRegistryService.ts +1 -1
- package/src/validation/cvcStatus.ts +209 -0
- package/src/validation/index.ts +1 -0
|
@@ -4,23 +4,23 @@
|
|
|
4
4
|
"cvcs": {
|
|
5
5
|
"service_mechanisms": {
|
|
6
6
|
"count": 8,
|
|
7
|
-
"hash": "
|
|
7
|
+
"hash": "595579a8f47c7fb87a2847c562a1d8ad53052f310a79bc586c3a92f923e484a6"
|
|
8
8
|
},
|
|
9
9
|
"service_states": {
|
|
10
|
-
"count":
|
|
11
|
-
"hash": "
|
|
10
|
+
"count": 17,
|
|
11
|
+
"hash": "8830b83c0129b7aef25f1a16af5842e12b2d0bdeaebe21f7bafce549a95f0e20"
|
|
12
12
|
},
|
|
13
13
|
"service_categories": {
|
|
14
14
|
"count": 151,
|
|
15
|
-
"hash": "
|
|
15
|
+
"hash": "68c5fee27fb5826ed86ff8e9387ec00ae8813029c87f9d5349c7ce2d5c640eaf"
|
|
16
16
|
},
|
|
17
17
|
"incident_participation_roles": {
|
|
18
|
-
"count":
|
|
19
|
-
"hash": "
|
|
18
|
+
"count": 20,
|
|
19
|
+
"hash": "bb891d1159a0e70b19ec485459f9778aa2c86a00009bf5e2259290a8ddf41a10"
|
|
20
20
|
},
|
|
21
21
|
"incident_involvement_roles": {
|
|
22
22
|
"count": 10,
|
|
23
|
-
"hash": "
|
|
23
|
+
"hash": "f9619dff97cd50873920c527c3b8fb2338773a7701f108bc1c8d22e642220850"
|
|
24
24
|
},
|
|
25
25
|
"race_ethnicity": {
|
|
26
26
|
"count": 14,
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
},
|
|
49
49
|
"name_type": {
|
|
50
50
|
"count": 12,
|
|
51
|
-
"hash": "
|
|
51
|
+
"hash": "290c0dbc5479a0ed095f98295886f65af5427dae4d924307b098cdfc360f3678"
|
|
52
52
|
},
|
|
53
53
|
"age_bin_reporting": {
|
|
54
54
|
"count": 11,
|
|
55
|
-
"hash": "
|
|
55
|
+
"hash": "e6c10d87d4f53bbb861147a081260c5adc8facb8fdd53f5dbf1bb41133d4d8cc"
|
|
56
56
|
},
|
|
57
57
|
"juvenile_justice_involvement_status": {
|
|
58
58
|
"count": 7,
|
|
59
|
-
"hash": "
|
|
59
|
+
"hash": "a1ea85245f114ac04e13b18c187c34d966f0af25825db6976b971391e01bc3f3"
|
|
60
60
|
},
|
|
61
61
|
"eye_color": {
|
|
62
62
|
"count": 11,
|
|
@@ -64,47 +64,47 @@
|
|
|
64
64
|
},
|
|
65
65
|
"smt_type": {
|
|
66
66
|
"count": 11,
|
|
67
|
-
"hash": "
|
|
67
|
+
"hash": "5187f29a02f8552222d53cfacce80ff27fe21a78df55360a4aba0f133eb06275"
|
|
68
68
|
},
|
|
69
69
|
"offender_status": {
|
|
70
70
|
"count": 9,
|
|
71
|
-
"hash": "
|
|
71
|
+
"hash": "02c39a437604d34e8e40256578124cd4497532cad8bb24c61b2f3bfb02fe2085"
|
|
72
72
|
},
|
|
73
73
|
"offender_status_family": {
|
|
74
74
|
"count": 8,
|
|
75
|
-
"hash": "
|
|
75
|
+
"hash": "13557efff19a69fe4451ea9300403b501eb4136146a5c1da8c73eaaf167ed219"
|
|
76
76
|
},
|
|
77
77
|
"military_status": {
|
|
78
78
|
"count": 6,
|
|
79
|
-
"hash": "
|
|
79
|
+
"hash": "3333618bccfd568ca064c3d0e52d04d496c57485d7ce1624120119e41e8c2d64"
|
|
80
80
|
},
|
|
81
81
|
"military_branch": {
|
|
82
82
|
"count": 8,
|
|
83
|
-
"hash": "
|
|
83
|
+
"hash": "f02b2865e23ef7abdebca77eafa921fb663cc3a82d480a251fcda8ef8433911f"
|
|
84
84
|
},
|
|
85
85
|
"contact_info_types": {
|
|
86
86
|
"count": 24,
|
|
87
|
-
"hash": "
|
|
87
|
+
"hash": "f356d68ce8658f761203e57ad61a2f39be5e9874379a92aec93755cfebe6ea1e"
|
|
88
88
|
},
|
|
89
89
|
"contact_safety_status": {
|
|
90
90
|
"count": 6,
|
|
91
91
|
"hash": "8aae59799013ec2d66f0477b44e1b3d556d00a6b908b5d0e0117e4e9a41ce5aa"
|
|
92
92
|
},
|
|
93
93
|
"highest_education_level_completed": {
|
|
94
|
-
"count":
|
|
95
|
-
"hash": "
|
|
94
|
+
"count": 13,
|
|
95
|
+
"hash": "5e440a30a194b0df89e23bc8072d306876dfb2bd366129bbe1faef1babb4b6ef"
|
|
96
96
|
},
|
|
97
97
|
"preferred_contact_method": {
|
|
98
98
|
"count": 4,
|
|
99
99
|
"hash": "c3fcaec7ef08f185748463adc1e73dc6a1ff196601f16a6453f737577f3dfd90"
|
|
100
100
|
},
|
|
101
101
|
"share_purpose": {
|
|
102
|
-
"count":
|
|
103
|
-
"hash": "
|
|
102
|
+
"count": 12,
|
|
103
|
+
"hash": "a3ecb1ffab4f32c5cd19afbc43278f0de0538c608464ae434595a7ff98552f65"
|
|
104
104
|
},
|
|
105
105
|
"facilitator_entity_type": {
|
|
106
106
|
"count": 14,
|
|
107
|
-
"hash": "
|
|
107
|
+
"hash": "cb38a134585eb782e3adf6b71e89766fa4da4a9a45ce92f2848ba97043b96e3e"
|
|
108
108
|
},
|
|
109
109
|
"facilitator_subrole": {
|
|
110
110
|
"count": 37,
|
|
@@ -128,11 +128,11 @@
|
|
|
128
128
|
},
|
|
129
129
|
"homeless_status": {
|
|
130
130
|
"count": 9,
|
|
131
|
-
"hash": "
|
|
131
|
+
"hash": "d77896cdbcb976e0934678ba6887de6e5de7cb93412b2f521ffe16cb082674e6"
|
|
132
132
|
},
|
|
133
133
|
"victim_status_family": {
|
|
134
134
|
"count": 9,
|
|
135
|
-
"hash": "
|
|
135
|
+
"hash": "b6850942b4582b30efed921356435f8eaf8f45a2d86754e3008398c97be8606c"
|
|
136
136
|
},
|
|
137
137
|
"hair_color": {
|
|
138
138
|
"count": 10,
|
|
@@ -140,19 +140,19 @@
|
|
|
140
140
|
},
|
|
141
141
|
"sex_provider_subrole": {
|
|
142
142
|
"count": 7,
|
|
143
|
-
"hash": "
|
|
143
|
+
"hash": "9141e81b57d90fc5a40a8511cfc870290a1bdf80a2a28bfa0a0c959537f8e14b"
|
|
144
144
|
},
|
|
145
145
|
"relationship_ties": {
|
|
146
146
|
"count": 28,
|
|
147
147
|
"hash": "29fb041c4d1b40260e4a448a0501eb580d29606479628a6807a833b52212f3c3"
|
|
148
148
|
},
|
|
149
149
|
"person_relationships": {
|
|
150
|
-
"count":
|
|
151
|
-
"hash": "
|
|
150
|
+
"count": 94,
|
|
151
|
+
"hash": "15b9d1989b897723881cdb489026fab9c42eb9fe0b809f349ec027e42ca7b154"
|
|
152
152
|
},
|
|
153
153
|
"employment_status": {
|
|
154
154
|
"count": 29,
|
|
155
|
-
"hash": "
|
|
155
|
+
"hash": "66cc1e58a53c60fc66be85a7bd688adffdd372e2686ce4fb1b1d28cfe8a66b0f"
|
|
156
156
|
},
|
|
157
157
|
"location_type": {
|
|
158
158
|
"count": 17,
|
|
@@ -160,11 +160,11 @@
|
|
|
160
160
|
},
|
|
161
161
|
"referral_entity_category": {
|
|
162
162
|
"count": 43,
|
|
163
|
-
"hash": "
|
|
163
|
+
"hash": "f2a551981afc2f8f6aa6ac02d37ca72ad809c6c6e407f63f05fb4f9f74a8af9c"
|
|
164
164
|
},
|
|
165
165
|
"income_benefits_sources": {
|
|
166
|
-
"count":
|
|
167
|
-
"hash": "
|
|
166
|
+
"count": 41,
|
|
167
|
+
"hash": "2c4c08fad1d49bf23f7cb3b1cec4f209b92cfac657b80e09ff0468420339a422"
|
|
168
168
|
},
|
|
169
169
|
"enrollment_application_status": {
|
|
170
170
|
"count": 12,
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
},
|
|
173
173
|
"administering_jurisdiction": {
|
|
174
174
|
"count": 10,
|
|
175
|
-
"hash": "
|
|
175
|
+
"hash": "11d0cca8132d86ea31a609931baf630c0cf96c2da16b736fb6e49254551019c2"
|
|
176
176
|
},
|
|
177
177
|
"frequency_cadence": {
|
|
178
178
|
"count": 11,
|
|
@@ -184,11 +184,11 @@
|
|
|
184
184
|
},
|
|
185
185
|
"source_category": {
|
|
186
186
|
"count": 9,
|
|
187
|
-
"hash": "
|
|
187
|
+
"hash": "1caf1295abc2bd190d6dc8891af15db2d8afd14a5238b9c4a8038b186aa9743f"
|
|
188
188
|
},
|
|
189
189
|
"source_subtype": {
|
|
190
|
-
"count":
|
|
191
|
-
"hash": "
|
|
190
|
+
"count": 39,
|
|
191
|
+
"hash": "90eefc3e2a4f924779239ae110fb271f8e5c1c34f30dc96ff0ffc40d23ed90e3"
|
|
192
192
|
},
|
|
193
193
|
"support_strength": {
|
|
194
194
|
"count": 11,
|
|
@@ -207,8 +207,8 @@
|
|
|
207
207
|
"hash": "5f98f5304468ccbc8b06c83388edcfc51abde67b3e8e7c66de55d9fafb0776c5"
|
|
208
208
|
},
|
|
209
209
|
"verification_method": {
|
|
210
|
-
"count":
|
|
211
|
-
"hash": "
|
|
210
|
+
"count": 11,
|
|
211
|
+
"hash": "ab1b4f974093be3a289544ecc859f86ae815109cba8a7b881d34828c505bf816"
|
|
212
212
|
},
|
|
213
213
|
"quality_flags": {
|
|
214
214
|
"count": 9,
|
|
@@ -251,8 +251,8 @@
|
|
|
251
251
|
"hash": "bcb674f2321ac832eea73553c6b0e0baac6af00ec526226fa1c664267d185122"
|
|
252
252
|
},
|
|
253
253
|
"check_in_phase": {
|
|
254
|
-
"count":
|
|
255
|
-
"hash": "
|
|
254
|
+
"count": 17,
|
|
255
|
+
"hash": "150538e848b5f46ad7340e239f983fb410c543c2ff7c3a43b174d29214e6accb"
|
|
256
256
|
},
|
|
257
257
|
"child_behavioral_concerns": {
|
|
258
258
|
"count": 16,
|
|
@@ -351,8 +351,8 @@
|
|
|
351
351
|
"hash": "5d32f251b24af795609cf5a354de58f2a67fa0884e94c864a3b2425052542d3b"
|
|
352
352
|
},
|
|
353
353
|
"identification_status": {
|
|
354
|
-
"count":
|
|
355
|
-
"hash": "
|
|
354
|
+
"count": 9,
|
|
355
|
+
"hash": "123525b1e4f981f8fe18cdfb1e34abc93c280c3295296db1512e7ee1f8c341ea"
|
|
356
356
|
},
|
|
357
357
|
"investigative_request_type": {
|
|
358
358
|
"count": 8,
|
|
@@ -477,6 +477,226 @@
|
|
|
477
477
|
"visa_type": {
|
|
478
478
|
"count": 40,
|
|
479
479
|
"hash": "df39913ea5401d187ba4b91b3f9b5d7c40811c8bbe4bdf4ae97ae2175a3cecc5"
|
|
480
|
+
},
|
|
481
|
+
"living_situation": {
|
|
482
|
+
"count": 22,
|
|
483
|
+
"hash": "a2cf23d69fd349c4091a3a7d0f3af7ea786a78b8fd3f7b34db97abbfa5adbc0b"
|
|
484
|
+
},
|
|
485
|
+
"service_audience": {
|
|
486
|
+
"count": 9,
|
|
487
|
+
"hash": "24e54f5cea374c1b7b743db491a8504c3c43f1c3a2e1cd6077fca65474e70682"
|
|
488
|
+
},
|
|
489
|
+
"hmis_relationship_to_hoh": {
|
|
490
|
+
"count": 9,
|
|
491
|
+
"hash": "93b7a0f327edbc77553c7ebee01f3ac59e1fe9b939cc930588d88704efd8274f"
|
|
492
|
+
},
|
|
493
|
+
"victim_abuse_types": {
|
|
494
|
+
"count": 29,
|
|
495
|
+
"hash": "03ce0a04e8a2ea49b39aaa45a7b11a2a9feb457637c6c6620a46fcb83e041442"
|
|
496
|
+
},
|
|
497
|
+
"ht_type": {
|
|
498
|
+
"count": 8,
|
|
499
|
+
"hash": "689c23880771fae764d0927f5872e250e0f6173eef0c162a192c477b6f638458"
|
|
500
|
+
},
|
|
501
|
+
"relationship_concern": {
|
|
502
|
+
"count": 11,
|
|
503
|
+
"hash": "48e882447e87dd4342afc4c9b56aff3925f10177e7ea214dca5d5f66c09e5668"
|
|
504
|
+
},
|
|
505
|
+
"recency_band": {
|
|
506
|
+
"count": 12,
|
|
507
|
+
"hash": "d371ef9d6edcf7c44c6e683bd5cc1fddbc7eac9f80983f787130fbfe16638c48"
|
|
508
|
+
},
|
|
509
|
+
"housing_subsidy_types": {
|
|
510
|
+
"count": 16,
|
|
511
|
+
"hash": "995a3170efe8219c0bfe0a174abb2389c86bf94423a70a5ce2b2feb3d9e6b3fa"
|
|
512
|
+
},
|
|
513
|
+
"assertion_domain": {
|
|
514
|
+
"count": 70,
|
|
515
|
+
"hash": "6b10f093870817757f4dcb45a513b347f0491ae3ca08c518e3c88df52cd48fdb"
|
|
516
|
+
},
|
|
517
|
+
"activity_type": {
|
|
518
|
+
"count": 14,
|
|
519
|
+
"hash": "ac980d852c4efc88db745fae50e7cd9ef6f94df3f9d4f90603b2960af4f55a68"
|
|
520
|
+
},
|
|
521
|
+
"provenance_source_id": {
|
|
522
|
+
"count": 13,
|
|
523
|
+
"hash": "4452b7ce856f13be7d7bb4b578943d15eef105140ec88fe03a0d8370f9d98a28"
|
|
524
|
+
},
|
|
525
|
+
"radius_bucket": {
|
|
526
|
+
"count": 9,
|
|
527
|
+
"hash": "f230944b4acc01997edafe36eaa8a96a6c599c16f59cab8269259333a69768ac"
|
|
528
|
+
},
|
|
529
|
+
"contact_link_type": {
|
|
530
|
+
"count": 8,
|
|
531
|
+
"hash": "2dd40c3fcaf9faabb8bf7524c8acfc82e20e020fb32b990e10df2efef95feda1"
|
|
532
|
+
},
|
|
533
|
+
"suggestion_source": {
|
|
534
|
+
"count": 6,
|
|
535
|
+
"hash": "773fc417d9f296b65f653f0c0a6b686a64bcf8838f9a3f39940b2b651ac273d9"
|
|
536
|
+
},
|
|
537
|
+
"roi_method": {
|
|
538
|
+
"count": 10,
|
|
539
|
+
"hash": "e9413c62e1b0879027a1509500f2e14faf7e0fa9bb60808dd6d1184de53c3087"
|
|
540
|
+
},
|
|
541
|
+
"session_note_visibility": {
|
|
542
|
+
"count": 7,
|
|
543
|
+
"hash": "6ad8e821e790b3ba303578c1ea78081d48264a96765299002b5545a7e78be3d0"
|
|
544
|
+
},
|
|
545
|
+
"special_needs_disabilities": {
|
|
546
|
+
"count": 14,
|
|
547
|
+
"hash": "d7309a7113de4b6e113126e952fe32b0f61daaef35f8f5e4033815f62f276320"
|
|
548
|
+
},
|
|
549
|
+
"hiv_status": {
|
|
550
|
+
"count": 6,
|
|
551
|
+
"hash": "18662b98fd25c6e68f556a3b4980801a5d807acbadaff759284a006af8dd5e39"
|
|
552
|
+
},
|
|
553
|
+
"mental_health_status": {
|
|
554
|
+
"count": 6,
|
|
555
|
+
"hash": "fa57c54bb1f0a92c5311ced4c24e22594ed47c206b84bbc33a951eedc9c226b2"
|
|
556
|
+
},
|
|
557
|
+
"child_change_type": {
|
|
558
|
+
"count": 15,
|
|
559
|
+
"hash": "194d6bc1244d21e696c7575936d56e8ce96a342c28ecef030517727ff50753fd"
|
|
560
|
+
},
|
|
561
|
+
"immigration_legal_status_change_type": {
|
|
562
|
+
"count": 14,
|
|
563
|
+
"hash": "022a25d6357bb3c883931daafa36d9a6f3c235913ef53fdf5f78959c442e9bb8"
|
|
564
|
+
},
|
|
565
|
+
"program_enrollment_change_type": {
|
|
566
|
+
"count": 13,
|
|
567
|
+
"hash": "5aa518bdbfded8ea20d5895c5bbd45d4b238356273e5452e52b93dcbbff250e4"
|
|
568
|
+
},
|
|
569
|
+
"romantic_relationship_change_type": {
|
|
570
|
+
"count": 16,
|
|
571
|
+
"hash": "746554af4c41ec04be2b7209caf5bd05a29df770111d208ea6c04fa181b8eb83"
|
|
572
|
+
},
|
|
573
|
+
"risk_category": {
|
|
574
|
+
"count": 13,
|
|
575
|
+
"hash": "8f650b786261619b2468eb3982c6146c21fa2ee3b1aa4504aa1084ad82543548"
|
|
576
|
+
},
|
|
577
|
+
"core_functions": {
|
|
578
|
+
"count": 81,
|
|
579
|
+
"hash": "5ed3bb6231e610bd6646f0d37e4bb6474d0c66a8c1e9ff6912ee2c00d1ccf534"
|
|
580
|
+
},
|
|
581
|
+
"needs_assessment_change_type": {
|
|
582
|
+
"count": 13,
|
|
583
|
+
"hash": "17303a3d9171a32d4302d94edfee67432bd46f102c39ef1db083b9628518f91e"
|
|
584
|
+
},
|
|
585
|
+
"roi_scope": {
|
|
586
|
+
"count": 31,
|
|
587
|
+
"hash": "079c1f421f0af3a3994b9735bd7df509de0a1b3aead22f6235b63a134210c33b"
|
|
588
|
+
},
|
|
589
|
+
"roi_status": {
|
|
590
|
+
"count": 9,
|
|
591
|
+
"hash": "8e9d079a860df143a08cb70b16045c611c89d6ec1f8692fac8966c66908f2b7b"
|
|
592
|
+
},
|
|
593
|
+
"core_referral_outcome": {
|
|
594
|
+
"count": 6,
|
|
595
|
+
"hash": "21308ee9fa9e4630e2a9faef4ae3e1754213d4b0acc4447f601a880edf74e2f8"
|
|
596
|
+
},
|
|
597
|
+
"dh_state": {
|
|
598
|
+
"count": 9,
|
|
599
|
+
"hash": "90aec290aa586a9bbc098c0c8a19536e06b705b054e4444ff6461a9913340a5c"
|
|
600
|
+
},
|
|
601
|
+
"core_indicators": {
|
|
602
|
+
"count": 220,
|
|
603
|
+
"hash": "634ba69f31273bace3c3be9509aba41f4c348086210905e42a6f97d393c64fbb"
|
|
604
|
+
},
|
|
605
|
+
"risk_severity_band": {
|
|
606
|
+
"count": 9,
|
|
607
|
+
"hash": "fc28328eb2b77e69c2a0d3a64add6de290687376506b053363756564d510448d"
|
|
608
|
+
},
|
|
609
|
+
"admin_roles": {
|
|
610
|
+
"count": 14,
|
|
611
|
+
"hash": "100b1ca9c69052c211bd591a75454c7a371da3825baa8a624579cf18f3ffb0b7"
|
|
612
|
+
},
|
|
613
|
+
"user_roles": {
|
|
614
|
+
"count": 19,
|
|
615
|
+
"hash": "978bc51bcff26af6ca265df119f368a790d31d3662bc947d01bb7fec3e39d4b3"
|
|
616
|
+
},
|
|
617
|
+
"hmis_current_living_situation": {
|
|
618
|
+
"count": 33,
|
|
619
|
+
"hash": "be6cead32a5d39c99a4b6d5d860ba736c74e28ab877591135a52823b1adfe0e6"
|
|
620
|
+
},
|
|
621
|
+
"juvenile_justice_episode_type": {
|
|
622
|
+
"count": 9,
|
|
623
|
+
"hash": "2b3c256979ba48e8c96e56587b32323da52d0542563036d1f064d7e5babefb81"
|
|
624
|
+
},
|
|
625
|
+
"incarceration_episode_type": {
|
|
626
|
+
"count": 9,
|
|
627
|
+
"hash": "52472cc461d57c684d546eef21c10b2a78458f6d50352226db0f8862b209a0e4"
|
|
628
|
+
},
|
|
629
|
+
"exploitation_type": {
|
|
630
|
+
"count": 9,
|
|
631
|
+
"hash": "3edd24b55ff7f26f1039a1f9fe48386d16f08dc9f68a05b6ba4afe93b53b2606"
|
|
632
|
+
},
|
|
633
|
+
"source_system": {
|
|
634
|
+
"count": 19,
|
|
635
|
+
"hash": "059cedc420b9724e7394ba8356f3a381932548c505d7c22e9b2708b1b07a4ef3"
|
|
636
|
+
},
|
|
637
|
+
"source_instrument": {
|
|
638
|
+
"count": 41,
|
|
639
|
+
"hash": "3e10b9e2ad96b4a2cb79dc56e8de785620207b9fea819d711085a2e7df53251e"
|
|
640
|
+
},
|
|
641
|
+
"po_petition_basis": {
|
|
642
|
+
"count": 8,
|
|
643
|
+
"hash": "0b1f95119f6cfd8a4791337463a200b7ad0f4a09d396e7aec2b93f2e0b18586d"
|
|
644
|
+
},
|
|
645
|
+
"po_status": {
|
|
646
|
+
"count": 12,
|
|
647
|
+
"hash": "67b982ca3f0bd4a1b628d35c6f432d362d8b14291dfc0b82056c03164b25fab2"
|
|
648
|
+
},
|
|
649
|
+
"po_violation_status": {
|
|
650
|
+
"count": 6,
|
|
651
|
+
"hash": "53a0ad169d2e5ff34ffa9b246eacbde2efb9b31baf763bfa1d3be53f0fbedd3c"
|
|
652
|
+
},
|
|
653
|
+
"session_template": {
|
|
654
|
+
"count": 25,
|
|
655
|
+
"hash": "f8e4b1830fb03f82499c10eb84b2202c7a3258832fec64fc73c17a734de24ece"
|
|
656
|
+
},
|
|
657
|
+
"service_delivery_channel": {
|
|
658
|
+
"count": 11,
|
|
659
|
+
"hash": "9318fd371d4418222eab7d1ac520c245f9d45f838a22efe31937669a01fdf26b"
|
|
660
|
+
},
|
|
661
|
+
"why_nots": {
|
|
662
|
+
"count": 32,
|
|
663
|
+
"hash": "c79f3a30eaa522190b54edd833202c1f37037f541d9d2eac65b22488da56619d"
|
|
664
|
+
},
|
|
665
|
+
"citizenship": {
|
|
666
|
+
"count": 253,
|
|
667
|
+
"hash": "83962425a6a987b46bd89f596feefe5758f25993137010bb417823b83c4ae31f"
|
|
668
|
+
},
|
|
669
|
+
"countries": {
|
|
670
|
+
"count": 254,
|
|
671
|
+
"hash": "21525c56d5bac7f218bcb9a5dc048eea4b9132cfaf4a6a7439ebbf7dd34ebcde"
|
|
672
|
+
},
|
|
673
|
+
"determination_helper_categories": {
|
|
674
|
+
"count": 57,
|
|
675
|
+
"hash": "9e296ba8ae3a187171eb8facfd13a5e6824daa0ed7f963e41e31672104aa16c0"
|
|
676
|
+
},
|
|
677
|
+
"trafficking_relevant_role": {
|
|
678
|
+
"count": 8,
|
|
679
|
+
"hash": "1a4ea2992cc501179adafd192d7a2f1733ffe48c1ba26e1e61a3c757b2d62b32"
|
|
680
|
+
},
|
|
681
|
+
"assertion_status": {
|
|
682
|
+
"count": 7,
|
|
683
|
+
"hash": "a1914348815dabc7171ed4ea632383d39f31764d390c43d6b1d359eae465807f"
|
|
684
|
+
},
|
|
685
|
+
"car_correction_reason": {
|
|
686
|
+
"count": 8,
|
|
687
|
+
"hash": "6ad10301ca7759bbda822b44a251208826b8880dff8d085ce501bc1faedc69d8"
|
|
688
|
+
},
|
|
689
|
+
"created_by_system": {
|
|
690
|
+
"count": 8,
|
|
691
|
+
"hash": "35ea022a704b4eee7b493ea3c9a8a5d2ffa41c4cacbe9f899cc1336e73808fc2"
|
|
692
|
+
},
|
|
693
|
+
"subject_type": {
|
|
694
|
+
"count": 7,
|
|
695
|
+
"hash": "81ad6c7fbb74bbb6d9c6f316df3275fd57a1646dedb4fb47472ee77fb2482f99"
|
|
696
|
+
},
|
|
697
|
+
"minor_adult_status": {
|
|
698
|
+
"count": 7,
|
|
699
|
+
"hash": "9d8972c65373a9981aab6b8749661659ecc632004e67bc9c2b3c88aa76f30977"
|
|
480
700
|
}
|
|
481
701
|
}
|
|
482
702
|
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CORE INFORMATION SCOPE (CVC-236) — the invariants adoption depends on
|
|
3
|
+
* ==================================================================
|
|
4
|
+
*
|
|
5
|
+
* Two vocabularies describe the same thing at different grains:
|
|
6
|
+
*
|
|
7
|
+
* `roi_scope` flat item vocabulary, 27 substantive keys, no category axis
|
|
8
|
+
* `core_information_scope` 12 policy-grain CATEGORIES + 54 authorization-grain UNITS
|
|
9
|
+
*
|
|
10
|
+
* PAVE and Thread are both pinned to `roi_scope` today, and both persist stored
|
|
11
|
+
* ROIs against it. Migrating them to this domain is safe for exactly one reason:
|
|
12
|
+
* every substantive `roi_scope` key survives here, spelled identically, so a
|
|
13
|
+
* stored ROI keeps its exact recorded meaning. That is not a nice-to-have — an
|
|
14
|
+
* ROI whose meaning widens is a CONSENT change wearing a data change's clothes,
|
|
15
|
+
* and one already shipped on the CaseShare lane when a coarse->granular table
|
|
16
|
+
* expanded `caseNotes` to include screening notes the survivor never authorized.
|
|
17
|
+
*
|
|
18
|
+
* So the subset property below is the whole basis for calling adoption additive.
|
|
19
|
+
* If it ever fails, adoption stops being a migration and becomes a re-consent.
|
|
20
|
+
*
|
|
21
|
+
* The grain invariants matter for a different reason: canon states that
|
|
22
|
+
* categories are the POLICY grain and units are the AUTHORIZATION grain. A
|
|
23
|
+
* selectable category would let a policy row be cited as if it were consent.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { readFileSync } from "node:fs";
|
|
27
|
+
import path from "node:path";
|
|
28
|
+
import { fileURLToPath } from "node:url";
|
|
29
|
+
|
|
30
|
+
import { describe, it, expect } from "vitest";
|
|
31
|
+
|
|
32
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
33
|
+
const cvcDir = path.join(here, "..", "cvcs");
|
|
34
|
+
|
|
35
|
+
interface Entry {
|
|
36
|
+
code: string;
|
|
37
|
+
key: string;
|
|
38
|
+
selectable: boolean;
|
|
39
|
+
parentCode: string | null;
|
|
40
|
+
childCodes: string[];
|
|
41
|
+
shareableDefault?: boolean;
|
|
42
|
+
required?: boolean;
|
|
43
|
+
platformFloor?: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const read = (f: string): { entries: Entry[]; levels: Record<string, string> } =>
|
|
47
|
+
JSON.parse(readFileSync(path.join(cvcDir, f), "utf8")) as {
|
|
48
|
+
entries: Entry[];
|
|
49
|
+
levels: Record<string, string>;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const scope = read("coreInformationScope.v1.0.0.json");
|
|
53
|
+
const roi = read("roiScope.v1.0.0.json");
|
|
54
|
+
|
|
55
|
+
const byCode = new Map(scope.entries.map((e) => [e.code, e]));
|
|
56
|
+
const MISSINGNESS = new Set([
|
|
57
|
+
"missingness_root",
|
|
58
|
+
"unknown",
|
|
59
|
+
"anonymous",
|
|
60
|
+
"data_not_collected",
|
|
61
|
+
]);
|
|
62
|
+
|
|
63
|
+
const isMissingness = (e: Entry): boolean =>
|
|
64
|
+
MISSINGNESS.has(e.key) ||
|
|
65
|
+
(e.parentCode !== null && byCode.get(e.parentCode)?.key === "missingness_root");
|
|
66
|
+
|
|
67
|
+
const categories = scope.entries.filter(
|
|
68
|
+
(e) => e.parentCode === null && !isMissingness(e),
|
|
69
|
+
);
|
|
70
|
+
const units = scope.entries.filter(
|
|
71
|
+
(e) => e.parentCode !== null && !isMissingness(e),
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
describe("core_information_scope — adoption invariants", () => {
|
|
75
|
+
it("carries every substantive roi_scope key, spelled identically", () => {
|
|
76
|
+
const roiSubstantive = roi.entries
|
|
77
|
+
.map((e) => e.key)
|
|
78
|
+
.filter((k) => !MISSINGNESS.has(k));
|
|
79
|
+
const unitKeys = new Set(units.map((u) => u.key));
|
|
80
|
+
const missing = roiSubstantive.filter((k) => !unitKeys.has(k));
|
|
81
|
+
|
|
82
|
+
// A failure here means a stored ROI can no longer be expressed in the new
|
|
83
|
+
// vocabulary — re-consent, not migration.
|
|
84
|
+
expect(missing).toEqual([]);
|
|
85
|
+
expect(roiSubstantive.length).toBe(27);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("is a strict superset — the additions are additions, not renames", () => {
|
|
89
|
+
expect(units.length).toBeGreaterThan(27);
|
|
90
|
+
expect(units).toHaveLength(54);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it("keeps the two grains distinct: categories decide policy, units carry consent", () => {
|
|
94
|
+
expect(categories).toHaveLength(12);
|
|
95
|
+
expect(categories.every((c) => c.selectable === false)).toBe(true);
|
|
96
|
+
expect(units.every((u) => u.selectable === true)).toBe(true);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("wires every unit to exactly one category, reciprocally", () => {
|
|
100
|
+
for (const u of units) {
|
|
101
|
+
const parent = byCode.get(u.parentCode as string);
|
|
102
|
+
expect(parent, `unit ${u.key} has a dangling parent`).toBeDefined();
|
|
103
|
+
expect(parent?.selectable, `unit ${u.key} hangs off a selectable row`).toBe(
|
|
104
|
+
false,
|
|
105
|
+
);
|
|
106
|
+
expect(parent?.childCodes, `category ${parent?.key} disowns ${u.key}`).toContain(
|
|
107
|
+
u.code,
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
expect(categories.flatMap((c) => c.childCodes)).toHaveLength(units.length);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it("publishes the posture sets as data, so they stop being literals", () => {
|
|
114
|
+
const of = (p: (u: Entry) => boolean): string[] =>
|
|
115
|
+
units.filter(p).map((u) => u.key).sort();
|
|
116
|
+
|
|
117
|
+
// shareable_default:false — the picker must not pre-check these.
|
|
118
|
+
expect(of((u) => u.shareableDefault === false)).toEqual([
|
|
119
|
+
"federal_protection_applications",
|
|
120
|
+
"hiv_status",
|
|
121
|
+
"immigration_status",
|
|
122
|
+
"le_report_status",
|
|
123
|
+
"safe_locations",
|
|
124
|
+
"tvap_enrollment",
|
|
125
|
+
"uscis_alien_number",
|
|
126
|
+
]);
|
|
127
|
+
|
|
128
|
+
// The platform safety floor — enforceable BELOW the scope layer.
|
|
129
|
+
expect(of((u) => u.platformFloor === true)).toEqual(["safe_locations"]);
|
|
130
|
+
|
|
131
|
+
// Always included; currently a hardcoded string in both apps.
|
|
132
|
+
expect(of((u) => u.required === true)).toEqual(["system_info"]);
|
|
133
|
+
});
|
|
134
|
+
});
|