@htilabs/platform-common-models 0.81.0 → 0.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/{index-uz57Fic9.d.ts → index-Bh1zO_Vu.d.ts} +1 -1
- package/dist/{index-1pWiqEBC.d.cts → index-XWSYon40.d.cts} +1 -1
- package/dist/index.cjs +332 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +322 -44
- package/dist/index.js.map +1 -1
- package/dist/information-scope/index.cjs +290 -2
- package/dist/information-scope/index.cjs.map +1 -1
- package/dist/information-scope/index.d.cts +84 -1
- package/dist/information-scope/index.d.ts +84 -1
- package/dist/information-scope/index.js +279 -1
- package/dist/information-scope/index.js.map +1 -1
- package/dist/models/index.d.cts +2 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/schemas/index.d.cts +25 -25
- package/dist/schemas/index.d.ts +25 -25
- package/dist/services/index.cjs +290 -2
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +279 -1
- package/dist/services/index.js.map +1 -1
- package/dist/validation/index.d.cts +1 -1
- package/dist/validation/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/generated/informationScopeUiCopy.ts +263 -0
- package/src/services/__tests__/informationScopeUiCopy.test.ts +128 -0
- package/src/services/informationScope.ts +1 -0
- package/src/services/informationScopeUiCopy.ts +98 -0
- package/dist/{agency-Djp57S71.d.cts → agency-8ufZJJDH.d.cts} +4 -4
- package/dist/{agency-BHv54o79.d.ts → agency-CnVTwLeV.d.ts} +4 -4
- package/dist/{cvcEntry-DAuhe0cd.d.cts → cvcEntry-D787utvP.d.cts} +8 -8
- package/dist/{cvcEntry-DAuhe0cd.d.ts → cvcEntry-D787utvP.d.ts} +8 -8
|
@@ -468,17 +468,295 @@ function scopeMigrationsFromSot(sot) {
|
|
|
468
468
|
};
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
|
+
|
|
472
|
+
// src/generated/informationScopeUiCopy.ts
|
|
473
|
+
var INFORMATION_SCOPE_UI_COPY_SOURCE = {
|
|
474
|
+
"order": {
|
|
475
|
+
"repo": "htilabstech/prototype",
|
|
476
|
+
"file": "data/cvcs/core_information_scope.yaml",
|
|
477
|
+
"sha": "395bb7aa"
|
|
478
|
+
},
|
|
479
|
+
"words": {
|
|
480
|
+
"repo": "htilabstech/platform-prototype",
|
|
481
|
+
"file": "src/data.js",
|
|
482
|
+
"sha": "c324f715",
|
|
483
|
+
"line": 33875
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
var INFORMATION_SCOPE_CATEGORY_ORDER = [
|
|
487
|
+
"system",
|
|
488
|
+
"notes",
|
|
489
|
+
"identifying",
|
|
490
|
+
"contact",
|
|
491
|
+
"health_accommodation",
|
|
492
|
+
"immigration_legal_status",
|
|
493
|
+
"risk",
|
|
494
|
+
"services",
|
|
495
|
+
"instruments",
|
|
496
|
+
"relationships_household",
|
|
497
|
+
"offenders__identifying",
|
|
498
|
+
"offenders__contact",
|
|
499
|
+
"offenders__health_accommodation",
|
|
500
|
+
"offenders__immigration_legal_status",
|
|
501
|
+
"offenders__risk",
|
|
502
|
+
"offenders__services",
|
|
503
|
+
"offenders__instruments",
|
|
504
|
+
"offenders__relationships_household",
|
|
505
|
+
"family__identifying",
|
|
506
|
+
"family__contact",
|
|
507
|
+
"family__health_accommodation",
|
|
508
|
+
"family__immigration_legal_status",
|
|
509
|
+
"family__risk",
|
|
510
|
+
"family__services",
|
|
511
|
+
"family__instruments",
|
|
512
|
+
"family__relationships_household",
|
|
513
|
+
"others__identifying",
|
|
514
|
+
"others__contact",
|
|
515
|
+
"others__health_accommodation",
|
|
516
|
+
"others__immigration_legal_status",
|
|
517
|
+
"others__risk",
|
|
518
|
+
"others__services",
|
|
519
|
+
"others__instruments",
|
|
520
|
+
"others__relationships_household",
|
|
521
|
+
"network_associations",
|
|
522
|
+
"commercial_activity",
|
|
523
|
+
"investigative_work_product",
|
|
524
|
+
"object_identifiers"
|
|
525
|
+
];
|
|
526
|
+
var INFORMATION_SCOPE_CATEGORY_SUB = {
|
|
527
|
+
"system": "Session timestamps, source info \u2014 always shared",
|
|
528
|
+
"notes": "The session summary, and notes written in a session or on the case",
|
|
529
|
+
"identifying": "Names, DOB, addresses, identifiers, demographics",
|
|
530
|
+
"contact": "How to reach the person safely: contact info + safety preferences, the Priorities & Safety triage",
|
|
531
|
+
"health_accommodation": "Health status, accommodation needs",
|
|
532
|
+
"immigration_legal_status": "Immigration status, immigration applications",
|
|
533
|
+
"risk": "Indicators, screening outcomes, per-instrument assessment responses, determinations, system involvement \u2014 the people who caused harm are their own branch",
|
|
534
|
+
"services": "Contact history with this agency, service records, service plans + goals \u2014 three tiers of sensitivity",
|
|
535
|
+
"instruments": "Initial Screen, intake screens, assessments, Findings \u2014 a Summary & outcome row and a Full questions, narratives & notes row per instrument",
|
|
536
|
+
"relationships_household": "The client's account of the people around them \u2014 each relationship record, the household roster, pets; each entry names the other person as name + kind and carries nothing else about them",
|
|
537
|
+
"offenders__identifying": "People who caused harm \u2014 the person's own record, grouped by kind (identifying information)",
|
|
538
|
+
"offenders__contact": "People who caused harm \u2014 the person's own record, grouped by kind (contact & safety)",
|
|
539
|
+
"offenders__health_accommodation": "People who caused harm \u2014 the person's own record, grouped by kind (health & accommodation)",
|
|
540
|
+
"offenders__immigration_legal_status": "People who caused harm \u2014 the person's own record, grouped by kind (immigration & legal status)",
|
|
541
|
+
"offenders__risk": "People who caused harm \u2014 the person's own record, grouped by kind (risk-related)",
|
|
542
|
+
"offenders__services": "People who caused harm \u2014 the person's own record, grouped by kind (services & case history)",
|
|
543
|
+
"offenders__instruments": "People who caused harm \u2014 the person's own record, grouped by kind (screens & assessments)",
|
|
544
|
+
"offenders__relationships_household": "People who caused harm \u2014 the person's own record, grouped by kind (relationships & household)",
|
|
545
|
+
"family__identifying": "Eligible family members \u2014 the person's own record, grouped by kind (identifying information)",
|
|
546
|
+
"family__contact": "Eligible family members \u2014 the person's own record, grouped by kind (contact & safety)",
|
|
547
|
+
"family__health_accommodation": "Eligible family members \u2014 the person's own record, grouped by kind (health & accommodation)",
|
|
548
|
+
"family__immigration_legal_status": "Eligible family members \u2014 the person's own record, grouped by kind (immigration & legal status)",
|
|
549
|
+
"family__risk": "Eligible family members \u2014 the person's own record, grouped by kind (risk-related)",
|
|
550
|
+
"family__services": "Eligible family members \u2014 the person's own record, grouped by kind (services & case history)",
|
|
551
|
+
"family__instruments": "Eligible family members \u2014 the person's own record, grouped by kind (screens & assessments)",
|
|
552
|
+
"family__relationships_household": "Eligible family members \u2014 the person's own record, grouped by kind (relationships & household)",
|
|
553
|
+
"others__identifying": "Other people on the case \u2014 the person's own record, grouped by kind (identifying information)",
|
|
554
|
+
"others__contact": "Other people on the case \u2014 the person's own record, grouped by kind (contact & safety)",
|
|
555
|
+
"others__health_accommodation": "Other people on the case \u2014 the person's own record, grouped by kind (health & accommodation)",
|
|
556
|
+
"others__immigration_legal_status": "Other people on the case \u2014 the person's own record, grouped by kind (immigration & legal status)",
|
|
557
|
+
"others__risk": "Other people on the case \u2014 the person's own record, grouped by kind (risk-related)",
|
|
558
|
+
"others__services": "Other people on the case \u2014 the person's own record, grouped by kind (services & case history)",
|
|
559
|
+
"others__instruments": "Other people on the case \u2014 the person's own record, grouped by kind (screens & assessments)",
|
|
560
|
+
"others__relationships_household": "Other people on the case \u2014 the person's own record, grouped by kind (relationships & household)",
|
|
561
|
+
"network_associations": "Personas, network membership, relationships, criminal-org links",
|
|
562
|
+
"commercial_activity": "Ads, listings, posting activity, pricing, business fronts",
|
|
563
|
+
"investigative_work_product": "Analyst determinations, dispositions, case briefs",
|
|
564
|
+
"object_identifiers": "Phone numbers, vehicle identifiers, image hashes, account handles"
|
|
565
|
+
};
|
|
566
|
+
var INFORMATION_SCOPE_ROW_ORDER = {
|
|
567
|
+
"system": [
|
|
568
|
+
"system_info"
|
|
569
|
+
],
|
|
570
|
+
"notes": [
|
|
571
|
+
"session_summary",
|
|
572
|
+
"case_notes"
|
|
573
|
+
],
|
|
574
|
+
"identifying": [
|
|
575
|
+
"names",
|
|
576
|
+
"dob",
|
|
577
|
+
"addresses",
|
|
578
|
+
"additional_ids",
|
|
579
|
+
"demographics",
|
|
580
|
+
"identifying__other"
|
|
581
|
+
],
|
|
582
|
+
"contact": [
|
|
583
|
+
"contact_info",
|
|
584
|
+
"safe_locations",
|
|
585
|
+
"priorities_safety",
|
|
586
|
+
"encounter_location"
|
|
587
|
+
],
|
|
588
|
+
"health_accommodation": [
|
|
589
|
+
"health_status",
|
|
590
|
+
"accommodation_needs"
|
|
591
|
+
],
|
|
592
|
+
"immigration_legal_status": [
|
|
593
|
+
"immigration_status",
|
|
594
|
+
"immigration_applications"
|
|
595
|
+
],
|
|
596
|
+
"risk": [
|
|
597
|
+
"screen_indicators",
|
|
598
|
+
"victimization",
|
|
599
|
+
"system_involvement",
|
|
600
|
+
"derived_risk_signals"
|
|
601
|
+
],
|
|
602
|
+
"services": [
|
|
603
|
+
"contact_history",
|
|
604
|
+
"service_history",
|
|
605
|
+
"plans_goals"
|
|
606
|
+
],
|
|
607
|
+
"instruments": [
|
|
608
|
+
"summary_initial_screen",
|
|
609
|
+
"summary_mental_health_screen",
|
|
610
|
+
"summary_behavioral_health_intake",
|
|
611
|
+
"summary_trauma_and_coping_screen",
|
|
612
|
+
"summary_ae_intake",
|
|
613
|
+
"summary_ida",
|
|
614
|
+
"summary_lap",
|
|
615
|
+
"summary_danger_assessment",
|
|
616
|
+
"summary_stalking_assessment",
|
|
617
|
+
"summary_injury_and_strangulation",
|
|
618
|
+
"summary_hope_scale",
|
|
619
|
+
"summary_needs_assessment",
|
|
620
|
+
"summary_tra",
|
|
621
|
+
"summary_findings",
|
|
622
|
+
"full_initial_screen",
|
|
623
|
+
"full_mental_health_screen",
|
|
624
|
+
"full_behavioral_health_intake",
|
|
625
|
+
"full_trauma_and_coping_screen",
|
|
626
|
+
"full_ae_intake",
|
|
627
|
+
"full_ida",
|
|
628
|
+
"full_lap",
|
|
629
|
+
"full_danger_assessment",
|
|
630
|
+
"full_stalking_assessment",
|
|
631
|
+
"full_injury_and_strangulation",
|
|
632
|
+
"full_hope_scale",
|
|
633
|
+
"full_needs_assessment",
|
|
634
|
+
"full_tra",
|
|
635
|
+
"full_findings"
|
|
636
|
+
],
|
|
637
|
+
"relationships_household": [],
|
|
638
|
+
"offenders__identifying": [],
|
|
639
|
+
"offenders__contact": [
|
|
640
|
+
"offenders__safe_locations"
|
|
641
|
+
],
|
|
642
|
+
"offenders__health_accommodation": [],
|
|
643
|
+
"offenders__immigration_legal_status": [],
|
|
644
|
+
"offenders__risk": [],
|
|
645
|
+
"offenders__services": [],
|
|
646
|
+
"offenders__instruments": [
|
|
647
|
+
"offenders__instrument_summary",
|
|
648
|
+
"offenders__instrument_full"
|
|
649
|
+
],
|
|
650
|
+
"offenders__relationships_household": [],
|
|
651
|
+
"family__identifying": [],
|
|
652
|
+
"family__contact": [
|
|
653
|
+
"family__safe_locations"
|
|
654
|
+
],
|
|
655
|
+
"family__health_accommodation": [],
|
|
656
|
+
"family__immigration_legal_status": [],
|
|
657
|
+
"family__risk": [],
|
|
658
|
+
"family__services": [],
|
|
659
|
+
"family__instruments": [
|
|
660
|
+
"family__instrument_summary",
|
|
661
|
+
"family__instrument_full"
|
|
662
|
+
],
|
|
663
|
+
"family__relationships_household": [],
|
|
664
|
+
"others__identifying": [],
|
|
665
|
+
"others__contact": [
|
|
666
|
+
"others__safe_locations"
|
|
667
|
+
],
|
|
668
|
+
"others__health_accommodation": [],
|
|
669
|
+
"others__immigration_legal_status": [],
|
|
670
|
+
"others__risk": [],
|
|
671
|
+
"others__services": [],
|
|
672
|
+
"others__instruments": [
|
|
673
|
+
"others__instrument_summary",
|
|
674
|
+
"others__instrument_full"
|
|
675
|
+
],
|
|
676
|
+
"others__relationships_household": [],
|
|
677
|
+
"network_associations": [
|
|
678
|
+
"network_membership",
|
|
679
|
+
"persona_links"
|
|
680
|
+
],
|
|
681
|
+
"commercial_activity": [
|
|
682
|
+
"ad_content",
|
|
683
|
+
"commercial_patterns"
|
|
684
|
+
],
|
|
685
|
+
"investigative_work_product": [
|
|
686
|
+
"case_determinations",
|
|
687
|
+
"case_lifecycle",
|
|
688
|
+
"case_attachments"
|
|
689
|
+
],
|
|
690
|
+
"object_identifiers": [
|
|
691
|
+
"phone_identifiers",
|
|
692
|
+
"object_identity_attributes"
|
|
693
|
+
]
|
|
694
|
+
};
|
|
695
|
+
var INFORMATION_SCOPE_ROW_HINT = {
|
|
696
|
+
"system_info": "Always included",
|
|
697
|
+
"names": "All logged name entries",
|
|
698
|
+
"additional_ids": "Other IDs entered separately",
|
|
699
|
+
"identifying__other": "Living situation \xB7 work & income \xB7 education \xB7 languages \xB7 citizenship \xB7 physical description \xB7 vehicle",
|
|
700
|
+
"safe_locations": "Shelter placements + confidential program addresses",
|
|
701
|
+
"encounter_location": "The session's meetup / incident location \u2014 not the survivor's own addresses (CVC-191 reasons Meet / contact + Incident)",
|
|
702
|
+
"immigration_status": "Visa type + birth country + relevant flags",
|
|
703
|
+
"commercial_patterns": "Pricing, schedule, venues",
|
|
704
|
+
"case_attachments": "Content-dependent \u2014 attachment handling flags govern",
|
|
705
|
+
"object_identity_attributes": "Names, trade names, ages"
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
// src/services/informationScopeUiCopy.ts
|
|
709
|
+
var own = (o, k) => Object.prototype.hasOwnProperty.call(o, k);
|
|
710
|
+
function toKey(codeOrKey) {
|
|
711
|
+
return codeOrKey.replace(/\./g, "__");
|
|
712
|
+
}
|
|
713
|
+
function toCode(key) {
|
|
714
|
+
return key.replace(/__/g, ".");
|
|
715
|
+
}
|
|
716
|
+
function scopeCategorySub(category) {
|
|
717
|
+
const k = toKey(category);
|
|
718
|
+
return own(INFORMATION_SCOPE_CATEGORY_SUB, k) ? INFORMATION_SCOPE_CATEGORY_SUB[k] : void 0;
|
|
719
|
+
}
|
|
720
|
+
function scopeRowHint(row) {
|
|
721
|
+
const k = toKey(row);
|
|
722
|
+
return own(INFORMATION_SCOPE_ROW_HINT, k) ? INFORMATION_SCOPE_ROW_HINT[k] : void 0;
|
|
723
|
+
}
|
|
724
|
+
function scopeRowDisplayOrder(category) {
|
|
725
|
+
const k = toKey(category);
|
|
726
|
+
return own(INFORMATION_SCOPE_ROW_ORDER, k) ? INFORMATION_SCOPE_ROW_ORDER[k].map(toCode) : [];
|
|
727
|
+
}
|
|
728
|
+
function sortScopeRows(category, rows) {
|
|
729
|
+
const k = toKey(category);
|
|
730
|
+
const order = own(INFORMATION_SCOPE_ROW_ORDER, k) ? INFORMATION_SCOPE_ROW_ORDER[k] : [];
|
|
731
|
+
const rank = new Map(order.map((r, i) => [r, i]));
|
|
732
|
+
return rows.map((r, i) => ({ r, i, at: rank.get(toKey(r)) ?? order.length })).sort((a, b) => a.at - b.at || a.i - b.i).map((x) => x.r);
|
|
733
|
+
}
|
|
734
|
+
function sortScopeCategories(categories) {
|
|
735
|
+
const rank = new Map(INFORMATION_SCOPE_CATEGORY_ORDER.map((c, i) => [c, i]));
|
|
736
|
+
const n = INFORMATION_SCOPE_CATEGORY_ORDER.length;
|
|
737
|
+
return categories.map((c, i) => ({ c, i, at: rank.get(toKey(c)) ?? n })).sort((a, b) => a.at - b.at || a.i - b.i).map((x) => x.c);
|
|
738
|
+
}
|
|
471
739
|
export {
|
|
740
|
+
INFORMATION_SCOPE_CATEGORY_ORDER,
|
|
741
|
+
INFORMATION_SCOPE_CATEGORY_SUB,
|
|
472
742
|
INFORMATION_SCOPE_POLICY_VERSION_ROW_NOTE,
|
|
473
743
|
INFORMATION_SCOPE_READABLE_VERSIONS,
|
|
744
|
+
INFORMATION_SCOPE_ROW_HINT,
|
|
745
|
+
INFORMATION_SCOPE_ROW_ORDER,
|
|
474
746
|
INFORMATION_SCOPE_SYSTEM_INFO,
|
|
747
|
+
INFORMATION_SCOPE_UI_COPY_SOURCE,
|
|
475
748
|
INFORMATION_SCOPE_VERSION,
|
|
476
749
|
createInformationScopeResolver,
|
|
477
750
|
isScopeInstrumentRow,
|
|
478
751
|
isScopeRestRow,
|
|
479
752
|
isSelectableScopeRow,
|
|
480
753
|
kindForPerson,
|
|
754
|
+
scopeCategorySub,
|
|
481
755
|
scopeMigrationsFromSot,
|
|
482
|
-
|
|
756
|
+
scopeRowDisplayOrder,
|
|
757
|
+
scopeRowHint,
|
|
758
|
+
scopeRowsFromSot,
|
|
759
|
+
sortScopeCategories,
|
|
760
|
+
sortScopeRows
|
|
483
761
|
};
|
|
484
762
|
//# sourceMappingURL=index.js.map
|