@htilabs/platform-common-models 0.3.0-beta.5 → 0.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/cvcs/index.cjs +634 -468
  2. package/dist/cvcs/index.cjs.map +1 -1
  3. package/dist/cvcs/index.d.cts +570 -505
  4. package/dist/cvcs/index.d.ts +570 -505
  5. package/dist/cvcs/index.js +634 -467
  6. package/dist/cvcs/index.js.map +1 -1
  7. package/dist/index.cjs +814 -644
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +179 -179
  10. package/dist/index.d.ts +179 -179
  11. package/dist/index.js +814 -642
  12. package/dist/index.js.map +1 -1
  13. package/dist/models/index.cjs +6 -5
  14. package/dist/models/index.cjs.map +1 -1
  15. package/dist/models/index.js +6 -5
  16. package/dist/models/index.js.map +1 -1
  17. package/dist/schemas/index.cjs +4 -3
  18. package/dist/schemas/index.cjs.map +1 -1
  19. package/dist/schemas/index.js +4 -3
  20. package/dist/schemas/index.js.map +1 -1
  21. package/dist/services/index.cjs +6 -5
  22. package/dist/services/index.cjs.map +1 -1
  23. package/dist/services/index.js +6 -5
  24. package/dist/services/index.js.map +1 -1
  25. package/dist/validation/index.cjs +5 -12
  26. package/dist/validation/index.cjs.map +1 -1
  27. package/dist/validation/index.d.cts +32 -31
  28. package/dist/validation/index.d.ts +32 -31
  29. package/dist/validation/index.js +5 -12
  30. package/dist/validation/index.js.map +1 -1
  31. package/package.json +1 -1
  32. package/src/__tests__/__snapshots__/cvc-sot.snap +7 -11
  33. package/src/__tests__/cvc-sot-snapshot.test.ts +8 -8
  34. package/src/__tests__/cvc-structural.test.ts +1 -2
  35. package/src/cvcs/index.ts +5 -6
  36. package/src/cvcs/serviceCategories.v1.0.0.json +560 -430
  37. package/src/cvcs/serviceMechanisms.v1.0.0.json +45 -5
  38. package/src/cvcs/serviceStates.v1.0.0.json +58 -18
  39. package/src/generated/cvc-enums.ts +177 -179
  40. package/src/models/cvcEntryModel.ts +1 -1
  41. package/src/models/cvcRegistryModel.ts +1 -1
  42. package/src/schemas/cvcEntry.ts +3 -2
  43. package/src/schemas/cvcRegistry.ts +3 -2
  44. package/src/validation/cvc.ts +38 -55
  45. package/src/cvcs/missingness.v1.0.0.json +0 -50
@@ -12,176 +12,184 @@
12
12
  /**
13
13
  * Key → positional code map for the `service_categories` CVC domain.
14
14
  *
15
- * Domain: `service_categories` · Version: 1.0.0 · Entries: 147
15
+ * Domain: `service_categories` · Version: 1.0.0 · Entries: 151
16
16
  */
