@htilabs/platform-common-models 0.7.0-beta.1 → 0.8.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.
- package/README.md +0 -44
- package/dist/constants/index.cjs +76 -52
- 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 +75 -48
- package/dist/constants/index.js.map +1 -1
- package/dist/{cvcEntry-BCj1OWqL.d.cts → cvcEntry-DaDrEuTa.d.cts} +36 -36
- package/dist/{cvcEntry-BCj1OWqL.d.ts → cvcEntry-DaDrEuTa.d.ts} +36 -36
- package/dist/cvcs/index.cjs +11136 -136
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +12856 -603
- package/dist/cvcs/index.d.ts +12856 -603
- package/dist/cvcs/index.js +11060 -132
- package/dist/cvcs/index.js.map +1 -1
- package/dist/{index-I-DiX9eQ.d.ts → index-C0J3f169.d.ts} +1 -1
- package/dist/{index-CoVr1jIV.d.cts → index-EPjPjR0z.d.cts} +1 -1
- package/dist/index.cjs +12593 -246
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1686 -98
- package/dist/index.d.ts +1686 -98
- package/dist/index.js +12442 -234
- package/dist/index.js.map +1 -1
- package/dist/models/index.d.cts +2 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/{platform-auth-C97LpsRd.d.cts → platform-auth-7dL99tZh.d.cts} +21 -9
- package/dist/{platform-auth-C97LpsRd.d.ts → platform-auth-7dL99tZh.d.ts} +21 -9
- package/dist/schemas/index.cjs +68 -49
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +11 -15
- package/dist/schemas/index.d.ts +11 -15
- package/dist/schemas/index.js +68 -49
- package/dist/schemas/index.js.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +19 -25
- package/src/__tests__/__snapshots__/cvc-sot.snap +297 -9
- package/src/__tests__/cvc-sot-snapshot.test.ts +150 -18
- package/src/__tests__/cvc-structural.test.ts +76 -3
- package/src/constants/ic.ts +163 -51
- package/src/cvcs/accommodationType.v1.0.0.json +107 -0
- package/src/cvcs/actionStepCompletionStatus.v1.0.0.json +89 -0
- package/src/cvcs/actionStepType.v1.0.0.json +71 -0
- package/src/cvcs/announcementAudienceScope.v1.0.0.json +80 -0
- package/src/cvcs/announcementResponseType.v1.0.0.json +89 -0
- package/src/cvcs/basisQuickPicks.v1.0.0.json +123 -0
- package/src/cvcs/checkInActivity.v1.0.0.json +233 -0
- package/src/cvcs/checkInPhase.v1.0.0.json +152 -0
- package/src/cvcs/childBehavioralConcerns.v1.0.0.json +161 -0
- package/src/cvcs/childCustodyArrangement.v1.0.0.json +188 -0
- package/src/cvcs/collectionContext.v1.0.0.json +88 -0
- package/src/cvcs/contactInfoUseType.v1.0.0.json +87 -0
- package/src/cvcs/daIncidentArchiveReason.v1.0.0.json +89 -0
- package/src/cvcs/daIncidentConfidence.v1.0.0.json +80 -0
- package/src/cvcs/daIncidentDayApprox.v1.0.0.json +89 -0
- package/src/cvcs/daIncidentSeverity.v1.0.0.json +97 -0
- package/src/cvcs/determinationLevel.v1.0.0.json +96 -0
- package/src/cvcs/disabilitySubtype.v1.0.0.json +126 -0
- package/src/cvcs/discretionLevel.v1.0.0.json +89 -0
- package/src/cvcs/emergencyContactCallReason.v1.0.0.json +107 -0
- package/src/cvcs/emergencyContactPermissions.v1.0.0.json +125 -0
- package/src/cvcs/emergencyExitCascade.v1.0.0.json +89 -0
- package/src/cvcs/exitProcessChecklistItem.v1.0.0.json +152 -0
- package/src/cvcs/exitReasons.v1.0.0.json +224 -0
- package/src/cvcs/facialHair.v1.0.0.json +71 -0
- package/src/cvcs/funder.v1.0.0.json +125 -0
- package/src/cvcs/goalCategory.v1.0.0.json +161 -0
- package/src/cvcs/goalPriority.v1.0.0.json +80 -0
- package/src/cvcs/goalStatus.v1.0.0.json +98 -0
- package/src/cvcs/goalWithdrawalReason.v1.0.0.json +116 -0
- package/src/cvcs/hmisProjectType.v1.0.0.json +178 -0
- package/src/cvcs/hopeScaleCaptureContext.v1.0.0.json +116 -0
- package/src/cvcs/hopeScaleResponseOptions.v1.0.0.json +125 -0
- package/src/cvcs/hopeScaleTier.v1.0.0.json +89 -0
- package/src/cvcs/identificationStatus.v1.0.0.json +80 -0
- package/src/cvcs/index.ts +150 -6
- package/src/cvcs/inferenceType.v1.0.0.json +78 -0
- package/src/cvcs/investigativeRequestType.v1.0.0.json +89 -0
- package/src/cvcs/languages.v1.0.0.json +1924 -0
- package/src/cvcs/leReportStatus.v1.0.0.json +89 -0
- package/src/cvcs/legalActionType.v1.0.0.json +116 -0
- package/src/cvcs/messageReportReason.v1.0.0.json +107 -0
- package/src/cvcs/midStayEventType.v1.0.0.json +116 -0
- package/src/cvcs/milestoneType.v1.0.0.json +170 -0
- package/src/cvcs/needsResidentialAgain.v1.0.0.json +80 -0
- package/src/cvcs/personRelationships.v1.0.0.json +6 -6
- package/src/cvcs/petExitReason.v1.0.0.json +107 -0
- package/src/cvcs/petRelationshipBasis.v1.0.0.json +80 -0
- package/src/cvcs/programSpecificCode.v1.0.0.json +125 -0
- package/src/cvcs/proofOfIdType.v1.0.0.json +188 -0
- package/src/cvcs/qualityFlags.v1.0.0.json +96 -0
- package/src/cvcs/referenceLinkType.v1.0.0.json +125 -0
- package/src/cvcs/relationshipDynamics.v1.0.0.json +445 -0
- package/src/cvcs/returnedToAbuserStatus.v1.0.0.json +80 -0
- package/src/cvcs/roleContext.v1.0.0.json +78 -0
- package/src/cvcs/rsvpResponse.v1.0.0.json +80 -0
- package/src/cvcs/servicePlanClosureReason.v1.0.0.json +125 -0
- package/src/cvcs/servicePlanReviewSnoozeReason.v1.0.0.json +116 -0
- package/src/cvcs/serviceSource.v1.0.0.json +71 -0
- package/src/cvcs/serviceStates.v1.0.0.json +12 -2
- package/src/cvcs/sessionState.v1.0.0.json +96 -0
- package/src/cvcs/severityFollowUp.v1.0.0.json +89 -0
- package/src/cvcs/signatureMethod.v1.0.0.json +89 -0
- package/src/cvcs/signatureType.v1.0.0.json +89 -0
- package/src/cvcs/smtBodyLocation.v1.0.0.json +314 -0
- package/src/cvcs/smtNameRelation.v1.0.0.json +116 -0
- package/src/cvcs/smtSignificanceFlags.v1.0.0.json +116 -0
- package/src/cvcs/sourceCategory.v1.1.0.json +96 -0
- package/src/cvcs/sourceSubtype.v1.1.0.json +330 -0
- package/src/cvcs/substanceUseStatus.v1.0.0.json +90 -0
- package/src/cvcs/supportStrength.v1.0.0.json +114 -0
- package/src/cvcs/supportTopic.v1.0.0.json +116 -0
- package/src/cvcs/threadStatus.v1.0.0.json +80 -0
- package/src/cvcs/threadType.v1.0.0.json +98 -0
- package/src/cvcs/timeScope.v1.0.0.json +69 -0
- package/src/cvcs/verificationMethod.v1.0.0.json +96 -0
- package/src/cvcs/verificationStatus.v1.0.0.json +80 -0
- package/src/cvcs/visaType.v1.0.0.json +378 -0
- package/src/generated/cvc-enums.ts +1816 -46
- package/src/index.ts +0 -20
- package/src/schemas/common.ts +0 -4
- package/dist/config/index.cjs +0 -191
- package/dist/config/index.cjs.map +0 -1
- package/dist/config/index.d.cts +0 -101
- package/dist/config/index.d.ts +0 -101
- package/dist/config/index.js +0 -165
- package/dist/config/index.js.map +0 -1
- package/src/__tests__/runtime-contract-validator.test.ts +0 -556
- package/src/config/fixtures/valid.yaml +0 -90
- package/src/config/index.ts +0 -352
- package/src/cvcs/hmisSex.v1.0.0.json +0 -89
- package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +0 -96
- package/src/cvcs/recencyBand.v1.0.0.json +0 -124
|
@@ -92,9 +92,82 @@ 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: "
|
|
96
|
-
{ file: "
|
|
97
|
-
{ file: "
|
|
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" },
|
|
106
|
+
// ─── 0.8.0 net-new DRAFT domains (64) — all pass §4 invariants. ───
|
|
107
|
+
{ file: "accommodationType.v1.0.0.json", expectedDomain: "accommodation_type" },
|
|
108
|
+
{ file: "actionStepCompletionStatus.v1.0.0.json", expectedDomain: "action_step_completion_status" },
|
|
109
|
+
{ file: "actionStepType.v1.0.0.json", expectedDomain: "action_step_type" },
|
|
110
|
+
{ file: "announcementAudienceScope.v1.0.0.json", expectedDomain: "announcement_audience_scope" },
|
|
111
|
+
{ file: "announcementResponseType.v1.0.0.json", expectedDomain: "announcement_response_type" },
|
|
112
|
+
{ file: "basisQuickPicks.v1.0.0.json", expectedDomain: "basis_quick_picks" },
|
|
113
|
+
{ file: "checkInActivity.v1.0.0.json", expectedDomain: "check_in_activity" },
|
|
114
|
+
{ file: "checkInPhase.v1.0.0.json", expectedDomain: "check_in_phase" },
|
|
115
|
+
{ file: "childBehavioralConcerns.v1.0.0.json", expectedDomain: "child_behavioral_concerns" },
|
|
116
|
+
{ file: "childCustodyArrangement.v1.0.0.json", expectedDomain: "child_custody_arrangement" },
|
|
117
|
+
{ file: "collectionContext.v1.0.0.json", expectedDomain: "collection_context" },
|
|
118
|
+
{ file: "daIncidentArchiveReason.v1.0.0.json", expectedDomain: "da_incident_archive_reason" },
|
|
119
|
+
{ file: "daIncidentConfidence.v1.0.0.json", expectedDomain: "da_incident_confidence" },
|
|
120
|
+
{ file: "daIncidentDayApprox.v1.0.0.json", expectedDomain: "da_incident_day_approx" },
|
|
121
|
+
{ file: "daIncidentSeverity.v1.0.0.json", expectedDomain: "da_incident_severity" },
|
|
122
|
+
{ file: "disabilitySubtype.v1.0.0.json", expectedDomain: "disability_subtype" },
|
|
123
|
+
{ file: "discretionLevel.v1.0.0.json", expectedDomain: "discretion_level" },
|
|
124
|
+
{ file: "emergencyContactCallReason.v1.0.0.json", expectedDomain: "emergency_contact_call_reason" },
|
|
125
|
+
{ file: "emergencyContactPermissions.v1.0.0.json", expectedDomain: "emergency_contact_permissions" },
|
|
126
|
+
{ file: "emergencyExitCascade.v1.0.0.json", expectedDomain: "emergency_exit_cascade" },
|
|
127
|
+
{ file: "exitProcessChecklistItem.v1.0.0.json", expectedDomain: "exit_process_checklist_item" },
|
|
128
|
+
{ file: "exitReasons.v1.0.0.json", expectedDomain: "exit_reasons" },
|
|
129
|
+
{ file: "facialHair.v1.0.0.json", expectedDomain: "facial_hair" },
|
|
130
|
+
{ file: "funder.v1.0.0.json", expectedDomain: "funder" },
|
|
131
|
+
{ file: "goalCategory.v1.0.0.json", expectedDomain: "goal_category" },
|
|
132
|
+
{ file: "goalPriority.v1.0.0.json", expectedDomain: "goal_priority" },
|
|
133
|
+
{ file: "goalStatus.v1.0.0.json", expectedDomain: "goal_status" },
|
|
134
|
+
{ file: "goalWithdrawalReason.v1.0.0.json", expectedDomain: "goal_withdrawal_reason" },
|
|
135
|
+
{ file: "hmisProjectType.v1.0.0.json", expectedDomain: "hmis_project_type" },
|
|
136
|
+
{ file: "hopeScaleCaptureContext.v1.0.0.json", expectedDomain: "hope_scale_capture_context" },
|
|
137
|
+
{ file: "hopeScaleResponseOptions.v1.0.0.json", expectedDomain: "hope_scale_response_options" },
|
|
138
|
+
{ file: "hopeScaleTier.v1.0.0.json", expectedDomain: "hope_scale_tier" },
|
|
139
|
+
{ file: "identificationStatus.v1.0.0.json", expectedDomain: "identification_status" },
|
|
140
|
+
{ file: "investigativeRequestType.v1.0.0.json", expectedDomain: "investigative_request_type" },
|
|
141
|
+
{ file: "languages.v1.0.0.json", expectedDomain: "languages" },
|
|
142
|
+
{ file: "leReportStatus.v1.0.0.json", expectedDomain: "le_report_status" },
|
|
143
|
+
{ file: "legalActionType.v1.0.0.json", expectedDomain: "legal_action_type" },
|
|
144
|
+
{ file: "messageReportReason.v1.0.0.json", expectedDomain: "message_report_reason" },
|
|
145
|
+
{ file: "midStayEventType.v1.0.0.json", expectedDomain: "mid_stay_event_type" },
|
|
146
|
+
{ file: "milestoneType.v1.0.0.json", expectedDomain: "milestone_type" },
|
|
147
|
+
{ file: "needsResidentialAgain.v1.0.0.json", expectedDomain: "needs_residential_again" },
|
|
148
|
+
{ file: "petExitReason.v1.0.0.json", expectedDomain: "pet_exit_reason" },
|
|
149
|
+
{ file: "petRelationshipBasis.v1.0.0.json", expectedDomain: "pet_relationship_basis" },
|
|
150
|
+
{ file: "programSpecificCode.v1.0.0.json", expectedDomain: "program_specific_code" },
|
|
151
|
+
{ file: "proofOfIdType.v1.0.0.json", expectedDomain: "proof_of_id_type" },
|
|
152
|
+
{ file: "referenceLinkType.v1.0.0.json", expectedDomain: "reference_link_type" },
|
|
153
|
+
{ file: "relationshipDynamics.v1.0.0.json", expectedDomain: "relationship_dynamics" },
|
|
154
|
+
{ file: "returnedToAbuserStatus.v1.0.0.json", expectedDomain: "returned_to_abuser_status" },
|
|
155
|
+
{ file: "rsvpResponse.v1.0.0.json", expectedDomain: "rsvp_response" },
|
|
156
|
+
{ file: "servicePlanClosureReason.v1.0.0.json", expectedDomain: "service_plan_closure_reason" },
|
|
157
|
+
{ file: "servicePlanReviewSnoozeReason.v1.0.0.json", expectedDomain: "service_plan_review_snooze_reason" },
|
|
158
|
+
{ file: "serviceSource.v1.0.0.json", expectedDomain: "service_source" },
|
|
159
|
+
{ file: "severityFollowUp.v1.0.0.json", expectedDomain: "severity_follow_up" },
|
|
160
|
+
{ file: "signatureMethod.v1.0.0.json", expectedDomain: "signature_method" },
|
|
161
|
+
{ file: "signatureType.v1.0.0.json", expectedDomain: "signature_type" },
|
|
162
|
+
{ file: "smtBodyLocation.v1.0.0.json", expectedDomain: "smt_body_location" },
|
|
163
|
+
{ file: "smtNameRelation.v1.0.0.json", expectedDomain: "smt_name_relation" },
|
|
164
|
+
{ file: "smtSignificanceFlags.v1.0.0.json", expectedDomain: "smt_significance_flags" },
|
|
165
|
+
{ file: "substanceUseStatus.v1.0.0.json", expectedDomain: "substance_use_status" },
|
|
166
|
+
{ file: "supportTopic.v1.0.0.json", expectedDomain: "support_topic" },
|
|
167
|
+
{ file: "threadStatus.v1.0.0.json", expectedDomain: "thread_status" },
|
|
168
|
+
{ file: "threadType.v1.0.0.json", expectedDomain: "thread_type" },
|
|
169
|
+
{ file: "verificationStatus.v1.0.0.json", expectedDomain: "verification_status" },
|
|
170
|
+
{ file: "visaType.v1.0.0.json", expectedDomain: "visa_type" },
|
|
98
171
|
] as const;
|
|
99
172
|
|
|
100
173
|
function loadSot(file: string): unknown {
|
package/src/constants/ic.ts
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
// HMIS-aligned data quality indicators for demographics and contact fields.
|
|
11
11
|
// Used as companion fields (e.g., sexDataQuality, raceDataQuality) to track
|
|
12
12
|
// why data is missing. Absence of the field (undefined) means data was provided.
|
|
13
|
+
//
|
|
14
|
+
// PAVE §4 DIVERGENCE FLAG (ADR-CONTRACT-platform-common-wiring §4 — missingness
|
|
15
|
+
// row). `@pave/domain` MISSINGNESS_REASONS is `[unk, anon, dnc]`; per the PAVE
|
|
16
|
+
// bind notes those abbreviations realign to the canonical SOT triad
|
|
17
|
+
// `unknown`/`anonymous`/`data_not_collected` that the per-domain CVC JSON
|
|
18
|
+
// missingness leaves already use (prototype/Notion authority). DATA_QUALITY
|
|
19
|
+
// below is a SEPARATE companion-field vocabulary (client_doesnt_know /
|
|
20
|
+
// client_prefers_not_to_answer / data_not_collected) and is intentionally NOT
|
|
21
|
+
// reshaped to match — its reconciliation vs MissingnessKeys is an unratified
|
|
22
|
+
// Tier-C conflict (ADR §8.3, Sean sign-off). No value dropped; flag only.
|
|
13
23
|
|
|
14
24
|
export const DATA_QUALITY = {
|
|
15
25
|
/** Client does not know the answer. */
|
|
@@ -45,10 +55,19 @@ export const DATA_QUALITY_DESCRIPTIONS: Record<DataQualityValue, string> = {
|
|
|
45
55
|
|
|
46
56
|
// ─── CVC-1: Name Type ───────────────────────────────────────────────
|
|
47
57
|
// Distinguishes between legal names (structured: first/middle/last/suffix)
|
|
48
|
-
// and unstructured name forms (alias, trade name,
|
|
49
|
-
// Mononym is not a name_type — it's a shape flag on structured components
|
|
50
|
-
// (see `isMononym` on personNameSchema).
|
|
58
|
+
// and unstructured name forms (alias, trade name, mononym, etc.)
|
|
51
59
|
// Reference: core_name_type in IC/CVC codebook
|
|
60
|
+
//
|
|
61
|
+
// PAVE §4 DIVERGENCE FLAG (ADR-CONTRACT-platform-common-wiring §4 — name-type
|
|
62
|
+
// row). `@pave/domain` NAME_TYPES (14 string members incl. maiden/street/code/
|
|
63
|
+
// preferred/system_display/other; `trade` not `trade_name`; no `mononym`)
|
|
64
|
+
// CONFLICTS with this CVC_1_NAME_TYPE (7 members incl. `mononym`) and with the
|
|
65
|
+
// nameType.v1.0.0.json SOT (8 substantive keys: legal/alias/code_name/
|
|
66
|
+
// handle_screenname/maiden_former/nickname/street_name/trade_name_stage_name).
|
|
67
|
+
// The PAVE bind notes list NAME_TYPES as STILL-DIVERGENT / DEFERRED. This is an
|
|
68
|
+
// unratified Tier-C conflict (ADR §8.3, Sean sign-off); platform-common is NOT
|
|
69
|
+
// reshaped here. No prototype value is dropped — flag only. The nameType SOT
|
|
70
|
+
// JSON is the canonical string surface; this numeric-adjacent const is retained.
|
|
52
71
|
|
|
53
72
|
export const CVC_1_NAME_TYPE = {
|
|
54
73
|
/** Full legal name with structured components (first, middle, last, suffix) */
|
|
@@ -57,6 +76,8 @@ export const CVC_1_NAME_TYPE = {
|
|
|
57
76
|
ALIAS: "alias",
|
|
58
77
|
/** Trade name / business name - single unstructured name field */
|
|
59
78
|
TRADE_NAME: "trade_name",
|
|
79
|
+
/** Single-word name (e.g., "Madonna", "Prince") - single unstructured name field */
|
|
80
|
+
MONONYM: "mononym",
|
|
60
81
|
/** Nickname - single unstructured name field */
|
|
61
82
|
NICKNAME: "nickname",
|
|
62
83
|
/** Online handle or username - single unstructured name field */
|
|
@@ -71,6 +92,7 @@ export const CVC_1_VALUES = [
|
|
|
71
92
|
CVC_1_NAME_TYPE.LEGAL,
|
|
72
93
|
CVC_1_NAME_TYPE.ALIAS,
|
|
73
94
|
CVC_1_NAME_TYPE.TRADE_NAME,
|
|
95
|
+
CVC_1_NAME_TYPE.MONONYM,
|
|
74
96
|
CVC_1_NAME_TYPE.NICKNAME,
|
|
75
97
|
CVC_1_NAME_TYPE.HANDLE,
|
|
76
98
|
CVC_1_NAME_TYPE.UNKNOWN,
|
|
@@ -80,6 +102,7 @@ export const CVC_1_LABELS: Record<CVC1Value, string> = {
|
|
|
80
102
|
[CVC_1_NAME_TYPE.LEGAL]: "Legal Name",
|
|
81
103
|
[CVC_1_NAME_TYPE.ALIAS]: "Alias / AKA",
|
|
82
104
|
[CVC_1_NAME_TYPE.TRADE_NAME]: "Trade Name",
|
|
105
|
+
[CVC_1_NAME_TYPE.MONONYM]: "Mononym",
|
|
83
106
|
[CVC_1_NAME_TYPE.NICKNAME]: "Nickname",
|
|
84
107
|
[CVC_1_NAME_TYPE.HANDLE]: "Handle / Username",
|
|
85
108
|
[CVC_1_NAME_TYPE.UNKNOWN]: "Unknown",
|
|
@@ -100,6 +123,7 @@ export const CVC_1_STRUCTURED_NAME_TYPES: readonly CVC1Value[] = [
|
|
|
100
123
|
export const CVC_1_UNSTRUCTURED_NAME_TYPES: readonly CVC1Value[] = [
|
|
101
124
|
CVC_1_NAME_TYPE.ALIAS,
|
|
102
125
|
CVC_1_NAME_TYPE.TRADE_NAME,
|
|
126
|
+
CVC_1_NAME_TYPE.MONONYM,
|
|
103
127
|
CVC_1_NAME_TYPE.NICKNAME,
|
|
104
128
|
CVC_1_NAME_TYPE.HANDLE,
|
|
105
129
|
CVC_1_NAME_TYPE.UNKNOWN,
|
|
@@ -761,6 +785,11 @@ export const IC_57_SERVICE_AUDIENCE = {
|
|
|
761
785
|
THIRD_PARTY: 2,
|
|
762
786
|
DEPENDENT_SECONDARY: 3,
|
|
763
787
|
CLIENT_GROUPS: 4,
|
|
788
|
+
// ADDITIVE per Thread Phase-0 SOT Block C. Labels for codes 1-3 intentionally
|
|
789
|
+
// left as-is (they diverge from the prototype semantically, but renaming them
|
|
790
|
+
// is a [TOUCHES EXISTING] change deferred out of this additive pass).
|
|
791
|
+
OFFENDER: 5,
|
|
792
|
+
PERSONNEL: 6,
|
|
764
793
|
} as const;
|
|
765
794
|
|
|
766
795
|
export type IC57Value =
|
|
@@ -771,6 +800,8 @@ export const IC_57_LABELS: Record<IC57Value, string> = {
|
|
|
771
800
|
[IC_57_SERVICE_AUDIENCE.THIRD_PARTY]: "Third-Party",
|
|
772
801
|
[IC_57_SERVICE_AUDIENCE.DEPENDENT_SECONDARY]: "Dependent / Secondary Victim",
|
|
773
802
|
[IC_57_SERVICE_AUDIENCE.CLIENT_GROUPS]: "Client Groups",
|
|
803
|
+
[IC_57_SERVICE_AUDIENCE.OFFENDER]: "Offender",
|
|
804
|
+
[IC_57_SERVICE_AUDIENCE.PERSONNEL]: "Personnel",
|
|
774
805
|
};
|
|
775
806
|
|
|
776
807
|
// ─── IC-58: Referral Entity Category ────────────────────────────────
|
|
@@ -1056,6 +1087,23 @@ export const IC_58_EXTERNAL_TIERED: IC58ExternalCategory[] = [
|
|
|
1056
1087
|
];
|
|
1057
1088
|
|
|
1058
1089
|
// ─── IC-59: Service State ───────────────────────────────────────────
|
|
1090
|
+
//
|
|
1091
|
+
// FLAG — DEPRECATION CANDIDATE (Thread Phase-0 SOT Block D step 13). This
|
|
1092
|
+
// numeric 1..5 mirror has NO prototype source (the prototype models service
|
|
1093
|
+
// state via the string-keyed `service_states` CVC in serviceStates.v1.0.0.json,
|
|
1094
|
+
// which is the canonical surface). REFERRED=2 in particular has no prototype
|
|
1095
|
+
// analog. Do NOT extend this numeric enum; new states (e.g. the additive
|
|
1096
|
+
// `unable_other_reason`) land on the string CVC only. Retained for wire/
|
|
1097
|
+
// back-compat until consumers migrate off the numeric mirror.
|
|
1098
|
+
//
|
|
1099
|
+
// PAVE §4 DIVERGENCE FLAG (ADR-CONTRACT-platform-common-wiring §4 —
|
|
1100
|
+
// service-state row). THREE distinct vocabularies model this concept:
|
|
1101
|
+
// `@pave/domain` LIFECYCLE_STATES `[needed, provided, referred, declined,
|
|
1102
|
+
// attempted]` (5, str), the `ServiceStateKeys` CVC (now 15 keys, code-mapped —
|
|
1103
|
+
// the prototype/Notion authority), and this numeric IC_59 (1..5). The PAVE bind
|
|
1104
|
+
// notes list LIFECYCLE_STATES as STILL-DIVERGENT / DEFERRED. Unratified Tier-C
|
|
1105
|
+
// conflict (ADR §8.3, Sean sign-off); not reshaped here. The string
|
|
1106
|
+
// `service_states` CVC is the canonical surface both sides converge toward.
|
|
1059
1107
|
|
|
1060
1108
|
export const IC_59_SERVICE_STATE = {
|
|
1061
1109
|
IDENTIFIED: 1,
|
|
@@ -1123,6 +1171,11 @@ export const SESSION_STATES = {
|
|
|
1123
1171
|
PENDING_SAVE: 3,
|
|
1124
1172
|
CLOSED: 4,
|
|
1125
1173
|
DISCARDED: 5,
|
|
1174
|
+
// ADDITIVE per Thread Phase-0 SOT Block G. FLAG — SESSION_STATES has no
|
|
1175
|
+
// prototype source (the prototype has a single record `status`, no
|
|
1176
|
+
// session-wizard state machine); SUBMITTED=6 rides Thread-local th-tsnf.13
|
|
1177
|
+
// authority, not the prototype.
|
|
1178
|
+
SUBMITTED: 6,
|
|
1126
1179
|
} as const;
|
|
1127
1180
|
|
|
1128
1181
|
export type SessionStateValue =
|
|
@@ -1134,6 +1187,7 @@ export const SESSION_STATE_LABELS: Record<SessionStateValue, string> = {
|
|
|
1134
1187
|
[SESSION_STATES.PENDING_SAVE]: "Pending Save",
|
|
1135
1188
|
[SESSION_STATES.CLOSED]: "Closed",
|
|
1136
1189
|
[SESSION_STATES.DISCARDED]: "Discarded",
|
|
1190
|
+
[SESSION_STATES.SUBMITTED]: "Submitted",
|
|
1137
1191
|
};
|
|
1138
1192
|
|
|
1139
1193
|
// ─── Record States ──────────────────────────────────────────────────
|
|
@@ -1164,6 +1218,13 @@ export const INTERACTION_TYPES = {
|
|
|
1164
1218
|
LAP_INCIDENT: 2,
|
|
1165
1219
|
FIELD_RESPONSE: 3,
|
|
1166
1220
|
EMAIL_CRISIS: 4,
|
|
1221
|
+
// ADDITIVE per Thread Phase-0 SOT Block F. FLAG — numeric INTERACTION_TYPES
|
|
1222
|
+
// (incl. these 3 and the pre-existing EMAIL_CRISIS=4) have no prototype
|
|
1223
|
+
// source; the prototype models interactions as string template ids + the
|
|
1224
|
+
// CVC-47/IC-56 delivery channel. Non-canonical wire/back-compat mirror.
|
|
1225
|
+
IN_PERSON: 5,
|
|
1226
|
+
TEXT_EMAIL: 6,
|
|
1227
|
+
VIRTUAL: 7,
|
|
1167
1228
|
OTHER: 99,
|
|
1168
1229
|
} as const;
|
|
1169
1230
|
|
|
@@ -1185,11 +1246,24 @@ export const INTERACTION_TYPE_LABELS: Record<InteractionTypeValue, string> = {
|
|
|
1185
1246
|
[INTERACTION_TYPES.LAP_INCIDENT]: "LAP Incident",
|
|
1186
1247
|
[INTERACTION_TYPES.FIELD_RESPONSE]: "Field Response",
|
|
1187
1248
|
[INTERACTION_TYPES.EMAIL_CRISIS]: "Email Crisis",
|
|
1249
|
+
[INTERACTION_TYPES.IN_PERSON]: "In Person",
|
|
1250
|
+
[INTERACTION_TYPES.TEXT_EMAIL]: "Text / Email",
|
|
1251
|
+
[INTERACTION_TYPES.VIRTUAL]: "Virtual",
|
|
1188
1252
|
[INTERACTION_TYPES.OTHER]: "Other",
|
|
1189
1253
|
};
|
|
1190
1254
|
|
|
1191
1255
|
// ─── CVC-130: Incident Involvement Role ─────────────────────────────
|
|
1192
1256
|
// MECE "one slot" per person per incident. Determines Person Type.
|
|
1257
|
+
//
|
|
1258
|
+
// PAVE §4 DIVERGENCE FLAG (ADR-CONTRACT-platform-common-wiring §4 —
|
|
1259
|
+
// involvement-role row): CONVERGED. `@pave/domain` INVOLVEMENT_ROLES is now
|
|
1260
|
+
// sourced FROM this CVC-130 (via `IncidentInvolvementRoleKeys`/
|
|
1261
|
+
// `INVOLVEMENT_ROLE_KEYS`); the 6 substantive roles (victim_primary/
|
|
1262
|
+
// victim_secondary/victim_other/offender/witness/dependent) match exactly and
|
|
1263
|
+
// PAVE realigned its sentinel `not_collected`→`data_not_collected` to match the
|
|
1264
|
+
// canonical keys here. This string-keyed CVC is the prototype/Notion authority;
|
|
1265
|
+
// no platform-common change needed. (Distinct from the legacy numeric
|
|
1266
|
+
// PERSON_ROLES display map below, which is non-canonical.)
|
|
1193
1267
|
|
|
1194
1268
|
export const INCIDENT_INVOLVEMENT_ROLE = {
|
|
1195
1269
|
VICTIM_PRIMARY: "victim_primary",
|
|
@@ -1292,11 +1366,36 @@ export const IC_4_LABELS: Record<IC4Value, string> = {
|
|
|
1292
1366
|
};
|
|
1293
1367
|
|
|
1294
1368
|
// ─── IC-22: Core Sex ───────────────────────────────────────────────
|
|
1369
|
+
//
|
|
1370
|
+
// PROTOTYPE-AUTHORITY ALIGNMENT (Thread Phase-0 SOT, Block A / SEVERE-1).
|
|
1371
|
+
// The prototype CSV + Thread treat numeric code 3 = NOT_REPORTED. The prior
|
|
1372
|
+
// SOT assigned code 3 = INTERSEX, a TRUE COLLISION on the same integer with
|
|
1373
|
+
// incompatible meaning (numeric exchange silently corrupted "Not Reported" ↔
|
|
1374
|
+
// "Intersex"). Resolution per "prototype is authority":
|
|
1375
|
+
// • code 3 reassigned INTERSEX → NOT_REPORTED (matches prototype + Thread)
|
|
1376
|
+
// • code 4 NOT_TRACKED added (matches CVC_15_CORE_SEX missingness surface)
|
|
1377
|
+
// • INTERSEX relocated to code 5 — FLAGGED, NOT deleted. INTERSEX has no
|
|
1378
|
+
// prototype source (grep -i intersex over the 268k-line prototype = 0
|
|
1379
|
+
// hits; absent from the CVC-15 CSV). It is retained at 5 only because
|
|
1380
|
+
// out-of-repo persisted data may exist under the old meaning.
|
|
1381
|
+
// CVC_15_CORE_SEX is the canonical string surface and is already
|
|
1382
|
+
// prototype-correct — UNCHANGED. Numeric IC_22 is retained for wire/back-compat.
|
|
1383
|
+
//
|
|
1384
|
+
// STORED-DATA MIGRATION — CONDITIONAL. IC_22_CORE_SEX.INTERSEX has NO
|
|
1385
|
+
// value-level consumer in platform-common src (only the IC22Value type is
|
|
1386
|
+
// re-exported at src/types/index.ts). IF any persisted `sex == 3` rows exist
|
|
1387
|
+
// out-of-repo under the OLD INTERSEX meaning, re-map 3 → 5 before this lands.
|
|
1388
|
+
// If none, no migration. This is a consumer-side (Thread) migration gated on
|
|
1389
|
+
// the 0.8.0 publish, not a change applied here.
|
|
1295
1390
|
|
|
1296
1391
|
export const IC_22_CORE_SEX = {
|
|
1297
1392
|
FEMALE: 1,
|
|
1298
1393
|
MALE: 2,
|
|
1299
|
-
|
|
1394
|
+
NOT_REPORTED: 3,
|
|
1395
|
+
NOT_TRACKED: 4,
|
|
1396
|
+
// FLAG: no prototype source; relocated from 3 (not deleted) to preserve any
|
|
1397
|
+
// out-of-repo persisted data. See migration note above.
|
|
1398
|
+
INTERSEX: 5,
|
|
1300
1399
|
UNKNOWN: 99,
|
|
1301
1400
|
} as const;
|
|
1302
1401
|
|
|
@@ -1305,11 +1404,30 @@ export type IC22Value = (typeof IC_22_CORE_SEX)[keyof typeof IC_22_CORE_SEX];
|
|
|
1305
1404
|
export const IC_22_LABELS: Record<IC22Value, string> = {
|
|
1306
1405
|
[IC_22_CORE_SEX.FEMALE]: "Female",
|
|
1307
1406
|
[IC_22_CORE_SEX.MALE]: "Male",
|
|
1407
|
+
[IC_22_CORE_SEX.NOT_REPORTED]: "Not Reported",
|
|
1408
|
+
[IC_22_CORE_SEX.NOT_TRACKED]: "Not Tracked",
|
|
1308
1409
|
[IC_22_CORE_SEX.INTERSEX]: "Intersex",
|
|
1309
1410
|
[IC_22_CORE_SEX.UNKNOWN]: "Unknown",
|
|
1310
1411
|
};
|
|
1311
1412
|
|
|
1312
1413
|
// ─── IC-23: Core Gender Identity ───────────────────────────────────
|
|
1414
|
+
//
|
|
1415
|
+
// PROTOTYPE-AUTHORITY ALIGNMENT (Thread Phase-0 SOT, Block B / SEVERE-2).
|
|
1416
|
+
// The canonical prototype (prototype/data/cvcs/core_gender_identity.yaml)
|
|
1417
|
+
// defines TRANSGENDER_MTF = "transgender woman" and TRANSGENDER_FTM =
|
|
1418
|
+
// "transgender man". Per the user's 2026-06-11 decision to MATCH THE CANONICAL
|
|
1419
|
+
// CVC, the numeric meanings are fixed as:
|
|
1420
|
+
// • code 4 TRANSGENDER_FEMALE = trans woman (MTF, male-to-female)
|
|
1421
|
+
// • code 5 TRANSGENDER_MALE = trans man (FTM, female-to-male)
|
|
1422
|
+
// Labels below are made UNAMBIGUOUS so no downstream consumer can mis-code.
|
|
1423
|
+
//
|
|
1424
|
+
// FLAG — Thread-side conditional migration (gated on the 0.8.0 publish):
|
|
1425
|
+
// Thread's labels were BACKWARDS — Thread labeled code 4 "Transgender - FTM"
|
|
1426
|
+
// (a trans man) and code 5 "Transgender - MTF" (a trans woman), the opposite
|
|
1427
|
+
// people from this canonical mapping. Thread MUST (a) correct its IC_23 labels
|
|
1428
|
+
// to match the canonical here, and (b) migrate any persisted numeric IC_23
|
|
1429
|
+
// data captured under the backwards labels (swap 4 ↔ 5 for affected rows).
|
|
1430
|
+
// No data change is applied here; this is a Thread-repo consumer migration.
|
|
1313
1431
|
|
|
1314
1432
|
export const IC_23_CORE_GENDER_IDENTITY = {
|
|
1315
1433
|
FEMALE: 1,
|
|
@@ -1317,6 +1435,8 @@ export const IC_23_CORE_GENDER_IDENTITY = {
|
|
|
1317
1435
|
NON_BINARY: 3,
|
|
1318
1436
|
TRANSGENDER_FEMALE: 4,
|
|
1319
1437
|
TRANSGENDER_MALE: 5,
|
|
1438
|
+
TRANSGENDER: 6,
|
|
1439
|
+
OTHER: 7,
|
|
1320
1440
|
UNKNOWN: 99,
|
|
1321
1441
|
} as const;
|
|
1322
1442
|
|
|
@@ -1327,8 +1447,12 @@ export const IC_23_LABELS: Record<IC23Value, string> = {
|
|
|
1327
1447
|
[IC_23_CORE_GENDER_IDENTITY.FEMALE]: "Female",
|
|
1328
1448
|
[IC_23_CORE_GENDER_IDENTITY.MALE]: "Male",
|
|
1329
1449
|
[IC_23_CORE_GENDER_IDENTITY.NON_BINARY]: "Non-Binary",
|
|
1330
|
-
[IC_23_CORE_GENDER_IDENTITY.TRANSGENDER_FEMALE]:
|
|
1331
|
-
|
|
1450
|
+
[IC_23_CORE_GENDER_IDENTITY.TRANSGENDER_FEMALE]:
|
|
1451
|
+
"Transgender Female (MTF / trans woman)",
|
|
1452
|
+
[IC_23_CORE_GENDER_IDENTITY.TRANSGENDER_MALE]:
|
|
1453
|
+
"Transgender Male (FTM / trans man)",
|
|
1454
|
+
[IC_23_CORE_GENDER_IDENTITY.TRANSGENDER]: "Transgender",
|
|
1455
|
+
[IC_23_CORE_GENDER_IDENTITY.OTHER]: "Other",
|
|
1332
1456
|
[IC_23_CORE_GENDER_IDENTITY.UNKNOWN]: "Unknown",
|
|
1333
1457
|
};
|
|
1334
1458
|
|
|
@@ -1412,10 +1536,11 @@ export const CVC_17_CORE_GENDER_IDENTITY = {
|
|
|
1412
1536
|
TRANSGENDER: "TRANSGENDER",
|
|
1413
1537
|
NON_BINARY: "NON_BINARY",
|
|
1414
1538
|
OTHER: "OTHER",
|
|
1415
|
-
// Level 0 - Missingness codes (codebook canonical set)
|
|
1416
1539
|
UNKNOWN: "UNK",
|
|
1417
|
-
|
|
1418
|
-
|
|
1540
|
+
// Level 0 - Missingness (canonical genderIdentity.v1.0.0.json L0 set).
|
|
1541
|
+
// ADDITIVE per Thread Phase-0 SOT Block B step 5.
|
|
1542
|
+
PREFER_NOT_TO_ANSWER: "PREFER_NOT_TO_ANSWER",
|
|
1543
|
+
DATA_NOT_COLLECTED: "DATA_NOT_COLLECTED",
|
|
1419
1544
|
// Level 2 - Transgender subcategories
|
|
1420
1545
|
TRANSGENDER_FTM: "TRANSGENDER_FTM",
|
|
1421
1546
|
TRANSGENDER_MTF: "TRANSGENDER_MTF",
|
|
@@ -1431,8 +1556,9 @@ export const CVC_17_LABELS: Record<CVC17Value, string> = {
|
|
|
1431
1556
|
[CVC_17_CORE_GENDER_IDENTITY.NON_BINARY]: "Non-Binary",
|
|
1432
1557
|
[CVC_17_CORE_GENDER_IDENTITY.OTHER]: "Other",
|
|
1433
1558
|
[CVC_17_CORE_GENDER_IDENTITY.UNKNOWN]: "Unknown",
|
|
1559
|
+
[CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER]:
|
|
1560
|
+
"Client prefers not to answer",
|
|
1434
1561
|
[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
1562
|
[CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM]: "Transgender - FTM",
|
|
1437
1563
|
[CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF]: "Transgender - MTF",
|
|
1438
1564
|
};
|
|
@@ -1447,6 +1573,14 @@ export const CVC_17_LEVEL_1_OPTIONS: CVC17Value[] = [
|
|
|
1447
1573
|
CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
|
|
1448
1574
|
];
|
|
1449
1575
|
|
|
1576
|
+
// Level 0 options (missingness — canonical genderIdentity.v1.0.0.json L0 set).
|
|
1577
|
+
// ADDITIVE per Thread Phase-0 SOT Block B step 5.
|
|
1578
|
+
export const CVC_17_LEVEL_0_MISSINGNESS_OPTIONS: CVC17Value[] = [
|
|
1579
|
+
CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
|
|
1580
|
+
CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER,
|
|
1581
|
+
CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED,
|
|
1582
|
+
];
|
|
1583
|
+
|
|
1450
1584
|
// Level 2 options (transgender subcategories)
|
|
1451
1585
|
export const CVC_17_LEVEL_2_TRANSGENDER_OPTIONS: CVC17Value[] = [
|
|
1452
1586
|
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
|
|
@@ -1469,38 +1603,6 @@ export function isTransgenderGenderIdentity(value: CVC17Value | null | undefined
|
|
|
1469
1603
|
return CVC_17_TRANSGENDER_VALUES.includes(value);
|
|
1470
1604
|
}
|
|
1471
1605
|
|
|
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
1606
|
// ─── IC-24: Race ───────────────────────────────────────────────────
|
|
1505
1607
|
|
|
1506
1608
|
export const IC_24_RACE = {
|
|
@@ -1664,6 +1766,10 @@ export const QUICK_START_TEMPLATES = {
|
|
|
1664
1766
|
HT_REFERRAL: "ht_referral",
|
|
1665
1767
|
FIELD_RESPONSE: "field_response",
|
|
1666
1768
|
EMAIL_CRISIS: "email_crisis",
|
|
1769
|
+
// ADDITIVE per Thread Phase-0 SOT Block F step 19.
|
|
1770
|
+
TEXT_EMAIL: "text_email",
|
|
1771
|
+
MISC_CALL: "misc_call",
|
|
1772
|
+
IN_PERSON: "in_person",
|
|
1667
1773
|
OTHER: "other",
|
|
1668
1774
|
} as const;
|
|
1669
1775
|
|
|
@@ -1676,6 +1782,9 @@ export const QUICK_START_LABELS: Record<QuickStartTemplateId, string> = {
|
|
|
1676
1782
|
ht_referral: "HT Referral",
|
|
1677
1783
|
field_response: "Field Response",
|
|
1678
1784
|
email_crisis: "Email / Crisis",
|
|
1785
|
+
text_email: "Text / Email",
|
|
1786
|
+
misc_call: "Misc Call",
|
|
1787
|
+
in_person: "In Person",
|
|
1679
1788
|
other: "Other",
|
|
1680
1789
|
};
|
|
1681
1790
|
|
|
@@ -1704,6 +1813,18 @@ export const QUICK_START_CONFIG: Record<
|
|
|
1704
1813
|
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.PHONE,
|
|
1705
1814
|
interactionType: INTERACTION_TYPES.EMAIL_CRISIS,
|
|
1706
1815
|
},
|
|
1816
|
+
text_email: {
|
|
1817
|
+
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.EMAIL_TEXT_CHAT,
|
|
1818
|
+
interactionType: INTERACTION_TYPES.TEXT_EMAIL,
|
|
1819
|
+
},
|
|
1820
|
+
misc_call: {
|
|
1821
|
+
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.PHONE,
|
|
1822
|
+
interactionType: INTERACTION_TYPES.OTHER,
|
|
1823
|
+
},
|
|
1824
|
+
in_person: {
|
|
1825
|
+
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.IN_PERSON,
|
|
1826
|
+
interactionType: INTERACTION_TYPES.IN_PERSON,
|
|
1827
|
+
},
|
|
1707
1828
|
other: {
|
|
1708
1829
|
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.PHONE,
|
|
1709
1830
|
interactionType: INTERACTION_TYPES.OTHER,
|
|
@@ -5316,12 +5437,3 @@ export const CVC_67_SELECTABLE_VALUES: CVC67Value[] = [
|
|
|
5316
5437
|
export const CVC_67_MISSINGNESS_VALUES: CVC67Value[] = [
|
|
5317
5438
|
CVC_67_HMIS_SEX.DATA_NOT_COLLECTED,
|
|
5318
5439
|
];
|
|
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,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"domain": "accommodation_type",
|
|
3
|
+
"name": "Accommodation Type",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"_status": "DRAFT — TEMPORARY: net-new value-CVC not yet in Notion; provisional 900+ numbering; codes from prototype/data/cvcs/core_accommodation_type.yaml; PENDING canonical Notion authoring (PAVE Auditability backlog).",
|
|
6
|
+
"_source": "prototype/data/cvcs/core_accommodation_type.yaml",
|
|
7
|
+
"levels": {
|
|
8
|
+
"0": "Unknown or Missing",
|
|
9
|
+
"1": "Accommodation type"
|
|
10
|
+
},
|
|
11
|
+
"entries": [
|
|
12
|
+
{
|
|
13
|
+
"code": "900-000-000-000-000-000-000",
|
|
14
|
+
"key": "missingness_root",
|
|
15
|
+
"title": "Unknown, Redacted, or Missing",
|
|
16
|
+
"selectable": false,
|
|
17
|
+
"parentCode": null,
|
|
18
|
+
"childCodes": [
|
|
19
|
+
"900-000-000-000-000-000-001",
|
|
20
|
+
"900-000-000-000-000-000-002",
|
|
21
|
+
"900-000-000-000-000-000-003"
|
|
22
|
+
],
|
|
23
|
+
"definition": "Root group for values indicating absent, withheld, or uncollected data. Variant: 3-value (unknown, anonymous, data_not_collected) under the workspace standard ANON semantic. The prototype YAML's UNK sentinel (survivor knows an accommodation is needed but can't specify the type) maps to the unknown child."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"code": "900-000-000-000-000-000-001",
|
|
27
|
+
"key": "unknown",
|
|
28
|
+
"title": "Unknown",
|
|
29
|
+
"selectable": true,
|
|
30
|
+
"parentCode": "900-000-000-000-000-000-000",
|
|
31
|
+
"childCodes": [],
|
|
32
|
+
"definition": "Value is unknown at time of entry. Carries the prototype's UNK case — survivor knows accommodations are needed but can't specify the type; useful when the conversation needs to keep moving without forcing a guess, and the advocate returns to capture detail later."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"code": "900-000-000-000-000-000-002",
|
|
36
|
+
"key": "anonymous",
|
|
37
|
+
"title": "Anonymous / declined to answer",
|
|
38
|
+
"selectable": true,
|
|
39
|
+
"parentCode": "900-000-000-000-000-000-000",
|
|
40
|
+
"childCodes": [],
|
|
41
|
+
"definition": "Value is intentionally withheld or redacted. Combines declined-to-answer and redacted/anonymous semantics under the workspace standard ANON sentinel."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"code": "900-000-000-000-000-000-003",
|
|
45
|
+
"key": "data_not_collected",
|
|
46
|
+
"title": "Data not collected",
|
|
47
|
+
"selectable": true,
|
|
48
|
+
"parentCode": "900-000-000-000-000-000-000",
|
|
49
|
+
"childCodes": [],
|
|
50
|
+
"definition": "No attempt was made to collect the value."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"code": "900-001-000-000-000-000-000",
|
|
54
|
+
"key": "sensory",
|
|
55
|
+
"title": "Sensory (vision, hearing)",
|
|
56
|
+
"selectable": true,
|
|
57
|
+
"parentCode": null,
|
|
58
|
+
"childCodes": [],
|
|
59
|
+
"definition": "ASL interpreter, captioning, large print, screen reader compatible materials, assistive listening device, tactile materials. Per-type free-text captures the specific need (e.g., 'ASL interpreter for in-person staff meetings only — written for everything else')."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"code": "900-002-000-000-000-000-000",
|
|
63
|
+
"key": "mobility",
|
|
64
|
+
"title": "Mobility / physical access",
|
|
65
|
+
"selectable": true,
|
|
66
|
+
"parentCode": null,
|
|
67
|
+
"childCodes": [],
|
|
68
|
+
"definition": "Wheelchair access, ramps, accessible entrances/restrooms, first-floor units, accessible parking, seating support. Per-type free-text captures the specific physical access requirement (e.g., 'wheelchair-accessible entrance + first-floor unit + grab bars in bathroom')."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"code": "900-003-000-000-000-000-000",
|
|
72
|
+
"key": "communication_cognitive",
|
|
73
|
+
"title": "Communication / cognitive processing",
|
|
74
|
+
"selectable": true,
|
|
75
|
+
"parentCode": null,
|
|
76
|
+
"childCodes": [],
|
|
77
|
+
"definition": "Augmentative/alternative communication (AAC), simplified materials, extra processing time, support person for communication, written-only communication, plain language. Distinct from sensory (which is about access modality) — this is about how information is structured and paced for the survivor."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"code": "900-004-000-000-000-000-000",
|
|
81
|
+
"key": "medical_dietary",
|
|
82
|
+
"title": "Medical / dietary",
|
|
83
|
+
"selectable": true,
|
|
84
|
+
"parentCode": null,
|
|
85
|
+
"childCodes": [],
|
|
86
|
+
"definition": "Medication storage, refrigeration, dietary restrictions (allergies / religious / medical), break schedules for medical care, accessible bathroom/kitchen for medical-care self-management. Per-type free-text captures the specific medical or dietary requirement."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"code": "900-005-000-000-000-000-000",
|
|
90
|
+
"key": "service_animal",
|
|
91
|
+
"title": "Service animal accompanies",
|
|
92
|
+
"selectable": true,
|
|
93
|
+
"parentCode": null,
|
|
94
|
+
"childCodes": [],
|
|
95
|
+
"definition": "Trained service animal accompanies the survivor; programs need to confirm service-animal-friendly housing and intake spaces. Distinct from emotional support animal (ESA) — most shelters are not legally required to accommodate ESAs but ARE required to accommodate trained service animals per ADA Title III."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"code": "900-006-000-000-000-000-000",
|
|
99
|
+
"key": "other",
|
|
100
|
+
"title": "Other (specify)",
|
|
101
|
+
"selectable": true,
|
|
102
|
+
"parentCode": null,
|
|
103
|
+
"childCodes": [],
|
|
104
|
+
"definition": "Free-text refinement for accommodation needs not otherwise categorized. Future polish: surface most-frequently-typed values back as suggested codes for canonical promotion."
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|