@htilabs/platform-common-models 0.7.0-beta.1 → 0.7.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 (67) hide show
  1. package/README.md +0 -44
  2. package/dist/constants/index.cjs +5 -46
  3. package/dist/constants/index.cjs.map +1 -1
  4. package/dist/constants/index.d.cts +1 -1
  5. package/dist/constants/index.d.ts +1 -1
  6. package/dist/constants/index.js +5 -42
  7. package/dist/constants/index.js.map +1 -1
  8. package/dist/{cvcEntry-BCj1OWqL.d.cts → cvcEntry-DaDrEuTa.d.cts} +36 -36
  9. package/dist/{cvcEntry-BCj1OWqL.d.ts → cvcEntry-DaDrEuTa.d.ts} +36 -36
  10. package/dist/cvcs/index.cjs +1085 -126
  11. package/dist/cvcs/index.cjs.map +1 -1
  12. package/dist/cvcs/index.d.cts +1652 -595
  13. package/dist/cvcs/index.d.ts +1652 -595
  14. package/dist/cvcs/index.js +1074 -123
  15. package/dist/cvcs/index.js.map +1 -1
  16. package/dist/{index-I-DiX9eQ.d.ts → index-C0J3f169.d.ts} +1 -1
  17. package/dist/{index-CoVr1jIV.d.cts → index-EPjPjR0z.d.cts} +1 -1
  18. package/dist/index.cjs +1253 -228
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +193 -77
  21. package/dist/index.d.ts +193 -77
  22. package/dist/index.js +1231 -216
  23. package/dist/index.js.map +1 -1
  24. package/dist/models/index.d.cts +2 -2
  25. package/dist/models/index.d.ts +2 -2
  26. package/dist/{platform-auth-C97LpsRd.d.cts → platform-auth-CjC57132.d.cts} +4 -8
  27. package/dist/{platform-auth-C97LpsRd.d.ts → platform-auth-CjC57132.d.ts} +4 -8
  28. package/dist/schemas/index.cjs +6 -43
  29. package/dist/schemas/index.cjs.map +1 -1
  30. package/dist/schemas/index.d.cts +11 -15
  31. package/dist/schemas/index.d.ts +11 -15
  32. package/dist/schemas/index.js +6 -43
  33. package/dist/schemas/index.js.map +1 -1
  34. package/dist/types/index.d.cts +2 -2
  35. package/dist/types/index.d.ts +2 -2
  36. package/package.json +18 -24
  37. package/src/__tests__/__snapshots__/cvc-sot.snap +39 -7
  38. package/src/__tests__/cvc-sot-snapshot.test.ts +80 -16
  39. package/src/__tests__/cvc-structural.test.ts +11 -3
  40. package/src/constants/ic.ts +6 -49
  41. package/src/cvcs/contactInfoUseType.v1.0.0.json +87 -0
  42. package/src/cvcs/determinationLevel.v1.0.0.json +96 -0
  43. package/src/cvcs/index.ts +22 -6
  44. package/src/cvcs/inferenceType.v1.0.0.json +78 -0
  45. package/src/cvcs/qualityFlags.v1.0.0.json +96 -0
  46. package/src/cvcs/roleContext.v1.0.0.json +78 -0
  47. package/src/cvcs/sessionState.v1.0.0.json +96 -0
  48. package/src/cvcs/sourceCategory.v1.1.0.json +96 -0
  49. package/src/cvcs/sourceSubtype.v1.1.0.json +330 -0
  50. package/src/cvcs/supportStrength.v1.0.0.json +114 -0
  51. package/src/cvcs/timeScope.v1.0.0.json +69 -0
  52. package/src/cvcs/verificationMethod.v1.0.0.json +96 -0
  53. package/src/generated/cvc-enums.ts +211 -41
  54. package/src/index.ts +0 -20
  55. package/src/schemas/common.ts +0 -4
  56. package/dist/config/index.cjs +0 -191
  57. package/dist/config/index.cjs.map +0 -1
  58. package/dist/config/index.d.cts +0 -101
  59. package/dist/config/index.d.ts +0 -101
  60. package/dist/config/index.js +0 -165
  61. package/dist/config/index.js.map +0 -1
  62. package/src/__tests__/runtime-contract-validator.test.ts +0 -556
  63. package/src/config/fixtures/valid.yaml +0 -90
  64. package/src/config/index.ts +0 -352
  65. package/src/cvcs/hmisSex.v1.0.0.json +0 -89
  66. package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +0 -96
  67. package/src/cvcs/recencyBand.v1.0.0.json +0 -124