17
17
  export const ServiceCategoryKeys = {
18
- social_support_community_engagement: "01-02-00-00-00-00-00",
19
- cultural_needs_support: "01-02-01-00-00-00-00",
20
- gift_holiday_resources: "01-02-02-00-00-00-00",
21
- peer_facilitated_supportive_group: "01-02-03-00-00-00-00",
22
- community_service_learning: "01-02-04-00-00-00-00",
23
- survivor_support_psychoeducation: "01-02-05-00-00-00-00",
24
- financial_and_employment: "01-03-00-00-00-00-00",
25
- financial_support: "01-03-01-00-00-00-00",
26
- emergency_financial_assistance: "01-03-01-01-00-00-00",
27
- employment_support: "01-03-02-00-00-00-00",
28
- supported_employment: "01-03-02-01-00-00-00",
29
- employment_assistance_job_search: "01-03-02-02-00-00-00",
30
- job_vocation_training: "01-03-02-03-00-00-00",
31
- healthcare: "01-04-00-00-00-00-00",
32
- medical: "01-04-01-00-00-00-00",
33
- emergency_medical_care: "01-04-01-01-00-00-00",
34
- forensic_exam_interview: "01-04-01-02-00-00-00",
35
- dv_exam: "01-04-01-02-01-00-00",
36
- sane_exam: "01-04-01-02-02-00-00",
37
- std_testing: "01-04-01-02-03-00-00",
38
- specialized_assessments: "01-04-01-02-04-00-00",
39
- counseling_evaluation_assessment: "01-04-01-02-04-01-00",
40
- stalking_assessment: "01-04-01-02-04-02-00",
41
- danger_assessment: "01-04-01-02-04-03-00",
42
- indepth_assessment: "01-04-01-02-04-04-00",
43
- outpatient_medical: "01-04-01-03-00-00-00",
44
- dental: "01-04-01-03-01-00-00",
45
- vision: "01-04-01-03-02-00-00",
46
- tattoo_removal: "01-04-01-03-03-00-00",
47
- pet_medical: "01-04-01-03-04-00-00",
48
- pregnancy_care: "01-04-01-04-00-00-00",
49
- prenatal_care: "01-04-01-04-01-00-00",
50
- postnatal_care_client: "01-04-01-04-02-00-00",
51
- postnatal_care_newborn: "01-04-01-04-03-00-00",
52
- emotional_support_mental_health: "01-04-02-00-00-00-00",
53
- individual_counseling: "01-04-02-01-00-00-00",
54
- group_counseling: "01-04-02-02-00-00-00",
55
- family_counseling: "01-04-02-03-00-00-00",
56
- counseling_treatment_planning: "01-04-02-04-00-00-00",
57
- counseling_treatment_plan_review: "01-04-02-05-00-00-00",
58
- behavioral_occupational_support: "01-04-02-06-00-00-00",
59
- substance_abuse_treatment: "01-04-02-06-01-00-00",
60
- coping_strategy_support: "01-04-02-06-02-00-00",
61
- other_therapy: "01-04-02-07-00-00-00",
62
- housing_services: "01-05-00-00-00-00-00",
63
- emergency_shelter: "01-05-01-00-00-00-00",
64
- day_shelter_dropin: "01-05-01-01-00-00-00",
65
- host_homes_safe_homes: "01-05-01-02-00-00-00",
66
- congregate_shelter_bednight: "01-05-01-03-00-00-00",
67
- emergency_hotel_motel: "01-05-01-04-00-00-00",
68
- night_by_night_shelter: "01-05-01-05-00-00-00",
69
- transitional_housing: "01-05-02-00-00-00-00",
70
- housing_renovation_modification: "01-05-03-00-00-00-00",
71
- household_setup_goods: "01-05-03-01-00-00-00",
72
- housing_navigation_placement: "01-05-04-00-00-00-00",
73
- housing_financial_assistance: "01-05-04-01-00-00-00",
74
- rental_payment_assistance: "01-05-04-01-01-00-00",
75
- security_deposit_allowance: "01-05-04-01-01-01-00",
76
- utility_assistance: "01-05-04-01-01-02-00",
77
- relocation_moving_assistance: "01-05-04-02-00-00-00",
78
- housing_stabilization_eviction_prevention: "01-05-05-00-00-00-00",
79
- tenant_based_scattered_site: "01-05-06-00-00-00-00",
80
- legal_services: "01-06-00-00-00-00-00",
81
- immigration_relief: "01-06-01-00-00-00-00",
82
- repatriation: "01-06-01-01-00-00-00",
83
- family_law: "01-06-02-00-00-00-00",
84
- criminal_support: "01-06-03-00-00-00-00",
85
- victim_impact_statement: "01-06-03-01-00-00-00",
86
- perpetrator_accountability: "01-06-03-02-00-00-00",
87
- victim_compensation: "01-06-03-03-00-00-00",
88
- victims_rights_representation: "01-06-03-04-00-00-00",
89
- criminal_record_relief: "01-06-03-05-00-00-00",
90
- civil_support: "01-06-04-00-00-00-00",
91
- protection_restraining_orders: "01-06-04-01-00-00-00",
92
- public_benefits_law: "01-06-04-02-00-00-00",
93
- emergency_safety_assistance: "01-06-05-00-00-00-00",
94
- basic_needs: "01-07-00-00-00-00-00",
95
- clothing_shoes_accessories: "01-07-01-00-00-00-00",
96
- elder_assistance: "01-07-01-01-00-00-00",
97
- food: "01-07-02-00-00-00-00",
98
- over_the_counter_medications: "01-07-03-00-00-00-00",
99
- immediate_safety_planning: "01-07-04-00-00-00-00",
100
- emergency_crisis_safety_support: "01-07-04-01-00-00-00",
101
- hygiene_items_personal_care: "01-07-05-00-00-00-00",
102
- communications_connectivity: "01-07-06-00-00-00-00",
103
- interpreter_services: "01-07-07-00-00-00-00",
104
- informal_education_life_skills: "01-08-00-00-00-00-00",
105
- basic_life_skills_self_care: "01-08-01-00-00-00-00",
106
- accessibility_disability_support: "01-08-02-00-00-00-00",
107
- parenting_education: "01-08-03-00-00-00-00",
108
- learning_language_classes: "01-08-04-00-00-00-00",
109
- transportation: "01-09-00-00-00-00-00",
110
- transportation_assistance_direct: "01-09-01-00-00-00-00",
111
- transportation_direct_emergency: "01-09-01-01-00-00-00",
112
- taxi_rideshare_voucher: "01-09-02-00-00-00-00",
113
- taxi_rideshare_emergency: "01-09-02-01-00-00-00",
114
- bus_fare_pass: "01-09-03-00-00-00-00",
115
- bus_fare_pass_emergency: "01-09-03-01-00-00-00",
116
- gift_card_gas_card: "01-09-04-00-00-00-00",
117
- gift_card_gas_card_emergency: "01-09-04-01-00-00-00",
118
- airline_tickets: "01-09-05-00-00-00-00",
119
- airline_tickets_emergency: "01-09-05-01-00-00-00",
120
- dependents: "01-10-00-00-00-00-00",
121
- pet_care: "01-10-01-00-00-00-00",
122
- child_care: "01-10-02-00-00-00-00",
123
- childrens_activities: "01-10-02-01-00-00-00",
124
- children_youth_baby_supplies: "01-10-02-01-01-00-00",
125
- case_coordination: "01-11-00-00-00-00-00",
126
- advocacy: "01-11-01-00-00-00-00",
127
- medical_advocacy: "01-11-01-01-00-00-00",
128
- advocacy_emergency_medical: "01-11-01-01-01-00-00",
129
- advocacy_forensic_exam: "01-11-01-01-02-00-00",
130
- court_advocacy: "01-11-01-02-00-00-00",
131
- crime_scene_clean_up: "01-11-01-02-01-00-00",
132
- family_reunification: "01-11-01-02-02-00-00",
133
- law_enforcement_interview_support: "01-11-01-02-03-00-00",
134
- prosecution_interview_advocacy: "01-11-01-02-04-00-00",
135
- immigration_advocacy_support: "01-11-01-02-05-00-00",
136
- documentation_records_retrieval: "01-11-01-03-00-00-00",
137
- obtaining_insurance: "01-11-01-03-01-00-00",
138
- drivers_car_insurance: "01-11-01-03-01-01-00",
139
- medical_insurance: "01-11-01-03-01-02-00",
140
- obtaining_drivers_license: "01-11-01-03-02-00-00",
141
- faith_resource: "01-11-01-04-00-00-00",
142
- banking_notary: "01-11-01-05-00-00-00",
143
- income_benefits_navigation: "01-11-01-06-00-00-00",
144
- government_services_special_programs: "01-11-01-06-01-00-00",
145
- intervention_employer_creditor_academic: "01-11-01-07-00-00-00",
146
- formal_education_academic_support: "01-11-01-07-01-00-00",
147
- adult_school_ged: "01-11-01-07-01-01-00",
148
- child_school_enrollment: "01-11-01-07-01-02-00",
149
- intake: "01-11-02-00-00-00-00",
150
- screening: "01-11-02-01-00-00-00",
151
- housing_eligibility_determination: "01-11-02-01-01-00-00",
152
- coordinated_entry: "01-11-02-01-01-01-00",
153
- behavioral_issues_screen: "01-11-02-01-02-00-00",
154
- initial_screen: "01-11-02-01-03-00-00",
155
- needs_assessment: "01-11-02-01-04-00-00",
156
- tvap: "01-11-02-01-05-00-00",
157
- case_management_supportive_services: "01-11-03-00-00-00-00",
158
- intra_agency_provider_coordination: "01-11-03-01-00-00-00",
159
- inter_agency_consultation: "01-11-03-02-00-00-00",
160
- service_plan: "01-11-03-03-00-00-00",
161
- hope_scale_and_plan: "01-11-03-03-01-00-00",
162
- post_exit_plan: "01-11-03-04-00-00-00",
163
- advanced_directives: "01-11-03-05-00-00-00",
164
- other_services: "01-12-00-00-00-00-00",
18
+ missingness_root: "022-000-000-000-000-000-000",
19
+ unknown: "022-000-000-000-000-000-001",
20
+ anonymous: "022-000-000-000-000-000-002",
21
+ data_not_collected: "022-000-000-000-000-000-003",
22
+ social_support_community_engagement: "022-002-000-000-000-000-000",
23
+ cultural_needs_support: "022-002-001-000-000-000-000",
24
+ gift_holiday_resources: "022-002-002-000-000-000-000",
25
+ peer_facilitated_supportive_group: "022-002-003-000-000-000-000",
26
+ community_service_learning: "022-002-004-000-000-000-000",
27
+ survivor_support_psychoeducation: "022-002-005-000-000-000-000",
28
+ financial_and_employment: "022-003-000-000-000-000-000",
29
+ financial_support: "022-003-001-000-000-000-000",
30
+ emergency_financial_assistance: "022-003-001-001-000-000-000",
31
+ employment_support: "022-003-002-000-000-000-000",
32
+ supported_employment: "022-003-002-001-000-000-000",
33
+ employment_assistance_job_search: "022-003-002-002-000-000-000",
34
+ job_vocation_training: "022-003-002-003-000-000-000",
35
+ healthcare: "022-004-000-000-000-000-000",
36
+ medical: "022-004-001-000-000-000-000",
37
+ emergency_medical_care: "022-004-001-001-000-000-000",
38
+ forensic_exam_interview: "022-004-001-002-000-000-000",
39
+ dv_exam: "022-004-001-002-001-000-000",
40
+ sane_exam: "022-004-001-002-002-000-000",
41
+ std_testing: "022-004-001-002-003-000-000",
42
+ specialized_assessments: "022-004-001-002-004-000-000",
43
+ counseling_evaluation_assessment: "022-004-001-002-004-001-000",
44
+ stalking_assessment: "022-004-001-002-004-002-000",
45
+ danger_assessment: "022-004-001-002-004-003-000",
46
+ indepth_assessment: "022-004-001-002-004-004-000",
47
+ outpatient_medical: "022-004-001-003-000-000-000",
48
+ dental: "022-004-001-003-001-000-000",
49
+ vision: "022-004-001-003-002-000-000",
50
+ tattoo_removal: "022-004-001-003-003-000-000",
51
+ pet_medical: "022-004-001-003-004-000-000",
52
+ pregnancy_care: "022-004-001-004-000-000-000",
53
+ prenatal_care: "022-004-001-004-001-000-000",
54
+ postnatal_care_client: "022-004-001-004-002-000-000",
55
+ postnatal_care_newborn: "022-004-001-004-003-000-000",
56
+ emotional_support_mental_health: "022-004-002-000-000-000-000",
57
+ individual_counseling: "022-004-002-001-000-000-000",
58
+ group_counseling: "022-004-002-002-000-000-000",
59
+ family_counseling: "022-004-002-003-000-000-000",
60
+ counseling_treatment_planning: "022-004-002-004-000-000-000",
61
+ counseling_treatment_plan_review: "022-004-002-005-000-000-000",
62
+ behavioral_occupational_support: "022-004-002-006-000-000-000",
63
+ substance_abuse_treatment: "022-004-002-006-001-000-000",
64
+ coping_strategy_support: "022-004-002-006-002-000-000",
65
+ other_therapy: "022-004-002-007-000-000-000",
66
+ housing_services: "022-005-000-000-000-000-000",
67
+ emergency_shelter: "022-005-001-000-000-000-000",
68
+ day_shelter_dropin: "022-005-001-001-000-000-000",
69
+ host_homes_safe_homes: "022-005-001-002-000-000-000",
70
+ congregate_shelter_bednight: "022-005-001-003-000-000-000",
71
+ emergency_hotel_motel: "022-005-001-004-000-000-000",
72
+ night_by_night_shelter: "022-005-001-005-000-000-000",
73
+ transitional_housing: "022-005-002-000-000-000-000",
74
+ housing_renovation_modification: "022-005-003-000-000-000-000",
75
+ household_setup_goods: "022-005-003-001-000-000-000",
76
+ housing_navigation_placement: "022-005-004-000-000-000-000",
77
+ housing_financial_assistance: "022-005-004-001-000-000-000",
78
+ rental_payment_assistance: "022-005-004-001-001-000-000",
79
+ security_deposit_allowance: "022-005-004-001-001-001-000",
80
+ utility_assistance: "022-005-004-001-001-002-000",
81
+ relocation_moving_assistance: "022-005-004-002-000-000-000",
82
+ housing_stabilization_eviction_prevention: "022-005-005-000-000-000-000",
83
+ tenant_based_scattered_site: "022-005-006-000-000-000-000",
84
+ legal_services: "022-006-000-000-000-000-000",
85
+ immigration_relief: "022-006-001-000-000-000-000",
86
+ repatriation: "022-006-001-001-000-000-000",
87
+ family_law: "022-006-002-000-000-000-000",
88
+ criminal_support: "022-006-003-000-000-000-000",
89
+ victim_impact_statement: "022-006-003-001-000-000-000",
90
+ perpetrator_accountability: "022-006-003-002-000-000-000",
91
+ victim_compensation: "022-006-003-003-000-000-000",
92
+ victims_rights_representation: "022-006-003-004-000-000-000",
93
+ criminal_record_relief: "022-006-003-005-000-000-000",
94
+ civil_support: "022-006-004-000-000-000-000",
95
+ protection_restraining_orders: "022-006-004-001-000-000-000",
96
+ public_benefits_law: "022-006-004-002-000-000-000",
97
+ emergency_safety_assistance: "022-006-005-000-000-000-000",
98
+ basic_needs: "022-007-000-000-000-000-000",
99
+ clothing_shoes_accessories: "022-007-001-000-000-000-000",
100
+ elder_assistance: "022-007-001-001-000-000-000",
101
+ food: "022-007-002-000-000-000-000",
102
+ over_the_counter_medications: "022-007-003-000-000-000-000",
103
+ immediate_safety_planning: "022-007-004-000-000-000-000",
104
+ emergency_crisis_safety_support: "022-007-004-001-000-000-000",
105
+ hygiene_items_personal_care: "022-007-005-000-000-000-000",
106
+ communications_connectivity: "022-007-006-000-000-000-000",
107
+ interpreter_services: "022-007-007-000-000-000-000",
108
+ informal_education_life_skills: "022-008-000-000-000-000-000",
109
+ basic_life_skills_self_care: "022-008-001-000-000-000-000",
110
+ accessibility_disability_support: "022-008-002-000-000-000-000",
111
+ parenting_education: "022-008-003-000-000-000-000",
112
+ learning_language_classes: "022-008-004-000-000-000-000",
113
+ transportation: "022-009-000-000-000-000-000",
114
+ transportation_assistance_direct: "022-009-001-000-000-000-000",
115
+ transportation_direct_emergency: "022-009-001-001-000-000-000",
116
+ taxi_rideshare_voucher: "022-009-002-000-000-000-000",
117
+ taxi_rideshare_emergency: "022-009-002-001-000-000-000",
118
+ bus_fare_pass: "022-009-003-000-000-000-000",
119
+ bus_fare_pass_emergency: "022-009-003-001-000-000-000",
120
+ gift_card_gas_card: "022-009-004-000-000-000-000",
121
+ gift_card_gas_card_emergency: "022-009-004-001-000-000-000",
122
+ airline_tickets: "022-009-005-000-000-000-000",
123
+ airline_tickets_emergency: "022-009-005-001-000-000-000",
124
+ dependents: "022-010-000-000-000-000-000",
125
+ pet_care: "022-010-001-000-000-000-000",
126
+ child_care: "022-010-002-000-000-000-000",
127
+ childrens_activities: "022-010-002-001-000-000-000",
128
+ children_youth_baby_supplies: "022-010-002-001-001-000-000",
129
+ case_coordination: "022-011-000-000-000-000-000",
130
+ advocacy: "022-011-001-000-000-000-000",
131
+ medical_advocacy: "022-011-001-001-000-000-000",
132
+ advocacy_emergency_medical: "022-011-001-001-001-000-000",
133
+ advocacy_forensic_exam: "022-011-001-001-002-000-000",
134
+ court_advocacy: "022-011-001-002-000-000-000",
135
+ crime_scene_clean_up: "022-011-001-002-001-000-000",
136
+ family_reunification: "022-011-001-002-002-000-000",
137
+ law_enforcement_interview_support: "022-011-001-002-003-000-000",
138
+ prosecution_interview_advocacy: "022-011-001-002-004-000-000",
139
+ immigration_advocacy_support: "022-011-001-002-005-000-000",
140
+ documentation_records_retrieval: "022-011-001-003-000-000-000",
141
+ obtaining_insurance: "022-011-001-003-001-000-000",
142
+ drivers_car_insurance: "022-011-001-003-001-001-000",
143
+ medical_insurance: "022-011-001-003-001-002-000",
144
+ obtaining_drivers_license: "022-011-001-003-002-000-000",
145
+ faith_resource: "022-011-001-004-000-000-000",
146
+ banking_notary: "022-011-001-005-000-000-000",
147
+ income_benefits_navigation: "022-011-001-006-000-000-000",
148
+ government_services_special_programs: "022-011-001-006-001-000-000",
149
+ intervention_employer_creditor_academic: "022-011-001-007-000-000-000",
150
+ formal_education_academic_support: "022-011-001-007-001-000-000",
151
+ adult_school_ged: "022-011-001-007-001-001-000",
152
+ child_school_enrollment: "022-011-001-007-001-002-000",
153
+ intake: "022-011-002-000-000-000-000",
154
+ screening: "022-011-002-001-000-000-000",
155
+ housing_eligibility_determination: "022-011-002-001-001-000-000",
156
+ coordinated_entry: "022-011-002-001-001-001-000",
157
+ behavioral_issues_screen: "022-011-002-001-002-000-000",
158
+ initial_screen: "022-011-002-001-003-000-000",
159
+ needs_assessment: "022-011-002-001-004-000-000",
160
+ tvap: "022-011-002-001-005-000-000",
161
+ case_management_supportive_services: "022-011-003-000-000-000-000",
162
+ intra_agency_provider_coordination: "022-011-003-001-000-000-000",
163
+ inter_agency_consultation: "022-011-003-002-000-000-000",
164
+ service_plan: "022-011-003-003-000-000-000",
165
+ hope_scale_and_plan: "022-011-003-003-001-000-000",
166
+ post_exit_plan: "022-011-003-004-000-000-000",
167
+ advanced_directives: "022-011-003-005-000-000-000",
168
+ other_services: "022-012-000-000-000-000-000",
165
169
  } as const;
