@htilabs/platform-common-models 0.2.0-beta.1 → 0.2.0-beta.2

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.
@@ -1,639 +1,154 @@
1
+ export { A as ACCOMMODATION_LABELS, a as ACCOMMODATION_OPTIONS, b as AGE_BIN_REPORTING, c as AGE_BIN_REPORTING_IS_MINOR, d as AGE_BIN_REPORTING_LABELS, e as APPARENT_AGE, f as APPARENT_AGE_LABELS, g as APP_SCOPE, h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, B as BIRTH_LOCATION, l as BIRTH_LOCATION_LABELS, m as BIRTH_LOCATION_VALUES, n as BirthLocationValue, C as CALLER_IS_VICTIM_ROLES, o as CVC100Value, p as CVC115Value, q as CVC120Value, r as CVC121Value, s as CVC122Value, t as CVC126Category, u as CVC126Option, v as CVC126Value, w as CVC136Category, x as CVC136Option, y as CVC136Value, z as CVC145Category, D as CVC145Option, E as CVC145Value, F as CVC147Value, G as CVC148Value, H as CVC150Value, I as CVC151Value, J as CVC152Value, K as CVC153Value, L as CVC156Value, M as CVC157Value, N as CVC158Value, O as CVC159Category, P as CVC159Option, Q as CVC159Value, R as CVC15Value, S as CVC16Value, T as CVC171Category, U as CVC171Option, V as CVC171Value, W as CVC179HierarchicalCategory, X as CVC179HierarchicalValue, Y as CVC179Value, Z as CVC17Value, _ as CVC180Value, $ as CVC181Value, a0 as CVC196Value, a1 as CVC1Value, a2 as CVC67Value, a3 as CVC72Value, a4 as CVC76Value, a5 as CVC93Value, a6 as CVC95Value, a7 as CVC96Value, a8 as CVC97Value, a9 as CVC98Value, aa as CVC99Value, ab as CVC_100_LABELS, ac as CVC_100_LIVES_RURAL, ad as CVC_100_VALUES, ae as CVC_115_LABELS, af as CVC_115_SERVICE_PLANNING, ag as CVC_115_VALUES, ah as CVC_120_LABELS, ai as CVC_120_MILITARY_BRANCH, aj as CVC_120_VALUES, ak as CVC_121_LABELS, al as CVC_121_MILITARY_STATUS, am as CVC_121_VALUES, an as CVC_122_LABELS, ao as CVC_122_PRIMARY_LANGUAGE, ap as CVC_122_VALUES, aq as CVC_126_CATEGORY, ar as CVC_126_CATEGORY_LABELS, as as CVC_126_LABELS, at as CVC_126_OPTIONS, au as CVC_126_PERSON_RELATIONSHIP, av as CVC_126_PROTECTED_CATEGORIES, aw as CVC_126_TYPE_TO_CATEGORY, ax as CVC_126_VALUES, ay as CVC_136_ALERT_INDICATOR, az as CVC_136_CATEGORY_LABELS, aA as CVC_136_INDICATOR_CATEGORY, aB as CVC_136_LABELS, aC as CVC_136_OPTIONS, aD as CVC_136_TYPE_TO_CATEGORY, aE as CVC_136_VALUES, aF as CVC_145_CATEGORY, aG as CVC_145_CATEGORY_LABELS, aH as CVC_145_CATEGORY_ORDER, aI as CVC_145_LABELS, aJ as CVC_145_OPTIONS, aK as CVC_145_RELATIONSHIP_DYNAMICS, aL as CVC_145_SELECTABLE_OPTIONS, aM as CVC_145_TYPE_TO_CATEGORY, aN as CVC_145_VALUES, aO as CVC_147_LABELS, aP as CVC_147_PRONOUNS, aQ as CVC_147_VALUES, aR as CVC_148_LABELS, aS as CVC_148_TRIBES, aT as CVC_148_VALUES, aU as CVC_150_EYE_COLOR, aV as CVC_150_LABELS, aW as CVC_150_VALUES, aX as CVC_151_HAIR_COLOR, aY as CVC_151_LABELS, aZ as CVC_151_VALUES, a_ as CVC_152_HAS_TATTOOS, a$ as CVC_152_LABELS, b0 as CVC_152_VALUES, b1 as CVC_153_LABELS, b2 as CVC_153_SMT_TYPE, b3 as CVC_153_VALUES, b4 as CVC_156_LABELS, b5 as CVC_156_MARITAL_STATUS, b6 as CVC_156_VALUES, b7 as CVC_157_LABELS, b8 as CVC_157_RELATIONSHIP_STATUS, b9 as CVC_157_VALUES, ba as CVC_158_CUSTODY_STATUS, bb as CVC_158_LABELS, bc as CVC_158_VALUES, bd as CVC_159_CATEGORY, be as CVC_159_CATEGORY_LABELS, bf as CVC_159_CATEGORY_ORDER, bg as CVC_159_LABELS, bh as CVC_159_OPTIONS, bi as CVC_159_RELATIONSHIP_TIES, bj as CVC_159_SELECTABLE_OPTIONS, bk as CVC_159_TYPE_TO_CATEGORY, bl as CVC_159_VALUES, bm as CVC_15_CORE_SEX, bn as CVC_15_LABELS, bo as CVC_15_SELECTABLE_VALUES, bp as CVC_16_CORE_ORIENTATION, bq as CVC_16_LABELS, br as CVC_16_LGBTQ_VALUES, bs as CVC_171_CATEGORY, bt as CVC_171_CATEGORY_LABELS, bu as CVC_171_CHILD_TO_PARENT, bv as CVC_171_INCOME_BENEFITS, bw as CVC_171_INCOME_SOURCES, bx as CVC_171_LABELS, by as CVC_171_PARENT_CHILDREN, bz as CVC_171_SELECTABLE_OPTIONS, bA as CVC_171_VALUES, bB as CVC_171_VALUE_TO_CATEGORY, bC as CVC_179_CHILD_TO_PARENT, bD as CVC_179_EMPLOYMENT_STATUS, bE as CVC_179_HIERARCHICAL_CATEGORY, bF as CVC_179_HIERARCHICAL_CATEGORY_LABELS, bG as CVC_179_HIERARCHICAL_CATEGORY_ORDER, bH as CVC_179_HIERARCHICAL_LABELS, bI as CVC_179_HIERARCHICAL_VALUES, bJ as CVC_179_LABELS, bK as CVC_179_PARENT_CHILDREN, bL as CVC_179_PRIMARY_CATEGORY, bM as CVC_179_SELECTABLE_OPTIONS, bN as CVC_179_VALUES, bO as CVC_179_VALUE_TO_CATEGORY, bP as CVC_17_CORE_GENDER_IDENTITY, bQ as CVC_17_LABELS, bR as CVC_17_LEVEL_1_OPTIONS, bS as CVC_17_LEVEL_2_TRANSGENDER_OPTIONS, bT as CVC_17_TRANSGENDER_VALUES, bU as CVC_180_EDUCATION_LEVEL, bV as CVC_180_LABELS, bW as CVC_180_ORDINAL, bX as CVC_180_VALUES, bY as CVC_181_COUNTRIES, bZ as CVC_181_LABELS, b_ as CVC_196_CHILD_WELFARE_EPISODE_TYPE, b$ as CVC_196_LABELS, c0 as CVC_196_VALUES, c1 as CVC_1_LABELS, c2 as CVC_1_NAME_TYPE, c3 as CVC_1_STRUCTURED_NAME_TYPES, c4 as CVC_1_UNSTRUCTURED_NAME_TYPES, c5 as CVC_1_VALUES, c6 as CVC_67_HMIS_SEX, c7 as CVC_67_LABELS, c8 as CVC_67_MISSINGNESS_VALUES, c9 as CVC_67_SELECTABLE_VALUES, ca as CVC_72_HT_TYPE, cb as CVC_72_LABELS, cc as CVC_72_VALUES, cd as CVC_76_LABELS, ce as CVC_76_RACE_ETHNICITY, cf as CVC_76_VALUES, cg as CVC_93_CHILD_WELFARE_INVOLVEMENT, ch as CVC_93_LABELS, ci as CVC_93_VALUES, cj as CVC_95_JUVENILE_JUSTICE_INVOLVEMENT, ck as CVC_95_LABELS, cl as CVC_95_VALUES, cm as CVC_96_HOMELESS_STATUS, cn as CVC_96_LABELS, co as CVC_96_VALUES, cp as CVC_97_IMMIGRANT_REFUGEE, cq as CVC_97_LABELS, cr as CVC_97_VALUES, cs as CVC_98_LABELS, ct as CVC_98_US_VETERAN, cu as CVC_98_VALUES, cv as CVC_99_ENGLISH_PROFICIENCY, cw as CVC_99_LABELS, cx as CVC_99_VALUES, cy as DATA_QUALITY, cz as DATA_QUALITY_DESCRIPTIONS, cA as DATA_QUALITY_LABELS, cB as DATA_QUALITY_VALUES, cC as DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY, cD as DataQualityValue, cE as FORM_STATUS, cF as FORM_STATUS_LABELS, cG as FORM_TYPE, cH as FORM_TYPE_LABELS, cI as FUNCTION_STATUS, cJ as FUNCTION_STATUS_LABELS, cK as FUNCTION_STATUS_VALUES, cL as FormStatusValue, cM as FormTypeValue, cN as FunctionStatusValue, cO as IC13Category, cP as IC13PriorityGroup, cQ as IC13Value, cR as IC22Value, cS as IC23Value, cT as IC24Value, cU as IC25Value, cV as IC49ReferralOutcomeValue, cW as IC49ReferralVerificationValue, cX as IC49Value, cY as IC4Value, cZ as IC56ChannelValue, c_ as IC56Value, c$ as IC57Value, d0 as IC58ExternalCategory, d1 as IC58Value, d2 as IC59Value, d3 as IC5Value, d4 as IC_13_CATEGORIES, d5 as IC_13_CATEGORY_ORDER, d6 as IC_13_LABELS, d7 as IC_13_PRIORITY_GROUPS, d8 as IC_13_RELATIONSHIP_ABBREV, d9 as IC_13_RELATIONSHIP_TYPE, da as IC_13_REVERSE_CONTEXT_LABELS, db as IC_22_CORE_SEX, dc as IC_22_LABELS, dd as IC_23_CORE_GENDER_IDENTITY, de as IC_23_LABELS, df as IC_24_LABELS, dg as IC_24_RACE, dh as IC_25_ETHNICITY, di as IC_25_LABELS, dj as IC_48_SERVICE_CATEGORIES, dk as IC_49_DESCRIPTIONS, dl as IC_49_LABELS, dm as IC_49_REFERRAL_OUTCOME, dn as IC_49_REFERRAL_OUTCOME_LABELS, dp as IC_49_REFERRAL_VERIFICATION, dq as IC_49_REFERRAL_VERIFICATION_LABELS, dr as IC_49_SERVICE_MECHANISM, ds as IC_4_AGE_TYPE, dt as IC_4_LABELS, du as IC_56_DESCRIPTIONS, dv as IC_56_LABELS, dw as IC_56_OPTIONS, dx as IC_56_SERVICE_DELIVERY_CHANNEL, dy as IC_57_LABELS, dz as IC_57_SERVICE_AUDIENCE, dA as IC_58_EXTERNAL_TIERED, dB as IC_58_LABELS, dC as IC_58_ORG_TYPE_GROUPS, dD as IC_58_PRIMARY_BRANCHES, dE as IC_58_REFERRAL_ENTITY, dF as IC_59_LABELS, dG as IC_59_SERVICE_STATE, dH as IC_5_FULL_LABELS, dI as IC_5_LABELS, dJ as IC_5_VICTIMIZATION, dK as INCIDENT_INVOLVEMENT_ROLE, dL as INCIDENT_INVOLVEMENT_ROLE_LABELS, dM as INCIDENT_INVOLVEMENT_ROLE_TO_PERSON_ROLE, dN as INCIDENT_PARTICIPATION_ROLE, dO as INCIDENT_PARTICIPATION_ROLE_LABELS, dP as INCIDENT_PARTICIPATION_ROLE_VALUES, dQ as INTERACTION_TYPES, dR as INTERACTION_TYPE_LABELS, dS as INVOLVEMENT_ROLE_TO_PERSON_TYPE, dT as IncidentInvolvementRoleValue, dU as IncidentParticipationRoleValue, dV as InteractionTypeValue, dW as MINOR_ADULT_STATUS, dX as MINOR_ADULT_STATUS_LABELS, dY as MinorAdultStatusValue, dZ as OrgTypeGroup, d_ as PARTICIPATION_ROLE_CATEGORIES, d$ as PERMISSION_STATE, e0 as PERMISSION_STATE_DISPLAY, e1 as PERMISSION_STATE_LABELS, e2 as PERMISSION_STATE_VALUES, e3 as PERSON_DISPLAY_CATEGORY, e4 as PERSON_DISPLAY_CATEGORY_LABELS, e5 as PERSON_ROLES, e6 as PERSON_TYPE, e7 as PERSON_TYPE_VALUES, e8 as PLATFORM_TOOL, e9 as PLATFORM_TOOL_LABELS, ea as PLATFORM_TOOL_VALUES, eb as PermissionStateValue, ec as PersonDisplayCategoryValue, ed as PersonRoleValue, ee as PersonTypeValue, ef as PlatformToolValue, eg as QUESTION_FORMAT, eh as QUESTION_FORMAT_LABELS, ei as QUICK_START_CONFIG, ej as QUICK_START_LABELS, ek as QUICK_START_TEMPLATES, el as QuestionFormatValue, em as QuickStartTemplateId, en as RECORD_STATES, eo as RECORD_STATE_LABELS, ep as RELATIONSHIP_CONCERNS, eq as RELATIONSHIP_CONCERNS_LABELS, er as RELATIONSHIP_CONCERNS_VALUES, es as RELATIONSHIP_DYNAMICS, et as RELATIONSHIP_DYNAMICS_LABELS, eu as RELATIONSHIP_DYNAMICS_VALUES, ev as ROLE_LEVEL, ew as ROLE_LEVEL_LABELS, ex as ROLE_LEVEL_VALUES, ey as RecordStateValue, ez as ReferralBranch, eA as RelationshipConcernValue, eB as RelationshipDynamicValue, eC as RoleLevelValue, eD as SESSION_STATES, eE as SESSION_STATE_LABELS, eF as SHARE_VIEW, eG as SHARE_VIEW_LABELS, eH as SHARE_VIEW_VALUES, eI as SUBMISSION_STATES, eJ as SUBMISSION_STATE_LABELS, eK as ServiceCategory, eL as ServiceCategoryChild, eM as SessionStateValue, eN as ShareViewValue, eO as SubmissionStateValue, eP as THREAD_INVOLVEMENT_ROLES, eQ as USER_STATUS, eR as USER_STATUS_LABELS, eS as UserStatusValue, eT as VALID_INTERACTION_TYPES, eU as VALID_RECORD_STATES, eV as deriveAgeBinFromAge, eW as getDisplayCategoryForRole, eX as getPersonTypeForRole, eY as getRelationshipCategory, eZ as isIC56Missingness, e_ as isIC56ValidChannel, e$ as isLgbtqOrientation, f0 as isProtectedRelationship, f1 as isStructuredNameType, f2 as isTransgenderGenderIdentity, f3 as sortRelationshipsByPriority } from '../platform-auth-C-G2qeGM.js';
2
+
1
3
  /**
2
- * @htilabs/platform-common-models — Information Concept (IC) Constants
3
- * ENUM integer values matching victim services data standards.
4
+ * @htilabs/platform-common-models — IC-48 Universal Service Catalog
4
5
  *
5
- * Each IC constant object is `as const` so values are narrow literal types.
6
- * Label records provide display text for UI rendering.
7
- */
8
- declare const DATA_QUALITY: {
9
- /** Client does not know the answer. */
10
- readonly CLIENT_DOESNT_KNOW: "client_doesnt_know";
11
- /** Client explicitly declined to provide the information. */
12
- readonly CLIENT_PREFERS_NOT_TO_ANSWER: "client_prefers_not_to_answer";
13
- /** Data was not collected during this interaction. */
14
- readonly DATA_NOT_COLLECTED: "data_not_collected";
15
- };
16
- type DataQualityValue = (typeof DATA_QUALITY)[keyof typeof DATA_QUALITY];
17
- /** Tuple of valid DATA_QUALITY values for enum constraints (preserves literal types). */
18
- declare const DATA_QUALITY_VALUES: readonly ["client_doesnt_know", "client_prefers_not_to_answer", "data_not_collected"];
19
- declare const DATA_QUALITY_LABELS: Record<DataQualityValue, string>;
20
- declare const DATA_QUALITY_DESCRIPTIONS: Record<DataQualityValue, string>;
21
- declare const IC_5_VICTIMIZATION: {
22
- readonly DV: 1;
23
- readonly SA: 2;
24
- readonly DMST: 3;
25
- readonly ST: 4;
26
- readonly LT: 5;
27
- readonly OTHER: 99;
28
- };
29
- type IC5Value = (typeof IC_5_VICTIMIZATION)[keyof typeof IC_5_VICTIMIZATION];
30
- declare const IC_5_LABELS: Record<IC5Value, string>;
31
- declare const IC_5_FULL_LABELS: Record<IC5Value, string>;
32
- declare const IC_13_RELATIONSHIP_TYPE: {
33
- readonly SPOUSE: 1;
34
- readonly PARTNER: 2;
35
- readonly PARENT: 3;
36
- readonly CHILD: 4;
37
- readonly SIBLING: 5;
38
- readonly OTHER_FAMILY: 6;
39
- readonly ROOMMATE: 7;
40
- readonly FRIEND: 8;
41
- readonly COWORKER: 9;
42
- readonly ACQUAINTANCE: 10;
43
- readonly STRANGER: 11;
44
- readonly OTHER: 99;
45
- };
46
- type IC13Value = (typeof IC_13_RELATIONSHIP_TYPE)[keyof typeof IC_13_RELATIONSHIP_TYPE];
47
- declare const IC_13_LABELS: Record<IC13Value, string>;
48
- declare const IC_13_RELATIONSHIP_ABBREV: Record<IC13Value, string>;
49
- /**
50
- * IC-13 relationship priority groups.
51
- * Order: Familial > Romantic > Close social > Business > Other social > ungrouped.
52
- * Used by the UI to sort and group relationship dropdown options.
6
+ * Thread Universal Service Categories (IC-48) - the canonical taxonomy for
7
+ * victim services across HTI Labs applications.
8
+ *
9
+ * This catalog defines a hierarchical structure of service categories with:
10
+ * - Unique numeric IDs for each category
11
+ * - Hierarchical codes (e.g., "01-04-01" for Medical)
12
+ * - Parent-child relationships via parentId
13
+ * - Selectability flags for leaf vs branch nodes
14
+ *
15
+ * @see https://github.com/htilabstech/thread2 for the source of truth
53
16
  */
