@htilabs/platform-common-models 0.6.0 → 0.7.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +44 -0
  2. package/dist/config/index.cjs +191 -0
  3. package/dist/config/index.cjs.map +1 -0
  4. package/dist/config/index.d.cts +101 -0
  5. package/dist/config/index.d.ts +101 -0
  6. package/dist/config/index.js +165 -0
  7. package/dist/config/index.js.map +1 -0
  8. package/dist/constants/index.cjs +46 -5
  9. package/dist/constants/index.cjs.map +1 -1
  10. package/dist/constants/index.d.cts +1 -1
  11. package/dist/constants/index.d.ts +1 -1
  12. package/dist/constants/index.js +42 -5
  13. package/dist/constants/index.js.map +1 -1
  14. package/dist/cvcs/index.cjs +321 -0
  15. package/dist/cvcs/index.cjs.map +1 -1
  16. package/dist/cvcs/index.d.cts +789 -436
  17. package/dist/cvcs/index.d.ts +789 -436
  18. package/dist/cvcs/index.js +318 -0
  19. package/dist/cvcs/index.js.map +1 -1
  20. package/dist/index.cjs +424 -6
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +94 -3
  23. package/dist/index.d.ts +94 -3
  24. package/dist/index.js +412 -6
  25. package/dist/index.js.map +1 -1
  26. package/dist/{platform-auth-CjC57132.d.cts → platform-auth-C97LpsRd.d.cts} +8 -4
  27. package/dist/{platform-auth-CjC57132.d.ts → platform-auth-C97LpsRd.d.ts} +8 -4
  28. package/dist/schemas/index.cjs +43 -6
  29. package/dist/schemas/index.cjs.map +1 -1
  30. package/dist/schemas/index.d.cts +4 -0
  31. package/dist/schemas/index.d.ts +4 -0
  32. package/dist/schemas/index.js +43 -6
  33. package/dist/schemas/index.js.map +1 -1
  34. package/dist/types/index.d.cts +2 -2
  35. package/dist/types/index.d.ts +2 -2
  36. package/package.json +9 -2
  37. package/src/__tests__/__snapshots__/cvc-sot.snap +12 -0
  38. package/src/__tests__/cvc-sot-snapshot.test.ts +24 -0
  39. package/src/__tests__/cvc-structural.test.ts +3 -0
  40. package/src/__tests__/runtime-contract-validator.test.ts +556 -0
  41. package/src/config/fixtures/valid.yaml +90 -0
  42. package/src/config/index.ts +352 -0
  43. package/src/constants/ic.ts +49 -6
  44. package/src/cvcs/hmisSex.v1.0.0.json +89 -0
  45. package/src/cvcs/index.ts +6 -0
  46. package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +96 -0
  47. package/src/cvcs/recencyBand.v1.0.0.json +124 -0
  48. package/src/generated/cvc-enums.ts +59 -0
  49. package/src/index.ts +20 -0
  50. package/src/schemas/common.ts +4 -0