166
170
 
167
171
  export type ServiceCategoryKey = keyof typeof ServiceCategoryKeys;
168
172
 
169
173
  /**
170
- * Key → positional code map for the `service_states` CVC domain.
174
+ * Key → positional code map for the `service_state` CVC domain.
171
175
  *
172
- * Domain: `service_states` · Version: 1.0.0 · Entries: 10
176
+ * Domain: `service_state` · Version: 1.0.0 · Entries: 14
173
177
  */
174
178
  export const ServiceStateKeys = {
175
- need_identified: "02-01-00-00-00-00-00",
176
- offered: "02-02-00-00-00-00-00",
177
- scheduled_in_progress: "02-03-00-00-00-00-00",
178
- delivered: "02-04-00-00-00-00-00",
179
- completed: "02-05-00-00-00-00-00",
180
- declined_by_client: "02-06-00-00-00-00-00",
181
- unable_to_provide: "02-07-00-00-00-00-00",
182
- unable_to_provide_eligibility: "02-07-01-00-00-00-00",
183
- unable_to_provide_capacity: "02-07-02-00-00-00-00",
184
- unable_to_provide_resources: "02-07-03-00-00-00-00",
179
+ missingness_root: "049-000-000-000-000-000-000",
180
+ unknown: "049-000-000-000-000-000-001",
181
+ anonymous: "049-000-000-000-000-000-002",
182
+ data_not_collected: "049-000-000-000-000-000-003",
183
+ need_identified: "049-001-000-000-000-000-000",
184
+ offered: "049-002-000-000-000-000-000",
185
+ scheduled_in_progress: "049-003-000-000-000-000-000",
186
+ delivered: "049-004-000-000-000-000-000",
187
+ completed: "049-005-000-000-000-000-000",
188
+ declined_by_client: "049-006-000-000-000-000-000",
189
+ unable_to_provide: "049-007-000-000-000-000-000",
190
+ unable_to_provide_eligibility: "049-007-001-000-000-000-000",
191
+ unable_to_provide_capacity: "049-007-002-000-000-000-000",
192
+ unable_to_provide_resources: "049-007-003-000-000-000-000",
185
193
  } as const;
