@htilabs/platform-common-models 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/agency-BHv54o79.d.ts +484 -0
  2. package/dist/agency-Ca4pCOOf.d.ts +342 -0
  3. package/dist/agency-DYCv839V.d.cts +342 -0
  4. package/dist/agency-Djp57S71.d.cts +484 -0
  5. package/dist/constants/index.cjs +952 -0
  6. package/dist/constants/index.cjs.map +1 -1
  7. package/dist/constants/index.d.cts +3 -1
  8. package/dist/constants/index.d.ts +3 -1
  9. package/dist/constants/index.js +920 -0
  10. package/dist/constants/index.js.map +1 -1
  11. package/dist/{cvcEntry-ctHTp2df.d.cts → cvcEntry-0BIB9sen.d.cts} +36 -36
  12. package/dist/{cvcEntry-ctHTp2df.d.ts → cvcEntry-0BIB9sen.d.ts} +36 -36
  13. package/dist/cvcs/index.cjs +114 -62
  14. package/dist/cvcs/index.cjs.map +1 -1
  15. package/dist/cvcs/index.d.cts +112 -59
  16. package/dist/cvcs/index.d.ts +112 -59
  17. package/dist/cvcs/index.js +114 -62
  18. package/dist/cvcs/index.js.map +1 -1
  19. package/dist/enums/index.cjs +1 -0
  20. package/dist/enums/index.cjs.map +1 -1
  21. package/dist/enums/index.d.cts +2 -1
  22. package/dist/enums/index.d.ts +2 -1
  23. package/dist/enums/index.js +1 -0
  24. package/dist/enums/index.js.map +1 -1
  25. package/dist/{index-4DiJrn7y.d.ts → index-CDoqrfc1.d.ts} +1 -1
  26. package/dist/{index-qreOzXYS.d.cts → index-Zu_mOJRn.d.cts} +1 -1
  27. package/dist/index.cjs +1654 -1077
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +6 -4
  30. package/dist/index.d.ts +6 -4
  31. package/dist/index.js +1600 -1076
  32. package/dist/index.js.map +1 -1
  33. package/dist/models/index.d.cts +2 -2
  34. package/dist/models/index.d.ts +2 -2
  35. package/dist/org-type-BYQb9Qzq.d.ts +366 -0
  36. package/dist/org-type-D_FG4KdN.d.cts +366 -0
  37. package/dist/{platform-auth-CrF5U_JH.d.cts → platform-auth-CvAYFVhK.d.cts} +39 -0
  38. package/dist/{platform-auth-CrF5U_JH.d.ts → platform-auth-CvAYFVhK.d.ts} +39 -0
  39. package/dist/schemas/index.cjs +977 -2
  40. package/dist/schemas/index.cjs.map +1 -1
  41. package/dist/schemas/index.d.cts +14 -11
  42. package/dist/schemas/index.d.ts +14 -11
  43. package/dist/schemas/index.js +962 -1
  44. package/dist/schemas/index.js.map +1 -1
  45. package/dist/types/index.d.cts +2 -2
  46. package/dist/types/index.d.ts +2 -2
  47. package/dist/validation/index.cjs +894 -2
  48. package/dist/validation/index.cjs.map +1 -1
  49. package/dist/validation/index.d.cts +5 -1
  50. package/dist/validation/index.d.ts +5 -1
  51. package/dist/validation/index.js +884 -1
  52. package/dist/validation/index.js.map +1 -1
  53. package/package.json +26 -27
  54. package/src/__tests__/__snapshots__/cvc-sot.snap +2 -2
  55. package/src/__tests__/cvc-sot-snapshot.test.ts +5 -5
  56. package/src/__tests__/cvc-structural.test.ts +1 -1
  57. package/src/__tests__/org-type-contract.test.ts +1353 -0
  58. package/src/__tests__/referral-entity-category-canon.test.ts +255 -81
  59. package/src/constants/ic.ts +45 -0
  60. package/src/constants/index.ts +1 -0
  61. package/src/constants/org-type.ts +703 -0
  62. package/src/cvcs/index.ts +1 -1
  63. package/src/cvcs/{referralEntityCategory.v1.1.0.json → referralEntityCategory.v1.2.0.json} +111 -59
  64. package/src/generated/cvc-enums.ts +2 -1
  65. package/src/index.ts +23 -0
  66. package/src/schemas/agency.ts +481 -0
  67. package/src/schemas/index.ts +24 -0
  68. package/src/validation/agency.ts +119 -0
  69. package/src/validation/index.ts +1 -0
  70. package/dist/team-C4LJ5Tex.d.cts +0 -333
  71. package/dist/team-C4LJ5Tex.d.ts +0 -333
@@ -6013,11 +6013,900 @@ var FUNCTION_STATUS_LABELS = {
6013
6013
  [FUNCTION_STATUS.FUNCTIONAL]: "Functional",
6014
6014
  [FUNCTION_STATUS.FUTURE]: "Future (Not v1)"
6015
6015
  };