@@ -1,5 +1,5 @@
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';
1
+ import { ef as PlatformToolValue, cN as FunctionStatusValue, eC as RoleLevelValue, eN as ShareViewValue, eb as PermissionStateValue } from '../platform-auth-CjC57132.cjs';
2
+ export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cD as DataQualityValue, cL as FormStatusValue, cM as FormTypeValue, cO as IC13Category, cQ as IC13Value, cR as IC22Value, cS as IC23Value, cT as IC24Value, cU as IC25Value, cV as IC49ReferralOutcomeValue, cW as IC49ReferralVerificationValue, cX as IC49Value, cY as IC4Value, c_ as IC56Value, c$ as IC57Value, d1 as IC58Value, d2 as IC59Value, d3 as IC5Value, dT as IncidentInvolvementRoleValue, dU as IncidentParticipationRoleValue, dV as InteractionTypeValue, dY as MinorAdultStatusValue, ec as PersonDisplayCategoryValue, ed as PersonRoleValue, ee as PersonTypeValue, el as QuestionFormatValue, em as QuickStartTemplateId, ey as RecordStateValue, eA as RelationshipConcernValue, eB as RelationshipDynamicValue, eM as SessionStateValue, eO as SubmissionStateValue, eS as UserStatusValue } from '../platform-auth-CjC57132.cjs';
3
3
 