186
194
 
187
195
  export type ServiceStateKey = keyof typeof ServiceStateKeys;
@@ -189,27 +197,17 @@ export type ServiceStateKey = keyof typeof ServiceStateKeys;
189
197
  /**
190
198
  * Key → positional code map for the `service_mechanisms` CVC domain.
191
199
  *
192
- * Domain: `service_mechanisms` · Version: 1.0.0 · Entries: 4
200
+ * Domain: `service_mechanisms` · Version: 1.0.0 · Entries: 8
193
201
  */
194
202
  export const ServiceMechanismKeys = {
195
- support_via_referral: "03-01-00-00-00-00-00",
196
- informational_support: "03-02-00-00-00-00-00",
197
- direct_staff_contractor: "03-03-00-00-00-00-00",
198
- financial_material_assistance: "03-04-00-00-00-00-00",
203
+ missingness_root: "025-000-000-000-000-000-000",
204
+ unknown: "025-000-000-000-000-000-001",
205
+ anonymous: "025-000-000-000-000-000-002",
206
+ data_not_collected: "025-000-000-000-000-000-003",
207
+ support_via_referral: "025-001-000-000-000-000-000",
208
+ informational_support: "025-002-000-000-000-000-000",
209
+ direct_staff_contractor: "025-003-000-000-000-000-000",
210
+ financial_material_assistance: "025-004-000-000-000-000-000",
199
211
  } as const;
