@htilabs/platform-common-models 0.8.7 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +44 -0
  2. package/dist/config/index.cjs +191 -0
  3. package/dist/config/index.cjs.map +1 -0
  4. package/dist/config/index.d.cts +101 -0
  5. package/dist/config/index.d.ts +101 -0
  6. package/dist/config/index.js +165 -0
  7. package/dist/config/index.js.map +1 -0
  8. package/dist/constants/index.cjs +5 -28
  9. package/dist/constants/index.cjs.map +1 -1
  10. package/dist/constants/index.d.cts +1 -1
  11. package/dist/constants/index.d.ts +1 -1
  12. package/dist/constants/index.js +5 -27
  13. package/dist/constants/index.js.map +1 -1
  14. package/dist/{cvcEntry-DaDrEuTa.d.cts → cvcEntry-0BIB9sen.d.cts} +44 -44
  15. package/dist/{cvcEntry-DaDrEuTa.d.ts → cvcEntry-0BIB9sen.d.ts} +44 -44
  16. package/dist/cvcs/index.cjs +3 -1321
  17. package/dist/cvcs/index.cjs.map +1 -1
  18. package/dist/cvcs/index.d.cts +1195 -2649
  19. package/dist/cvcs/index.d.ts +1195 -2649
  20. package/dist/cvcs/index.js +3 -1313
  21. package/dist/cvcs/index.js.map +1 -1
  22. package/dist/{index-C0J3f169.d.ts → index-CDoqrfc1.d.ts} +1 -1
  23. package/dist/{index-EPjPjR0z.d.cts → index-Zu_mOJRn.d.cts} +1 -1
  24. package/dist/index.cjs +121 -1550
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +48 -401
  27. package/dist/index.d.ts +48 -401
  28. package/dist/index.js +120 -1526
  29. package/dist/index.js.map +1 -1
  30. package/dist/models/index.d.cts +2 -2
  31. package/dist/models/index.d.ts +2 -2
  32. package/dist/{platform-auth-BdnJUisw.d.cts → platform-auth-XVB9aHqR.d.cts} +3 -16
  33. package/dist/{platform-auth-BdnJUisw.d.ts → platform-auth-XVB9aHqR.d.ts} +3 -16
  34. package/dist/schemas/index.cjs +9 -26
  35. package/dist/schemas/index.cjs.map +1 -1
  36. package/dist/schemas/index.d.cts +39 -35
  37. package/dist/schemas/index.d.ts +39 -35
  38. package/dist/schemas/index.js +9 -26
  39. package/dist/schemas/index.js.map +1 -1
  40. package/dist/types/index.d.cts +2 -2
  41. package/dist/types/index.d.ts +2 -2
  42. package/package.json +25 -19
  43. package/src/__tests__/__snapshots__/cvc-sot.snap +12 -76
  44. package/src/__tests__/cvc-sot-snapshot.test.ts +10 -61
  45. package/src/__tests__/cvc-structural.test.ts +0 -9
  46. package/src/__tests__/runtime-contract-validator.test.ts +556 -0
  47. package/src/config/fixtures/valid.yaml +90 -0
  48. package/src/config/index.ts +352 -0
  49. package/src/constants/ic.ts +3 -31
  50. package/src/cvcs/highestEducationLevelCompleted.v1.0.0.json +0 -9
  51. package/src/cvcs/hmisSex.v1.0.0.json +89 -0
  52. package/src/cvcs/identificationStatus.v1.0.0.json +0 -18
  53. package/src/cvcs/incomeBenefitsSources.v1.0.0.json +2 -31
  54. package/src/cvcs/index.ts +0 -16
  55. package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +96 -0
  56. package/src/cvcs/recencyBand.v1.0.0.json +57 -38
  57. package/src/cvcs/serviceStates.v1.0.0.json +1 -23
  58. package/src/cvcs/sourceSubtype.v1.1.0.json +0 -36
  59. package/src/cvcs/verificationMethod.v1.0.0.json +0 -18
  60. package/src/generated/cvc-enums.ts +6 -429
  61. package/src/index.ts +20 -0
  62. package/src/schemas/common.ts +4 -0
  63. package/src/cvcs/activityType.v1.0.0.json +0 -143
  64. package/src/cvcs/assertionDomain.v1.0.0.json +0 -629
  65. package/src/cvcs/contactLinkType.v1.0.0.json +0 -89
  66. package/src/cvcs/hmisRelationshipToHoh.v1.0.0.json +0 -104
  67. package/src/cvcs/housingSubsidyTypes.v1.0.0.json +0 -159
  68. package/src/cvcs/htType.v1.0.0.json +0 -87
  69. package/src/cvcs/livingSituation.v1.0.0.json +0 -213
  70. package/src/cvcs/provenanceSourceId.v1.0.0.json +0 -134
  71. package/src/cvcs/radiusBucket.v1.0.0.json +0 -98
  72. package/src/cvcs/relationshipConcern.v1.0.0.json +0 -114
  73. package/src/cvcs/roiMethod.v1.0.0.json +0 -107
  74. package/src/cvcs/serviceAudience.v1.0.0.json +0 -96
  75. package/src/cvcs/sessionNoteVisibility.v1.0.0.json +0 -80
  76. package/src/cvcs/suggestionSource.v1.0.0.json +0 -71
  77. package/src/cvcs/victimAbuseTypes.v1.0.0.json +0 -276