4
4
  /**
5
5
  * @htilabs/platform-common-models — Platform Authorization Types
@@ -1,5 +1,5 @@
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';
1
+ import { ef as PlatformToolValue, cN as FunctionStatusValue, eC as RoleLevelValue, eN as ShareViewValue, eb as PermissionStateValue } from '../platform-auth-CjC57132.js';
2
+ export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cD as DataQualityValue, cL as FormStatusValue, cM as FormTypeValue, cO as IC13Category, cQ as IC13Value, cR as IC22Value, cS as IC23Value, cT as IC24Value, cU as IC25Value, cV as IC49ReferralOutcomeValue, cW as IC49ReferralVerificationValue, cX as IC49Value, cY as IC4Value, c_ as IC56Value, c$ as IC57Value, d1 as IC58Value, d2 as IC59Value, d3 as IC5Value, dT as IncidentInvolvementRoleValue, dU as IncidentParticipationRoleValue, dV as InteractionTypeValue, dY as MinorAdultStatusValue, ec as PersonDisplayCategoryValue, ed as PersonRoleValue, ee as PersonTypeValue, el as QuestionFormatValue, em as QuickStartTemplateId, ey as RecordStateValue, eA as RelationshipConcernValue, eB as RelationshipDynamicValue, eM as SessionStateValue, eO as SubmissionStateValue, eS as UserStatusValue } from '../platform-auth-CjC57132.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.7.0-beta.1",
3
+ "version": "0.7.0",
4
4
  "description": "Shared constants, types, and models for HTI Labs applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -46,17 +46,29 @@
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"
54
49
  }
55
50
  },
56
51
  "files": [
57
52
  "dist",
58
53
  "src"
59
54
  ],
55
+ "scripts": {
56
+ "build": "tsup",
57
+ "dev": "tsup --watch",
58
+ "typecheck": "tsc --noEmit && tsc --noEmit -p scripts/tsconfig.json",
59
+ "lint": "eslint src --ext .ts",
60
+ "lint:fix": "eslint src --ext .ts --fix",
61
+ "test": "vitest run",
62
+ "test:watch": "vitest",
63
+ "test:snapshot": "UPDATE_SNAPSHOT=1 vitest run",
64
+ "clean": "rm -rf dist",
65
+ "codegen:cvc": "tsx scripts/codegen-cvc-enums.ts",
66
+ "codegen:cvc:check": "tsx scripts/codegen-cvc-enums.ts --check",
67
+ "seed:cvc": "tsx scripts/seed-cvc.ts",
68
+ "seed:cvc:all": "tsx scripts/seed-all-cvcs.ts",
69
+ "test:seed": "node --import tsx --test scripts/seed-cvc.test.ts",
70
+ "prepublishOnly": "npm run build"
71
+ },
60
72
  "keywords": [
61
73
  "hti",
62
74
  "platform-common",
@@ -78,7 +90,6 @@
78
90
  "vitest": "^1.6.1"
79
91
  },
80
92
  "dependencies": {
81
- "yaml": "^2.7.0",
82
93
  "zod": "^3.22.0"
83
94
  },
84
95
  "peerDependencies": {
@@ -91,22 +102,5 @@
91
102
  },
92
103
  "engines": {
93
104
  "node": ">=18.0.0"
94
- },
95
- "scripts": {
96
- "build": "tsup",
97
- "dev": "tsup --watch",
98
- "typecheck": "tsc --noEmit && tsc --noEmit -p scripts/tsconfig.json",
99
- "lint": "eslint src --ext .ts",
100
- "lint:fix": "eslint src --ext .ts --fix",
101
- "test": "vitest run",
102
- "test:watch": "vitest",
103
- "test:snapshot": "UPDATE_SNAPSHOT=1 vitest run",
104
- "clean": "rm -rf dist",
105
- "codegen:cvc": "tsx scripts/codegen-cvc-enums.ts",
106
- "codegen:cvc:check": "tsx scripts/codegen-cvc-enums.ts --check",
107
- "seed:cvc": "tsx scripts/seed-cvc.ts",
108
- "seed:cvc:all": "tsx scripts/seed-all-cvcs.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"
111
105
  }
112
106
  }
@@ -178,17 +178,49 @@
178
178
  "count": 11,
179
179
  "hash": "09d81031a2534830f3956bd49514985e4e9d67304d03fa21f3d7da3fd779c66e"
180
180
  },
181
- "recency_band": {
182
- "count": 12,
183
- "hash": "457483e1672882aa90675a7264f5517a236e32a318153c9d1f8ade0c1579b8ac"
181
+ "inference_type": {
182
+ "count": 7,
183
+ "hash": "14bee2d2d4a99fad4d7201e451b8ae926fd870394dfb0ccd42ac4a685cd12bcc"
184
184
  },
185
- "juvenile_justice_episode_type": {
185
+ "source_category": {
186
186
  "count": 9,
187
- "hash": "cefaec0cabd9ddbe3e824d43ab2fa149bdbed5c0d7a810b4156f72e6da8b4a50"
187
+ "hash": "ba2c6ddb0ef60863d88690f8c82d54208c1eb13b3546e4a5e49c4a2ec8a7517c"
188
+ },
189
+ "source_subtype": {
190
+ "count": 35,
191
+ "hash": "3c039024ef731abc2eb9f3ba9ae1860b75531e1b92e58a6bf74402444f59b773"
192
+ },
193
+ "support_strength": {
194
+ "count": 11,
195
+ "hash": "5d8fac1ffc16f39e2e2ccc0c8e1d7c5d667d2a662a15b312b90279084d70d78f"
196
+ },
197
+ "determination_level": {
198
+ "count": 9,
199
+ "hash": "d02ca85cebd134223f021b64fe79ac1157f628a46cca28b27ff7de96103d05f3"
200
+ },
201
+ "role_context": {
202
+ "count": 7,
203
+ "hash": "28e030655d3489e2feb802f89d29c8efdd431c7e685c5e1cee88e3d6a4c3c717"
188
204
  },
189
- "hmis_sex": {
205
+ "time_scope": {
206
+ "count": 6,
207
+ "hash": "5f98f5304468ccbc8b06c83388edcfc51abde67b3e8e7c66de55d9fafb0776c5"
208
+ },
209
+ "verification_method": {
210
+ "count": 9,
211
+ "hash": "7054ed373cb1b6c7f9a71e9729625bedb8128c94c1fd3afb3063fcc7e505ccfe"
212
+ },
213
+ "quality_flags": {
214
+ "count": 9,
215
+ "hash": "92202865236b89bf09673a07b81ae7797c4db49da5efb82512b3b0bec9154ab4"
216
+ },
217
+ "contact_info_use_type": {
190
218
  "count": 8,
191
- "hash": "3f42a6f2f507bd404ae0906b2238f53055908e086d12b3039fcc9817dce2192d"
219
+ "hash": "7ebd840146ac112553c164059061b25da76151f8085df4cf081d877190561cda"
220
+ },
221
+ "session_state": {
222
+ "count": 9,
223
+ "hash": "69d301667ebec681cfc9daf3f5d570adc269e484ab05f7d8bab773d1e4511a49"
192
224
  }
193
225
  }
194
226
  }
@@ -387,30 +387,94 @@ const SOT_SPECS: readonly SotSpec[] = [
387
387
  domain: "frequency_cadence",
388
388
  expectedCount: 11,
389
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.
390
+ // CVC-142 — inference_type. 3 substantive Level-1 entries (manual, rules,
391
+ // model) + 1 missingness root + 3 canonical missingness children = 7.
393
392
  {
394
- file: "recencyBand.v1.0.0.json",
395
- domain: "recency_band",
396
- expectedCount: 12,
393
+ file: "inferenceType.v1.0.0.json",
394
+ domain: "inference_type",
395
+ expectedCount: 7,
397
396
  },
398
- // CVC-197 — 5 flat Level-1 episode types + 1 missingness root + 3
399
- // canonical missingness children (no PNA for juvenile justice episode) = 9.
397
+ // CVC-140 — source_category. 5 substantive Level-1 entries (human,
398
+ // institutional_record, legal_evidentiary, machine, open_source) + 1
399
+ // missingness root + 3 canonical missingness children = 9.
400
400
  {
401
- file: "juvenileJusticeEpisodeType.v1.0.0.json",
402
- domain: "juvenile_justice_episode_type",
401
+ file: "sourceCategory.v1.1.0.json",
402
+ domain: "source_category",
403
403
  expectedCount: 9,
404
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.
405
+ // CVC-141 — source_subtype. 31 substantive Level-1 entries (flat across
406
+ // human / institutional_record / legal_evidentiary / machine / open_source
407
+ // categories, with cross-CVC context in definitions) + 1 missingness root +
408
+ // 3 canonical missingness children = 35.
409
+ {
410
+ file: "sourceSubtype.v1.1.0.json",
411
+ domain: "source_subtype",
412
+ expectedCount: 35,
413
+ },
414
+ // CVC-139 — support_strength (formerly evidence_tier). 7 substantive Level-1
415
+ // entries + 1 missingness root + 3 canonical missingness children = 11.
416
+ {
417
+ file: "supportStrength.v1.0.0.json",
418
+ domain: "support_strength",
419
+ expectedCount: 11,
420
+ },
421
+ // CVC-138 — determination_level. 5 substantive Level-1 entries (disclosed,
422
+ // estimated, reported, suspected, verified) + 1 missingness root + 3
423
+ // canonical missingness children = 9.
424
+ {
425
+ file: "determinationLevel.v1.0.0.json",
426
+ domain: "determination_level",
427
+ expectedCount: 9,
428
+ },
429
+ // CVC-160 — role_context. 3 substantive Level-1 entries (both, offender,
430
+ // victim) + 1 missingness root + 3 canonical missingness children = 7.
431
+ {
432
+ file: "roleContext.v1.0.0.json",
433
+ domain: "role_context",
434
+ expectedCount: 7,
435
+ },
436
+ // CVC-174 — time_scope. 2 substantive Level-1 entries (current, prior) + 1
437
+ // missingness root + 3 canonical missingness children = 6.
409
438
  {
410
- file: "hmisSex.v1.0.0.json",
411
- domain: "hmis_sex",
439
+ file: "timeScope.v1.0.0.json",
440
+ domain: "time_scope",
441
+ expectedCount: 6,
442
+ },
443
+ // CVC-143 — verification_method. 5 substantive Level-1 entries
444
+ // (court_record_confirmed, evidence_threshold_met, multi_source_corroboration,
445
+ // qa_audit_passed, supervisor_review) + 1 missingness root + 3 canonical
446
+ // missingness children = 9.
447
+ {
448
+ file: "verificationMethod.v1.0.0.json",
449
+ domain: "verification_method",
450
+ expectedCount: 9,
451
+ },
452
+ // CVC-144 — quality_flags. 5 substantive Level-1 entries
453
+ // (circular_model_label_risk, data_redacted, inconsistent, self_report_only,
454
+ // single_source) + 1 missingness root + 3 canonical missingness children = 9.
455
+ {
456
+ file: "qualityFlags.v1.0.0.json",
457
+ domain: "quality_flags",
458
+ expectedCount: 9,
459
+ },
460
+ // CVC-154 — contact_info_use_type. 4 substantive Level-1 entries
461
+ // (business_commercial_sex, business_non_cs, mixed_use, personal) + 1
462
+ // missingness root + 3 canonical missingness children = 8. Notion status:
463
+ // Drafted - Needs Review (v3.0); landed at v1.0.0 against canonical pattern.
464
+ {
465
+ file: "contactInfoUseType.v1.0.0.json",
466
+ domain: "contact_info_use_type",
412
467
  expectedCount: 8,
413
468
  },
469
+ // CVC-216 — session_state. 5 substantive Level-1 entries
470
+ // (session_action_needed, session_closed, session_discarded,
471
+ // session_in_progress, session_initialized) + 1 missingness root + 3
472
+ // canonical missingness children = 9.
473
+ {
474
+ file: "sessionState.v1.0.0.json",
475
+ domain: "session_state",
476
+ expectedCount: 9,
477
+ },
414
478
  ] as const;
415
479
 
416
480
  // ─── Helpers ────────────────────────────────────────────────────────────────
@@ -92,9 +92,17 @@ const SOT_FILES: readonly SotFile[] = [
92
92
  { file: "enrollmentApplicationStatus.v1.0.0.json", expectedDomain: "enrollment_application_status" },
93
93
  { file: "administeringJurisdiction.v1.0.0.json", expectedDomain: "administering_jurisdiction" },
94
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" },
95
+ { file: "inferenceType.v1.0.0.json", expectedDomain: "inference_type" },
96
+ { file: "sourceCategory.v1.1.0.json", expectedDomain: "source_category" },
97
+ { file: "sourceSubtype.v1.1.0.json", expectedDomain: "source_subtype" },
98
+ { file: "supportStrength.v1.0.0.json", expectedDomain: "support_strength" },
99
+ { file: "determinationLevel.v1.0.0.json", expectedDomain: "determination_level" },
100
+ { file: "roleContext.v1.0.0.json", expectedDomain: "role_context" },
101
+ { file: "timeScope.v1.0.0.json", expectedDomain: "time_scope" },
102
+ { file: "verificationMethod.v1.0.0.json", expectedDomain: "verification_method" },
103
+ { file: "qualityFlags.v1.0.0.json", expectedDomain: "quality_flags" },
104
+ { file: "contactInfoUseType.v1.0.0.json", expectedDomain: "contact_info_use_type" },
105
+ { file: "sessionState.v1.0.0.json", expectedDomain: "session_state" },
98
106
  ] as const;
99
107
 
100
108
  function loadSot(file: string): unknown {
@@ -45,9 +45,7 @@ export const DATA_QUALITY_DESCRIPTIONS: Record<DataQualityValue, string> = {
45
45
 
46
46
  // ─── CVC-1: Name Type ───────────────────────────────────────────────
47
47
  // Distinguishes between legal names (structured: first/middle/last/suffix)
48
- // and unstructured name forms (alias, trade name, nickname, etc.)
49
- // Mononym is not a name_type — it's a shape flag on structured components
50
- // (see `isMononym` on personNameSchema).
48
+ // and unstructured name forms (alias, trade name, mononym, etc.)
51
49
  // Reference: core_name_type in IC/CVC codebook
52
50
 
53
51
  export const CVC_1_NAME_TYPE = {
@@ -57,6 +55,8 @@ export const CVC_1_NAME_TYPE = {
57
55
  ALIAS: "alias",
58
56
  /** Trade name / business name - single unstructured name field */
