@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.
- package/README.md +44 -0
- package/dist/config/index.cjs +191 -0
- package/dist/config/index.cjs.map +1 -0
- package/dist/config/index.d.cts +101 -0
- package/dist/config/index.d.ts +101 -0
- package/dist/config/index.js +165 -0
- package/dist/config/index.js.map +1 -0
- package/dist/constants/index.cjs +46 -5
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +42 -5
- package/dist/constants/index.js.map +1 -1
- package/dist/cvcs/index.cjs +321 -0
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +789 -436
- package/dist/cvcs/index.d.ts +789 -436
- package/dist/cvcs/index.js +318 -0
- package/dist/cvcs/index.js.map +1 -1
- package/dist/index.cjs +424 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +94 -3
- package/dist/index.d.ts +94 -3
- package/dist/index.js +412 -6
- package/dist/index.js.map +1 -1
- package/dist/{platform-auth-CjC57132.d.cts → platform-auth-C97LpsRd.d.cts} +8 -4
- package/dist/{platform-auth-CjC57132.d.ts → platform-auth-C97LpsRd.d.ts} +8 -4
- package/dist/schemas/index.cjs +43 -6
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +4 -0
- package/dist/schemas/index.d.ts +4 -0
- package/dist/schemas/index.js +43 -6
- package/dist/schemas/index.js.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +9 -2
- package/src/__tests__/__snapshots__/cvc-sot.snap +12 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +24 -0
- package/src/__tests__/cvc-structural.test.ts +3 -0
- package/src/__tests__/runtime-contract-validator.test.ts +556 -0
- package/src/config/fixtures/valid.yaml +90 -0
- package/src/config/index.ts +352 -0
- package/src/constants/ic.ts +49 -6
- package/src/cvcs/hmisSex.v1.0.0.json +89 -0
- package/src/cvcs/index.ts +6 -0
- package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +96 -0
- package/src/cvcs/recencyBand.v1.0.0.json +124 -0
- package/src/generated/cvc-enums.ts +59 -0
- package/src/index.ts +20 -0
- package/src/schemas/common.ts +4 -0
package/dist/cvcs/index.cjs
CHANGED
|
@@ -35,10 +35,12 @@ __export(cvcs_exports, {
|
|
|
35
35
|
hairColorSot: () => hairColor_v1_0_0_default,
|
|
36
36
|
hasTattoosSot: () => hasTattoos_v1_0_0_default,
|
|
37
37
|
highestEducationLevelCompletedSot: () => highestEducationLevelCompleted_v1_0_0_default,
|
|
38
|
+
hmisSexSot: () => hmisSex_v1_0_0_default,
|
|
38
39
|
homelessStatusSot: () => homelessStatus_v1_0_0_default,
|
|
39
40
|
incidentInvolvementRolesSot: () => incidentInvolvementRoles_v1_0_0_default,
|
|
40
41
|
incidentParticipationRolesSot: () => incidentParticipationRoles_v1_0_0_default,
|
|
41
42
|
incomeBenefitsSourcesSot: () => incomeBenefitsSources_v1_0_0_default,
|
|
43
|
+
juvenileJusticeEpisodeTypeSot: () => juvenileJusticeEpisodeType_v1_0_0_default,
|
|
42
44
|
juvenileJusticeInvolvementStatusSot: () => juvenileJusticeInvolvementStatus_v1_0_0_default,
|
|
43
45
|
locationTypeSot: () => locationType_v1_0_0_default,
|
|
44
46
|
maritalStatusLegalSot: () => maritalStatusLegal_v1_0_0_default,
|
|
@@ -53,6 +55,7 @@ __export(cvcs_exports, {
|
|
|
53
55
|
primaryLanguageSot: () => primaryLanguage_v1_0_0_default,
|
|
54
56
|
pronounsSot: () => pronouns_v1_0_0_default,
|
|
55
57
|
raceEthnicitySot: () => raceEthnicity_v1_0_0_default,
|
|
58
|
+
recencyBandSot: () => recencyBand_v1_0_0_default,
|
|
56
59
|
referralEntityCategorySot: () => referralEntityCategory_v1_0_0_default,
|
|
57
60
|
relationshipStatusCurrentSot: () => relationshipStatusCurrent_v1_0_0_default,
|
|
58
61
|
relationshipTiesSot: () => relationshipTies_v1_0_0_default,
|
|
@@ -11432,6 +11435,321 @@ var frequencyCadence_v1_0_0_default = {
|
|
|
11432
11435
|
}
|
|
11433
11436
|
]
|
|
11434
11437
|
};
|
|
11438
|
+
|
|
11439
|
+
// src/cvcs/recencyBand.v1.0.0.json
|
|
11440
|
+
var recencyBand_v1_0_0_default = {
|
|
11441
|
+
domain: "recency_band",
|
|
11442
|
+
name: "Core Recency Band",
|
|
11443
|
+
version: "1.0.0",
|
|
11444
|
+
levels: {
|
|
11445
|
+
"0": "Unknown or Missing",
|
|
11446
|
+
"1": "Recency Band"
|
|
11447
|
+
},
|
|
11448
|
+
entries: [
|
|
11449
|
+
{
|
|
11450
|
+
code: "137-000-000-000-000-000-000",
|
|
11451
|
+
key: "missingness_root",
|
|
11452
|
+
title: "Unknown, Redacted, or Missing",
|
|
11453
|
+
selectable: false,
|
|
11454
|
+
parentCode: null,
|
|
11455
|
+
childCodes: [
|
|
11456
|
+
"137-000-000-000-000-000-001",
|
|
11457
|
+
"137-000-000-000-000-000-002",
|
|
11458
|
+
"137-000-000-000-000-000-003",
|
|
11459
|
+
"137-000-000-000-000-000-004"
|
|
11460
|
+
],
|
|
11461
|
+
definition: "Root group for values indicating absent, withheld, or uncollected data."
|
|
11462
|
+
},
|
|
11463
|
+
{
|
|
11464
|
+
code: "137-000-000-000-000-000-001",
|
|
11465
|
+
key: "unknown",
|
|
11466
|
+
title: "Unknown",
|
|
11467
|
+
selectable: true,
|
|
11468
|
+
parentCode: "137-000-000-000-000-000-000",
|
|
11469
|
+
childCodes: [],
|
|
11470
|
+
definition: "Value is unknown at time of entry."
|
|
11471
|
+
},
|
|
11472
|
+
{
|
|
11473
|
+
code: "137-000-000-000-000-000-002",
|
|
11474
|
+
key: "anonymous",
|
|
11475
|
+
title: "Anonymous",
|
|
11476
|
+
selectable: true,
|
|
11477
|
+
parentCode: "137-000-000-000-000-000-000",
|
|
11478
|
+
childCodes: [],
|
|
11479
|
+
definition: "Value is intentionally withheld or redacted."
|
|
11480
|
+
},
|
|
11481
|
+
{
|
|
11482
|
+
code: "137-000-000-000-000-000-003",
|
|
11483
|
+
key: "data_not_collected",
|
|
11484
|
+
title: "Data not collected",
|
|
11485
|
+
selectable: true,
|
|
11486
|
+
parentCode: "137-000-000-000-000-000-000",
|
|
11487
|
+
childCodes: [],
|
|
11488
|
+
definition: "No attempt was made to collect the value."
|
|
11489
|
+
},
|
|
11490
|
+
{
|
|
11491
|
+
code: "137-000-000-000-000-000-004",
|
|
11492
|
+
key: "prefer_not_to_answer",
|
|
11493
|
+
title: "Client prefers not to answer",
|
|
11494
|
+
selectable: true,
|
|
11495
|
+
parentCode: "137-000-000-000-000-000-000",
|
|
11496
|
+
childCodes: [],
|
|
11497
|
+
definition: "Client was offered the opportunity to self-identify and explicitly declined to provide the value."
|
|
11498
|
+
},
|
|
11499
|
+
{
|
|
11500
|
+
code: "137-001-000-000-000-000-000",
|
|
11501
|
+
key: "less_than_3_years",
|
|
11502
|
+
title: "Less than 3 years ago",
|
|
11503
|
+
selectable: true,
|
|
11504
|
+
parentCode: null,
|
|
11505
|
+
childCodes: [],
|
|
11506
|
+
definition: "The asserted event occurred less than 3 years ago."
|
|
11507
|
+
},
|
|
11508
|
+
{
|
|
11509
|
+
code: "137-002-000-000-000-000-000",
|
|
11510
|
+
key: "months_3_to_6",
|
|
11511
|
+
title: "3-6 months ago",
|
|
11512
|
+
selectable: true,
|
|
11513
|
+
parentCode: null,
|
|
11514
|
+
childCodes: [],
|
|
11515
|
+
definition: "The asserted event occurred between 3 and 6 months ago."
|
|
11516
|
+
},
|
|
11517
|
+
{
|
|
11518
|
+
code: "137-003-000-000-000-000-000",
|
|
11519
|
+
key: "months_6_to_12",
|
|
11520
|
+
title: "6-12 months ago",
|
|
11521
|
+
selectable: true,
|
|
11522
|
+
parentCode: null,
|
|
11523
|
+
childCodes: [],
|
|
11524
|
+
definition: "The asserted event occurred between 6 and 12 months ago."
|
|
11525
|
+
},
|
|
11526
|
+
{
|
|
11527
|
+
code: "137-004-000-000-000-000-000",
|
|
11528
|
+
key: "one_year_or_more",
|
|
11529
|
+
title: "One year or more",
|
|
11530
|
+
selectable: true,
|
|
11531
|
+
parentCode: null,
|
|
11532
|
+
childCodes: [],
|
|
11533
|
+
definition: "The asserted event occurred one year or more ago (without further granularity)."
|
|
11534
|
+
},
|
|
11535
|
+
{
|
|
11536
|
+
code: "137-005-000-000-000-000-000",
|
|
11537
|
+
key: "ten_plus_years",
|
|
11538
|
+
title: "10+ years ago",
|
|
11539
|
+
selectable: true,
|
|
11540
|
+
parentCode: null,
|
|
11541
|
+
childCodes: [],
|
|
11542
|
+
definition: "The asserted event occurred 10 or more years ago."
|
|
11543
|
+
},
|
|
11544
|
+
{
|
|
11545
|
+
code: "137-006-000-000-000-000-000",
|
|
11546
|
+
key: "within_3_months",
|
|
11547
|
+
title: "Within past 3 months",
|
|
11548
|
+
selectable: true,
|
|
11549
|
+
parentCode: null,
|
|
11550
|
+
childCodes: [],
|
|
11551
|
+
definition: "The asserted event occurred within the past 3 months."
|
|
11552
|
+
},
|
|
11553
|
+
{
|
|
11554
|
+
code: "137-007-000-000-000-000-000",
|
|
11555
|
+
key: "years_3_to_10",
|
|
11556
|
+
title: "3-10 years ago",
|
|
11557
|
+
selectable: true,
|
|
11558
|
+
parentCode: null,
|
|
11559
|
+
childCodes: [],
|
|
11560
|
+
definition: "The asserted event occurred between 3 and 10 years ago."
|
|
11561
|
+
}
|
|
11562
|
+
]
|
|
11563
|
+
};
|
|
11564
|
+
|
|
11565
|
+
// src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json
|
|
11566
|
+
var juvenileJusticeEpisodeType_v1_0_0_default = {
|
|
11567
|
+
domain: "juvenile_justice_episode_type",
|
|
11568
|
+
name: "Core Juvenile Justice Episode Type",
|
|
11569
|
+
version: "1.0.0",
|
|
11570
|
+
levels: {
|
|
11571
|
+
"0": "Unknown or Missing",
|
|
11572
|
+
"1": "Episode Type"
|
|
11573
|
+
},
|
|
11574
|
+
entries: [
|
|
11575
|
+
{
|
|
11576
|
+
code: "197-000-000-000-000-000-000",
|
|
11577
|
+
key: "missingness_root",
|
|
11578
|
+
title: "Unknown, Redacted, or Missing",
|
|
11579
|
+
selectable: false,
|
|
11580
|
+
parentCode: null,
|
|
11581
|
+
childCodes: [
|
|
11582
|
+
"197-000-000-000-000-000-001",
|
|
11583
|
+
"197-000-000-000-000-000-002",
|
|
11584
|
+
"197-000-000-000-000-000-003"
|
|
11585
|
+
],
|
|
11586
|
+
definition: "Root group for values indicating absent, withheld, or uncollected data."
|
|
11587
|
+
},
|
|
11588
|
+
{
|
|
11589
|
+
code: "197-000-000-000-000-000-001",
|
|
11590
|
+
key: "unknown",
|
|
11591
|
+
title: "Unknown",
|
|
11592
|
+
selectable: true,
|
|
11593
|
+
parentCode: "197-000-000-000-000-000-000",
|
|
11594
|
+
childCodes: [],
|
|
11595
|
+
definition: "Value is unknown at time of entry."
|
|
11596
|
+
},
|
|
11597
|
+
{
|
|
11598
|
+
code: "197-000-000-000-000-000-002",
|
|
11599
|
+
key: "anonymous",
|
|
11600
|
+
title: "Anonymous",
|
|
11601
|
+
selectable: true,
|
|
11602
|
+
parentCode: "197-000-000-000-000-000-000",
|
|
11603
|
+
childCodes: [],
|
|
11604
|
+
definition: "Value is intentionally withheld or redacted."
|
|
11605
|
+
},
|
|
11606
|
+
{
|
|
11607
|
+
code: "197-000-000-000-000-000-003",
|
|
11608
|
+
key: "data_not_collected",
|
|
11609
|
+
title: "Data not collected",
|
|
11610
|
+
selectable: true,
|
|
11611
|
+
parentCode: "197-000-000-000-000-000-000",
|
|
11612
|
+
childCodes: [],
|
|
11613
|
+
definition: "No attempt was made to collect the value."
|
|
11614
|
+
},
|
|
11615
|
+
{
|
|
11616
|
+
code: "197-001-000-000-000-000-000",
|
|
11617
|
+
key: "detention_stay",
|
|
11618
|
+
title: "Detention stay",
|
|
11619
|
+
selectable: true,
|
|
11620
|
+
parentCode: null,
|
|
11621
|
+
childCodes: [],
|
|
11622
|
+
definition: "A period of confinement in a juvenile detention facility."
|
|
11623
|
+
},
|
|
11624
|
+
{
|
|
11625
|
+
code: "197-002-000-000-000-000-000",
|
|
11626
|
+
key: "diversion_program",
|
|
11627
|
+
title: "Diversion program",
|
|
11628
|
+
selectable: true,
|
|
11629
|
+
parentCode: null,
|
|
11630
|
+
childCodes: [],
|
|
11631
|
+
definition: "Participation in a program that diverts a youth away from formal juvenile court processing."
|
|
11632
|
+
},
|
|
11633
|
+
{
|
|
11634
|
+
code: "197-003-000-000-000-000-000",
|
|
11635
|
+
key: "pending_adjudication",
|
|
11636
|
+
title: "Pending charges / adjudication process",
|
|
11637
|
+
selectable: true,
|
|
11638
|
+
parentCode: null,
|
|
11639
|
+
childCodes: [],
|
|
11640
|
+
definition: "An open juvenile case awaiting adjudication."
|
|
11641
|
+
},
|
|
11642
|
+
{
|
|
11643
|
+
code: "197-004-000-000-000-000-000",
|
|
11644
|
+
key: "probation_supervision",
|
|
11645
|
+
title: "Probation / community supervision (juvenile)",
|
|
11646
|
+
selectable: true,
|
|
11647
|
+
parentCode: null,
|
|
11648
|
+
childCodes: [],
|
|
11649
|
+
definition: "Court-ordered supervision of a youth in the community rather than in confinement."
|
|
11650
|
+
},
|
|
11651
|
+
{
|
|
11652
|
+
code: "197-005-000-000-000-000-000",
|
|
11653
|
+
key: "residential_jj_placement",
|
|
11654
|
+
title: "Residential JJ placement",
|
|
11655
|
+
selectable: true,
|
|
11656
|
+
parentCode: null,
|
|
11657
|
+
childCodes: [],
|
|
11658
|
+
definition: "Placement in a residential juvenile justice facility (e.g. training school, residential treatment)."
|
|
11659
|
+
}
|
|
11660
|
+
]
|
|
11661
|
+
};
|
|
11662
|
+
|
|
11663
|
+
// src/cvcs/hmisSex.v1.0.0.json
|
|
11664
|
+
var hmisSex_v1_0_0_default = {
|
|
11665
|
+
domain: "hmis_sex",
|
|
11666
|
+
name: "Core HMIS Sex",
|
|
11667
|
+
version: "1.0.0",
|
|
11668
|
+
levels: {
|
|
11669
|
+
"0": "Unknown or Missing",
|
|
11670
|
+
"1": "Sex"
|
|
11671
|
+
},
|
|
11672
|
+
entries: [
|
|
11673
|
+
{
|
|
11674
|
+
code: "067-000-000-000-000-000-000",
|
|
11675
|
+
key: "missingness_root",
|
|
11676
|
+
title: "Unknown, Redacted, or Missing",
|
|
11677
|
+
selectable: false,
|
|
11678
|
+
parentCode: null,
|
|
11679
|
+
childCodes: [
|
|
11680
|
+
"067-000-000-000-000-000-001",
|
|
11681
|
+
"067-000-000-000-000-000-002",
|
|
11682
|
+
"067-000-000-000-000-000-003",
|
|
11683
|
+
"067-000-000-000-000-000-004",
|
|
11684
|
+
"067-000-000-000-000-000-005"
|
|
11685
|
+
],
|
|
11686
|
+
definition: "Root group for values indicating absent, withheld, or uncollected data."
|
|
11687
|
+
},
|
|
11688
|
+
{
|
|
11689
|
+
code: "067-000-000-000-000-000-001",
|
|
11690
|
+
key: "unknown",
|
|
11691
|
+
title: "Unknown",
|
|
11692
|
+
selectable: true,
|
|
11693
|
+
parentCode: "067-000-000-000-000-000-000",
|
|
11694
|
+
childCodes: [],
|
|
11695
|
+
definition: "Value is unknown at time of entry."
|
|
11696
|
+
},
|
|
11697
|
+
{
|
|
11698
|
+
code: "067-000-000-000-000-000-002",
|
|
11699
|
+
key: "anonymous",
|
|
11700
|
+
title: "Anonymous",
|
|
11701
|
+
selectable: true,
|
|
11702
|
+
parentCode: "067-000-000-000-000-000-000",
|
|
11703
|
+
childCodes: [],
|
|
11704
|
+
definition: "Value is intentionally withheld or redacted."
|
|
11705
|
+
},
|
|
11706
|
+
{
|
|
11707
|
+
code: "067-000-000-000-000-000-003",
|
|
11708
|
+
key: "data_not_collected",
|
|
11709
|
+
title: "Data not collected",
|
|
11710
|
+
selectable: true,
|
|
11711
|
+
parentCode: "067-000-000-000-000-000-000",
|
|
11712
|
+
childCodes: [],
|
|
11713
|
+
definition: "Use this response if the staff does not ask the person to provide their sex."
|
|
11714
|
+
},
|
|
11715
|
+
{
|
|
11716
|
+
code: "067-000-000-000-000-000-004",
|
|
11717
|
+
key: "client_doesn_t_know",
|
|
11718
|
+
title: "Client doesn't know",
|
|
11719
|
+
selectable: true,
|
|
11720
|
+
parentCode: "067-000-000-000-000-000-000",
|
|
11721
|
+
childCodes: [],
|
|
11722
|
+
definition: `"Client doesn't know" should only be selected when a person does not know their sex from among the responses.`
|
|
11723
|
+
},
|
|
11724
|
+
{
|
|
11725
|
+
code: "067-000-000-000-000-000-005",
|
|
11726
|
+
key: "client_prefers_not_to_answer",
|
|
11727
|
+
title: "Client prefers not to answer",
|
|
11728
|
+
selectable: true,
|
|
11729
|
+
parentCode: "067-000-000-000-000-000-000",
|
|
11730
|
+
childCodes: [],
|
|
11731
|
+
definition: '"Client prefers not to answer" should only be selected when a person chooses not to identify their sex from among the responses.'
|
|
11732
|
+
},
|
|
11733
|
+
{
|
|
11734
|
+
code: "067-001-000-000-000-000-000",
|
|
11735
|
+
key: "female",
|
|
11736
|
+
title: "Female",
|
|
11737
|
+
selectable: true,
|
|
11738
|
+
parentCode: null,
|
|
11739
|
+
childCodes: [],
|
|
11740
|
+
definition: "A person of the sex characterized by a reproductive system with the biological function of producing eggs (ova)."
|
|
11741
|
+
},
|
|
11742
|
+
{
|
|
11743
|
+
code: "067-002-000-000-000-000-000",
|
|
11744
|
+
key: "male",
|
|
11745
|
+
title: "Male",
|
|
11746
|
+
selectable: true,
|
|
11747
|
+
parentCode: null,
|
|
11748
|
+
childCodes: [],
|
|
11749
|
+
definition: "A person of the sex characterized by a reproductive system with the biological function of producing sperm."
|
|
11750
|
+
}
|
|
11751
|
+
]
|
|
11752
|
+
};
|
|
11435
11753
|
// Annotate the CommonJS export names for ESM import in node:
|
|
11436
11754
|
0 && (module.exports = {
|
|
11437
11755
|
administeringJurisdictionSot,
|
|
@@ -11449,10 +11767,12 @@ var frequencyCadence_v1_0_0_default = {
|
|
|
11449
11767
|
hairColorSot,
|
|
11450
11768
|
hasTattoosSot,
|
|
11451
11769
|
highestEducationLevelCompletedSot,
|
|
11770
|
+
hmisSexSot,
|
|
11452
11771
|
homelessStatusSot,
|
|
11453
11772
|
incidentInvolvementRolesSot,
|
|
11454
11773
|
incidentParticipationRolesSot,
|
|
11455
11774
|
incomeBenefitsSourcesSot,
|
|
11775
|
+
juvenileJusticeEpisodeTypeSot,
|
|
11456
11776
|
juvenileJusticeInvolvementStatusSot,
|
|
11457
11777
|
locationTypeSot,
|
|
11458
11778
|
maritalStatusLegalSot,
|
|
@@ -11467,6 +11787,7 @@ var frequencyCadence_v1_0_0_default = {
|
|
|
11467
11787
|
primaryLanguageSot,
|
|
11468
11788
|
pronounsSot,
|
|
11469
11789
|
raceEthnicitySot,
|
|
11790
|
+
recencyBandSot,
|
|
11470
11791
|
referralEntityCategorySot,
|
|
11471
11792
|
relationshipStatusCurrentSot,
|
|
11472
11793
|
relationshipTiesSot,
|