@@ -173,7 +173,7 @@ export type ServiceCategoryKey = keyof typeof ServiceCategoryKeys;
173
173
  /**
174
174
  * Key → positional code map for the `service_states` CVC domain.
175
175
  *
176
- * Domain: `service_states` · Version: 1.0.0 · Entries: 17
176
+ * Domain: `service_states` · Version: 1.0.0 · Entries: 15
177
177
  */
178
178
  export const ServiceStateKeys = {
179
179
  missingness_root: "049-000-000-000-000-000-000",
@@ -191,8 +191,6 @@ export const ServiceStateKeys = {
191
191
  unable_to_provide_capacity: "049-007-002-000-000-000-000",
192
192
  unable_to_provide_resource: "049-007-003-000-000-000-000",
193
193
  unable_other_reason: "049-007-004-000-000-000-000",
194
- unable_to_provide_service_fit: "049-007-005-000-000-000-000",
195
- unable_to_provide_access_barrier: "049-007-006-000-000-000-000",
196
194
  } as const;
197
195
 
198
196
  export type ServiceStateKey = keyof typeof ServiceStateKeys;
@@ -837,7 +835,7 @@ export type ContactSafetyStatusKey = keyof typeof ContactSafetyStatusKeys;
837
835
  /**
838
836
  * Key → positional code map for the `highest_education_level_completed` CVC domain.
839
837
  *
840
- * Domain: `highest_education_level_completed` · Version: 1.0.0 · Entries: 13
838
+ * Domain: `highest_education_level_completed` · Version: 1.0.0 · Entries: 12
841
839
  */
842
840
  export const HighestEducationLevelCompletedKeys = {
843
841
  missingness_root: "180-000-000-000-000-000-000",
@@ -852,7 +850,6 @@ export const HighestEducationLevelCompletedKeys = {
852
850
  associates: "180-005-000-000-000-000-000",
853
851
  bachelors: "180-006-000-000-000-000-000",
854
852
  graduate_professional: "180-007-000-000-000-000-000",
855
- trade_vocational: "180-008-000-000-000-000-000",
856
853
  } as const;
857
854
 
858
855
  export type HighestEducationLevelCompletedKey = keyof typeof HighestEducationLevelCompletedKeys;
@@ -1371,7 +1368,7 @@ export type ReferralEntityCategoryKey = keyof typeof ReferralEntityCategoryKeys;
1371
1368
  /**
1372
1369
  * Key → positional code map for the `income_benefits_sources` CVC domain.
1373
1370
  *
1374
- * Domain: `income_benefits_sources` · Version: 1.0.0 · Entries: 41
1371
+ * Domain: `income_benefits_sources` · Version: 1.0.0 · Entries: 38
1375
1372
  */
1376
1373
  export const IncomeBenefitsSourcesKeys = {
1377
1374
  missingness_root: "171-000-000-000-000-000-000",
@@ -1381,7 +1378,6 @@ export const IncomeBenefitsSourcesKeys = {
1381
1378
  prefer_not_to_answer: "171-000-000-000-000-000-004",
1382
1379
  earned_income: "171-001-000-000-000-000-000",
1383
1380
  employment: "171-001-001-000-000-000-000",
1384
- informal_income: "171-001-002-000-000-000-000",
1385
1381
  cash_benefit: "171-002-000-000-000-000-000",
1386
1382
  unemployment_insurance: "171-002-001-000-000-000-000",
1387
1383
  supplemental_security_income: "171-002-002-000-000-000-000",
@@ -1409,12 +1405,10 @@ export const IncomeBenefitsSourcesKeys = {
1409
1405
  transfer_support: "171-004-000-000-000-000-000",
1410
1406
  child_support: "171-004-001-000-000-000-000",
1411
1407
  alimony_spousal_support: "171-004-002-000-000-000-000",
1412
- family_friend_support: "171-004-003-000-000-000-000",
1413
1408
  other_unspecified: "171-005-000-000-000-000-000",
1414
1409
  other_income: "171-005-001-000-000-000-000",
1415
1410
  other_benefit: "171-005-002-000-000-000-000",
1416
1411
  education_stipend: "171-005-003-000-000-000-000",
1417
- victim_compensation: "171-006-000-000-000-000-000",
1418
1412
  } as const;
1419
1413
 
1420
1414
  export type IncomeBenefitsSourcesKey = keyof typeof IncomeBenefitsSourcesKeys;
@@ -1521,7 +1515,7 @@ export type SourceCategoryKey = keyof typeof SourceCategoryKeys;
1521
1515
  /**
1522
1516
  * Key → positional code map for the `source_subtype` CVC domain.
1523
1517
  *
1524
- * Domain: `source_subtype` · Version: 1.1.0 · Entries: 39
1518
+ * Domain: `source_subtype` · Version: 1.1.0 · Entries: 35
1525
1519
  */
1526
1520
  export const SourceSubtypeKeys = {
1527
1521
  missingness_root: "141-000-000-000-000-000-000",
@@ -1559,10 +1553,6 @@ export const SourceSubtypeKeys = {
1559
1553
  system_import: "141-029-000-000-000-000-000",
1560
1554
  third_party_report: "141-030-000-000-000-000-000",
1561
1555
  victim_disclosure: "141-031-000-000-000-000-000",
1562
- advocate_capture: "141-032-000-000-000-000-000",
1563
- advocate_assessment: "141-033-000-000-000-000-000",
1564
- child_welfare_episode_edit: "141-034-000-000-000-000-000",
1565
- juvenile_justice_episode_edit: "141-035-000-000-000-000-000",
1566
1556
  } as const;
1567
1557
 
1568
1558
  export type SourceSubtypeKey = keyof typeof SourceSubtypeKeys;
@@ -1643,7 +1633,7 @@ export type TimeScopeKey = keyof typeof TimeScopeKeys;
1643
1633
  /**
1644
1634
  * Key → positional code map for the `verification_method` CVC domain.
1645
1635
  *
1646
- * Domain: `verification_method` · Version: 1.0.0 · Entries: 11
1636
+ * Domain: `verification_method` · Version: 1.0.0 · Entries: 9
1647
1637
  */
1648
1638
  export const VerificationMethodKeys = {
1649
1639
  missingness_root: "143-000-000-000-000-000-000",
@@ -1655,8 +1645,6 @@ export const VerificationMethodKeys = {
1655
1645
  multi_source_corroboration: "143-003-000-000-000-000-000",
1656
1646
  qa_audit_passed: "143-004-000-000-000-000-000",
1657
1647
  supervisor_review: "143-005-000-000-000-000-000",
1658
- rules: "143-006-000-000-000-000-000",
1659
- still_reaches: "143-007-000-000-000-000-000",
1660
1648
  } as const;
1661
1649
 
1662
1650
  export type VerificationMethodKey = keyof typeof VerificationMethodKeys;
@@ -2784,7 +2772,7 @@ export type HopeScaleTierKey = keyof typeof HopeScaleTierKeys;
2784
2772
  /**
2785
2773
  * Key → positional code map for the `identification_status` CVC domain.
2786
2774
  *
2787
- * Domain: `identification_status` · Version: 1.0.0 · Entries: 9
2775
+ * Domain: `identification_status` · Version: 1.0.0 · Entries: 7
2788
2776
  */
2789
2777
  export const IdentificationStatusKeys = {
2790
2778
  missingness_root: "929-000-000-000-000-000-000",
@@ -2794,8 +2782,6 @@ export const IdentificationStatusKeys = {
2794
2782
  identified: "929-001-000-000-000-000-000",
2795
2783
  unidentified: "929-002-000-000-000-000-000",
2796
2784
  anonymous_posture: "929-003-000-000-000-000-000",
2797
- estimated_persona: "929-004-000-000-000-000-000",
2798
- confirmed: "929-005-000-000-000-000-000",
2799
2785
  } as const;
2800
2786
 
2801
2787
  export type IdentificationStatusKey = keyof typeof IdentificationStatusKeys;
@@ -3317,412 +3303,3 @@ export const ThreadTypeKeys = {
3317
3303
  } as const;
3318
3304
 
3319
3305
  export type ThreadTypeKey = keyof typeof ThreadTypeKeys;
3320
-
3321
- /**
3322
- * Key → positional code map for the `living_situation` CVC domain.
3323
- *
3324
- * Domain: `living_situation` · Version: 1.0.0 · Entries: 22
3325
- */
3326
- export const LivingSituationKeys = {
3327
- missingness_root: "192-000-000-000-000-000-000",
3328
- unknown: "192-000-000-000-000-000-001",
3329
- anonymous: "192-000-000-000-000-000-002",
3330
- data_not_collected: "192-000-000-000-000-000-003",
3331
- unsheltered: "192-001-000-000-000-000-000",
3332
- emergency_shelter: "192-002-000-000-000-000-000",
3333
- safe_haven: "192-003-000-000-000-000-000",
3334
- dv_shelter_safe_house: "192-004-000-000-000-000-000",
3335
- homeless_unspecified: "192-005-000-000-000-000-000",
3336
- hospital_medical: "192-006-000-000-000-000-000",
3337
- psychiatric_residential_facility: "192-007-000-000-000-000-000",
3338
- substance_use_treatment_residential: "192-008-000-000-000-000-000",
3339
- incarcerated: "192-009-000-000-000-000-000",
3340
- cw_foster_care: "192-010-000-000-000-000-000",
3341
- cw_kinship: "192-011-000-000-000-000-000",
3342
- long_term_care: "192-012-000-000-000-000-000",
3343
- transitional_housing_program: "192-013-000-000-000-000-000",
3344
- temp_housing_program: "192-014-000-000-000-000-000",
3345
- hotel_motel_non_shelter: "192-015-000-000-000-000-000",
3346
- own_rent: "192-016-000-000-000-000-000",
3347
- with_family_friends: "192-017-000-000-000-000-000",
3348
- other: "192-018-000-000-000-000-000",
3349
- } as const;
3350
-
3351
- export type LivingSituationKey = keyof typeof LivingSituationKeys;
3352
-
3353
- /**
3354
- * Key → positional code map for the `service_audience` CVC domain.
3355
- *
3356
- * Domain: `service_audience` · Version: 1.0.0 · Entries: 9
3357
- */
3358
- export const ServiceAudienceKeys = {
3359
- missingness_root: "045-000-000-000-000-000-000",
3360
- unknown: "045-000-000-000-000-000-001",
3361
- anonymous: "045-000-000-000-000-000-002",
3362
- data_not_collected: "045-000-000-000-000-000-003",
3363
- primary_victim: "045-001-000-000-000-000-000",
3364
- eligible_family_member: "045-002-000-000-000-000-000",
3365
- third_party: "045-003-000-000-000-000-000",
3366
- offender: "045-004-000-000-000-000-000",
3367
- personnel: "045-005-000-000-000-000-000",
3368
- } as const;
3369
-
3370
- export type ServiceAudienceKey = keyof typeof ServiceAudienceKeys;
3371
-
3372
- /**
3373
- * Key → positional code map for the `hmis_relationship_to_hoh` CVC domain.
3374
- *
3375
- * Domain: `hmis_relationship_to_hoh` · Version: 1.0.0 · Entries: 9
3376
- */
3377
- export const HmisRelationshipToHohKeys = {
3378
- missingness_root: "129-000-000-000-000-000-000",
3379
- unknown: "129-000-000-000-000-000-001",
3380
- anonymous: "129-000-000-000-000-000-002",
3381
- data_not_collected: "129-000-000-000-000-000-003",
3382
- self_hoh: "129-001-000-000-000-000-000",
3383
- child_of_hoh: "129-002-000-000-000-000-000",
3384
- spouse_or_partner_of_hoh: "129-003-000-000-000-000-000",
3385
- other_relative_of_hoh: "129-004-000-000-000-000-000",
3386
- non_relation_member: "129-005-000-000-000-000-000",
3387
- } as const;
3388
-
3389
- export type HmisRelationshipToHohKey = keyof typeof HmisRelationshipToHohKeys;
3390
-
3391
- /**
3392
- * Key → positional code map for the `victim_abuse_types` CVC domain.
3393
- *
3394
- * Domain: `victim_abuse_types` · Version: 1.0.0 · Entries: 29
3395
- */
3396
- export const VictimAbuseTypesKeys = {
3397
- missingness_root: "073-000-000-000-000-000-000",
3398
- unknown: "073-000-000-000-000-000-001",
3399
- anonymous: "073-000-000-000-000-000-002",
3400
- data_not_collected: "073-000-000-000-000-000-003",
3401
- adult_physical_assault: "073-001-000-000-000-000-000",
3402
- adult_sexual_assault: "073-002-000-000-000-000-000",
3403
- arson: "073-003-000-000-000-000-000",
3404
- bullying: "073-004-000-000-000-000-000",
3405
- burglary: "073-005-000-000-000-000-000",
3406
- child_physical_abuse_or_neglect: "073-006-000-000-000-000-000",
3407
- child_pornography: "073-007-000-000-000-000-000",
3408
- child_sexual_abuse_assault: "073-008-000-000-000-000-000",
3409
- domestic_and_or_family_violence: "073-009-000-000-000-000-000",
3410
- dui_dwi_incidents: "073-010-000-000-000-000-000",
3411
- elder_abuse: "073-011-000-000-000-000-000",
3412
- gang_violence: "073-012-000-000-000-000-000",
3413
- hate_crime: "073-013-000-000-000-000-000",
3414
- homicide: "073-014-000-000-000-000-000",
3415
- identity_theft: "073-015-000-000-000-000-000",
3416
- kidnapping_custodial: "073-016-000-000-000-000-000",
3417
- kidnapping_noncustodial: "073-017-000-000-000-000-000",
3418
- mass_violence: "073-018-000-000-000-000-000",
3419
- other: "073-019-000-000-000-000-000",
3420
- other_vehicular: "073-020-000-000-000-000-000",
3421
- robbery: "073-021-000-000-000-000-000",
3422
- stalking_harassment: "073-022-000-000-000-000-000",
3423
- survivors_of_homicide_victims: "073-023-000-000-000-000-000",
3424
- teen_dating_victimization: "073-024-000-000-000-000-000",
3425
- terrorism: "073-025-000-000-000-000-000",
3426
- } as const;
3427
-
3428
- export type VictimAbuseTypesKey = keyof typeof VictimAbuseTypesKeys;
3429
-
3430
- /**
3431
- * Key → positional code map for the `ht_type` CVC domain.
3432
- *
3433
- * Domain: `ht_type` · Version: 1.0.0 · Entries: 8
3434
- */
3435
- export const HtTypeKeys = {
3436
- missingness_root: "072-000-000-000-000-000-000",
3437
- unknown: "072-000-000-000-000-000-001",
3438
- anonymous: "072-000-000-000-000-000-002",
3439
- data_not_collected: "072-000-000-000-000-000-003",
3440
- sex: "072-001-000-000-000-000-000",
3441
- labor: "072-002-000-000-000-000-000",
3442
- sex_and_labor: "072-003-000-000-000-000-000",
3443
- none: "072-004-000-000-000-000-000",
3444
- } as const;
3445
-
3446
- export type HtTypeKey = keyof typeof HtTypeKeys;
3447
-
3448
- /**
3449
- * Key → positional code map for the `relationship_concern` CVC domain (PROVISIONAL CVC-231 — pending codebook ratification).
3450
- *
3451
- * Domain: `relationship_concern` · Version: 1.0.0 · Entries: 11
3452
- */
3453
- export const RelationshipConcernKeys = {
3454
- missingness_root: "231-000-000-000-000-000-000",
3455
- unknown: "231-000-000-000-000-000-001",
3456
- anonymous: "231-000-000-000-000-000-002",
3457
- data_not_collected: "231-000-000-000-000-000-003",
3458
- appears_controlling: "231-001-000-000-000-000-000",
3459
- is_much_older: "231-002-000-000-000-000-000",
3460
- physically_abusive: "231-003-000-000-000-000-000",
3461
- emotionally_abusive: "231-004-000-000-000-000-000",
3462
- has_legal_involvement: "231-005-000-000-000-000-000",
3463
- is_known_trafficker_or_suspect: "231-006-000-000-000-000-000",
3464
- other_concern: "231-007-000-000-000-000-000",
3465
- } as const;
3466
-
3467
- export type RelationshipConcernKey = keyof typeof RelationshipConcernKeys;
3468
-
3469
- /**
3470
- * Key → positional code map for the `recency_band` CVC domain (PROVISIONAL CVC-232 — pending codebook ratification).
3471
- *
3472
- * Domain: `recency_band` · Version: 1.0.0 · Entries: 10
3473
- */
3474
- export const RecencyBandKeys = {
3475
- missingness_root: "232-000-000-000-000-000-000",
3476
- unknown: "232-000-000-000-000-000-001",
3477
- anonymous: "232-000-000-000-000-000-002",
3478
- data_not_collected: "232-000-000-000-000-000-003",
3479
- within_3_months: "232-001-000-000-000-000-000",
3480
- months_3_to_6: "232-002-000-000-000-000-000",
3481
- months_6_to_12: "232-003-000-000-000-000-000",
3482
- one_year_or_more: "232-004-000-000-000-000-000",
3483
- years_3_to_10: "232-005-000-000-000-000-000",
3484
- ten_plus_years: "232-006-000-000-000-000-000",
3485
- } as const;
3486
-
3487
- export type RecencyBandKey = keyof typeof RecencyBandKeys;
3488
-
3489
- /**
3490
- * Key → positional code map for the `housing_subsidy_types` CVC domain (PROVISIONAL CVC-233 — pending codebook ratification).
3491
- *
3492
- * Domain: `housing_subsidy_types` · Version: 1.0.0 · Entries: 16
3493
- */
3494
- export const HousingSubsidyTypesKeys = {
3495
- missingness_root: "233-000-000-000-000-000-000",
3496
- unknown: "233-000-000-000-000-000-001",
3497
- anonymous: "233-000-000-000-000-000-002",
3498
- data_not_collected: "233-000-000-000-000-000-003",
3499
- housing_choice_voucher: "233-001-000-000-000-000-000",
3500
- public_housing: "233-002-000-000-000-000-000",
3501
- project_based_rental_assistance: "233-003-000-000-000-000-000",
3502
- permanent_supportive_housing: "233-004-000-000-000-000-000",
3503
- rapid_rehousing_assistance: "233-005-000-000-000-000-000",
3504
- other_housing_subsidy: "233-006-000-000-000-000-000",
3505
- no_subsidy: "233-007-000-000-000-000-000",
3506
- va_supportive_housing: "233-008-000-000-000-000-000",
3507
- grant_per_diem_transition_in_place: "233-009-000-000-000-000-000",
3508
- housing_stability_voucher: "233-010-000-000-000-000-000",
3509
- family_unification_program: "233-011-000-000-000-000-000",
3510
- foster_youth_to_independence: "233-012-000-000-000-000-000",
3511
- } as const;
3512
-
3513
- export type HousingSubsidyTypesKey = keyof typeof HousingSubsidyTypesKeys;
3514
-
3515
- /**
3516
- * Key → positional code map for the `assertion_domain` CVC domain (CAR assertion domain; PROVISIONAL, pending Notion ratification).
3517
- *
3518
- * Domain: `assertion_domain` · Version: 1.0.0 · Entries: 68
3519
- */
3520
- export const AssertionDomainKeys = {
3521
- missingness_root: "964-000-000-000-000-000-000",
3522
- unknown: "964-000-000-000-000-000-001",
3523
- anonymous: "964-000-000-000-000-000-002",
3524
- data_not_collected: "964-000-000-000-000-000-003",
3525
- indicator: "964-001-000-000-000-000-000",
3526
- risk_signal: "964-002-000-000-000-000-000",
3527
- victim_status: "964-003-000-000-000-000-000",
3528
- offender_status: "964-004-000-000-000-000-000",
3529
- domain_determination: "964-005-000-000-000-000-000",
3530
- victimization_or_abuse_type: "964-006-000-000-000-000-000",
3531
- assessment_scale: "964-007-000-000-000-000-000",
3532
- recommended_followup: "964-008-000-000-000-000-000",
3533
- relationship: "964-009-000-000-000-000-000",
3534
- household_relationships: "964-010-000-000-000-000-000",
3535
- relationship_tie: "964-011-000-000-000-000-000",
3536
- relationship_dynamics: "964-012-000-000-000-000-000",
3537
- relationship_status_current: "964-013-000-000-000-000-000",
3538
- marital_status_legal: "964-014-000-000-000-000-000",
3539
- core_profile: "964-015-000-000-000-000-000",
3540
- person_tile: "964-016-000-000-000-000-000",
3541
- person_relationship: "964-017-000-000-000-000-000",
3542
- relevant_people: "964-018-000-000-000-000-000",
3543
- name: "964-019-000-000-000-000-000",
3544
- contact_info: "964-020-000-000-000-000-000",
3545
- address: "964-021-000-000-000-000-000",
3546
- vehicle: "964-022-000-000-000-000-000",
3547
- income_history: "964-023-000-000-000-000-000",
3548
- physical_description: "964-024-000-000-000-000-000",
3549
- living_situation: "964-025-000-000-000-000-000",
3550
- pet: "964-026-000-000-000-000-000",
3551
- protection_order: "964-027-000-000-000-000-000",
3552
- log_entry: "964-028-000-000-000-000-000",
3553
- session_note: "964-029-000-000-000-000-000",
3554
- referral_source: "964-030-000-000-000-000-000",
3555
- org_directory: "964-031-000-000-000-000-000",
3556
- person_directory: "964-032-000-000-000-000-000",
3557
- service_delivery: "964-033-000-000-000-000-000",
3558
- needs_assessment: "964-034-000-000-000-000-000",
3559
- priorities_and_safety: "964-035-000-000-000-000-000",
3560
- share: "964-036-000-000-000-000-000",
3561
- roi: "964-037-000-000-000-000-000",
3562
- external_recipient: "964-038-000-000-000-000-000",
3563
- access_accommodations: "964-039-000-000-000-000-000",
3564
- danger_assessment: "964-040-000-000-000-000-000",
3565
- hope_scale: "964-041-000-000-000-000-000",
3566
- injury_and_strangulation: "964-042-000-000-000-000-000",
3567
- lethality_assessment_program: "964-043-000-000-000-000-000",
3568
- occupational_background: "964-044-000-000-000-000-000",
3569
- household_tenure: "964-045-000-000-000-000-000",
3570
- program_enrollment: "964-046-000-000-000-000-000",
3571
- program_enrollment_exit_wizard: "964-047-000-000-000-000-000",
3572
- goal: "964-048-000-000-000-000-000",
3573
- action_step: "964-049-000-000-000-000-000",
3574
- milestone: "964-050-000-000-000-000-000",
3575
- check_in: "964-051-000-000-000-000-000",
3576
- goal_signature: "964-052-000-000-000-000-000",
3577
- subject_functional_role: "964-053-000-000-000-000-000",
3578
- worker_subrole: "964-054-000-000-000-000-000",
3579
- offender_status_family: "964-055-000-000-000-000-000",
3580
- assessment_rating: "964-056-000-000-000-000-000",
3581
- immigration_legal_status: "964-057-000-000-000-000-000",
3582
- persons_network: "964-058-000-000-000-000-000",
3583
- lifecycle_services: "964-059-000-000-000-000-000",
3584
- juvenile_justice_involvement: "964-060-000-000-000-000-000",
3585
- child_welfare_involvement: "964-061-000-000-000-000-000",
3586
- facilitator_role: "964-062-000-000-000-000-000",
3587
- facilitator_subrole: "964-063-000-000-000-000-000",
3588
- facilitator_entity_type: "964-064-000-000-000-000-000",
3589
- } as const;
3590
-
3591
- export type AssertionDomainKey = keyof typeof AssertionDomainKeys;
3592
-
3593
- /**
3594
- * Key → positional code map for the `activity_type` CVC domain (activity type; PROVISIONAL, pending Notion ratification).
3595
- *
3596
- * Domain: `activity_type` · Version: 1.0.0 · Entries: 14
3597
- */
3598
- export const ActivityTypeKeys = {
3599
- missingness_root: "965-000-000-000-000-000-000",
3600
- unknown: "965-000-000-000-000-000-001",
3601
- anonymous: "965-000-000-000-000-000-002",
3602
- data_not_collected: "965-000-000-000-000-000-003",
3603
- resided: "965-001-000-000-000-000-000",
3604
- sheltered: "965-002-000-000-000-000-000",
3605
- service_delivered: "965-003-000-000-000-000-000",
3606
- met: "965-004-000-000-000-000-000",
3607
- advertised: "965-005-000-000-000-000-000",
3608
- arrested: "965-006-000-000-000-000-000",
3609
- visited: "965-007-000-000-000-000-000",
3610
- child_welfare_visit: "965-008-000-000-000-000-000",
3611
- incident: "965-009-000-000-000-000-000",
3612
- other: "965-010-000-000-000-000-000",
3613
- } as const;
3614
-
3615
- export type ActivityTypeKey = keyof typeof ActivityTypeKeys;
3616
-
3617
- /**
3618
- * Key → positional code map for the `provenance_source_id` CVC domain (provenance source id; PROVISIONAL, pending Notion ratification).
3619
- *
3620
- * Domain: `provenance_source_id` · Version: 1.0.0 · Entries: 13
3621
- */
3622
- export const ProvenanceSourceIdKeys = {
3623
- missingness_root: "966-000-000-000-000-000-000",
3624
- unknown: "966-000-000-000-000-000-001",
3625
- anonymous: "966-000-000-000-000-000-002",
3626
- data_not_collected: "966-000-000-000-000-000-003",
3627
- client_self_report: "966-001-000-000-000-000-000",
3628
- system_derived_ads: "966-002-000-000-000-000-000",
3629
- system_derived_geocoder: "966-003-000-000-000-000-000",
3630
- staff_observation: "966-004-000-000-000-000-000",
3631
- intake_form: "966-005-000-000-000-000-000",
3632
- referral_partner: "966-006-000-000-000-000-000",
3633
- law_enforcement: "966-007-000-000-000-000-000",
3634
- id_document: "966-008-000-000-000-000-000",
3635
- social_profile: "966-009-000-000-000-000-000",
3636
- } as const;
3637
-
3638
- export type ProvenanceSourceIdKey = keyof typeof ProvenanceSourceIdKeys;
3639
-
3640
- /**
3641
- * Key → positional code map for the `radius_bucket` CVC domain (search radius bucket; PROVISIONAL, pending Notion ratification).
3642
- *
3643
- * Domain: `radius_bucket` · Version: 1.0.0 · Entries: 9
3644
- */
3645
- export const RadiusBucketKeys = {
3646
- missingness_root: "967-000-000-000-000-000-000",
3647
- unknown: "967-000-000-000-000-000-001",
3648
- anonymous: "967-000-000-000-000-000-002",
3649
- data_not_collected: "967-000-000-000-000-000-003",
3650
- 10: "967-001-000-000-000-000-000",
3651
- 50: "967-002-000-000-000-000-000",
3652
- 100: "967-003-000-000-000-000-000",
3653
- 250: "967-004-000-000-000-000-000",
3654
- 500: "967-005-000-000-000-000-000",
3655
- } as const;
3656
-
3657
- export type RadiusBucketKey = keyof typeof RadiusBucketKeys;
3658
-
3659
- /**
3660
- * Key → positional code map for the `contact_link_type` CVC domain (contact link type; PROVISIONAL, pending Notion ratification).
3661
- *
3662
- * Domain: `contact_link_type` · Version: 1.0.0 · Entries: 8
3663
- */
3664
- export const ContactLinkTypeKeys = {
3665
- missingness_root: "968-000-000-000-000-000-000",
3666
- unknown: "968-000-000-000-000-000-001",
3667
- anonymous: "968-000-000-000-000-000-002",
3668
- data_not_collected: "968-000-000-000-000-000-003",
3669
- belongs: "968-001-000-000-000-000-000",
3670
- associated: "968-002-000-000-000-000-000",
3671
- advertises: "968-003-000-000-000-000-000",
3672
- contacted: "968-004-000-000-000-000-000",
3673
- } as const;
3674
-
3675
- export type ContactLinkTypeKey = keyof typeof ContactLinkTypeKeys;
3676
-
3677
- /**
3678
- * Key → positional code map for the `suggestion_source` CVC domain (goal suggestion source; PROVISIONAL, pending Notion ratification).
3679
- *
3680
- * Domain: `suggestion_source` · Version: 1.0.0 · Entries: 6
3681
- */
3682
- export const SuggestionSourceKeys = {
3683
- missingness_root: "969-000-000-000-000-000-000",
3684
- unknown: "969-000-000-000-000-000-001",
3685
- anonymous: "969-000-000-000-000-000-002",
3686
- data_not_collected: "969-000-000-000-000-000-003",
3687
- lap: "969-001-000-000-000-000-000",
3688
- ps_step_4: "969-002-000-000-000-000-000",
3689
- } as const;
3690
-
3691
- export type SuggestionSourceKey = keyof typeof SuggestionSourceKeys;
3692
-
3693
- /**
3694
- * Key → positional code map for the `roi_method` CVC domain (ROI delivery method; PROVISIONAL, pending Notion ratification).
3695
- *
3696
- * Domain: `roi_method` · Version: 1.0.0 · Entries: 10
3697
- */
3698
- export const RoiMethodKeys = {
3699
- missingness_root: "970-000-000-000-000-000-000",
3700
- unknown: "970-000-000-000-000-000-001",
3701
- anonymous: "970-000-000-000-000-000-002",
3702
- data_not_collected: "970-000-000-000-000-000-003",
3703
- thread_caseshare: "970-001-000-000-000-000-000",
3704
- thread_magic_link: "970-002-000-000-000-000-000",
3705
- email: "970-003-000-000-000-000-000",
3706
- fax: "970-004-000-000-000-000-000",
3707
- secure_portal: "970-005-000-000-000-000-000",
3708
- in_person: "970-006-000-000-000-000-000",
3709
- } as const;
3710
-
3711
- export type RoiMethodKey = keyof typeof RoiMethodKeys;
3712
-
3713
- /**
3714
- * Key → positional code map for the `session_note_visibility` CVC domain (session-note visibility; PROVISIONAL, pending Notion ratification).
3715
- *
3716
- * Domain: `session_note_visibility` · Version: 1.0.0 · Entries: 7
3717
- */
3718
- export const SessionNoteVisibilityKeys = {
3719
- missingness_root: "971-000-000-000-000-000-000",
3720
- unknown: "971-000-000-000-000-000-001",
3721
- anonymous: "971-000-000-000-000-000-002",
3722
- data_not_collected: "971-000-000-000-000-000-003",
3723
- default: "971-001-000-000-000-000-000",
3724
- account: "971-002-000-000-000-000-000",
3725
- private: "971-003-000-000-000-000-000",
3726
- } as const;
3727
-
3728
- export type SessionNoteVisibilityKey = keyof typeof SessionNoteVisibilityKeys;
package/src/index.ts CHANGED
@@ -88,3 +88,23 @@ export { compileModel as compileCvcEntryModel } from "./models/cvcEntryModel.js"
88
88
  // filesystem access. See `./cvcs/index.ts` for the full list and naming.
89
89
 
90
90
  export * from "./cvcs/index.js";
91
+
92
+ // ─── SOT-first CVC flat-array aliases ───────────────────────────────────────
93
+ // Legacy-shaped `CVC_<N>_VALUES` arrays for CVCs that are SOT-native (no
94
+ // ic.ts constants). Derived from the SOT JSON envelope's `entries` filtered
95
+ // to `selectable: true` so the SOT JSON remains the single source of truth
96
+ // AND the non-selectable `missingness_root` grouping code is excluded (it
97
+ // would otherwise fail schema enum validation on write).
98
+
99
+ import recencyBandSot from "./cvcs/recencyBand.v1.0.0.json" with { type: "json" };
100
+ import juvenileJusticeEpisodeTypeSot from "./cvcs/juvenileJusticeEpisodeType.v1.0.0.json" with { type: "json" };
101
+
102
+ const selectableCodes = (envelope: {
103
+ entries: ReadonlyArray<{ code: string; selectable: boolean }>;
104
+ }): string[] =>
105
+ envelope.entries.filter((e) => e.selectable).map((e) => e.code);
106
+
107
+ export const CVC_137_VALUES: string[] = selectableCodes(recencyBandSot);
108
+ export const CVC_197_VALUES: string[] = selectableCodes(
109
+ juvenileJusticeEpisodeTypeSot,
110
+ );
@@ -42,6 +42,10 @@ export const personNameSchema = new Schema(
42
42
  alias: Boolean,
43
43
  isUnknown: Boolean,
44
44
  isAnonymous: Boolean,
45
+ // Shape flag: this person has only one name (e.g., Madonna). A mononym
46
+ // can itself be legal, a nickname, a trade name, etc. — it's orthogonal
47
+ // to nameType, not a value of it.
48
+ isMononym: Boolean,
45
49
  },
46
50
  { _id: false },
47
51
  );