200
212
 
201
213
  export type ServiceMechanismKey = keyof typeof ServiceMechanismKeys;
202
-
203
- /**
204
- * Key → positional code map for the `missingness` CVC domain.
205
- *
206
- * Domain: `missingness` · Version: 1.0.0 · Entries: 4
207
- */
208
- export const MissingnessKeys = {
209
- missingness_root: "00-00-00-00-00-00-00",
210
- unknown: "00-00-00-00-00-00-01",
211
- anonymous: "00-00-00-00-00-00-02",
212
- data_not_collected: "00-00-00-00-00-00-03",
213
- } as const;
214
-
215
- export type MissingnessKey = keyof typeof MissingnessKeys;
@@ -27,6 +27,6 @@ export function compileModel(
27
27
  connection: Connection,
28
28
  schema = buildCvcEntrySchema(),
29
29
  ): Model<CvcEntry> {
30
- return connection.models?.CvcEntry as Model<CvcEntry>
30
+ return connection.models.CvcEntry as Model<CvcEntry>
31
31
  ?? connection.model<CvcEntry>("CvcEntry", schema);
32
32
  }
@@ -30,6 +30,6 @@ export function compileModel(
30
30
  connection: Connection,
31
31
  schema = buildCvcRegistrySchema(),
32
32
  ): Model<CvcRegistry> {
33
- return connection.models?.CvcRegistry as Model<CvcRegistry>
33
+ return connection.models.CvcRegistry as Model<CvcRegistry>
34
34
  ?? connection.model<CvcRegistry>("CvcRegistry", schema);
35
35
  }