59
57
  TRADE_NAME: "trade_name",
58
+ /** Single-word name (e.g., "Madonna", "Prince") - single unstructured name field */
59
+ MONONYM: "mononym",
60
60
  /** Nickname - single unstructured name field */
61
61
  NICKNAME: "nickname",
62
62
  /** Online handle or username - single unstructured name field */
@@ -71,6 +71,7 @@ export const CVC_1_VALUES = [
71
71
  CVC_1_NAME_TYPE.LEGAL,
72
72
  CVC_1_NAME_TYPE.ALIAS,
73
73
  CVC_1_NAME_TYPE.TRADE_NAME,
74
+ CVC_1_NAME_TYPE.MONONYM,
74
75
  CVC_1_NAME_TYPE.NICKNAME,
75
76
  CVC_1_NAME_TYPE.HANDLE,
76
77
  CVC_1_NAME_TYPE.UNKNOWN,
@@ -80,6 +81,7 @@ export const CVC_1_LABELS: Record<CVC1Value, string> = {
80
81
  [CVC_1_NAME_TYPE.LEGAL]: "Legal Name",
81
82
  [CVC_1_NAME_TYPE.ALIAS]: "Alias / AKA",
82
83
  [CVC_1_NAME_TYPE.TRADE_NAME]: "Trade Name",
84
+ [CVC_1_NAME_TYPE.MONONYM]: "Mononym",
83
85
  [CVC_1_NAME_TYPE.NICKNAME]: "Nickname",
84
86
  [CVC_1_NAME_TYPE.HANDLE]: "Handle / Username",
85
87
  [CVC_1_NAME_TYPE.UNKNOWN]: "Unknown",
@@ -100,6 +102,7 @@ export const CVC_1_STRUCTURED_NAME_TYPES: readonly CVC1Value[] = [
100
102
  export const CVC_1_UNSTRUCTURED_NAME_TYPES: readonly CVC1Value[] = [
101
103
  CVC_1_NAME_TYPE.ALIAS,
102
104
  CVC_1_NAME_TYPE.TRADE_NAME,
105
+ CVC_1_NAME_TYPE.MONONYM,
103
106
  CVC_1_NAME_TYPE.NICKNAME,
104
107
  CVC_1_NAME_TYPE.HANDLE,
105
108
  CVC_1_NAME_TYPE.UNKNOWN,
@@ -1412,10 +1415,7 @@ export const CVC_17_CORE_GENDER_IDENTITY = {
1412
1415
  TRANSGENDER: "TRANSGENDER",
1413
1416
  NON_BINARY: "NON_BINARY",
1414
1417
  OTHER: "OTHER",
1415
- // Level 0 - Missingness codes (codebook canonical set)
1416
1418
  UNKNOWN: "UNK",
1417
- DATA_NOT_COLLECTED: "DNC",
1418
- PREFER_NOT_TO_ANSWER: "PNA",
1419
1419
  // Level 2 - Transgender subcategories
1420
1420
  TRANSGENDER_FTM: "TRANSGENDER_FTM",
1421
1421
  TRANSGENDER_MTF: "TRANSGENDER_MTF",
@@ -1431,8 +1431,6 @@ export const CVC_17_LABELS: Record<CVC17Value, string> = {
1431
1431
  [CVC_17_CORE_GENDER_IDENTITY.NON_BINARY]: "Non-Binary",
1432
1432
  [CVC_17_CORE_GENDER_IDENTITY.OTHER]: "Other",
1433
1433
  [CVC_17_CORE_GENDER_IDENTITY.UNKNOWN]: "Unknown",
1434
- [CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED]: "Data not collected",
1435
- [CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER]: "Client prefers not to answer",
1436
1434
  [CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM]: "Transgender - FTM",
1437
1435
  [CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF]: "Transgender - MTF",
1438
1436
  };
@@ -1469,38 +1467,6 @@ export function isTransgenderGenderIdentity(value: CVC17Value | null | undefined
1469
1467
  return CVC_17_TRANSGENDER_VALUES.includes(value);
1470
1468
  }
1471
1469
 
1472
- // Selectable non-missingness values (Level 1 primary + Level 2 subcategories)
1473
- export const CVC_17_SELECTABLE_VALUES: CVC17Value[] = [
1474
- CVC_17_CORE_GENDER_IDENTITY.MALE,
1475
- CVC_17_CORE_GENDER_IDENTITY.FEMALE,
1476
- CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER,
1477
- CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
1478
- CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF,
1479
- CVC_17_CORE_GENDER_IDENTITY.NON_BINARY,
1480
- CVC_17_CORE_GENDER_IDENTITY.OTHER,
1481
- ];
1482
-
1483
- // Missingness values (codebook canonical set: UNK, DNC, PNA)
1484
- export const CVC_17_MISSINGNESS_VALUES: CVC17Value[] = [
1485
- CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
1486
- CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED,
1487
- CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER,
1488
- ];
1489
-
1490
- // All CVC-17 values as an array (for Mongoose schema enum validation)
1491
- export const CVC_17_VALUES: CVC17Value[] = [
1492
- CVC_17_CORE_GENDER_IDENTITY.MALE,
1493
- CVC_17_CORE_GENDER_IDENTITY.FEMALE,
1494
- CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER,
1495
- CVC_17_CORE_GENDER_IDENTITY.NON_BINARY,
1496
- CVC_17_CORE_GENDER_IDENTITY.OTHER,
1497
- CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
1498
- CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED,
1499
- CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER,
1500
- CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
1501
- CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF,
1502
- ];
1503
-
1504
1470
  // ─── IC-24: Race ───────────────────────────────────────────────────
1505
1471
 
1506
1472
  export const IC_24_RACE = {
@@ -5316,12 +5282,3 @@ export const CVC_67_SELECTABLE_VALUES: CVC67Value[] = [
5316
5282
  export const CVC_67_MISSINGNESS_VALUES: CVC67Value[] = [
5317
5283
  CVC_67_HMIS_SEX.DATA_NOT_COLLECTED,
5318
5284
  ];
5319
-
5320
- // All CVC-67 values as an array (for Mongoose schema enum validation)
5321
- export const CVC_67_VALUES: CVC67Value[] = [
5322
- CVC_67_HMIS_SEX.MALE,
5323
- CVC_67_HMIS_SEX.FEMALE,
5324
- CVC_67_HMIS_SEX.CLIENT_PREFERS_NOT_TO_ANSWER,
5325
- CVC_67_HMIS_SEX.CLIENT_DOESNT_KNOW,
5326
- CVC_67_HMIS_SEX.DATA_NOT_COLLECTED,
5327
- ];
@@ -0,0 +1,87 @@
1
+ {
2
+ "domain": "contact_info_use_type",
3
+ "name": "Core Contact Info Use Type",
4
+ "version": "1.0.0",
5
+ "levels": {
6
+ "0": "Unknown or Missing",
7
+ "1": "Use type"
8
+ },
9
+ "entries": [
10
+ {
11
+ "code": "154-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
+ "154-000-000-000-000-000-001",
18
+ "154-000-000-000-000-000-002",
19
+ "154-000-000-000-000-000-003"
20
+ ],
21
+ "definition": "Root group for values indicating absent, withheld, or uncollected data."
22
+ },
23
+ {
24
+ "code": "154-000-000-000-000-000-001",
25
+ "key": "unknown",
26
+ "title": "Unknown",
27
+ "selectable": true,
28
+ "parentCode": "154-000-000-000-000-000-000",
29
+ "childCodes": [],
30
+ "definition": "Usage context is not known."
31
+ },
32
+ {
33
+ "code": "154-000-000-000-000-000-002",
34
+ "key": "anonymous",
35
+ "title": "Anonymous",
36
+ "selectable": true,
37
+ "parentCode": "154-000-000-000-000-000-000",
38
+ "childCodes": [],
39
+ "definition": "Value is intentionally withheld or redacted."
40
+ },
41
+ {
42
+ "code": "154-000-000-000-000-000-003",
43
+ "key": "data_not_collected",
44
+ "title": "Data not collected",
45
+ "selectable": true,
46
+ "parentCode": "154-000-000-000-000-000-000",
47
+ "childCodes": [],
48
+ "definition": "Worker did not attempt to collect / record usage context."
49
+ },
50
+ {
51
+ "code": "154-001-000-000-000-000-000",
52
+ "key": "business_commercial_sex",
53
+ "title": "Business (commercial sex)",
54
+ "selectable": true,
55
+ "parentCode": null,
56
+ "childCodes": [],
57
+ "definition": "Used primarily for commercial sex advertising, client communication, or related coordination. If a source instrument directly encodes a CS-only flag, map that into this code."
58
+ },
59
+ {
60
+ "code": "154-002-000-000-000-000-000",
61
+ "key": "business_non_cs",
62
+ "title": "Business (non-CS)",
63
+ "selectable": true,
64
+ "parentCode": null,
65
+ "childCodes": [],
66
+ "definition": "Used primarily for work / business communication not specific to commercial sex activity (employer, general business, services, etc.)."
67
+ },
68
+ {
69
+ "code": "154-003-000-000-000-000-000",
70
+ "key": "mixed_use",
71
+ "title": "Mixed use",
72
+ "selectable": true,
73
+ "parentCode": null,
74
+ "childCodes": [],
75
+ "definition": "Used for both personal and business purposes (including where business includes commercial sex activity)."
76
+ },
77
+ {
78
+ "code": "154-004-000-000-000-000-000",
79
+ "key": "personal",
80
+ "title": "Personal",
81
+ "selectable": true,
82
+ "parentCode": null,
83
+ "childCodes": [],
84
+ "definition": "Used primarily for personal / family communication."
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "domain": "determination_level",
3
+ "name": "Core Determination Level",
4
+ "version": "1.0.0",
5
+ "levels": {
6
+ "0": "Unknown or Missing",
7
+ "1": "Determination level"
8
+ },
9
+ "entries": [
10
+ {
11
+ "code": "138-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
+ "138-000-000-000-000-000-001",
18
+ "138-000-000-000-000-000-002",
19
+ "138-000-000-000-000-000-003"
20
+ ],
21
+ "definition": "Root group for values indicating absent, withheld, or uncollected data."
22
+ },
23
+ {
24
+ "code": "138-000-000-000-000-000-001",
25
+ "key": "unknown",
26
+ "title": "Unknown",
27
+ "selectable": true,
28
+ "parentCode": "138-000-000-000-000-000-000",
29
+ "childCodes": [],
30
+ "definition": "Value is unknown at time of entry."
31
+ },
32
+ {
33
+ "code": "138-000-000-000-000-000-002",
34
+ "key": "anonymous",
35
+ "title": "Anonymous",
36
+ "selectable": true,
37
+ "parentCode": "138-000-000-000-000-000-000",
38
+ "childCodes": [],
39
+ "definition": "Value is intentionally withheld or redacted."
40
+ },
41
+ {
42
+ "code": "138-000-000-000-000-000-003",
43
+ "key": "data_not_collected",
44
+ "title": "Data not collected",
45
+ "selectable": true,
46
+ "parentCode": "138-000-000-000-000-000-000",
47
+ "childCodes": [],
48
+ "definition": "No attempt was made to collect the value."
49
+ },
50
+ {
51
+ "code": "138-001-000-000-000-000-000",
52
+ "key": "disclosed",
53
+ "title": "Disclosed (subject)",
54
+ "selectable": true,
55
+ "parentCode": null,
56
+ "childCodes": [],
57
+ "definition": "The subject discloses or self-reports the condition occurred or applies. Use for trauma-informed capture of disclosures without requiring independent corroboration. Often high priority for service workflows. Pair with support_strength = allegation by default unless corroboration exists."
58
+ },
59
+ {
60
+ "code": "138-002-000-000-000-000-000",
61
+ "key": "estimated",
62
+ "title": "Estimated (system-derived)",
63
+ "selectable": true,
64
+ "parentCode": null,
65
+ "childCodes": [],
66
+ "definition": "Statistical or heuristic estimate where underlying facts may be partial or inferred; useful for early triage and modeling, but not a direct claim by a person or authority. Use when the system or staff is inferring a status from incomplete signals (heuristics, early screening patterns, probabilistic scoring). Do not treat as a disclosure. Pair with inference_type = rules / model when applicable."
67
+ },
68
+ {
69
+ "code": "138-003-000-000-000-000-000",
70
+ "key": "reported",
71
+ "title": "Reported (third-party)",
72
+ "selectable": true,
73
+ "parentCode": null,
74
+ "childCodes": [],
75
+ "definition": "A third party reports the condition occurred or applies (not the subject's own account). Use when information comes from someone other than the subject: witness, family, another agency, community tip, etc. Not a measure of truth. Pair with support_strength to capture corroboration strength."
76
+ },
77
+ {
78
+ "code": "138-004-000-000-000-000-000",
79
+ "key": "suspected",
80
+ "title": "Suspected (working theory)",
81
+ "selectable": true,
82
+ "parentCode": null,
83
+ "childCodes": [],
84
+ "definition": "A working hypothesis or investigative theory that the condition likely applies, but is not yet established as a report / disclosure or verified determination. Use for early investigation, suspicion from indicators, or preliminary hypotheses by staff or partners. May be elevated to verified later via superseding entries. Avoid using as a long-term resting state."
85
+ },
86
+ {
87
+ "code": "138-005-000-000-000-000-000",
88
+ "key": "verified",
89
+ "title": "Verified (operational)",
90
+ "selectable": true,
91
+ "parentCode": null,
92
+ "childCodes": [],
93
+ "definition": "The asserting organization has verified the condition to a defined operational threshold (not necessarily a legal finding). Use when an agency's policy defines what counts as verified for program / reporting or an internal badge. Verification criteria vary by org; record the policy / threshold via provenance notes or mapping version. Verified means an organization has performed an explicit verification act under a defined threshold; support / corroboration belongs in support_strength."
94
+ }
95
+ ]
96
+ }
package/src/cvcs/index.ts CHANGED
@@ -63,9 +63,17 @@ import incomeBenefitsSourcesSot from "./incomeBenefitsSources.v1.0.0.json" with
63
63
  import enrollmentApplicationStatusSot from "./enrollmentApplicationStatus.v1.0.0.json" with { type: "json" };
64
64
  import administeringJurisdictionSot from "./administeringJurisdiction.v1.0.0.json" with { type: "json" };
65
65
  import frequencyCadenceSot from "./frequencyCadence.v1.0.0.json" with { type: "json" };
66
- import recencyBandSot from "./recencyBand.v1.0.0.json" with { type: "json" };
67
- import juvenileJusticeEpisodeTypeSot from "./juvenileJusticeEpisodeType.v1.0.0.json" with { type: "json" };
68
- import hmisSexSot from "./hmisSex.v1.0.0.json" with { type: "json" };
66
+ import inferenceTypeSot from "./inferenceType.v1.0.0.json" with { type: "json" };
67
+ import sourceCategorySot from "./sourceCategory.v1.1.0.json" with { type: "json" };
68
+ import sourceSubtypeSot from "./sourceSubtype.v1.1.0.json" with { type: "json" };
69
+ import supportStrengthSot from "./supportStrength.v1.0.0.json" with { type: "json" };
70
+ import determinationLevelSot from "./determinationLevel.v1.0.0.json" with { type: "json" };
71
+ import roleContextSot from "./roleContext.v1.0.0.json" with { type: "json" };
72
+ import timeScopeSot from "./timeScope.v1.0.0.json" with { type: "json" };
73
+ import verificationMethodSot from "./verificationMethod.v1.0.0.json" with { type: "json" };
74
+ import qualityFlagsSot from "./qualityFlags.v1.0.0.json" with { type: "json" };
75
+ import contactInfoUseTypeSot from "./contactInfoUseType.v1.0.0.json" with { type: "json" };
76
+ import sessionStateSot from "./sessionState.v1.0.0.json" with { type: "json" };
69
77
 
70
78
  export {
71
79
  serviceCategoriesSot,
@@ -112,7 +120,15 @@ export {
112
120
  enrollmentApplicationStatusSot,
113
121
  administeringJurisdictionSot,
114
122
  frequencyCadenceSot,
115
- recencyBandSot,
116
- juvenileJusticeEpisodeTypeSot,
117
- hmisSexSot,
123
+ inferenceTypeSot,
124
+ sourceCategorySot,
125
+ sourceSubtypeSot,
126
+ supportStrengthSot,
127
+ determinationLevelSot,
128
+ roleContextSot,
129
+ timeScopeSot,
130
+ verificationMethodSot,
131
+ qualityFlagsSot,
132
+ contactInfoUseTypeSot,
133
+ sessionStateSot,
118
134
  };