package/dist/index.cjs CHANGED
@@ -64,6 +64,7 @@ __export(src_exports, {
64
64
  CVC_136_OPTIONS: () => CVC_136_OPTIONS,
65
65
  CVC_136_TYPE_TO_CATEGORY: () => CVC_136_TYPE_TO_CATEGORY,
66
66
  CVC_136_VALUES: () => CVC_136_VALUES,
67
+ CVC_137_VALUES: () => CVC_137_VALUES,
67
68
  CVC_145_CATEGORY: () => CVC_145_CATEGORY,
68
69
  CVC_145_CATEGORY_LABELS: () => CVC_145_CATEGORY_LABELS,
69
70
  CVC_145_CATEGORY_ORDER: () => CVC_145_CATEGORY_ORDER,
@@ -142,7 +143,10 @@ __export(src_exports, {
142
143
  CVC_17_LABELS: () => CVC_17_LABELS,
143
144
  CVC_17_LEVEL_1_OPTIONS: () => CVC_17_LEVEL_1_OPTIONS,
144
145
  CVC_17_LEVEL_2_TRANSGENDER_OPTIONS: () => CVC_17_LEVEL_2_TRANSGENDER_OPTIONS,
146
+ CVC_17_MISSINGNESS_VALUES: () => CVC_17_MISSINGNESS_VALUES,
147
+ CVC_17_SELECTABLE_VALUES: () => CVC_17_SELECTABLE_VALUES,
145
148
  CVC_17_TRANSGENDER_VALUES: () => CVC_17_TRANSGENDER_VALUES,
149
+ CVC_17_VALUES: () => CVC_17_VALUES,
146
150
  CVC_180_EDUCATION_LEVEL: () => CVC_180_EDUCATION_LEVEL,
147
151
  CVC_180_LABELS: () => CVC_180_LABELS,
148
152
  CVC_180_ORDINAL: () => CVC_180_ORDINAL,
@@ -152,6 +156,7 @@ __export(src_exports, {
152
156
  CVC_196_CHILD_WELFARE_EPISODE_TYPE: () => CVC_196_CHILD_WELFARE_EPISODE_TYPE,
153
157
  CVC_196_LABELS: () => CVC_196_LABELS,
154
158
  CVC_196_VALUES: () => CVC_196_VALUES,
159
+ CVC_197_VALUES: () => CVC_197_VALUES,
155
160
  CVC_1_LABELS: () => CVC_1_LABELS,
156
161
  CVC_1_NAME_TYPE: () => CVC_1_NAME_TYPE,
157
162
  CVC_1_STRUCTURED_NAME_TYPES: () => CVC_1_STRUCTURED_NAME_TYPES,
@@ -161,6 +166,7 @@ __export(src_exports, {
161
166
  CVC_67_LABELS: () => CVC_67_LABELS,
162
167
  CVC_67_MISSINGNESS_VALUES: () => CVC_67_MISSINGNESS_VALUES,
163
168
  CVC_67_SELECTABLE_VALUES: () => CVC_67_SELECTABLE_VALUES,
169
+ CVC_67_VALUES: () => CVC_67_VALUES,
164
170
  CVC_72_HT_TYPE: () => CVC_72_HT_TYPE,
165
171
  CVC_72_LABELS: () => CVC_72_LABELS,
166
172
  CVC_72_VALUES: () => CVC_72_VALUES,
@@ -215,6 +221,7 @@ __export(src_exports, {
215
221
  HairColorKeys: () => HairColorKeys,
216
222
  HasTattoosKeys: () => HasTattoosKeys,
217
223
  HighestEducationLevelCompletedKeys: () => HighestEducationLevelCompletedKeys,
224
+ HmisSexKeys: () => HmisSexKeys,
218
225
  HomelessStatusKeys: () => HomelessStatusKeys,
219
226
  IC_13_CATEGORIES: () => IC_13_CATEGORIES,
220
227
  IC_13_CATEGORY_ORDER: () => IC_13_CATEGORY_ORDER,
@@ -275,6 +282,7 @@ __export(src_exports, {
275
282
  IncidentInvolvementRoleKeys: () => IncidentInvolvementRoleKeys,
276
283
  IncidentParticipationRoleKeys: () => IncidentParticipationRoleKeys,
277
284
  IncomeBenefitsSourcesKeys: () => IncomeBenefitsSourcesKeys,
285
+ JuvenileJusticeEpisodeTypeKeys: () => JuvenileJusticeEpisodeTypeKeys,
278
286
  JuvenileJusticeInvolvementStatusKeys: () => JuvenileJusticeInvolvementStatusKeys,
279
287
  LocationTypeKeys: () => LocationTypeKeys,
280
288
  MINOR_ADULT_STATUS: () => MINOR_ADULT_STATUS,
@@ -320,6 +328,7 @@ __export(src_exports, {
320
328
  ROLE_LEVEL_LABELS: () => ROLE_LEVEL_LABELS,
321
329
  ROLE_LEVEL_VALUES: () => ROLE_LEVEL_VALUES,
322
330
  RaceEthnicityKeys: () => RaceEthnicityKeys,
331
+ RecencyBandKeys: () => RecencyBandKeys,
323
332
  ReferralEntityCategoryKeys: () => ReferralEntityCategoryKeys,
324
333
  RelationshipStatusCurrentKeys: () => RelationshipStatusCurrentKeys,
325
334
  RelationshipTiesKeys: () => RelationshipTiesKeys,
@@ -401,6 +410,7 @@ __export(src_exports, {
401
410
  hairColorSot: () => hairColor_v1_0_0_default,
402
411
  hasTattoosSot: () => hasTattoos_v1_0_0_default,
403
412
  highestEducationLevelCompletedSot: () => highestEducationLevelCompleted_v1_0_0_default,
413
+ hmisSexSot: () => hmisSex_v1_0_0_default,
404
414
  homelessStatusSot: () => homelessStatus_v1_0_0_default,
405
415
  incidentInvolvementRolesSot: () => incidentInvolvementRoles_v1_0_0_default,
406
416
  incidentParticipationRolesSot: () => incidentParticipationRoles_v1_0_0_default,
@@ -411,6 +421,7 @@ __export(src_exports, {
411
421
  isProtectedRelationship: () => isProtectedRelationship,
412
422
  isStructuredNameType: () => isStructuredNameType,
413
423
  isTransgenderGenderIdentity: () => isTransgenderGenderIdentity,
424
+ juvenileJusticeEpisodeTypeSot: () => juvenileJusticeEpisodeType_v1_0_0_default,
414
425
  juvenileJusticeInvolvementStatusSot: () => juvenileJusticeInvolvementStatus_v1_0_0_default,
415
426
  layoutSchema: () => layoutSchema,
416
427
  locationTypeSot: () => locationType_v1_0_0_default,
@@ -437,6 +448,7 @@ __export(src_exports, {
437
448
  questionSchemaDefinition: () => questionSchemaDefinition,
438
449
  questionSchemaOptions: () => questionSchemaOptions,
439
450
  raceEthnicitySot: () => raceEthnicity_v1_0_0_default,
451
+ recencyBandSot: () => recencyBand_v1_0_0_default,
440
452
  referralEntityCategorySot: () => referralEntityCategory_v1_0_0_default,
441
453
  relationshipStatusCurrentSot: () => relationshipStatusCurrent_v1_0_0_default,
442
454
  relationshipTiesSot: () => relationshipTies_v1_0_0_default,
@@ -495,8 +507,6 @@ var CVC_1_NAME_TYPE = {
495
507
  ALIAS: "alias",
496
508
  /** Trade name / business name - single unstructured name field */
497
509
  TRADE_NAME: "trade_name",
498
- /** Single-word name (e.g., "Madonna", "Prince") - single unstructured name field */
499
- MONONYM: "mononym",
500
510
  /** Nickname - single unstructured name field */
501
511
  NICKNAME: "nickname",
502
512
  /** Online handle or username - single unstructured name field */
@@ -508,7 +518,6 @@ var CVC_1_VALUES = [
508
518
  CVC_1_NAME_TYPE.LEGAL,
509
519
  CVC_1_NAME_TYPE.ALIAS,
510
520
  CVC_1_NAME_TYPE.TRADE_NAME,
511
- CVC_1_NAME_TYPE.MONONYM,
512
521
  CVC_1_NAME_TYPE.NICKNAME,
513
522
  CVC_1_NAME_TYPE.HANDLE,
514
523
  CVC_1_NAME_TYPE.UNKNOWN
@@ -517,7 +526,6 @@ var CVC_1_LABELS = {
517
526
  [CVC_1_NAME_TYPE.LEGAL]: "Legal Name",
518
527
  [CVC_1_NAME_TYPE.ALIAS]: "Alias / AKA",
519
528
  [CVC_1_NAME_TYPE.TRADE_NAME]: "Trade Name",
520
- [CVC_1_NAME_TYPE.MONONYM]: "Mononym",
521
529
  [CVC_1_NAME_TYPE.NICKNAME]: "Nickname",
522
530
  [CVC_1_NAME_TYPE.HANDLE]: "Handle / Username",
523
531
  [CVC_1_NAME_TYPE.UNKNOWN]: "Unknown"
@@ -528,7 +536,6 @@ var CVC_1_STRUCTURED_NAME_TYPES = [
528
536
  var CVC_1_UNSTRUCTURED_NAME_TYPES = [
529
537
  CVC_1_NAME_TYPE.ALIAS,
530
538
  CVC_1_NAME_TYPE.TRADE_NAME,
531
- CVC_1_NAME_TYPE.MONONYM,
532
539
  CVC_1_NAME_TYPE.NICKNAME,
533
540
  CVC_1_NAME_TYPE.HANDLE,
534
541
  CVC_1_NAME_TYPE.UNKNOWN
@@ -1474,7 +1481,10 @@ var CVC_17_CORE_GENDER_IDENTITY = {
1474
1481
  TRANSGENDER: "TRANSGENDER",
1475
1482
  NON_BINARY: "NON_BINARY",
1476
1483
  OTHER: "OTHER",
1484
+ // Level 0 - Missingness codes (codebook canonical set)
1477
1485
  UNKNOWN: "UNK",
1486
+ DATA_NOT_COLLECTED: "DNC",
1487
+ PREFER_NOT_TO_ANSWER: "PNA",
1478
1488
  // Level 2 - Transgender subcategories
1479
1489
  TRANSGENDER_FTM: "TRANSGENDER_FTM",
1480
1490
  TRANSGENDER_MTF: "TRANSGENDER_MTF"
@@ -1486,6 +1496,8 @@ var CVC_17_LABELS = {
1486
1496
  [CVC_17_CORE_GENDER_IDENTITY.NON_BINARY]: "Non-Binary",
1487
1497
  [CVC_17_CORE_GENDER_IDENTITY.OTHER]: "Other",
1488
1498
  [CVC_17_CORE_GENDER_IDENTITY.UNKNOWN]: "Unknown",
1499
+ [CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED]: "Data not collected",
1500
+ [CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER]: "Client prefers not to answer",
1489
1501
  [CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM]: "Transgender - FTM",
1490
1502
  [CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF]: "Transgender - MTF"
1491
1503
  };
@@ -1510,6 +1522,32 @@ function isTransgenderGenderIdentity(value) {
1510
1522
  if (!value) return false;
1511
1523
  return CVC_17_TRANSGENDER_VALUES.includes(value);
1512
1524
  }
1525
+ var CVC_17_SELECTABLE_VALUES = [
1526
+ CVC_17_CORE_GENDER_IDENTITY.MALE,
1527
+ CVC_17_CORE_GENDER_IDENTITY.FEMALE,
1528
+ CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER,
1529
+ CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
1530
+ CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF,
1531
+ CVC_17_CORE_GENDER_IDENTITY.NON_BINARY,
1532
+ CVC_17_CORE_GENDER_IDENTITY.OTHER
1533
+ ];
1534
+ var CVC_17_MISSINGNESS_VALUES = [
1535
+ CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
1536
+ CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED,
1537
+ CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER
1538
+ ];
1539
+ var CVC_17_VALUES = [
1540
+ CVC_17_CORE_GENDER_IDENTITY.MALE,
1541
+ CVC_17_CORE_GENDER_IDENTITY.FEMALE,
1542
+ CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER,
1543
+ CVC_17_CORE_GENDER_IDENTITY.NON_BINARY,
1544
+ CVC_17_CORE_GENDER_IDENTITY.OTHER,
1545
+ CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
1546
+ CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED,
1547
+ CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER,
1548
+ CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
1549
+ CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF
1550
+ ];
1513
1551
  var IC_24_RACE = {
1514
1552
  AMERICAN_INDIAN_ALASKA_NATIVE: 1,
1515
1553
  ASIAN: 2,
@@ -4435,6 +4473,13 @@ var CVC_67_SELECTABLE_VALUES = [
4435
4473
  var CVC_67_MISSINGNESS_VALUES = [
4436
4474
  CVC_67_HMIS_SEX.DATA_NOT_COLLECTED
4437
4475
  ];
4476
+ var CVC_67_VALUES = [
4477
+ CVC_67_HMIS_SEX.MALE,
4478
+ CVC_67_HMIS_SEX.FEMALE,
4479
+ CVC_67_HMIS_SEX.CLIENT_PREFERS_NOT_TO_ANSWER,
4480
+ CVC_67_HMIS_SEX.CLIENT_DOESNT_KNOW,
4481
+ CVC_67_HMIS_SEX.DATA_NOT_COLLECTED
4482
+ ];
4438
4483
 
4439
4484
  // src/constants/service-catalog.json
4440
4485
  var service_catalog_default = {
@@ -6045,7 +6090,11 @@ var personNameSchema = new import_mongoose.Schema(
6045
6090
  isPrimary: Boolean,
6046
6091
  alias: Boolean,
6047
6092
  isUnknown: Boolean,
6048
- isAnonymous: Boolean
6093
+ isAnonymous: Boolean,
6094
+ // Shape flag: this person has only one name (e.g., Madonna). A mononym
6095
+ // can itself be legal, a nickname, a trade name, etc. — it's orthogonal
6096
+ // to nameType, not a value of it.
6097
+ isMononym: Boolean
6049
6098
  },
6050
6099
  { _id: false }
6051
6100
  );
@@ -8190,6 +8239,41 @@ var FrequencyCadenceKeys = {
8190
8239
  annual: "176-006-000-000-000-000-000",
8191
8240
  one_time: "176-007-000-000-000-000-000"
8192
8241
  };
8242
+ var RecencyBandKeys = {
8243
+ missingness_root: "137-000-000-000-000-000-000",
8244
+ unknown: "137-000-000-000-000-000-001",
8245
+ anonymous: "137-000-000-000-000-000-002",
8246
+ data_not_collected: "137-000-000-000-000-000-003",
8247
+ prefer_not_to_answer: "137-000-000-000-000-000-004",
8248
+ less_than_3_years: "137-001-000-000-000-000-000",
8249
+ months_3_to_6: "137-002-000-000-000-000-000",
8250
+ months_6_to_12: "137-003-000-000-000-000-000",
8251
+ one_year_or_more: "137-004-000-000-000-000-000",
8252
+ ten_plus_years: "137-005-000-000-000-000-000",
8253
+ within_3_months: "137-006-000-000-000-000-000",
8254
+ years_3_to_10: "137-007-000-000-000-000-000"
8255
+ };
8256
+ var JuvenileJusticeEpisodeTypeKeys = {
8257
+ missingness_root: "197-000-000-000-000-000-000",
8258
+ unknown: "197-000-000-000-000-000-001",
8259
+ anonymous: "197-000-000-000-000-000-002",
8260
+ data_not_collected: "197-000-000-000-000-000-003",
8261
+ detention_stay: "197-001-000-000-000-000-000",
8262
+ diversion_program: "197-002-000-000-000-000-000",
8263
+ pending_adjudication: "197-003-000-000-000-000-000",
8264
+ probation_supervision: "197-004-000-000-000-000-000",
8265
+ residential_jj_placement: "197-005-000-000-000-000-000"
8266
+ };
8267
+ var HmisSexKeys = {
8268
+ missingness_root: "067-000-000-000-000-000-000",
8269
+ unknown: "067-000-000-000-000-000-001",
8270
+ anonymous: "067-000-000-000-000-000-002",
8271
+ data_not_collected: "067-000-000-000-000-000-003",
8272
+ client_doesn_t_know: "067-000-000-000-000-000-004",
8273
+ client_prefers_not_to_answer: "067-000-000-000-000-000-005",
8274
+ female: "067-001-000-000-000-000-000",
8275
+ male: "067-002-000-000-000-000-000"
8276
+ };
8193
8277
 
8194
8278
  // src/services/cvcRegistryService.ts
8195
8279
  var import_mongoose10 = require("mongoose");
@@ -19939,6 +20023,328 @@ var frequencyCadence_v1_0_0_default = {
19939
20023
  }
19940
20024
  ]
19941
20025
  };
20026
+
20027
+ // src/cvcs/recencyBand.v1.0.0.json
20028
+ var recencyBand_v1_0_0_default = {
20029
+ domain: "recency_band",
20030
+ name: "Core Recency Band",
20031
+ version: "1.0.0",
20032
+ levels: {
20033
+ "0": "Unknown or Missing",
20034
+ "1": "Recency Band"
20035
+ },
20036
+ entries: [
20037
+ {
20038
+ code: "137-000-000-000-000-000-000",
20039
+ key: "missingness_root",
20040
+ title: "Unknown, Redacted, or Missing",
20041
+ selectable: false,
20042
+ parentCode: null,
20043
+ childCodes: [
20044
+ "137-000-000-000-000-000-001",
20045
+ "137-000-000-000-000-000-002",
20046
+ "137-000-000-000-000-000-003",
20047
+ "137-000-000-000-000-000-004"
20048
+ ],
20049
+ definition: "Root group for values indicating absent, withheld, or uncollected data."
20050
+ },
20051
+ {
20052
+ code: "137-000-000-000-000-000-001",
20053
+ key: "unknown",
20054
+ title: "Unknown",
20055
+ selectable: true,
20056
+ parentCode: "137-000-000-000-000-000-000",
20057
+ childCodes: [],
20058
+ definition: "Value is unknown at time of entry."
20059
+ },
20060
+ {
20061
+ code: "137-000-000-000-000-000-002",
20062
+ key: "anonymous",
20063
+ title: "Anonymous",
20064
+ selectable: true,
20065
+ parentCode: "137-000-000-000-000-000-000",
20066
+ childCodes: [],
20067
+ definition: "Value is intentionally withheld or redacted."
20068
+ },
20069
+ {
20070
+ code: "137-000-000-000-000-000-003",
20071
+ key: "data_not_collected",
20072
+ title: "Data not collected",
20073
+ selectable: true,
20074
+ parentCode: "137-000-000-000-000-000-000",
20075
+ childCodes: [],
20076
+ definition: "No attempt was made to collect the value."
20077
+ },
20078
+ {
20079
+ code: "137-000-000-000-000-000-004",
20080
+ key: "prefer_not_to_answer",
20081
+ title: "Client prefers not to answer",
20082
+ selectable: true,
20083
+ parentCode: "137-000-000-000-000-000-000",
20084
+ childCodes: [],
20085
+ definition: "Client was offered the opportunity to self-identify and explicitly declined to provide the value."
20086
+ },
20087
+ {
20088
+ code: "137-001-000-000-000-000-000",
20089
+ key: "less_than_3_years",
20090
+ title: "Less than 3 years ago",
20091
+ selectable: true,
20092
+ parentCode: null,
20093
+ childCodes: [],
20094
+ definition: "The asserted event occurred less than 3 years ago."
20095
+ },
20096
+ {
20097
+ code: "137-002-000-000-000-000-000",
20098
+ key: "months_3_to_6",
20099
+ title: "3-6 months ago",
20100
+ selectable: true,
20101
+ parentCode: null,
20102
+ childCodes: [],
20103
+ definition: "The asserted event occurred between 3 and 6 months ago."
20104
+ },
20105
+ {
20106
+ code: "137-003-000-000-000-000-000",
20107
+ key: "months_6_to_12",
20108
+ title: "6-12 months ago",
20109
+ selectable: true,
20110
+ parentCode: null,
20111
+ childCodes: [],
20112
+ definition: "The asserted event occurred between 6 and 12 months ago."
20113
+ },
20114
+ {
20115
+ code: "137-004-000-000-000-000-000",
20116
+ key: "one_year_or_more",
20117
+ title: "One year or more",
20118
+ selectable: true,
20119
+ parentCode: null,
20120
+ childCodes: [],
20121
+ definition: "The asserted event occurred one year or more ago (without further granularity)."
20122
+ },
20123
+ {
20124
+ code: "137-005-000-000-000-000-000",
20125
+ key: "ten_plus_years",
20126
+ title: "10+ years ago",
20127
+ selectable: true,
20128
+ parentCode: null,
20129
+ childCodes: [],
20130
+ definition: "The asserted event occurred 10 or more years ago."
20131
+ },
20132
+ {
20133
+ code: "137-006-000-000-000-000-000",
20134
+ key: "within_3_months",
20135
+ title: "Within past 3 months",
20136
+ selectable: true,
20137
+ parentCode: null,
20138
+ childCodes: [],
20139
+ definition: "The asserted event occurred within the past 3 months."
20140
+ },
20141
+ {
20142
+ code: "137-007-000-000-000-000-000",
20143
+ key: "years_3_to_10",
20144
+ title: "3-10 years ago",
20145
+ selectable: true,
20146
+ parentCode: null,
20147
+ childCodes: [],
20148
+ definition: "The asserted event occurred between 3 and 10 years ago."
20149
+ }
20150
+ ]
20151
+ };
20152
+
20153
+ // src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json
20154
+ var juvenileJusticeEpisodeType_v1_0_0_default = {
20155
+ domain: "juvenile_justice_episode_type",
20156
+ name: "Core Juvenile Justice Episode Type",
20157
+ version: "1.0.0",
20158
+ levels: {
20159
+ "0": "Unknown or Missing",
20160
+ "1": "Episode Type"
20161
+ },
20162
+ entries: [
20163
+ {
20164
+ code: "197-000-000-000-000-000-000",
20165
+ key: "missingness_root",
20166
+ title: "Unknown, Redacted, or Missing",
20167
+ selectable: false,
20168
+ parentCode: null,
20169
+ childCodes: [
20170
+ "197-000-000-000-000-000-001",
20171
+ "197-000-000-000-000-000-002",
20172
+ "197-000-000-000-000-000-003"
20173
+ ],
20174
+ definition: "Root group for values indicating absent, withheld, or uncollected data."
20175
+ },
20176
+ {
20177
+ code: "197-000-000-000-000-000-001",
20178
+ key: "unknown",
20179
+ title: "Unknown",
20180
+ selectable: true,
20181
+ parentCode: "197-000-000-000-000-000-000",
20182
+ childCodes: [],
20183
+ definition: "Value is unknown at time of entry."
20184
+ },
20185
+ {
20186
+ code: "197-000-000-000-000-000-002",
20187
+ key: "anonymous",
20188
+ title: "Anonymous",
20189
+ selectable: true,
20190
+ parentCode: "197-000-000-000-000-000-000",
20191
+ childCodes: [],
20192
+ definition: "Value is intentionally withheld or redacted."
20193
+ },
20194
+ {
20195
+ code: "197-000-000-000-000-000-003",
20196
+ key: "data_not_collected",
20197
+ title: "Data not collected",
20198
+ selectable: true,
20199
+ parentCode: "197-000-000-000-000-000-000",
20200
+ childCodes: [],
20201
+ definition: "No attempt was made to collect the value."
20202
+ },
20203
+ {
20204
+ code: "197-001-000-000-000-000-000",
20205
+ key: "detention_stay",
20206
+ title: "Detention stay",
20207
+ selectable: true,
20208
+ parentCode: null,
20209
+ childCodes: [],
20210
+ definition: "A period of confinement in a juvenile detention facility."
20211
+ },
20212
+ {
20213
+ code: "197-002-000-000-000-000-000",
20214
+ key: "diversion_program",
20215
+ title: "Diversion program",
20216
+ selectable: true,
20217
+ parentCode: null,
20218
+ childCodes: [],
20219
+ definition: "Participation in a program that diverts a youth away from formal juvenile court processing."
20220
+ },
20221
+ {
20222
+ code: "197-003-000-000-000-000-000",
20223
+ key: "pending_adjudication",
20224
+ title: "Pending charges / adjudication process",
20225
+ selectable: true,
20226
+ parentCode: null,
20227
+ childCodes: [],
20228
+ definition: "An open juvenile case awaiting adjudication."
20229
+ },
20230
+ {
20231
+ code: "197-004-000-000-000-000-000",
20232
+ key: "probation_supervision",
20233
+ title: "Probation / community supervision (juvenile)",
20234
+ selectable: true,
20235
+ parentCode: null,
20236
+ childCodes: [],
20237
+ definition: "Court-ordered supervision of a youth in the community rather than in confinement."
20238
+ },
20239
+ {
20240
+ code: "197-005-000-000-000-000-000",
20241
+ key: "residential_jj_placement",
20242
+ title: "Residential JJ placement",
20243
+ selectable: true,
20244
+ parentCode: null,
20245
+ childCodes: [],
20246
+ definition: "Placement in a residential juvenile justice facility (e.g. training school, residential treatment)."
20247
+ }
20248
+ ]
20249
+ };
20250
+
20251
+ // src/cvcs/hmisSex.v1.0.0.json
20252
+ var hmisSex_v1_0_0_default = {
20253
+ domain: "hmis_sex",
20254
+ name: "Core HMIS Sex",
20255
+ version: "1.0.0",
20256
+ levels: {
20257
+ "0": "Unknown or Missing",
20258
+ "1": "Sex"
20259
+ },
20260
+ entries: [
20261
+ {
20262
+ code: "067-000-000-000-000-000-000",
20263
+ key: "missingness_root",
20264
+ title: "Unknown, Redacted, or Missing",
20265
+ selectable: false,
20266
+ parentCode: null,
20267
+ childCodes: [
20268
+ "067-000-000-000-000-000-001",
20269
+ "067-000-000-000-000-000-002",
20270
+ "067-000-000-000-000-000-003",
20271
+ "067-000-000-000-000-000-004",
20272
+ "067-000-000-000-000-000-005"
20273
+ ],
20274
+ definition: "Root group for values indicating absent, withheld, or uncollected data."
20275
+ },
20276
+ {
20277
+ code: "067-000-000-000-000-000-001",
20278
+ key: "unknown",
20279
+ title: "Unknown",
20280
+ selectable: true,
20281
+ parentCode: "067-000-000-000-000-000-000",
20282
+ childCodes: [],
20283
+ definition: "Value is unknown at time of entry."
20284
+ },
20285
+ {
20286
+ code: "067-000-000-000-000-000-002",
20287
+ key: "anonymous",
20288
+ title: "Anonymous",
20289
+ selectable: true,
20290
+ parentCode: "067-000-000-000-000-000-000",
20291
+ childCodes: [],
20292
+ definition: "Value is intentionally withheld or redacted."
20293
+ },
20294
+ {
20295
+ code: "067-000-000-000-000-000-003",
20296
+ key: "data_not_collected",
20297
+ title: "Data not collected",
20298
+ selectable: true,
20299
+ parentCode: "067-000-000-000-000-000-000",
20300
+ childCodes: [],
20301
+ definition: "Use this response if the staff does not ask the person to provide their sex."
20302
+ },
20303
+ {
20304
+ code: "067-000-000-000-000-000-004",
20305
+ key: "client_doesn_t_know",
20306
+ title: "Client doesn't know",
20307
+ selectable: true,
20308
+ parentCode: "067-000-000-000-000-000-000",
20309
+ childCodes: [],
20310
+ definition: `"Client doesn't know" should only be selected when a person does not know their sex from among the responses.`
20311
+ },
20312
+ {
20313
+ code: "067-000-000-000-000-000-005",
20314
+ key: "client_prefers_not_to_answer",
20315
+ title: "Client prefers not to answer",
20316
+ selectable: true,
20317
+ parentCode: "067-000-000-000-000-000-000",
20318
+ childCodes: [],
20319
+ definition: '"Client prefers not to answer" should only be selected when a person chooses not to identify their sex from among the responses.'
20320
+ },
20321
+ {
20322
+ code: "067-001-000-000-000-000-000",
20323
+ key: "female",
20324
+ title: "Female",
20325
+ selectable: true,
20326
+ parentCode: null,
20327
+ childCodes: [],
20328
+ definition: "A person of the sex characterized by a reproductive system with the biological function of producing eggs (ova)."
20329
+ },
20330
+ {
20331
+ code: "067-002-000-000-000-000-000",
20332
+ key: "male",
20333
+ title: "Male",
20334
+ selectable: true,
20335
+ parentCode: null,
20336
+ childCodes: [],
20337
+ definition: "A person of the sex characterized by a reproductive system with the biological function of producing sperm."
20338
+ }
20339
+ ]
20340
+ };
20341
+
20342
+ // src/index.ts
20343
+ var selectableCodes = (envelope) => envelope.entries.filter((e) => e.selectable).map((e) => e.code);
20344
+ var CVC_137_VALUES = selectableCodes(recencyBand_v1_0_0_default);
20345
+ var CVC_197_VALUES = selectableCodes(
20346
+ juvenileJusticeEpisodeType_v1_0_0_default
20347
+ );
19942
20348
  // Annotate the CommonJS export names for ESM import in node:
19943
20349
  0 && (module.exports = {
19944
20350
  ACCOMMODATION_LABELS,
@@ -19985,6 +20391,7 @@ var frequencyCadence_v1_0_0_default = {
19985
20391
  CVC_136_OPTIONS,
19986
20392
  CVC_136_TYPE_TO_CATEGORY,
19987
20393
  CVC_136_VALUES,
20394
+ CVC_137_VALUES,
19988
20395
  CVC_145_CATEGORY,
19989
20396
  CVC_145_CATEGORY_LABELS,
19990
20397
  CVC_145_CATEGORY_ORDER,
@@ -20063,7 +20470,10 @@ var frequencyCadence_v1_0_0_default = {
20063
20470
  CVC_17_LABELS,
20064
20471
  CVC_17_LEVEL_1_OPTIONS,
20065
20472
  CVC_17_LEVEL_2_TRANSGENDER_OPTIONS,
20473
+ CVC_17_MISSINGNESS_VALUES,
20474
+ CVC_17_SELECTABLE_VALUES,
20066
20475
  CVC_17_TRANSGENDER_VALUES,
20476
+ CVC_17_VALUES,
20067
20477
  CVC_180_EDUCATION_LEVEL,
20068
20478
  CVC_180_LABELS,
20069
20479
  CVC_180_ORDINAL,
@@ -20073,6 +20483,7 @@ var frequencyCadence_v1_0_0_default = {
20073
20483
  CVC_196_CHILD_WELFARE_EPISODE_TYPE,
20074
20484
  CVC_196_LABELS,
20075
20485
  CVC_196_VALUES,
20486
+ CVC_197_VALUES,
20076
20487
  CVC_1_LABELS,
20077
20488
  CVC_1_NAME_TYPE,
20078
20489
  CVC_1_STRUCTURED_NAME_TYPES,
@@ -20082,6 +20493,7 @@ var frequencyCadence_v1_0_0_default = {
20082
20493
  CVC_67_LABELS,
20083
20494
  CVC_67_MISSINGNESS_VALUES,
20084
20495
  CVC_67_SELECTABLE_VALUES,
20496
+ CVC_67_VALUES,
20085
20497
  CVC_72_HT_TYPE,
20086
20498
  CVC_72_LABELS,
20087
20499
  CVC_72_VALUES,
@@ -20136,6 +20548,7 @@ var frequencyCadence_v1_0_0_default = {
20136
20548
  HairColorKeys,
20137
20549
  HasTattoosKeys,
20138
20550
  HighestEducationLevelCompletedKeys,
20551
+ HmisSexKeys,
20139
20552
  HomelessStatusKeys,
20140
20553
  IC_13_CATEGORIES,
20141
20554
  IC_13_CATEGORY_ORDER,
@@ -20196,6 +20609,7 @@ var frequencyCadence_v1_0_0_default = {
20196
20609
  IncidentInvolvementRoleKeys,
20197
20610
  IncidentParticipationRoleKeys,
20198
20611
  IncomeBenefitsSourcesKeys,
20612
+ JuvenileJusticeEpisodeTypeKeys,
20199
20613
  JuvenileJusticeInvolvementStatusKeys,
20200
20614
  LocationTypeKeys,
20201
20615
  MINOR_ADULT_STATUS,
@@ -20241,6 +20655,7 @@ var frequencyCadence_v1_0_0_default = {
20241
20655
  ROLE_LEVEL_LABELS,
20242
20656
  ROLE_LEVEL_VALUES,
20243
20657
  RaceEthnicityKeys,
20658
+ RecencyBandKeys,
20244
20659
  ReferralEntityCategoryKeys,
20245
20660
  RelationshipStatusCurrentKeys,
20246
20661
  RelationshipTiesKeys,
@@ -20322,6 +20737,7 @@ var frequencyCadence_v1_0_0_default = {
20322
20737
  hairColorSot,
20323
20738
  hasTattoosSot,
20324
20739
  highestEducationLevelCompletedSot,
20740
+ hmisSexSot,
20325
20741
  homelessStatusSot,
20326
20742
  incidentInvolvementRolesSot,
20327
20743
  incidentParticipationRolesSot,
@@ -20332,6 +20748,7 @@ var frequencyCadence_v1_0_0_default = {
20332
20748
  isProtectedRelationship,
20333
20749
  isStructuredNameType,
20334
20750
  isTransgenderGenderIdentity,
20751
+ juvenileJusticeEpisodeTypeSot,
20335
20752
  juvenileJusticeInvolvementStatusSot,
20336
20753
  layoutSchema,
20337
20754
  locationTypeSot,
@@ -20358,6 +20775,7 @@ var frequencyCadence_v1_0_0_default = {
20358
20775
  questionSchemaDefinition,
20359
20776
  questionSchemaOptions,
20360
20777
  raceEthnicitySot,
20778
+ recencyBandSot,
20361
20779
  referralEntityCategorySot,
20362
20780
  relationshipStatusCurrentSot,
20363
20781
  relationshipTiesSot,