@@ -24,10 +24,11 @@ import type { InferRawDocType } from "mongoose";
24
24
  // ─── Shared validators ───────────────────────────────────────────────────────
25
25
 
26
26
  /**
27
- * Positional 7-segment CVC code: `XX-XX-XX-XX-XX-XX-XX`. Mirrors
27
+ * Positional 7-segment CVC code: `XXX-XXX-XXX-XXX-XXX-XXX-XXX` (format v2,
28
+ * 3-digit segments with a Notion-aligned domain prefix). Mirrors
28
29
  * `CvcCodeSchema` in `validation/cvc.ts`. See locked spec §3.
29
30
  */
30
- const CVC_CODE_PATTERN = /^\d{2}(-\d{2}){6}$/;
31
+ const CVC_CODE_PATTERN = /^\d{3}(-\d{3}){6}$/;
31
32
 
32
33
  /**
33
34
  * Stable machine key for a CVC entry. Mirrors `CvcKeySchema` in
@@ -76,8 +76,9 @@ export const cvcRegistrySchemaDefinition = {
76
76
  },
77
77
 
78
78
  // Selective inclusion/exclusion lists. Both contain CVC entry codes
79
- // (positional 7-segment, e.g. "01-02-00-00-00-00-00"). The runtime
80
- // applies excludes after includes when resolving the effective set.
79
+ // (positional 7-segment, format v2: e.g. "022-002-000-000-000-000-000").
80
+ // The runtime applies excludes after includes when resolving the effective
81
+ // set.
81
82
  excludedEntries: {
82
83
  type: [String],
83
84
  default: [],