54
- interface IC13PriorityGroup {
55
- label: string;
56
- codes: readonly IC13Value[];
17
+ interface IC48CatalogMeta {
18
+ description: string;
19
+ mece: boolean;
20
+ levels: string[];
57
21
  }
58
- declare const IC_13_PRIORITY_GROUPS: readonly IC13PriorityGroup[];
59
- /**
60
- * IC-13 reverse-context labels: frames the relationship FROM the person
61
- * TO the Primary Victim. E.g., "Parent of victim" means the person IS
62
- * the parent of the victim.
63
- */
64
- declare const IC_13_REVERSE_CONTEXT_LABELS: Record<IC13Value, string>;
65
- /**
66
- * Sort IC-13 relationship codes by priority group order.
67
- * Codes not in any group are appended at the end.
68
- */
69
- declare function sortRelationshipsByPriority(codes: number[]): number[];
70
- declare const IC_13_CATEGORIES: {
71
- readonly familial: readonly IC13Value[];
72
- readonly romantic: readonly IC13Value[];
73
- readonly close_social: readonly IC13Value[];
74
- readonly business: readonly IC13Value[];
75
- readonly other_social: readonly IC13Value[];
76
- readonly ungrouped: readonly IC13Value[];
77
- };
78
- type IC13Category = keyof typeof IC_13_CATEGORIES;
79
- /** Display priority order for IC-13 categories (highest priority first). */
80
- declare const IC_13_CATEGORY_ORDER: readonly IC13Category[];
81
- declare const RELATIONSHIP_DYNAMICS: {
82
- readonly APPEARS_CONTROLLING: "appears_controlling";
83
- readonly CONTROLS_FINANCES: "controls_finances";
84
- readonly CONTROLS_DOCUMENTATION: "controls_documentation";
85
- readonly EMOTIONAL_VERBAL_ABUSE: "emotional_verbal_abuse";
86
- readonly PHYSICAL_ABUSE: "physical_abuse";
87
- readonly SEXUAL_ABUSE: "sexual_abuse";
88
- readonly THREATS_OF_HARM: "threats_of_harm";
89
- readonly THREATS_OF_LEGAL_TROUBLE: "threats_of_legal_trouble";
90
- readonly AGE_DISPARITY: "age_disparity";
91
- readonly HAS_KIDS_WITH: "has_kids_with";
92
- };
93
- type RelationshipDynamicValue = (typeof RELATIONSHIP_DYNAMICS)[keyof typeof RELATIONSHIP_DYNAMICS];
94
- declare const RELATIONSHIP_DYNAMICS_LABELS: Record<RelationshipDynamicValue, string>;
95
- declare const RELATIONSHIP_DYNAMICS_VALUES: readonly RelationshipDynamicValue[];
96
- declare const RELATIONSHIP_CONCERNS: {
97
- readonly SAFETY: "safety";
98
- readonly CUSTODY: "custody";
99
- readonly IMMIGRATION: "immigration";
100
- readonly FINANCIAL: "financial";
101
- readonly HOUSING: "housing";
102
- readonly SUBSTANCE_USE: "substance_use";
103
- readonly MENTAL_HEALTH: "mental_health";
104
- readonly CHILD_WELFARE: "child_welfare";
105
- };
106
- type RelationshipConcernValue = (typeof RELATIONSHIP_CONCERNS)[keyof typeof RELATIONSHIP_CONCERNS];
107
- declare const RELATIONSHIP_CONCERNS_LABELS: Record<RelationshipConcernValue, string>;
108
- declare const RELATIONSHIP_CONCERNS_VALUES: readonly RelationshipConcernValue[];
109
- interface ServiceCategoryChild {
110
- id: number;
111
- label: string;
22
+ interface IC48CategoryCrosswalk {
23
+ [key: string]: unknown;
112
24
  }
113
- interface ServiceCategory {
25
+ interface IC48Category {
26
+ /** Unique numeric identifier for this category */
114
27
  id: number;
28
+ /** Hierarchical code (e.g., "01-04-01") */
29
+ code: string;
30
+ /** Display label */
115
31
  label: string;
116
- children: ServiceCategoryChild[];
32
+ /** Full description of the service category */
33
+ description: string;
34
+ /** Hierarchy level (0=root, 1=topic, 2=primary, etc.) */
35
+ level: number;
36
+ /** Parent category ID, null for root/topic-level */
37
+ parentId: number | null;
38
+ /** Topic code prefix (e.g., "01-04") */
39
+ topicCode: string;
40
+ /** Sort order within parent */
41
+ sortOrder: number;
42
+ /** Whether this category can be selected (leaf nodes typically true) */
43
+ isSelectable: boolean;
44
+ /** Cross-reference mappings to other taxonomies */
45
+ crosswalk: IC48CategoryCrosswalk;
117
46
  }
118
- declare const IC_48_SERVICE_CATEGORIES: ServiceCategory[];
119
- declare const IC_49_SERVICE_MECHANISM: {
120
- readonly DATA_NOT_COLLECTED: -2;
121
- readonly ANONYMOUS: -1;
122
- readonly UNKNOWN: 0;
123
- readonly SUPPORT_VIA_REFERRAL: 3;
124
- readonly INFORMATIONAL_SUPPORT: 4;
125
- readonly DIRECT_STAFF_CONTRACTOR: 1;
126
- readonly FINANCIAL_MATERIAL_ASSISTANCE: 2;
127
- readonly SUPPORT_IDENTIFIED_NOT_ADMINISTERED: 5;
128
- };
129
- type IC49Value = (typeof IC_49_SERVICE_MECHANISM)[keyof typeof IC_49_SERVICE_MECHANISM];
130
- declare const IC_49_LABELS: Record<IC49Value, string>;
131
- declare const IC_49_DESCRIPTIONS: Record<IC49Value, string>;
132
- declare const IC_56_SERVICE_DELIVERY_CHANNEL: {
133
- readonly DATA_NOT_COLLECTED: -2;
134
- readonly ANONYMOUS: -1;
135
- readonly UNKNOWN: 0;
136
- readonly IN_PERSON: 1;
137
- readonly ON_SCENE: 2;
138
- readonly PHONE: 3;
139
- readonly EMAIL_TEXT_CHAT: 4;
140
- readonly VIRTUAL: 5;
141
- };
142
- type IC56Value = (typeof IC_56_SERVICE_DELIVERY_CHANNEL)[keyof typeof IC_56_SERVICE_DELIVERY_CHANNEL];
143
- /** Level 1 values only (excludes missingness codes). */
144
- type IC56ChannelValue = 1 | 2 | 3 | 4 | 5;
145
- declare const IC_56_LABELS: Record<IC56Value, string>;
146
- declare const IC_56_DESCRIPTIONS: Record<IC56Value, string>;
47
+ interface IC48Catalog {
48
+ catalogVersion: string;
49
+ catalogDate: string;
50
+ meta: IC48CatalogMeta;
51
+ categories: IC48Category[];
52
+ }
53
+ /** The full IC-48 service catalog */
54
+ declare const IC_48_SERVICE_CATALOG: IC48Catalog;
55
+ /** All service categories as an array */
56
+ declare const IC_48_CATEGORIES: IC48Category[];
57
+ /** Map of category ID to category object for O(1) lookup */
58
+ declare const IC_48_BY_ID: ReadonlyMap<number, IC48Category>;
59
+ /** Map of category code to category object for O(1) lookup */
60
+ declare const IC_48_BY_CODE: ReadonlyMap<string, IC48Category>;
147
61
  /**
148
- * Check if an IC-56 code is a missingness value (Level 0).
149
- * @param code - The IC-56 code
150
- * @returns True if the code represents a missingness state
62
+ * Get a service category by its numeric ID.
63
+ * @param id - The category ID
64
+ * @returns The category or undefined if not found
151
65
  */
152
- declare function isIC56Missingness(code: number): boolean;
66
+ declare function getIC48CategoryById(id: number): IC48Category | undefined;
153
67
  /**
154
- * Check if an IC-56 code is a valid service delivery channel (Level 1).
155
- * @param code - The IC-56 code
156
- * @returns True if the code represents an actual delivery channel
68
+ * Get a service category by its hierarchical code.
69
+ * @param code - The category code (e.g., "01-04-01")
70
+ * @returns The category or undefined if not found
157
71
  */
158
- declare function isIC56ValidChannel(code: number): code is IC56ChannelValue;
159
- /** Options array for dropdown/radio components (Level 1 only). */
160
- declare const IC_56_OPTIONS: readonly [{
161
- readonly value: 1;
162
- readonly label: string;
163
- }, {
164
- readonly value: 2;
165
- readonly label: string;
166
- }, {
167
- readonly value: 3;
168
- readonly label: string;
169
- }, {
170
- readonly value: 4;
171
- readonly label: string;
172
- }, {
173
- readonly value: 5;
174
- readonly label: string;
175
- }];
176
- declare const IC_57_SERVICE_AUDIENCE: {
177
- readonly CLIENT_VICTIM: 1;
178
- readonly THIRD_PARTY: 2;
179
- readonly DEPENDENT_SECONDARY: 3;
180
- readonly CLIENT_GROUPS: 4;
181
- };
182
- type IC57Value = (typeof IC_57_SERVICE_AUDIENCE)[keyof typeof IC_57_SERVICE_AUDIENCE];
183
- declare const IC_57_LABELS: Record<IC57Value, string>;
184
- declare const IC_58_REFERRAL_ENTITY: {
185
- readonly UNKNOWN: 0;
186
- readonly INTERNAL: 1;
187
- readonly INDIVIDUAL_SELF: 2;
188
- readonly INDIVIDUAL_FAMILY: 3;
189
- readonly INDIVIDUAL_PEER: 4;
190
- readonly INDIVIDUAL_OTHER: 5;
191
- readonly EXTERNAL_HOUSING_SHELTER: 10;
192
- readonly EXTERNAL_HOTLINE: 11;
193
- readonly EXTERNAL_JUSTICE: 12;
194
- readonly EXTERNAL_OUTREACH: 13;
195
- readonly EXTERNAL_TEMPORARY_SHELTER: 14;
196
- readonly EXTERNAL_RESIDENTIAL: 15;
197
- readonly EXTERNAL_HEALTH: 16;
198
- readonly EXTERNAL_EDUCATION: 17;
199
- readonly EXTERNAL_LAW_ENFORCEMENT: 18;
200
- readonly EXTERNAL_OTHER: 19;
201
- readonly EXTERNAL_CHILD_WELFARE: 20;
202
- readonly EXTERNAL_JUVENILE_JUSTICE: 21;
203
- readonly EXTERNAL_COURTS: 22;
204
- readonly EXTERNAL_CORRECTIONS: 23;
205
- readonly EXTERNAL_INPATIENT_PSYCH: 24;
206
- readonly EXTERNAL_HEALTHCARE_PROVIDER: 25;
207
- readonly EXTERNAL_VICTIM_COMMUNITY: 26;
208
- readonly EXTERNAL_CAC: 27;
209
- readonly EXTERNAL_VSP: 28;
210
- readonly EXTERNAL_COMMUNITY_PROVIDER: 29;
211
- readonly EXTERNAL_EMPLOYER: 30;
212
- readonly EXTERNAL_BENEFITS: 31;
213
- };
214
- type IC58Value = (typeof IC_58_REFERRAL_ENTITY)[keyof typeof IC_58_REFERRAL_ENTITY];
215
- declare const IC_58_LABELS: Record<IC58Value, string>;
216
- interface ReferralBranch {
217
- value?: number;
218
- label: string;
219
- description: string;
220
- children?: {
221
- value: number;
222
- label: string;
223
- }[];
224
- }
225
- declare const IC_58_PRIMARY_BRANCHES: Record<string, ReferralBranch>;
226
- interface OrgTypeGroup {
227
- value: number;
228
- label: string;
229
- description?: string;
230
- children: {
231
- value: number;
232
- label: string;
233
- }[];
234
- }
235
- declare const IC_58_ORG_TYPE_GROUPS: OrgTypeGroup[];
236
- interface IC58ExternalCategory {
237
- id: number;
238
- label: string;
239
- description: string;
240
- children: {
241
- id: number;
242
- label: string;
243
- }[];
244
- }
72
+ declare function getIC48CategoryByCode(code: string): IC48Category | undefined;
245
73
  /**
246
- * Tiered organization type structure for External referral sources.
247
- * Parent categories are collapsible; leaf children are selectable.
248
- * Based on core_referral_entity_category codebook from Notion.
74
+ * Get the label for a service category by ID.
75
+ * @param id - The category ID
76
+ * @returns The label or "Unknown Service" if not found
249
77
  */
250
- declare const IC_58_EXTERNAL_TIERED: IC58ExternalCategory[];
251
- declare const IC_59_SERVICE_STATE: {
252
- readonly IDENTIFIED: 1;
253
- readonly REFERRED: 2;
254
- readonly IN_PROGRESS: 3;
255
- readonly COMPLETED: 4;
256
- readonly DECLINED: 5;
257
- };
258
- type IC59Value = (typeof IC_59_SERVICE_STATE)[keyof typeof IC_59_SERVICE_STATE];
259
- declare const IC_59_LABELS: Record<IC59Value, string>;
260
- declare const IC_49_REFERRAL_OUTCOME: {
261
- readonly UNKNOWN: 0;
262
- readonly ATTAINED: 1;
263
- readonly NOT_ATTAINED: 2;
264
- };
265
- type IC49ReferralOutcomeValue = (typeof IC_49_REFERRAL_OUTCOME)[keyof typeof IC_49_REFERRAL_OUTCOME];
266
- declare const IC_49_REFERRAL_OUTCOME_LABELS: Record<IC49ReferralOutcomeValue, string>;
267
- declare const IC_49_REFERRAL_VERIFICATION: {
268
- readonly REFERRAL_MADE: 1;
269
- readonly CONFIRMED_RECEIVED: 2;
270
- };
271
- type IC49ReferralVerificationValue = (typeof IC_49_REFERRAL_VERIFICATION)[keyof typeof IC_49_REFERRAL_VERIFICATION];
272
- declare const IC_49_REFERRAL_VERIFICATION_LABELS: Record<IC49ReferralVerificationValue, string>;
273
- declare const SESSION_STATES: {
274
- readonly INITIALIZED: 1;
275
- readonly ACTION_NEEDED: 2;
276
- readonly PENDING_SAVE: 3;
277
- readonly CLOSED: 4;
278
- readonly DISCARDED: 5;
279
- };
280
- type SessionStateValue = (typeof SESSION_STATES)[keyof typeof SESSION_STATES];
281
- declare const SESSION_STATE_LABELS: Record<SessionStateValue, string>;
282
- declare const RECORD_STATES: {
283
- readonly OPEN: 1;
284
- readonly CLAIMED: 2;
285
- readonly SUBMITTED_NO_SHARES: 3;
286
- readonly SUBMITTED_WITH_SHARES: 4;
287
- readonly CLOSED: 5;
288
- };
289
- type RecordStateValue = (typeof RECORD_STATES)[keyof typeof RECORD_STATES];
290
- declare const RECORD_STATE_LABELS: Record<RecordStateValue, string>;
291
- declare const INTERACTION_TYPES: {
292
- readonly HOTLINE_CALL: 1;
293
- readonly LAP_INCIDENT: 2;
294
- readonly FIELD_RESPONSE: 3;
295
- readonly EMAIL_CRISIS: 4;
296
- readonly OTHER: 99;
297
- };
298
- type InteractionTypeValue = (typeof INTERACTION_TYPES)[keyof typeof INTERACTION_TYPES];
299
- /** Tuple of valid INTERACTION_TYPES values for schema constraints. */
300
- declare const VALID_INTERACTION_TYPES: readonly InteractionTypeValue[];
301
- /** Tuple of valid RECORD_STATES values for schema constraints. */
302
- declare const VALID_RECORD_STATES: readonly RecordStateValue[];
303
- declare const INTERACTION_TYPE_LABELS: Record<InteractionTypeValue, string>;
304
- declare const INCIDENT_INVOLVEMENT_ROLE: {
305
- readonly VICTIM_PRIMARY: "victim_primary";
306
- readonly VICTIM_SECONDARY: "victim_secondary";
307
- readonly VICTIM_OTHER: "victim_other";
308
- readonly DEPENDENT: "dependent";
309
- readonly WITNESS: "witness";
310
- readonly OFFENDER: "offender";
311
- readonly UNKNOWN: "unknown";
312
- readonly ANONYMOUS: "anonymous";
313
- readonly NOT_COLLECTED: "not_collected";
314
- };
315
- type IncidentInvolvementRoleValue = (typeof INCIDENT_INVOLVEMENT_ROLE)[keyof typeof INCIDENT_INVOLVEMENT_ROLE];
316
- declare const INCIDENT_INVOLVEMENT_ROLE_LABELS: Record<IncidentInvolvementRoleValue, string>;
317
- /** Involvement roles available for selection in Thread UI (excludes victim_other and not_collected). */
318
- declare const THREAD_INVOLVEMENT_ROLES: readonly ["victim_primary", "victim_secondary", "dependent", "witness", "offender", "unknown", "anonymous"];
319
- declare const PERSON_ROLES: {
320
- readonly VICTIM_CLIENT: "Victim / Client";
321
- readonly CALLER_REPORTER: "Caller / Reporter";
322
- readonly DEPENDENT: "Dependent / Secondary Victim";
323
- readonly OFFENDER: "Offender";
324
- readonly PERSONNEL: "Personnel / Staff";
325
- readonly OTHER: "Other";
326
- };
327
- type PersonRoleValue = (typeof PERSON_ROLES)[keyof typeof PERSON_ROLES];
78
+ declare function getIC48Label(id: number): string;
328
79
  /**
329
- * Maps IncidentInvolvementRoleValue (enum key stored on PersonInteracted) to
330
- * the corresponding PersonRoleValue display string used in the UI.
331
- *
332
- * PersonnelPerson always receives PERSON_ROLES.PERSONNEL regardless of their
333
- * personInvolvementRole — handle that case before consulting this map.
334
- *
335
- * All victim variants (primary, secondary, other) resolve to VICTIM_CLIENT
336
- * because Thread treats them uniformly in the person block UI.
80
+ * Get all children of a category (direct descendants only).
81
+ * @param parentId - The parent category ID
82
+ * @returns Array of child categories
337
83
  */
338
- declare const INCIDENT_INVOLVEMENT_ROLE_TO_PERSON_ROLE: Record<IncidentInvolvementRoleValue, PersonRoleValue>;
339
- declare const IC_4_AGE_TYPE: {
340
- readonly EXACT_DOB: 1;
341
- readonly APPROXIMATE: 2;
342
- readonly ESTIMATED_RANGE: 3;
343
- readonly UNKNOWN: 99;
344
- };
345
- type IC4Value = (typeof IC_4_AGE_TYPE)[keyof typeof IC_4_AGE_TYPE];
346
- declare const IC_4_LABELS: Record<IC4Value, string>;
347
- declare const IC_22_CORE_SEX: {
348
- readonly FEMALE: 1;
349
- readonly MALE: 2;
350
- readonly INTERSEX: 3;
351
- readonly UNKNOWN: 99;
352
- };
353
- type IC22Value = (typeof IC_22_CORE_SEX)[keyof typeof IC_22_CORE_SEX];
354
- declare const IC_22_LABELS: Record<IC22Value, string>;
355
- declare const IC_23_CORE_GENDER_IDENTITY: {
356
- readonly FEMALE: 1;
357
- readonly MALE: 2;
358
- readonly NON_BINARY: 3;
359
- readonly TRANSGENDER_FEMALE: 4;
360
- readonly TRANSGENDER_MALE: 5;
361
- readonly UNKNOWN: 99;
362
- };
363
- type IC23Value = (typeof IC_23_CORE_GENDER_IDENTITY)[keyof typeof IC_23_CORE_GENDER_IDENTITY];
364
- declare const IC_23_LABELS: Record<IC23Value, string>;
365
- declare const IC_24_RACE: {
366
- readonly AMERICAN_INDIAN_ALASKA_NATIVE: 1;
367
- readonly ASIAN: 2;
368
- readonly BLACK_AFRICAN_AMERICAN: 3;
369
- readonly NATIVE_HAWAIIAN_PACIFIC_ISLANDER: 4;
370
- readonly WHITE: 5;
371
- readonly MULTIPLE_RACES: 6;
372
- readonly UNKNOWN: 99;
373
- };
374
- type IC24Value = (typeof IC_24_RACE)[keyof typeof IC_24_RACE];
375
- declare const IC_24_LABELS: Record<IC24Value, string>;
376
- declare const IC_25_ETHNICITY: {
377
- readonly HISPANIC_LATINO: 1;
378
- readonly NOT_HISPANIC_LATINO: 2;
379
- readonly UNKNOWN: 99;
380
- };
381
- type IC25Value = (typeof IC_25_ETHNICITY)[keyof typeof IC_25_ETHNICITY];
382
- declare const IC_25_LABELS: Record<IC25Value, string>;
383
- declare const ACCOMMODATION_OPTIONS: {
384
- readonly HEARING_IMPAIRED: "hearing_impaired";
385
- readonly VISION_IMPAIRED: "vision_impaired";
386
- readonly MOBILITY_LIMITATION: "mobility_limitation";
387
- readonly COGNITIVE_DEVELOPMENTAL: "cognitive_developmental";
388
- readonly LANGUAGE_INTERPRETER: "language_interpreter";
389
- readonly OTHER: "other";
390
- };
391
- type AccommodationValue = (typeof ACCOMMODATION_OPTIONS)[keyof typeof ACCOMMODATION_OPTIONS];
392
- declare const ACCOMMODATION_LABELS: Record<AccommodationValue, string>;
393
- declare const MINOR_ADULT_STATUS: {
394
- readonly MINOR: 1;
395
- readonly ADULT: 2;
396
- readonly UNKNOWN: 99;
397
- };
398
- type MinorAdultStatusValue = (typeof MINOR_ADULT_STATUS)[keyof typeof MINOR_ADULT_STATUS];
399
- declare const MINOR_ADULT_STATUS_LABELS: Record<MinorAdultStatusValue, string>;
400
- declare const APPARENT_AGE: {
401
- readonly CHILD: "child";
402
- readonly TEEN: "teen";
403
- readonly YOUNG_ADULT: "young_adult";
404
- readonly ADULT: "adult";
405
- readonly MIDDLE_AGE: "middle_age";
406
- readonly SENIOR: "senior";
407
- };
408
- type ApparentAgeValue = (typeof APPARENT_AGE)[keyof typeof APPARENT_AGE];
409
- declare const APPARENT_AGE_LABELS: Record<ApparentAgeValue, string>;
410
- declare const AGE_BIN_REPORTING: {
411
- readonly AGE_0_12: "age_0_12";
412
- readonly AGE_13_17: "age_13_17";
413
- readonly AGE_18_24: "age_18_24";
414
- readonly AGE_25_59: "age_25_59";
415
- readonly AGE_60_PLUS: "age_60_plus";
416
- readonly NOT_REPORTED: "not_reported";
417
- readonly NOT_TRACKED: "not_tracked";
418
- };
419
- type AgeBinReportingValue = (typeof AGE_BIN_REPORTING)[keyof typeof AGE_BIN_REPORTING];
420
- declare const AGE_BIN_REPORTING_LABELS: Record<AgeBinReportingValue, string>;
421
- declare const AGE_BIN_REPORTING_IS_MINOR: Record<AgeBinReportingValue, boolean | null>;
422
- /** Derive VOCA age bin from numeric age */
423
- declare function deriveAgeBinFromAge(age: number): AgeBinReportingValue;
424
- declare const QUICK_START_TEMPLATES: {
425
- readonly HOTLINE_CALL: "hotline_call";
426
- readonly LAP_INCIDENT: "lap_incident";
427
- readonly HT_REFERRAL: "ht_referral";
428
- readonly FIELD_RESPONSE: "field_response";
429
- readonly EMAIL_CRISIS: "email_crisis";
430
- readonly OTHER: "other";
431
- };
432
- type QuickStartTemplateId = (typeof QUICK_START_TEMPLATES)[keyof typeof QUICK_START_TEMPLATES];
433
- declare const QUICK_START_LABELS: Record<QuickStartTemplateId, string>;
434
- declare const QUICK_START_CONFIG: Record<QuickStartTemplateId, {
435
- contactMethod: number;
436
- interactionType: number;
437
- intakeFormKey?: string;
438
- }>;
439
- declare const SUBMISSION_STATES: {
440
- readonly IN_PROGRESS: 1;
441
- readonly SUBMITTED: 2;
442
- readonly LOCKED: 3;
443
- };
444
- type SubmissionStateValue = (typeof SUBMISSION_STATES)[keyof typeof SUBMISSION_STATES];
445
- declare const SUBMISSION_STATE_LABELS: Record<SubmissionStateValue, string>;
446
- declare const FORM_STATUS: {
447
- readonly DRAFT: "draft";
448
- readonly ACTIVE: "active";
449
- readonly DEPRECATED: "deprecated";
450
- };
451
- type FormStatusValue = (typeof FORM_STATUS)[keyof typeof FORM_STATUS];
452
- declare const FORM_STATUS_LABELS: Record<FormStatusValue, string>;
453
- declare const QUESTION_FORMAT: {
454
- readonly EXCLUSIVE: "exclusive";
455
- readonly INCLUSIVE: "inclusive";
456
- readonly DROPDOWN: "dropdown";
457
- readonly BINARY: "binary";
458
- readonly TEXT: "text";
459
- readonly NUMBER: "number";
460
- readonly DATE: "date";
461
- readonly MULTISELECT: "multiselect";
462
- };
463
- /** @deprecated Use KNOWN_QUESTION_FORMATS from schemas/forms */
464
- type QuestionFormatValue = (typeof QUESTION_FORMAT)[keyof typeof QUESTION_FORMAT];
465
- declare const QUESTION_FORMAT_LABELS: Record<string, string>;
466
- declare const APP_SCOPE: {
467
- readonly THREAD: "thread";
468
- readonly PAVE: "pave";
469
- readonly BOTH: "both";
470
- };
471
- type AppScopeValue = (typeof APP_SCOPE)[keyof typeof APP_SCOPE];
472
- declare const FORM_TYPE: {
473
- readonly SCREENING: "screening";
474
- readonly INTAKE: "intake";
475
- readonly ASSESSMENT: "assessment";
476
- readonly DEMOGRAPHICS: "demographics";
477
- };
478
- type FormTypeValue = (typeof FORM_TYPE)[keyof typeof FORM_TYPE];
479
- declare const FORM_TYPE_LABELS: Record<FormTypeValue, string>;
480
- declare const USER_STATUS: {
481
- readonly CREATED: 0;
482
- readonly PENDING_APPROVAL: 1;
483
- readonly APPROVED: 2;
484
- readonly DENIED: 3;
485
- readonly INVITED: 4;
486
- readonly REVOKED: 5;
487
- };
488
- type UserStatusValue = (typeof USER_STATUS)[keyof typeof USER_STATUS];
489
- declare const USER_STATUS_LABELS: Record<UserStatusValue, string>;
490
- declare const INCIDENT_PARTICIPATION_ROLE: {
491
- readonly CLIENT_SUBJECT: "client_subject";
492
- readonly CALLER_SELF: "caller_self";
493
- readonly CALLER_THIRD_PARTY: "caller_third_party";
494
- readonly REPORTER: "reporter";
495
- readonly FAMILY_MEMBER_OR_GUARDIAN: "family_member_or_guardian";
496
- readonly FRIEND_OR_PEER: "friend_or_peer";
497
- readonly SERVICE_PROVIDER_STAFF: "service_provider_staff";
498
- readonly MEDICAL_PROVIDER_STAFF: "medical_provider_staff";
499
- readonly UNKNOWN: "unknown";
500
- readonly ANONYMOUS: "anonymous";
501
- readonly NOT_COLLECTED: "not_collected";
502
- };
503
- type IncidentParticipationRoleValue = (typeof INCIDENT_PARTICIPATION_ROLE)[keyof typeof INCIDENT_PARTICIPATION_ROLE];
504
- declare const INCIDENT_PARTICIPATION_ROLE_VALUES: readonly ["client_subject", "caller_self", "caller_third_party", "reporter", "family_member_or_guardian", "friend_or_peer", "service_provider_staff", "medical_provider_staff", "unknown", "anonymous", "not_collected"];
505
- declare const INCIDENT_PARTICIPATION_ROLE_LABELS: Record<IncidentParticipationRoleValue, string>;
84
+ declare function getIC48ChildCategories(parentId: number): IC48Category[];
506
85
  /**
507
- * Participation role category groupings for UI organization.
508
- *
509
- * Note: UNKNOWN, ANONYMOUS, and NOT_COLLECTED are intentionally excluded.
510
- * These are data quality states, not selectable participation roles.
511
- * Handle them via separate UI controls (e.g., "Unknown" / "Anonymous" buttons).
86
+ * Get all selectable (leaf) categories.
87
+ * @returns Array of selectable categories
512
88
  */
513
- declare const PARTICIPATION_ROLE_CATEGORIES: {
514
- readonly CLIENT: readonly ["client_subject"];
515
- readonly CALLER_REPORTER: readonly ["caller_self", "caller_third_party", "reporter"];
516
- readonly SUPPORT_NETWORK: readonly ["family_member_or_guardian", "friend_or_peer"];
517
- readonly SYSTEM_PROFESSIONAL: readonly ["service_provider_staff", "medical_provider_staff"];
518
- };
519
- /** All participation roles assigned to a victim who is also the caller. */
520
- declare const CALLER_IS_VICTIM_ROLES: IncidentParticipationRoleValue[];
521
- declare const PERSON_DISPLAY_CATEGORY: {
522
- readonly PRIMARY_VICTIM: "primary_victim";
523
- readonly ELIGIBLE_FAMILY: "eligible_family";
524
- readonly OFFENDER: "offender";
525
- readonly THIRD_PARTY: "third_party";
526
- readonly PERSONNEL: "personnel";
527
- };
528
- type PersonDisplayCategoryValue = (typeof PERSON_DISPLAY_CATEGORY)[keyof typeof PERSON_DISPLAY_CATEGORY];
529
- declare const PERSON_DISPLAY_CATEGORY_LABELS: Record<PersonDisplayCategoryValue, string>;
530
- declare const PERSON_TYPE: {
531
- readonly PROTECTED: "ProtectedPerson";
532
- readonly PERPETRATOR: "PerpetratorPerson";
533
- readonly PERSONNEL: "PersonnelPerson";
534
- readonly THIRD_PARTY: "ThirdPartyPerson";
535
- };
536
- type PersonTypeValue = (typeof PERSON_TYPE)[keyof typeof PERSON_TYPE];
537
- /** Tuple of valid PERSON_TYPE values for schema consumption. */
538
- declare const PERSON_TYPE_VALUES: readonly ["ProtectedPerson", "PerpetratorPerson", "PersonnelPerson", "ThirdPartyPerson"];
89
+ declare function getIC48SelectableCategories(): IC48Category[];
539
90
  /**
540
- * Static mapping from involvement role to person type.
541
- *
542
- * Note: Returns `null` for UNKNOWN and NOT_COLLECTED because these roles
543
- * require contextual handling. For these cases, use `getPersonTypeForRole()`
544
- * which applies conditional logic (e.g., preserving Personnel context).
545
- *
546
- * @see getPersonTypeForRole for the recommended API with null handling
91
+ * Get the root/topic categories (level 1, no parent).
92
+ * @returns Array of topic-level categories
547
93
  */
548
- declare const INVOLVEMENT_ROLE_TO_PERSON_TYPE: Record<IncidentInvolvementRoleValue, PersonTypeValue | null>;
94
+ declare function getIC48TopicCategories(): IC48Category[];
549
95
  /**
550
- * Get the person type for an involvement role.
551
- * For 'unknown', preserves PersonnelPerson if provided as context, otherwise defaults to ThirdPartyPerson.
552
- * Returns null for 'not_collected' (data quality state — cannot infer person type).
96
+ * Get the parent category for a given category.
97
+ * @param id - The category ID
98
+ * @returns The parent category or undefined if none/not found
553
99
  */
554
- declare function getPersonTypeForRole(role: IncidentInvolvementRoleValue, contextPersonType?: PersonTypeValue): PersonTypeValue | null;
100
+ declare function getIC48ParentCategory(id: number): IC48Category | undefined;
555
101
  /**
556
- * Get the display category for a person based on involvement role and person type.
557
- * Handles the conditional 'unknown' case where PersonnelPerson → Personnel category.
102
+ * Get all ancestor categories (parent, grandparent, etc.) for a category.
103
+ * @param id - The category ID
104
+ * @returns Array of ancestor categories from immediate parent to root
558
105
  */
559
- declare function getDisplayCategoryForRole(role: IncidentInvolvementRoleValue, personType?: PersonTypeValue): PersonDisplayCategoryValue;
560
- declare const DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY: Record<PersonDisplayCategoryValue, IncidentParticipationRoleValue | null>;
561
-
106
+ declare function getIC48AncestorCategories(id: number): IC48Category[];
562
107
  /**
563
- * @htilabs/platform-common-models — Platform Authorization Constants
564
- *
565
- * Enums and labels for the platform role/function permission model.
566
- * Includes permission states, share view levels, tool codes, role levels,
567
- * and function implementation statuses.
568
- *
569
- * Source: PLATFORM_AUTH_SPEC.md Sections 5 + 6
108
+ * Get the topic (level 1) category for any category in the tree.
109
+ * @param id - The category ID
110
+ * @returns The topic-level ancestor or undefined
570
111
  */
571
- declare const PERMISSION_STATE: {
572
- /** Role can always perform this function (mandatory, cannot disable). */
573
- readonly ALWAYS: "ALWAYS";
574
- /** Default On — user can opt off. */
575
- readonly PREF_YES: "PREF_YES";
576
- /** Default Off — user can opt in. */
577
- readonly PREF_NO: "PREF_NO";
578
- /** Role is explicitly barred from this function. */
579
- readonly NEVER: "NEVER";
580
- };
581
- type PermissionStateValue = (typeof PERMISSION_STATE)[keyof typeof PERMISSION_STATE];
582
- declare const PERMISSION_STATE_VALUES: readonly ["ALWAYS", "PREF_YES", "PREF_NO", "NEVER"];
583
- declare const PERMISSION_STATE_LABELS: Record<PermissionStateValue, string>;
584
- /** UI display metadata for permission states (colors, icons). */
585
- declare const PERMISSION_STATE_DISPLAY: Record<PermissionStateValue, {
586
- label: string;
587
- color: string;
588
- bgColor: string;
589
- icon: string;
590
- }>;
591
- declare const SHARE_VIEW: {
592
- /** System metadata only (partial access). */
593
- readonly SYS_INFO: "sys_info";
594
- /** Full case/record content. */
595
- readonly ALL: "all";
596
- /** No data access. */
597
- readonly NONE: "none";
598
- };
599
- type ShareViewValue = (typeof SHARE_VIEW)[keyof typeof SHARE_VIEW];
600
- declare const SHARE_VIEW_VALUES: readonly ["sys_info", "all", "none"];
601
- declare const SHARE_VIEW_LABELS: Record<ShareViewValue, string>;
602
- declare const PLATFORM_TOOL: {
603
- readonly PAVE: "PAVE";
604
- readonly ECHO: "ECHO";
605
- readonly LEADS: "LEADS";
606
- readonly THREAD: "THREAD";
607
- readonly TRAIL: "TRAIL";
608
- readonly PLATFORM: "PLATFORM";
609
- };
610
- type PlatformToolValue = (typeof PLATFORM_TOOL)[keyof typeof PLATFORM_TOOL];
611
- declare const PLATFORM_TOOL_VALUES: readonly ["PAVE", "ECHO", "LEADS", "THREAD", "TRAIL", "PLATFORM"];
612
- declare const PLATFORM_TOOL_LABELS: Record<PlatformToolValue, string>;
613
- declare const ROLE_LEVEL: {
614
- /** User-facing roles (staff, volunteers, practitioners). */
615
- readonly OPERATIONAL: "operational";
616
- /** Agency-level admin roles. */
617
- readonly AGENCY: "agency";
618
- /** Team-level admin roles. */
619
- readonly TEAM: "team";
620
- /** HTI-wide platform admin. */
621
- readonly PLATFORM: "platform";
622
- /** External governance/oversight roles. */
623
- readonly OVERSIGHT: "oversight";
624
- };
625
- type RoleLevelValue = (typeof ROLE_LEVEL)[keyof typeof ROLE_LEVEL];
626
- declare const ROLE_LEVEL_VALUES: readonly ["operational", "agency", "team", "platform", "oversight"];
627
- declare const ROLE_LEVEL_LABELS: Record<RoleLevelValue, string>;
628
- declare const FUNCTION_STATUS: {
629
- readonly NOT_STARTED: "Not started";
630
- readonly DEFINED_NEW: "Defined; new function";
631
- readonly DEFINED_EXISTING: "Defined; existing PAVE function";
632
- readonly FUNCTIONAL: "Functional on all apps";
633
- readonly FUTURE: "Future function (not v1)";
634
- };
635
- type FunctionStatusValue = (typeof FUNCTION_STATUS)[keyof typeof FUNCTION_STATUS];
636
- declare const FUNCTION_STATUS_VALUES: readonly ["Not started", "Defined; new function", "Defined; existing PAVE function", "Functional on all apps", "Future function (not v1)"];
637
- declare const FUNCTION_STATUS_LABELS: Record<FunctionStatusValue, string>;
112
+ declare function getIC48TopicForCategory(id: number): IC48Category | undefined;
113
+ declare const IC_48_CRISIS_SERVICES: {
114
+ /** Interpreter Services (01-07-06) */
115
+ readonly INTERPRETER: 158;
116
+ /** Emergency Transportation (01-09-01) */
117
+ readonly TRANSPORTATION: 28;
118
+ /** Medical Care (01-04-01) */
119
+ readonly MEDICAL: 50;
120
+ /** Emergency Shelter (01-05-01) */
121
+ readonly EMERGENCY_SHELTER: 99;
122
+ };
123
+ declare const IC_48_DERIVATION_SERVICES: {
124
+ /** Advocacy services */
125
+ readonly ADVOCACY: 20;
126
+ /** Child Care */
127
+ readonly CHILD_CARE: 24;
128
+ /** Formal Education */
129
+ readonly FORMAL_EDUCATION: 29;
130
+ /** Safety Planning */
131
+ readonly SAFETY_PLANNING: 37;
132
+ /** Medical Care */
133
+ readonly MEDICAL: 50;
134
+ /** Mental Health */
135
+ readonly MENTAL_HEALTH: 52;
136
+ /** Employment Support */
137
+ readonly EMPLOYMENT: 72;
138
+ /** Case Management */
139
+ readonly CASE_MANAGEMENT: 87;
140
+ /** Emergency Shelter */
141
+ readonly EMERGENCY_SHELTER: 99;
142
+ /** Immigration Relief */
143
+ readonly IMMIGRATION: 113;
144
+ /** Criminal Justice Support */
145
+ readonly CRIMINAL_JUSTICE: 122;
146
+ /** Emergency Safety Assistance */
147
+ readonly EMERGENCY_SAFETY: 124;
148
+ /** Interpreter Services */
149
+ readonly INTERPRETER: 158;
150
+ };
151
+ type IC48CrisisServiceId = (typeof IC_48_CRISIS_SERVICES)[keyof typeof IC_48_CRISIS_SERVICES];
152
+ type IC48DerivationServiceId = (typeof IC_48_DERIVATION_SERVICES)[keyof typeof IC_48_DERIVATION_SERVICES];
638
153
 
639
- export { ACCOMMODATION_LABELS, ACCOMMODATION_OPTIONS, AGE_BIN_REPORTING, AGE_BIN_REPORTING_IS_MINOR, AGE_BIN_REPORTING_LABELS, APPARENT_AGE, APPARENT_AGE_LABELS, APP_SCOPE, type AccommodationValue, type AgeBinReportingValue, type AppScopeValue, type ApparentAgeValue, CALLER_IS_VICTIM_ROLES, DATA_QUALITY, DATA_QUALITY_DESCRIPTIONS, DATA_QUALITY_LABELS, DATA_QUALITY_VALUES, DEFAULT_PARTICIPATION_ROLE_BY_CATEGORY, type DataQualityValue, FORM_STATUS, FORM_STATUS_LABELS, FORM_TYPE, FORM_TYPE_LABELS, FUNCTION_STATUS, FUNCTION_STATUS_LABELS, FUNCTION_STATUS_VALUES, type FormStatusValue, type FormTypeValue, type FunctionStatusValue, type IC13Category, type IC13PriorityGroup, type IC13Value, type IC22Value, type IC23Value, type IC24Value, type IC25Value, type IC49ReferralOutcomeValue, type IC49ReferralVerificationValue, type IC49Value, type IC4Value, type IC56ChannelValue, type IC56Value, type IC57Value, type IC58ExternalCategory, type IC58Value, type IC59Value, type IC5Value, IC_13_CATEGORIES, IC_13_CATEGORY_ORDER, IC_13_LABELS, IC_13_PRIORITY_GROUPS, IC_13_RELATIONSHIP_ABBREV, IC_13_RELATIONSHIP_TYPE, IC_13_REVERSE_CONTEXT_LABELS, IC_22_CORE_SEX, IC_22_LABELS, IC_23_CORE_GENDER_IDENTITY, IC_23_LABELS, IC_24_LABELS, IC_24_RACE, IC_25_ETHNICITY, IC_25_LABELS, IC_48_SERVICE_CATEGORIES, IC_49_DESCRIPTIONS, IC_49_LABELS, IC_49_REFERRAL_OUTCOME, IC_49_REFERRAL_OUTCOME_LABELS, IC_49_REFERRAL_VERIFICATION, IC_49_REFERRAL_VERIFICATION_LABELS, IC_49_SERVICE_MECHANISM, IC_4_AGE_TYPE, IC_4_LABELS, IC_56_DESCRIPTIONS, IC_56_LABELS, IC_56_OPTIONS, IC_56_SERVICE_DELIVERY_CHANNEL, IC_57_LABELS, IC_57_SERVICE_AUDIENCE, IC_58_EXTERNAL_TIERED, IC_58_LABELS, IC_58_ORG_TYPE_GROUPS, IC_58_PRIMARY_BRANCHES, IC_58_REFERRAL_ENTITY, IC_59_LABELS, IC_59_SERVICE_STATE, IC_5_FULL_LABELS, IC_5_LABELS, IC_5_VICTIMIZATION, INCIDENT_INVOLVEMENT_ROLE, INCIDENT_INVOLVEMENT_ROLE_LABELS, INCIDENT_INVOLVEMENT_ROLE_TO_PERSON_ROLE, INCIDENT_PARTICIPATION_ROLE, INCIDENT_PARTICIPATION_ROLE_LABELS, INCIDENT_PARTICIPATION_ROLE_VALUES, INTERACTION_TYPES, INTERACTION_TYPE_LABELS, INVOLVEMENT_ROLE_TO_PERSON_TYPE, type IncidentInvolvementRoleValue, type IncidentParticipationRoleValue, type InteractionTypeValue, MINOR_ADULT_STATUS, MINOR_ADULT_STATUS_LABELS, type MinorAdultStatusValue, type OrgTypeGroup, PARTICIPATION_ROLE_CATEGORIES, PERMISSION_STATE, PERMISSION_STATE_DISPLAY, PERMISSION_STATE_LABELS, PERMISSION_STATE_VALUES, PERSON_DISPLAY_CATEGORY, PERSON_DISPLAY_CATEGORY_LABELS, PERSON_ROLES, PERSON_TYPE, PERSON_TYPE_VALUES, PLATFORM_TOOL, PLATFORM_TOOL_LABELS, PLATFORM_TOOL_VALUES, type PermissionStateValue, type PersonDisplayCategoryValue, type PersonRoleValue, type PersonTypeValue, type PlatformToolValue, QUESTION_FORMAT, QUESTION_FORMAT_LABELS, QUICK_START_CONFIG, QUICK_START_LABELS, QUICK_START_TEMPLATES, type QuestionFormatValue, type QuickStartTemplateId, RECORD_STATES, RECORD_STATE_LABELS, RELATIONSHIP_CONCERNS, RELATIONSHIP_CONCERNS_LABELS, RELATIONSHIP_CONCERNS_VALUES, RELATIONSHIP_DYNAMICS, RELATIONSHIP_DYNAMICS_LABELS, RELATIONSHIP_DYNAMICS_VALUES, ROLE_LEVEL, ROLE_LEVEL_LABELS, ROLE_LEVEL_VALUES, type RecordStateValue, type ReferralBranch, type RelationshipConcernValue, type RelationshipDynamicValue, type RoleLevelValue, SESSION_STATES, SESSION_STATE_LABELS, SHARE_VIEW, SHARE_VIEW_LABELS, SHARE_VIEW_VALUES, SUBMISSION_STATES, SUBMISSION_STATE_LABELS, type ServiceCategory, type ServiceCategoryChild, type SessionStateValue, type ShareViewValue, type SubmissionStateValue, THREAD_INVOLVEMENT_ROLES, USER_STATUS, USER_STATUS_LABELS, type UserStatusValue, VALID_INTERACTION_TYPES, VALID_RECORD_STATES, deriveAgeBinFromAge, getDisplayCategoryForRole, getPersonTypeForRole, isIC56Missingness, isIC56ValidChannel, sortRelationshipsByPriority };
154
+ export { type IC48Catalog, type IC48CatalogMeta, type IC48Category, type IC48CategoryCrosswalk, type IC48CrisisServiceId, type IC48DerivationServiceId, IC_48_BY_CODE, IC_48_BY_ID, IC_48_CATEGORIES, IC_48_CRISIS_SERVICES, IC_48_DERIVATION_SERVICES, IC_48_SERVICE_CATALOG, getIC48AncestorCategories, getIC48CategoryByCode, getIC48CategoryById, getIC48ChildCategories, getIC48Label, getIC48ParentCategory, getIC48SelectableCategories, getIC48TopicCategories, getIC48TopicForCategory };