6016
+
6017
+ // src/cvcs/referralEntityCategory.v1.2.0.json
6018
+ var referralEntityCategory_v1_2_0_default = {
6019
+ domain: "referral_entity_category",
6020
+ name: "Core Referral Entity Category",
6021
+ version: "1.2.0",
6022
+ _status: "CANONICAL \u2014 Notion CVC-48 `core-referral_entity_category` (IC-58), status Active (full audit 2026-08-20, CVC48_IC58_REFERRAL_ENTITY_CATEGORY_AUDIT; `Date of last audit` 2026-09-01). Re-mirrored from prototype canon yaml v1.3 @ f1321e47 and the live Notion codebook (46 rows, compared row by row 2026-10-05). SUPERSEDES referralEntityCategory v1.0.0 (platform-common <= 0.13.0), which predated the audit. ADDITIVE: no v1.0.0 key is removed and no v1.0.0 positional code changes. ADDED (4): `adult_protective_services` (02-03-06-00), `school_academic_institution` (02-05-01-00), `legal_services_provider` (02-06-04-00), and since 0.18.0 `hotline` (02-02-01-00, canon's selectable Level-2 parent of the two hotline children) at the next free ordinal 048-006-003 with `national_hotline` / `local_other_hotline` RE-PARENTED under it \u2014 their codes are unchanged (a positional code is identity, `parentCode` is hierarchy). SELECTABLE follows canon on two rows: `education` is now a non-selectable heading (its leaf is `school_academic_institution`, which carries the HMIS R1 School rollup \u2014 ruled 2026-08-20) and `law_enforcement` is now selectable (canon Level 2 Required; its five children are optional depth). A stored `education` is still a valid key. `title` and `definition` are canon's, verbatim (yaml `name` / `definition`; the live Notion wording where the two differ: the Adult Protective Services label, the quotation marks in the Victim service provider definition, and the wording of the residual Community-based provider definition); the Level-0 rows keep the package's house missingness titles. `justice_protective_systems` no longer carries the package-authored definition v1.0.0 gave it: canon's heading (02-03-00-00) has none. Every canon-backed row carries canon's 4-segment code as `canonicalCode`; the package's own positional codes are unchanged and are NOT canon's. NOT carried: canon `hmis_r1_code` / `hmis_r1_mapping`, `required`, `voca_ovc_pmt_bucket`, `pave_2025_mapping`, `logic_notes`, `mappings_notes` (v1.0.0 carried none of them). CARRIED since 0.18.0: canon `enum_constant` as `enumConstant` on every canon-backed row (the Sean-spec constant the org registry / `agencies.typeId` spell the type with). Generated by scripts/gen-referral-entity-category.py \u2014 do not hand-edit.",
6023
+ _source: "htilabstech/prototype/data/cvcs/core_referral_entity_category.yaml @ f1321e47 (Notion CVC-48, yaml v1.3; read from origin/main) + Notion codebook collection://3181ef14-abcd-8081-95b5-000bc30a73bd (wording of 3 cells, compared 2026-10-05)",
6024
+ _supersedes: {
6025
+ version: "1.0.0",
6026
+ keyMap: {
6027
+ missingness_root: "missingness_root",
6028
+ unknown: "unknown",
6029
+ anonymous: "anonymous",
6030
+ data_not_collected: "data_not_collected",
6031
+ self_referred: "self_referred",
6032
+ family_guardian_friend: "family_guardian_friend",
6033
+ peer: "peer",
6034
+ other_individual: "other_individual",
6035
+ housing_shelter_continuum: "housing_shelter_continuum",
6036
+ outreach_project: "outreach_project",
6037
+ temporary_shelter: "temporary_shelter",
6038
+ residential_project: "residential_project",
6039
+ hotlines: "hotlines",
6040
+ national_hotline: "national_hotline",
6041
+ local_other_hotline: "local_other_hotline",
6042
+ justice_protective_systems: "justice_protective_systems",
6043
+ child_welfare_cps: "child_welfare_cps",
6044
+ juvenile_justice: "juvenile_justice",
6045
+ law_enforcement: "law_enforcement",
6046
+ local_law_enforcement: "local_law_enforcement",
6047
+ state_law_enforcement: "state_law_enforcement",
6048
+ federal_law_enforcement: "federal_law_enforcement",
6049
+ tribal_law_enforcement: "tribal_law_enforcement",
6050
+ other_law_enforcement: "other_law_enforcement",
6051
+ courts_prosecution: "courts_prosecution",
6052
+ correction_probation: "correction_probation",
6053
+ health_behavioral_health: "health_behavioral_health",
6054
+ inpatient_psychiatric_facility: "inpatient_psychiatric_facility",
6055
+ healthcare_provider: "healthcare_provider",
6056
+ education: "education",
6057
+ victim_community_service_providers: "victim_community_service_providers",
6058
+ child_advocacy_center: "child_advocacy_center",
6059
+ victim_service_provider: "victim_service_provider",
6060
+ community_based_service_provider: "community_based_service_provider",
6061
+ coordination_governance: "coordination_governance",
6062
+ mdt: "mdt",
6063
+ coalition: "coalition",
6064
+ internal: "internal",
6065
+ own_agency_internal: "own_agency_internal",
6066
+ other_entity: "other_entity",
6067
+ employer: "employer",
6068
+ benefits_public_assistance_office: "benefits_public_assistance_office",
6069
+ other_organization: "other_organization"
6070
+ },
6071
+ retiredCodes: [],
6072
+ notes: {
6073
+ education: "v1.0.0 `education` was a selectable leaf. Canon makes Education a heading whose only leaf is School / academic institution. `education` stays a valid stored key (now `selectable: false`); the specific successor for a school is `school_academic_institution`. Not mapped automatically.",
6074
+ law_enforcement: "v1.0.0 `law_enforcement` was a non-selectable heading. Canon makes Law enforcement / Police a selectable leaf with five optional children."
6075
+ }
6076
+ },
6077
+ _notCarried: [],
6078
+ levels: {
6079
+ "0": "Unknown or Missing",
6080
+ "1": "Category",
6081
+ "2": "Entity",
6082
+ "3": "Variant"
6083
+ },
6084
+ entries: [
6085
+ {
6086
+ code: "048-000-000-000-000-000-000",
6087
+ key: "missingness_root",
6088
+ title: "Unknown, Redacted, or Missing",
6089
+ selectable: false,
6090
+ parentCode: null,
6091
+ childCodes: [
6092
+ "048-000-000-000-000-000-001",
6093
+ "048-000-000-000-000-000-002",
6094
+ "048-000-000-000-000-000-003"
6095
+ ],
6096
+ definition: "Root group for values indicating absent, withheld, or uncollected data."
6097
+ },
6098
+ {
6099
+ code: "048-000-000-000-000-000-001",
6100
+ key: "unknown",
6101
+ title: "Unknown",
6102
+ selectable: true,
6103
+ parentCode: "048-000-000-000-000-000-000",
6104
+ childCodes: [],
6105
+ definition: "Referral entity category unknown.",
6106
+ canonicalCode: "00-00-01-00",
6107
+ enumConstant: "EMPTY_RESPONSE_UNKNOWN"
6108
+ },
6109
+ {
6110
+ code: "048-000-000-000-000-000-002",
6111
+ key: "anonymous",
6112
+ title: "Anonymous",
6113
+ selectable: true,
6114
+ parentCode: "048-000-000-000-000-000-000",
6115
+ childCodes: [],
6116
+ definition: "Referral entity category withheld or redacted.",
6117
+ canonicalCode: "00-00-02-00",
6118
+ enumConstant: "EMPTY_RESPONSE_ANONYMOUS"
6119
+ },
6120
+ {
6121
+ code: "048-000-000-000-000-000-003",
6122
+ key: "data_not_collected",
6123
+ title: "Data not collected",
6124
+ selectable: true,
6125
+ parentCode: "048-000-000-000-000-000-000",
6126
+ childCodes: [],
6127
+ definition: "Referral entity category not collected or no signal captured.",
6128
+ canonicalCode: "00-00-03-00",
6129
+ enumConstant: "EMPTY_RESPONSE_NOTCOLLECTED"
6130
+ },
6131
+ {
6132
+ code: "048-001-000-000-000-000-000",
6133
+ key: "self_referred",
6134
+ title: "Self-referred",
6135
+ selectable: true,
6136
+ parentCode: null,
6137
+ childCodes: [],
6138
+ definition: "Client initiated contact or presented for services without a third-party referrer.",
6139
+ canonicalCode: "01-00-01-00",
6140
+ enumConstant: "INDIVIDUAL_PERSON_SELFREFERRED"
6141
+ },
6142
+ {
6143
+ code: "048-002-000-000-000-000-000",
6144
+ key: "family_guardian_friend",
6145
+ title: "Family/guardian/friend/foster parent",
6146
+ selectable: true,
6147
+ parentCode: null,
6148
+ childCodes: [],
6149
+ definition: "A caregiver, family member, or close personal support person initiated the referral.",
6150
+ canonicalCode: "01-00-02-00",
6151
+ enumConstant: "INDIVIDUAL_PERSON_FAMILYGUARDIANFRIEND"
6152
+ },
6153
+ {
6154
+ code: "048-003-000-000-000-000-000",
6155
+ key: "peer",
6156
+ title: "Peer / another client",
6157
+ selectable: true,
6158
+ parentCode: null,
6159
+ childCodes: [],
6160
+ definition: "Another current or former client initiated or encouraged the referral.",
6161
+ canonicalCode: "01-00-03-00",
6162
+ enumConstant: "INDIVIDUAL_PERSON_PEER"
6163
+ },
6164
+ {
6165
+ code: "048-004-000-000-000-000-000",
6166
+ key: "other_individual",
6167
+ title: "Other individual",
6168
+ selectable: true,
6169
+ parentCode: null,
6170
+ childCodes: [],
6171
+ definition: "A non-family individual initiated the referral (e.g., neighbor, community member, clergy).",
6172
+ canonicalCode: "01-00-04-00",
6173
+ enumConstant: "INDIVIDUAL_PERSON_OTHER"
6174
+ },
6175
+ {
6176
+ code: "048-005-000-000-000-000-000",
6177
+ key: "housing_shelter_continuum",
6178
+ title: "Housing / Shelter continuum",
6179
+ selectable: false,
6180
+ parentCode: null,
6181
+ childCodes: [
6182
+ "048-005-001-000-000-000-000",
6183
+ "048-005-002-000-000-000-000",
6184
+ "048-005-003-000-000-000-000"
6185
+ ],
6186
+ definition: "Primary function is outreach engagement, emergency shelter, or residential shelter/housing programs.",
6187
+ canonicalCode: "02-01-00-00",
6188
+ enumConstant: "ORGANIZATION_HOUSING"
6189
+ },
6190
+ {
6191
+ code: "048-005-001-000-000-000-000",
6192
+ key: "outreach_project",
6193
+ title: "Outreach Project",
6194
+ selectable: true,
6195
+ parentCode: "048-005-000-000-000-000-000",
6196
+ childCodes: [],
6197
+ definition: "Street/community outreach program that engaged the client prior to enrollment.",
6198
+ canonicalCode: "02-01-01-00",
6199
+ enumConstant: "ORGANIZATION_HOUSING_OUTREACHPROJECT"
6200
+ },
6201
+ {
6202
+ code: "048-005-002-000-000-000-000",
6203
+ key: "temporary_shelter",
6204
+ title: "Temporary Shelter",
6205
+ selectable: true,
6206
+ parentCode: "048-005-000-000-000-000-000",
6207
+ childCodes: [],
6208
+ definition: "Emergency/crisis shelter or short-term temporary housing program.",
6209
+ canonicalCode: "02-01-02-00",
6210
+ enumConstant: "ORGANIZATION_HOUSING_TEMPORARYSHELTER"
6211
+ },
6212
+ {
6213
+ code: "048-005-003-000-000-000-000",
6214
+ key: "residential_project",
6215
+ title: "Residential Project",
6216
+ selectable: true,
6217
+ parentCode: "048-005-000-000-000-000-000",
6218
+ childCodes: [],
6219
+ definition: "Longer-term residential or transitional living program.",
6220
+ canonicalCode: "02-01-03-00",
6221
+ enumConstant: "ORGANIZATION_HOUSING_RESIDENTIALPROJECT"
6222
+ },
6223
+ {
6224
+ code: "048-006-000-000-000-000-000",
6225
+ key: "hotlines",
6226
+ title: "Hotlines",
6227
+ selectable: false,
6228
+ parentCode: null,
6229
+ childCodes: [
6230
+ "048-006-003-000-000-000-000"
6231
+ ],
6232
+ definition: "Crisis lines or call centers that connect a person to services.",
6233
+ canonicalCode: "02-02-00-00",
6234
+ enumConstant: "ORGANIZATION_CALLCENTERS"
6235
+ },
6236
+ {
6237
+ code: "048-006-001-000-000-000-000",
6238
+ key: "national_hotline",
6239
+ title: "National hotline",
6240
+ selectable: true,
6241
+ parentCode: "048-006-003-000-000-000-000",
6242
+ childCodes: [],
6243
+ definition: "National-level hotline network.",
6244
+ canonicalCode: "02-02-01-01",
6245
+ enumConstant: "ORGANIZATION_CALLCENTERS_HOTLINE_NATIONAL"
6246
+ },
6247
+ {
6248
+ code: "048-006-002-000-000-000-000",
6249
+ key: "local_other_hotline",
6250
+ title: "Local/other hotline",
6251
+ selectable: true,
6252
+ parentCode: "048-006-003-000-000-000-000",
6253
+ childCodes: [],
6254
+ definition: "Local/regional hotline or non-national hotline.",
6255
+ canonicalCode: "02-02-01-02",
6256
+ enumConstant: "ORGANIZATION_CALLCENTERS_HOTLINE_LOCAL"
6257
+ },
6258
+ {
6259
+ code: "048-006-003-000-000-000-000",
6260
+ key: "hotline",
6261
+ title: "Hotline",
6262
+ selectable: true,
6263
+ parentCode: "048-006-000-000-000-000-000",
6264
+ childCodes: [
6265
+ "048-006-001-000-000-000-000",
6266
+ "048-006-002-000-000-000-000"
6267
+ ],
6268
+ definition: "Crisis hotline or call center that connected the client to services.",
6269
+ canonicalCode: "02-02-01-00",
6270
+ enumConstant: "ORGANIZATION_CALLCENTERS_HOTLINE"
6271
+ },
6272
+ {
6273
+ code: "048-007-000-000-000-000-000",
6274
+ key: "justice_protective_systems",
6275
+ title: "Justice & Protective Systems",
6276
+ selectable: false,
6277
+ parentCode: null,
6278
+ childCodes: [
6279
+ "048-007-001-000-000-000-000",
6280
+ "048-007-002-000-000-000-000",
6281
+ "048-007-003-000-000-000-000",
6282
+ "048-007-004-000-000-000-000",
6283
+ "048-007-005-000-000-000-000",
6284
+ "048-007-006-000-000-000-000"
6285
+ ],
6286
+ definition: null,
6287
+ canonicalCode: "02-03-00-00",
6288
+ enumConstant: "ORGANIZATION_JUSTICE"
6289
+ },
6290
+ {
6291
+ code: "048-007-001-000-000-000-000",
6292
+ key: "child_welfare_cps",
6293
+ title: "Child Welfare / CPS",
6294
+ selectable: true,
6295
+ parentCode: "048-007-000-000-000-000-000",
6296
+ childCodes: [],
6297
+ definition: "Government child protection agency responsible for investigating child abuse/neglect and ensuring child safety.",
6298
+ canonicalCode: "02-03-01-00",
6299
+ enumConstant: "ORGANIZATION_JUSTICE_CHILDWELFARE"
6300
+ },
6301
+ {
6302
+ code: "048-007-002-000-000-000-000",
6303
+ key: "juvenile_justice",
6304
+ title: "Juvenile Justice",
6305
+ selectable: true,
6306
+ parentCode: "048-007-000-000-000-000-000",
6307
+ childCodes: [],
6308
+ definition: "Juvenile probation/detention/court-related juvenile justice system initiated the referral.",
6309
+ canonicalCode: "02-03-02-00",
6310
+ enumConstant: "ORGANIZATION_JUSTICE_JUVENILE"
6311
+ },
6312
+ {
6313
+ code: "048-007-003-000-000-000-000",
6314
+ key: "law_enforcement",
6315
+ title: "Law enforcement / Police",
6316
+ selectable: true,
6317
+ parentCode: "048-007-000-000-000-000-000",
6318
+ childCodes: [
6319
+ "048-007-003-001-000-000-000",
6320
+ "048-007-003-002-000-000-000",
6321
+ "048-007-003-003-000-000-000",
6322
+ "048-007-003-004-000-000-000",
6323
+ "048-007-003-005-000-000-000"
6324
+ ],
6325
+ definition: "Law enforcement agency initiated the referral (local/state/federal).",
6326
+ canonicalCode: "02-03-03-00",
6327
+ enumConstant: "ORGANIZATION_JUSTICE_LAWENFORCEMENT"
6328
+ },
6329
+ {
6330
+ code: "048-007-003-001-000-000-000",
6331
+ key: "local_law_enforcement",
6332
+ title: "Local law enforcement",
6333
+ selectable: true,
6334
+ parentCode: "048-007-003-000-000-000-000",
6335
+ childCodes: [],
6336
+ definition: "City/county police or sheriff.",
6337
+ canonicalCode: "02-03-03-01",
6338
+ enumConstant: "ORGANIZATION_JUSTICE_LAWENFORCEMENT_LOCAL"
6339
+ },
6340
+ {
6341
+ code: "048-007-003-002-000-000-000",
6342
+ key: "state_law_enforcement",
6343
+ title: "State law enforcement",
6344
+ selectable: true,
6345
+ parentCode: "048-007-003-000-000-000-000",
6346
+ childCodes: [],
6347
+ definition: "State-level law enforcement agency (e.g., state police/highway patrol/state bureau of investigation) acting in an official capacity.",
6348
+ canonicalCode: "02-03-03-02",
6349
+ enumConstant: "ORGANIZATION_JUSTICE_LAWENFORCEMENT_STATE"
6350
+ },
6351
+ {
6352
+ code: "048-007-003-003-000-000-000",
6353
+ key: "federal_law_enforcement",
6354
+ title: "Federal law enforcement",
6355
+ selectable: true,
6356
+ parentCode: "048-007-003-000-000-000-000",
6357
+ childCodes: [],
6358
+ definition: "Federal law enforcement agency (e.g., FBI, DHS/ICE).",
6359
+ canonicalCode: "02-03-03-03",
6360
+ enumConstant: "ORGANIZATION_JUSTICE_LAWENFORCEMENT_FEDERAL"
6361
+ },
6362
+ {
6363
+ code: "048-007-003-004-000-000-000",
6364
+ key: "tribal_law_enforcement",
6365
+ title: "Tribal law enforcement",
6366
+ selectable: true,
6367
+ parentCode: "048-007-003-000-000-000-000",
6368
+ childCodes: [],
6369
+ definition: "Tribal police.",
6370
+ canonicalCode: "02-03-03-04",
6371
+ enumConstant: "ORGANIZATION_JUSTICE_LAWENFORCEMENT_TRIBAL"
6372
+ },
6373
+ {
6374
+ code: "048-007-003-005-000-000-000",
6375
+ key: "other_law_enforcement",
6376
+ title: "Other/ unknown LE",
6377
+ selectable: true,
6378
+ parentCode: "048-007-003-000-000-000-000",
6379
+ childCodes: [],
6380
+ definition: "Other law enforcement entity, or law enforcement type is unknown.",
6381
+ canonicalCode: "02-03-03-05",
6382
+ enumConstant: "ORGANIZATION_JUSTICE_LAWENFORCEMENT_OTHER"
6383
+ },
6384
+ {
6385
+ code: "048-007-004-000-000-000-000",
6386
+ key: "courts_prosecution",
6387
+ title: "Courts or prosecution",
6388
+ selectable: true,
6389
+ parentCode: "048-007-000-000-000-000-000",
6390
+ childCodes: [],
6391
+ definition: "Court or prosecution entity (not law enforcement).",
6392
+ canonicalCode: "02-03-04-00",
6393
+ enumConstant: "ORGANIZATION_JUSTICE_COURTS"
6394
+ },
6395
+ {
6396
+ code: "048-007-005-000-000-000-000",
6397
+ key: "correction_probation",
6398
+ title: "Correction / probation",
6399
+ selectable: true,
6400
+ parentCode: "048-007-000-000-000-000-000",
6401
+ childCodes: [],
6402
+ definition: "Corrections, probation, parole, or community supervision entity (not law enforcement).",
6403
+ canonicalCode: "02-03-05-00",
6404
+ enumConstant: "ORGANIZATION_JUSTICE_CORRECTIONS"
6405
+ },
6406
+ {
6407
+ code: "048-007-006-000-000-000-000",
6408
+ key: "adult_protective_services",
6409
+ title: "Adult Protective Services (APS)",
6410
+ selectable: true,
6411
+ parentCode: "048-007-000-000-000-000-000",
6412
+ childCodes: [],
6413
+ definition: "Government adult protection agency responsible for investigating abuse, neglect, self-neglect, or exploitation of vulnerable or older adults and ensuring their safety. Adult analog of Child Welfare / CPS.",
6414
+ canonicalCode: "02-03-06-00",
6415
+ enumConstant: "ORGANIZATION_JUSTICE_ADULTPROTECTIVE"
6416
+ },
6417
+ {
6418
+ code: "048-008-000-000-000-000-000",
6419
+ key: "health_behavioral_health",
6420
+ title: "Health / behavioral health",
6421
+ selectable: false,
6422
+ parentCode: null,
6423
+ childCodes: [
6424
+ "048-008-001-000-000-000-000",
6425
+ "048-008-002-000-000-000-000"
6426
+ ],
6427
+ definition: "Hospitals and healthcare providers (including mental health inpatient facilities).",
6428
+ canonicalCode: "02-04-00-00",
6429
+ enumConstant: "ORGANIZATION_HEALTH"
6430
+ },
6431
+ {
6432
+ code: "048-008-001-000-000-000-000",
6433
+ key: "inpatient_psychiatric_facility",
6434
+ title: "Inpatient psychiatric facility",
6435
+ selectable: true,
6436
+ parentCode: "048-008-000-000-000-000-000",
6437
+ childCodes: [],
6438
+ definition: "Inpatient psychiatric hospital or psychiatric facility.",
6439
+ canonicalCode: "02-04-01-00",
6440
+ enumConstant: "ORGANIZATION_HEALTH_PSYCHIATRIC"
6441
+ },
6442
+ {
6443
+ code: "048-008-002-000-000-000-000",
6444
+ key: "healthcare_provider",
6445
+ title: "Healthcare provider (non-inpatient psychiatric)",
6446
+ selectable: true,
6447
+ parentCode: "048-008-000-000-000-000-000",
6448
+ childCodes: [],
6449
+ definition: "Any non-inpatient healthcare provider (clinic, hospital, outpatient provider, behavioral health clinic, SANE program, substance abuse clinic, etc.).",
6450
+ canonicalCode: "02-04-02-00",
6451
+ enumConstant: "ORGANIZATION_HEALTH_HEALTHCARE"
6452
+ },
6453
+ {
6454
+ code: "048-009-000-000-000-000-000",
6455
+ key: "education",
6456
+ title: "Education",
6457
+ selectable: false,
6458
+ parentCode: null,
6459
+ childCodes: [
6460
+ "048-009-001-000-000-000-000"
6461
+ ],
6462
+ definition: "Parent category for education-related institutions.",
6463
+ canonicalCode: "02-05-00-00",
6464
+ enumConstant: "ORGANIZATION_EDUCATION"
6465
+ },
6466
+ {
6467
+ code: "048-009-001-000-000-000-000",
6468
+ key: "school_academic_institution",
6469
+ title: "School / academic institution",
6470
+ selectable: true,
6471
+ parentCode: "048-009-000-000-000-000-000",
6472
+ childCodes: [],
6473
+ definition: "School system or educational institution.",
6474
+ canonicalCode: "02-05-01-00",
6475
+ enumConstant: "ORGANIZATION_EDUCATION_SCHOOL"
6476
+ },
6477
+ {
6478
+ code: "048-010-000-000-000-000-000",
6479
+ key: "victim_community_service_providers",
6480
+ title: "Victim + Community service providers",
6481
+ selectable: false,
6482
+ parentCode: null,
6483
+ childCodes: [
6484
+ "048-010-001-000-000-000-000",
6485
+ "048-010-002-000-000-000-000",
6486
+ "048-010-003-000-000-000-000",
6487
+ "048-010-004-000-000-000-000"
6488
+ ],
6489
+ definition: "Parent category for victim service providers and community-based service providers.",
6490
+ canonicalCode: "02-06-00-00",
6491
+ enumConstant: "ORGANIZATION_COMMUNITY"
6492
+ },
6493
+ {
6494
+ code: "048-010-001-000-000-000-000",
6495
+ key: "child_advocacy_center",
6496
+ title: "Child Advocacy Center (CAC)",
6497
+ selectable: true,
6498
+ parentCode: "048-010-000-000-000-000-000",
6499
+ childCodes: [],
6500
+ definition: "A child-centered multidisciplinary center coordinating investigation and services (forensic interview, coordination, referrals, sometimes medical or therapy) for child victims.",
6501
+ canonicalCode: "02-06-01-00",
6502
+ enumConstant: "ORGANIZATION_COMMUNITY_CHILDADVOCACYCENTER"
6503
+ },
6504
+ {
6505
+ code: "048-010-002-000-000-000-000",
6506
+ key: "victim_service_provider",
6507
+ title: "Victim service provider / advocacy program",
6508
+ selectable: true,
6509
+ parentCode: "048-010-000-000-000-000-000",
6510
+ childCodes: [],
6511
+ definition: "Organization whose primary mission is to provide services to victims/survivors of crime (VOCA-aligned breadth: rape crisis centers, DV/dating-violence/stalking programs, anti-trafficking programs, child victim centers, homicide-survivor organizations, and similar). Whether the organization is specifically a DV/SA victim service provider \u2014 the fact HMIS 2.01 needs (Comparable Database) \u2014 is a separate per-organization attribute, self-attested by the organization at onboarding (Platform survey / Agency Hub \u201CMy agency info\u201D), not part of this category.",
6512
+ canonicalCode: "02-06-02-00",
6513
+ enumConstant: "ORGANIZATION_COMMUNITY_VICTIMSERVICEPROVIDER"
6514
+ },
6515
+ {
6516
+ code: "048-010-003-000-000-000-000",
6517
+ key: "community_based_service_provider",
6518
+ title: "Community-based service provider (general social services)",
6519
+ selectable: true,
6520
+ parentCode: "048-010-000-000-000-000-000",
6521
+ childCodes: [],
6522
+ definition: "The residual community-based provider (\u201Cother community-based service provider\u201D): a non-VSP offering practical support services, navigation, or stabilization resources that is not primarily a VSP, a legal services provider, a housing/shelter project, a government justice agency, a healthcare provider, a school, a hotline, or a public benefits office. (Ex: youth drop-in center; food pantry; reentry program.)",
6523
+ canonicalCode: "02-06-03-00",
6524
+ enumConstant: "ORGANIZATION_COMMUNITY_COMMUNITYSERVICEPROVIDER"
6525
+ },
6526
+ {
6527
+ code: "048-010-004-000-000-000-000",
6528
+ key: "legal_services_provider",
6529
+ title: "Legal services provider",
6530
+ selectable: true,
6531
+ parentCode: "048-010-000-000-000-000-000",
6532
+ childCodes: [],
6533
+ definition: "Civil legal aid organization, immigration attorneys, victim-rights law clinic, or similar provider of legal help to the client. Distinct from Courts or prosecution (the justice-system entity itself): this is getting a lawyer's help, not being referred into proceedings.",
6534
+ canonicalCode: "02-06-04-00",
6535
+ enumConstant: "ORGANIZATION_COMMUNITY_LEGALSERVICES"
6536
+ },
6537
+ {
6538
+ code: "048-011-000-000-000-000-000",
6539
+ key: "coordination_governance",
6540
+ title: "Coordination & Governance",
6541
+ selectable: false,
6542
+ parentCode: null,
6543
+ childCodes: [
6544
+ "048-011-001-000-000-000-000",
6545
+ "048-011-002-000-000-000-000"
6546
+ ],
6547
+ definition: "Parent category for coordination and governance bodies (e.g., MDTs, coalitions).",
6548
+ canonicalCode: "02-07-00-00",
6549
+ enumConstant: "ORGANIZATION_GOVERNANCE"
6550
+ },
6551
+ {
6552
+ code: "048-011-001-000-000-000-000",
6553
+ key: "mdt",
6554
+ title: "Multidisciplinary team (MDT)",
6555
+ selectable: true,
6556
+ parentCode: "048-011-000-000-000-000-000",
6557
+ childCodes: [],
6558
+ definition: "A case-level team: professionals from multiple agencies (law enforcement, child welfare, medical, advocacy) who review and coordinate individual cases together; referrals arise out of case review. (E.g., a county trafficking MDT or a CAC-based team.)",
6559
+ canonicalCode: "02-07-01-00",
6560
+ enumConstant: "ORGANIZATION_GOVERNANCE_MDT"
6561
+ },
6562
+ {
6563
+ code: "048-011-002-000-000-000-000",
6564
+ key: "coalition",
6565
+ title: "Coalition (state/regional coalition)",
6566
+ selectable: true,
6567
+ parentCode: "048-011-000-000-000-000-000",
6568
+ childCodes: [],
6569
+ definition: "A state or regional membership body of organizations coordinating at the system level \u2014 training, standards, policy, funding \u2014 not individual cases; referrals from a coalition are typically warm handoffs to a member organization.",
6570
+ canonicalCode: "02-07-02-00",
6571
+ enumConstant: "ORGANIZATION_GOVERNANCE_COALITION"
6572
+ },
6573
+ {
6574
+ code: "048-012-000-000-000-000-000",
6575
+ key: "internal",
6576
+ title: "Internal",
6577
+ selectable: false,
6578
+ parentCode: null,
6579
+ childCodes: [
6580
+ "048-012-001-000-000-000-000"
6581
+ ],
6582
+ definition: "Parent category for internal referrals within the same umbrella agency.",
6583
+ canonicalCode: "02-08-00-00",
6584
+ enumConstant: "ORGANIZATION_INTERNAL"
6585
+ },
6586
+ {
6587
+ code: "048-012-001-000-000-000-000",
6588
+ key: "own_agency_internal",
6589
+ title: "Own agency / internal referral",
6590
+ selectable: true,
6591
+ parentCode: "048-012-000-000-000-000-000",
6592
+ childCodes: [],
6593
+ definition: "Client was referred from another program or unit within the same umbrella agency.",
6594
+ canonicalCode: "02-08-01-00",
6595
+ enumConstant: "ORGANIZATION_INTERNAL_OWNAGENCY"
6596
+ },
6597
+ {
6598
+ code: "048-013-000-000-000-000-000",
6599
+ key: "other_entity",
6600
+ title: "Other",
6601
+ selectable: false,
6602
+ parentCode: null,
6603
+ childCodes: [
6604
+ "048-013-001-000-000-000-000",
6605
+ "048-013-002-000-000-000-000",
6606
+ "048-013-003-000-000-000-000"
6607
+ ],
6608
+ definition: "Parent category for other organizations not captured by the primary sectors.",
6609
+ canonicalCode: "02-09-00-00",
6610
+ enumConstant: "ORGANIZATION_OTHER"
6611
+ },
6612
+ {
6613
+ code: "048-013-001-000-000-000-000",
6614
+ key: "employer",
6615
+ title: "Employer",
6616
+ selectable: true,
6617
+ parentCode: "048-013-000-000-000-000-000",
6618
+ childCodes: [],
6619
+ definition: "Employer, HR, or employee assistance program initiated the referral.",
6620
+ canonicalCode: "02-09-01-00",
6621
+ enumConstant: "ORGANIZATION_OTHER_EMPLOYER"
6622
+ },
6623
+ {
6624
+ code: "048-013-002-000-000-000-000",
6625
+ key: "benefits_public_assistance_office",
6626
+ title: "Benefits/public assistance office",
6627
+ selectable: true,
6628
+ parentCode: "048-013-000-000-000-000-000",
6629
+ childCodes: [],
6630
+ definition: "Government office administering public benefits or eligibility and enrollment (e.g., SNAP, TANF, Medicaid, SSA).",
6631
+ canonicalCode: "02-09-02-00",
6632
+ enumConstant: "ORGANIZATION_OTHER_PUBLICASSISTANCE"
6633
+ },
6634
+ {
6635
+ code: "048-013-003-000-000-000-000",
6636
+ key: "other_organization",
6637
+ title: "Other Organization",
6638
+ selectable: true,
6639
+ parentCode: "048-013-000-000-000-000-000",
6640
+ childCodes: [],
6641
+ definition: "Other organization not otherwise captured by the listed categories.",
6642
+ canonicalCode: "02-09-03-00",
6643
+ enumConstant: "ORGANIZATION_OTHER_UNSPECIFIED"
6644
+ }
6645
+ ]
6646
+ };
6647
+
6648
+ // src/constants/org-type.ts
6649
+ var ENTRIES = referralEntityCategory_v1_2_0_default.entries;
6650
+ var BY_KEY = new Map(ENTRIES.map((e) => [e.key, e]));
6651
+ var BY_CODE = new Map(ENTRIES.map((e) => [e.code, e]));
6652
+ var BY_CANON = new Map(
6653
+ ENTRIES.filter((e) => e.canonicalCode).map((e) => [
6654
+ e.canonicalCode,
6655
+ e
6656
+ ])
6657
+ );
6658
+ var BY_ENUM_CONSTANT = new Map(
6659
+ ENTRIES.filter((e) => e.enumConstant).map((e) => [
6660
+ e.enumConstant,
6661
+ e
6662
+ ])
6663
+ );
6664
+ var isOrgHalf = (e) => (e.canonicalCode ?? "").startsWith("02-");
6665
+ var isHeading = (e) => isOrgHalf(e) && !e.selectable && /^02-\d\d-00-00$/.test(e.canonicalCode ?? "");
6666
+ var ORG_TYPE_HEADING_KEYS = Object.freeze([
6667
+ "housing_shelter_continuum",
6668
+ "hotlines",
6669
+ "justice_protective_systems",
6670
+ "health_behavioral_health",
6671
+ "education",
6672
+ "victim_community_service_providers",
6673
+ "coordination_governance",
6674
+ "internal",
6675
+ "other_entity"
6676
+ ]);
6677
+ var ORG_TYPE_SELECTABLE_KEYS = Object.freeze([
6678
+ "outreach_project",
6679
+ "temporary_shelter",
6680
+ "residential_project",
6681
+ "national_hotline",
6682
+ "local_other_hotline",
6683
+ "hotline",
6684
+ "child_welfare_cps",
6685
+ "juvenile_justice",
6686
+ "law_enforcement",
6687
+ "local_law_enforcement",
6688
+ "state_law_enforcement",
6689
+ "federal_law_enforcement",
6690
+ "tribal_law_enforcement",
6691
+ "other_law_enforcement",
6692
+ "courts_prosecution",
6693
+ "correction_probation",
6694
+ "adult_protective_services",
6695
+ "inpatient_psychiatric_facility",
6696
+ "healthcare_provider",
6697
+ "school_academic_institution",
6698
+ "child_advocacy_center",
6699
+ "victim_service_provider",
6700
+ "community_based_service_provider",
6701
+ "legal_services_provider",
6702
+ "mdt",
6703
+ "coalition",
6704
+ "employer",
6705
+ "benefits_public_assistance_office",
6706
+ "other_organization"
6707
+ ]);
6708
+ var ORG_TYPE_NONPICKABLE_LEAF_KEYS = Object.freeze([
6709
+ "own_agency_internal"
6710
+ ]);
6711
+ var ORG_TYPE_KEYS = Object.freeze([
6712
+ ...ORG_TYPE_HEADING_KEYS,
6713
+ ...ORG_TYPE_SELECTABLE_KEYS,
6714
+ ...ORG_TYPE_NONPICKABLE_LEAF_KEYS
6715
+ ]);
6716
+ var AGENCY_TYPE_KEYS = Object.freeze([
6717
+ ...ORG_TYPE_SELECTABLE_KEYS,
6718
+ ...ORG_TYPE_NONPICKABLE_LEAF_KEYS,
6719
+ "unknown"
6720
+ ]);
6721
+ var ORG_TYPE_KEY_SET = new Set(ORG_TYPE_KEYS);
6722
+ var AGENCY_TYPE_KEY_SET = new Set(AGENCY_TYPE_KEYS);
6723
+ function isOrgTypeKey(value) {
6724
+ return typeof value === "string" && ORG_TYPE_KEY_SET.has(value);
6725
+ }
6726
+ function isAgencyTypeKey(value) {
6727
+ return typeof value === "string" && AGENCY_TYPE_KEY_SET.has(value);
6728
+ }
6729
+ function lookup(value) {
6730
+ if (typeof value !== "string") return null;
6731
+ const v = value.trim();
6732
+ if (!v) return null;
6733
+ return BY_KEY.get(v.toLowerCase()) ?? BY_ENUM_CONSTANT.get(v.toUpperCase()) ?? BY_CANON.get(v) ?? BY_CODE.get(v) ?? null;
6734
+ }
6735
+ function resolveOrgTypeKey(value) {
6736
+ const hit = lookup(value);
6737
+ return hit && isOrgTypeKey(hit.key) ? hit.key : null;
6738
+ }
6739
+ function resolveAgencyTypeKey(value) {
6740
+ const hit = lookup(value);
6741
+ return hit && isAgencyTypeKey(hit.key) ? hit.key : null;
6742
+ }
6743
+ var LEGACY_NUMERIC_TO_REFERRAL_ENTITY_KEY = Object.freeze({
6744
+ 0: "unknown",
6745
+ 1: "own_agency_internal",
6746
+ 2: "self_referred",
6747
+ 3: "family_guardian_friend",
6748
+ 4: "peer",
6749
+ 5: "other_individual",
6750
+ 10: "housing_shelter_continuum",
6751
+ 11: "hotline",
6752
+ 12: "justice_protective_systems",
6753
+ 13: "outreach_project",
6754
+ 14: "temporary_shelter",
6755
+ 15: "residential_project",
6756
+ 16: "health_behavioral_health",
6757
+ 17: "education",
6758
+ 18: "law_enforcement",
6759
+ 19: "other_entity",
6760
+ 20: "child_welfare_cps",
6761
+ 21: "juvenile_justice",
6762
+ 22: "courts_prosecution",
6763
+ 23: "correction_probation",
6764
+ 24: "inpatient_psychiatric_facility",
6765
+ 25: "healthcare_provider",
6766
+ 26: "victim_community_service_providers",
6767
+ 27: "child_advocacy_center",
6768
+ 28: "victim_service_provider",
6769
+ 29: "community_based_service_provider",
6770
+ 30: "employer",
6771
+ 31: "benefits_public_assistance_office"
6772
+ });
6773
+ function resolveReferralEntityKeyFromLegacyNumeric(value) {
6774
+ const n = typeof value === "number" ? value : typeof value === "string" && /^\s*\d{1,2}\s*$/.test(value) ? Number(value) : NaN;
6775
+ if (!Number.isInteger(n)) return null;
6776
+ const table = LEGACY_NUMERIC_TO_REFERRAL_ENTITY_KEY;
6777
+ return table[n] ?? null;
6778
+ }
6779
+ function resolveOrgTypeKeyFromLegacyNumeric(value) {
6780
+ const k = resolveReferralEntityKeyFromLegacyNumeric(value);
6781
+ return k && isOrgTypeKey(k) ? k : null;
6782
+ }
6783
+ function orgTypeEnumConstant(key) {
6784
+ return BY_KEY.get(key)?.enumConstant ?? null;
6785
+ }
6786
+ function orgTypeCanonicalCode(key) {
6787
+ return BY_KEY.get(key)?.canonicalCode ?? null;
6788
+ }
6789
+ function orgTypeLabel(key) {
6790
+ return BY_KEY.get(key)?.title ?? null;
6791
+ }
6792
+ function orgTypeAncestry(key) {
6793
+ const out = [];
6794
+ const seen = /* @__PURE__ */ new Set();
6795
+ let cursor = BY_KEY.get(key);
6796
+ while (cursor && !seen.has(cursor.code)) {
6797
+ seen.add(cursor.code);
6798
+ out.push(cursor.key);
6799
+ cursor = cursor.parentCode ? BY_CODE.get(cursor.parentCode) : void 0;
6800
+ }
6801
+ return out;
6802
+ }
6803
+ var ORG_TYPE_PARENT_KEY = Object.freeze(
6804
+ Object.fromEntries(
6805
+ ENTRIES.filter(isOrgHalf).map((e) => [
6806
+ e.key,
6807
+ e.parentCode ? BY_CODE.get(e.parentCode)?.key ?? null : null
6808
+ ])
6809
+ )
6810
+ );
6811
+ function orgTypeSector(key) {
6812
+ const chain = orgTypeAncestry(key);
6813
+ if (!chain.length) return null;
6814
+ const top = chain[chain.length - 1];
6815
+ const entry = BY_KEY.get(top);
6816
+ return entry && isHeading(entry) ? top : null;
6817
+ }
6818
+ var VICTIM_SERVING_ORG_TYPE_KEYS = Object.freeze([
6819
+ "victim_service_provider",
6820
+ "child_advocacy_center"
6821
+ ]);
6822
+ var LAW_ENFORCEMENT_ORG_TYPE_KEYS = Object.freeze([
6823
+ "law_enforcement",
6824
+ "local_law_enforcement",
6825
+ "state_law_enforcement",
6826
+ "federal_law_enforcement",
6827
+ "tribal_law_enforcement",
6828
+ "other_law_enforcement"
6829
+ ]);
6830
+ var LEGAL_ORG_TYPE_KEYS = Object.freeze([
6831
+ "courts_prosecution",
6832
+ "legal_services_provider"
6833
+ ]);
6834
+ var HEALTHCARE_ORG_TYPE_KEYS = Object.freeze([
6835
+ "health_behavioral_health",
6836
+ "inpatient_psychiatric_facility",
6837
+ "healthcare_provider"
6838
+ ]);
6839
+ var REPORT_AUTHORITY_ORG_TYPE_KEYS = Object.freeze([
6840
+ "justice_protective_systems",
6841
+ "child_welfare_cps",
6842
+ "juvenile_justice",
6843
+ "law_enforcement",
6844
+ "local_law_enforcement",
6845
+ "state_law_enforcement",
6846
+ "federal_law_enforcement",
6847
+ "tribal_law_enforcement",
6848
+ "other_law_enforcement",
6849
+ "courts_prosecution",
6850
+ "correction_probation",
6851
+ "adult_protective_services"
6852
+ ]);
6853
+ var NO_SECTOR_ORG_TYPE_KEYS = Object.freeze([
6854
+ "internal",
6855
+ "own_agency_internal",
6856
+ "unknown"
6857
+ ]);
6858
+ var asSet = (keys) => new Set(keys);
6859
+ var VICTIM_SERVING = asSet(VICTIM_SERVING_ORG_TYPE_KEYS);
6860
+ var LAW_ENFORCEMENT = asSet(LAW_ENFORCEMENT_ORG_TYPE_KEYS);
6861
+ var LEGAL = asSet(LEGAL_ORG_TYPE_KEYS);
6862
+ var HEALTHCARE = asSet(HEALTHCARE_ORG_TYPE_KEYS);
6863
+ var REPORT_AUTHORITY = asSet(REPORT_AUTHORITY_ORG_TYPE_KEYS);
6864
+ var NO_SECTOR = asSet(NO_SECTOR_ORG_TYPE_KEYS);
6865
+ function isVictimServingOrgType(type) {
6866
+ const k = resolveAgencyTypeKey(type);
6867
+ return !!k && VICTIM_SERVING.has(k);
6868
+ }
6869
+ function isLawEnforcementOrgType(type) {
6870
+ const k = resolveAgencyTypeKey(type);
6871
+ return !!k && LAW_ENFORCEMENT.has(k);
6872
+ }
6873
+ function isLegalOrgType(type) {
6874
+ const k = resolveAgencyTypeKey(type);
6875
+ return !!k && LEGAL.has(k);
6876
+ }
6877
+ function isHealthcareOrgType(type) {
6878
+ const k = resolveAgencyTypeKey(type);
6879
+ return !!k && HEALTHCARE.has(k);
6880
+ }
6881
+ function isReportAuthorityOrgType(type) {
6882
+ const k = resolveAgencyTypeKey(type);
6883
+ return !!k && REPORT_AUTHORITY.has(k);
6884
+ }
6885
+ function orgTypeDefaultVsp(type) {
6886
+ const k = resolveAgencyTypeKey(type);
6887
+ if (!k || NO_SECTOR.has(k) || k === "child_advocacy_center") return null;
6888
+ return k === "victim_service_provider";
6889
+ }
6890
+ function orgTypeDefaultSessionRole(type, vsp) {
6891
+ return orgTypeDefaultSessionRoleOrNull(type, vsp) ?? "vsp_staff";
6892
+ }
6893
+ function orgTypeDefaultSessionRoleOrNull(type, vsp) {
6894
+ if (vsp === true) return "vsp_staff";
6895
+ const k = resolveAgencyTypeKey(type);
6896
+ if (!k) return null;
6897
+ if (NO_SECTOR.has(k)) return "vsp_staff";
6898
+ if (VICTIM_SERVING.has(k)) return "vsp_staff";
6899
+ if (LAW_ENFORCEMENT.has(k)) return "law_enforcement_personnel";
6900
+ if (LEGAL.has(k)) return "legal_professional";
6901
+ if (HEALTHCARE.has(k)) return "healthcare_provider_staff";
6902
+ return "other_response_personnel";
6903
+ }
6016
6904
  export {
6017
6905
  ACCOMMODATION_LABELS,
6018
6906
  ACCOMMODATION_OPTIONS,
6019
6907
  ACTIVE_CVC_136_CORE_INDICATOR_VALUES,
6020
6908
  ACTIVE_INCIDENT_PARTICIPATION_ROLE_VALUES,
6909
+ AGENCY_TYPE_KEYS,
6021
6910
  AGE_BIN_REPORTING,
6022
6911
  AGE_BIN_REPORTING_IS_MINOR,
6023
6912
  AGE_BIN_REPORTING_LABELS,
@@ -6183,6 +7072,7 @@ export {
6183
7072
  FUNCTION_STATUS,
6184
7073
  FUNCTION_STATUS_LABELS,
6185
7074
  FUNCTION_STATUS_VALUES,
7075
+ HEALTHCARE_ORG_TYPE_KEYS,
6186
7076
  IC_13_CATEGORIES,
6187
7077
  IC_13_CATEGORY_ORDER,
6188
7078
  IC_13_LABELS,
@@ -6241,8 +7131,17 @@ export {
6241
7131
  INTERACTION_TYPES,
6242
7132
  INTERACTION_TYPE_LABELS,
6243
7133
  INVOLVEMENT_ROLE_TO_PERSON_TYPE,
7134
+ LAW_ENFORCEMENT_ORG_TYPE_KEYS,
7135
+ LEGACY_NUMERIC_TO_REFERRAL_ENTITY_KEY,
7136
+ LEGAL_ORG_TYPE_KEYS,
6244
7137
  MINOR_ADULT_STATUS,
6245
7138
  MINOR_ADULT_STATUS_LABELS,
7139
+ NO_SECTOR_ORG_TYPE_KEYS,
7140
+ ORG_TYPE_HEADING_KEYS,
7141
+ ORG_TYPE_KEYS,
7142
+ ORG_TYPE_NONPICKABLE_LEAF_KEYS,
7143
+ ORG_TYPE_PARENT_KEY,
7144
+ ORG_TYPE_SELECTABLE_KEYS,
6246
7145
  PARTICIPATION_ROLE_CATEGORIES,
6247
7146
  PERMISSION_STATE,
6248
7147
  PERMISSION_STATE_DISPLAY,
@@ -6269,6 +7168,7 @@ export {
6269
7168
  RELATIONSHIP_DYNAMICS,
6270
7169
  RELATIONSHIP_DYNAMICS_LABELS,
6271
7170
  RELATIONSHIP_DYNAMICS_VALUES,
7171
+ REPORT_AUTHORITY_ORG_TYPE_KEYS,
6272
7172
  ROLE_LEVEL,
6273
7173
  ROLE_LEVEL_LABELS,
6274
7174
  ROLE_LEVEL_VALUES,
@@ -6284,6 +7184,7 @@ export {
6284
7184
  USER_STATUS_LABELS,
6285
7185
  VALID_INTERACTION_TYPES,
6286
7186
  VALID_RECORD_STATES,
7187
+ VICTIM_SERVING_ORG_TYPE_KEYS,
6287
7188
  canonicalCoreIndicator,
6288
7189
  canonicalIncidentParticipationRole,
6289
7190
  deriveAgeBinFromAge,
@@ -6299,14 +7200,33 @@ export {
6299
7200
  getIC48TopicForCategory,
6300
7201
  getPersonTypeForRole,
6301
7202
  getRelationshipCategory,
7203
+ isAgencyTypeKey,
6302
7204
  isDeprecatedCoreIndicator,
6303
7205
  isDeprecatedIncidentParticipationRole,
7206
+ isHealthcareOrgType,
6304
7207
  isIC56Missingness,
6305
7208
  isIC56ValidChannel,
7209
+ isLawEnforcementOrgType,
7210
+ isLegalOrgType,
6306
7211
  isLgbtqOrientation,
7212
+ isOrgTypeKey,
6307
7213
  isProtectedRelationship,
7214
+ isReportAuthorityOrgType,
6308
7215
  isStructuredNameType,
6309
7216
  isTransgenderGenderIdentity,
7217
+ isVictimServingOrgType,
7218
+ orgTypeAncestry,
7219
+ orgTypeCanonicalCode,
7220
+ orgTypeDefaultSessionRole,
7221
+ orgTypeDefaultSessionRoleOrNull,
7222
+ orgTypeDefaultVsp,
7223
+ orgTypeEnumConstant,
7224
+ orgTypeLabel,
7225
+ orgTypeSector,
7226
+ resolveAgencyTypeKey,
7227
+ resolveOrgTypeKey,
7228
+ resolveOrgTypeKeyFromLegacyNumeric,
7229
+ resolveReferralEntityKeyFromLegacyNumeric,
6310
7230
  sortRelationshipsByPriority
6311
7231
  };
6312
7232
  //# sourceMappingURL=index.js.map