@htilabs/platform-common-models 0.5.1-beta.2 → 0.5.2-beta.3
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/dist/cvcs/index.cjs +146 -0
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +207 -46
- package/dist/cvcs/index.d.ts +207 -46
- package/dist/cvcs/index.js +145 -0
- package/dist/cvcs/index.js.map +1 -1
- package/dist/index.cjs +164 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +162 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/__snapshots__/cvc-sot.snap +4 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +8 -0
- package/src/__tests__/cvc-structural.test.ts +3 -0
- package/src/cvcs/index.ts +2 -0
- package/src/cvcs/raceEthnicity.v1.0.0.json +142 -0
- package/src/generated/cvc-enums.ts +24 -0
package/package.json
CHANGED
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"incident_involvement_roles": {
|
|
22
22
|
"count": 10,
|
|
23
23
|
"hash": "82cab90656a08ddd2c4730dbf37e9d0545f9243c74a6f4e919e014e35516d698"
|
|
24
|
+
},
|
|
25
|
+
"race_ethnicity": {
|
|
26
|
+
"count": 14,
|
|
27
|
+
"hash": "b5e9aa83bcbffcaf0fdc665e566d631c359c8b971ecdd6dda7b397745a88dbe9"
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
}
|
|
@@ -76,6 +76,14 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
76
76
|
domain: "incident_involvement_roles",
|
|
77
77
|
expectedCount: 10,
|
|
78
78
|
},
|
|
79
|
+
// CVC-76 — 9 flat race/ethnicity categories + 1 missingness root + 4
|
|
80
|
+
// missingness children (adds canonical `prefer_not_to_answer` for
|
|
81
|
+
// demographic PNA semantics) = 14.
|
|
82
|
+
{
|
|
83
|
+
file: "raceEthnicity.v1.0.0.json",
|
|
84
|
+
domain: "race_ethnicity",
|
|
85
|
+
expectedCount: 14,
|
|
86
|
+
},
|
|
79
87
|
] as const;
|
|
80
88
|
|
|
81
89
|
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
@@ -50,6 +50,9 @@ const SOT_FILES: readonly SotFile[] = [
|
|
|
50
50
|
{ file: "serviceMechanisms.v1.0.0.json", expectedDomain: "service_mechanisms" },
|
|
51
51
|
{ file: "serviceStates.v1.0.0.json", expectedDomain: "service_states" },
|
|
52
52
|
{ file: "serviceCategories.v1.0.0.json", expectedDomain: "service_categories" },
|
|
53
|
+
{ file: "incidentParticipationRoles.v1.0.0.json", expectedDomain: "incident_participation_roles" },
|
|
54
|
+
{ file: "incidentInvolvementRoles.v1.0.0.json", expectedDomain: "incident_involvement_roles" },
|
|
55
|
+
{ file: "raceEthnicity.v1.0.0.json", expectedDomain: "race_ethnicity" },
|
|
53
56
|
] as const;
|
|
54
57
|
|
|
55
58
|
function loadSot(file: string): unknown {
|
package/src/cvcs/index.ts
CHANGED
|
@@ -24,6 +24,7 @@ import serviceStatesSot from "./serviceStates.v1.0.0.json" with { type: "json" }
|
|
|
24
24
|
import serviceMechanismsSot from "./serviceMechanisms.v1.0.0.json" with { type: "json" };
|
|
25
25
|
import incidentParticipationRolesSot from "./incidentParticipationRoles.v1.0.0.json" with { type: "json" };
|
|
26
26
|
import incidentInvolvementRolesSot from "./incidentInvolvementRoles.v1.0.0.json" with { type: "json" };
|
|
27
|
+
import raceEthnicitySot from "./raceEthnicity.v1.0.0.json" with { type: "json" };
|
|
27
28
|
|
|
28
29
|
export {
|
|
29
30
|
serviceCategoriesSot,
|
|
@@ -31,4 +32,5 @@ export {
|
|
|
31
32
|
serviceMechanismsSot,
|
|
32
33
|
incidentParticipationRolesSot,
|
|
33
34
|
incidentInvolvementRolesSot,
|
|
35
|
+
raceEthnicitySot,
|
|
34
36
|
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
"domain": "race_ethnicity",
|
|
3
|
+
"name": "Core Race/Ethnicity",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"levels": {
|
|
6
|
+
"0": "Unknown or Missing",
|
|
7
|
+
"1": "Category"
|
|
8
|
+
},
|
|
9
|
+
"entries": [
|
|
10
|
+
{
|
|
11
|
+
"code": "076-000-000-000-000-000-000",
|
|
12
|
+
"key": "missingness_root",
|
|
13
|
+
"title": "Unknown, Redacted, or Missing",
|
|
14
|
+
"selectable": false,
|
|
15
|
+
"parentCode": null,
|
|
16
|
+
"childCodes": [
|
|
17
|
+
"076-000-000-000-000-000-001",
|
|
18
|
+
"076-000-000-000-000-000-002",
|
|
19
|
+
"076-000-000-000-000-000-003",
|
|
20
|
+
"076-000-000-000-000-000-004"
|
|
21
|
+
],
|
|
22
|
+
"definition": "Root group for values indicating absent, withheld, or uncollected data."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"code": "076-000-000-000-000-000-001",
|
|
26
|
+
"key": "unknown",
|
|
27
|
+
"title": "Unknown",
|
|
28
|
+
"selectable": true,
|
|
29
|
+
"parentCode": "076-000-000-000-000-000-000",
|
|
30
|
+
"childCodes": [],
|
|
31
|
+
"definition": "Value is unknown at time of entry."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"code": "076-000-000-000-000-000-002",
|
|
35
|
+
"key": "anonymous",
|
|
36
|
+
"title": "Anonymous",
|
|
37
|
+
"selectable": true,
|
|
38
|
+
"parentCode": "076-000-000-000-000-000-000",
|
|
39
|
+
"childCodes": [],
|
|
40
|
+
"definition": "Value is intentionally withheld or redacted."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"code": "076-000-000-000-000-000-003",
|
|
44
|
+
"key": "data_not_collected",
|
|
45
|
+
"title": "Data not collected",
|
|
46
|
+
"selectable": true,
|
|
47
|
+
"parentCode": "076-000-000-000-000-000-000",
|
|
48
|
+
"childCodes": [],
|
|
49
|
+
"definition": "No attempt was made to collect the value."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"code": "076-000-000-000-000-000-004",
|
|
53
|
+
"key": "prefer_not_to_answer",
|
|
54
|
+
"title": "Client prefers not to answer",
|
|
55
|
+
"selectable": true,
|
|
56
|
+
"parentCode": "076-000-000-000-000-000-000",
|
|
57
|
+
"childCodes": [],
|
|
58
|
+
"definition": "Client was offered the opportunity to self-identify and explicitly declined to provide the value."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"code": "076-001-000-000-000-000-000",
|
|
62
|
+
"key": "american_indian_or_alaska_native",
|
|
63
|
+
"title": "American Indian or Alaska Native",
|
|
64
|
+
"selectable": true,
|
|
65
|
+
"parentCode": null,
|
|
66
|
+
"childCodes": [],
|
|
67
|
+
"definition": "Individuals with origins in any of the original peoples of North, Central, and South America, including, for example, Navajo Nation, Blackfeet Tribe of the Blackfeet Indian Reservation of Montana, Native Village of Barrow Inupiat Traditional Government, Nome Eskimo Community, Aztec, and Maya."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"code": "076-002-000-000-000-000-000",
|
|
71
|
+
"key": "asian",
|
|
72
|
+
"title": "Asian",
|
|
73
|
+
"selectable": true,
|
|
74
|
+
"parentCode": null,
|
|
75
|
+
"childCodes": [],
|
|
76
|
+
"definition": "Individuals with origins in any of the original peoples of Central or East Asia, Southeast Asia, or South Asia, including, for example, Chinese, Asian Indian, Filipino, Vietnamese, Korean, and Japanese."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"code": "076-003-000-000-000-000-000",
|
|
80
|
+
"key": "black_or_african_american",
|
|
81
|
+
"title": "Black or African American",
|
|
82
|
+
"selectable": true,
|
|
83
|
+
"parentCode": null,
|
|
84
|
+
"childCodes": [],
|
|
85
|
+
"definition": "Individuals with origins in any of the Black racial groups of Africa, including, for example, African American, Jamaican, Haitian, Nigerian, Ethiopian, and Somali."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"code": "076-004-000-000-000-000-000",
|
|
89
|
+
"key": "hispanic_or_latino",
|
|
90
|
+
"title": "Hispanic or Latino",
|
|
91
|
+
"selectable": true,
|
|
92
|
+
"parentCode": null,
|
|
93
|
+
"childCodes": [],
|
|
94
|
+
"definition": "Includes individuals of Mexican, Puerto Rican, Salvadoran, Cuban, Dominican, Guatemalan, and other Central or South American or Spanish culture or origin."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"code": "076-005-000-000-000-000-000",
|
|
98
|
+
"key": "middle_eastern_or_north_african",
|
|
99
|
+
"title": "Middle Eastern or North African",
|
|
100
|
+
"selectable": true,
|
|
101
|
+
"parentCode": null,
|
|
102
|
+
"childCodes": [],
|
|
103
|
+
"definition": "Individuals with origins in any of the original peoples of the Middle East or North Africa, including, for example, Lebanese, Iranian, Egyptian, Syrian, Iraqi, and Israeli."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"code": "076-006-000-000-000-000-000",
|
|
107
|
+
"key": "multiple_races",
|
|
108
|
+
"title": "Multiple Races [multiple were selected]",
|
|
109
|
+
"selectable": true,
|
|
110
|
+
"parentCode": null,
|
|
111
|
+
"childCodes": [],
|
|
112
|
+
"definition": "Indicates that an individual identifies with more than one racial and/or ethnic category."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"code": "076-007-000-000-000-000-000",
|
|
116
|
+
"key": "native_hawaiian_or_pacific_islander",
|
|
117
|
+
"title": "Native Hawaiian or Pacific Islander",
|
|
118
|
+
"selectable": true,
|
|
119
|
+
"parentCode": null,
|
|
120
|
+
"childCodes": [],
|
|
121
|
+
"definition": "Individuals with origins in any of the original peoples of Hawaii, Guam, Samoa, or other Pacific Islands, including, for example, Native Hawaiian, Samoan, Chamorro, Tongan, Fijian, and Marshallese."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"code": "076-008-000-000-000-000-000",
|
|
125
|
+
"key": "other_self_described",
|
|
126
|
+
"title": "Other - [trigger an optional write in]",
|
|
127
|
+
"selectable": true,
|
|
128
|
+
"parentCode": null,
|
|
129
|
+
"childCodes": [],
|
|
130
|
+
"definition": "Allows for additional self-described race or ethnicity information not adequately represented by the listed categories."
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"code": "076-009-000-000-000-000-000",
|
|
134
|
+
"key": "white",
|
|
135
|
+
"title": "White",
|
|
136
|
+
"selectable": true,
|
|
137
|
+
"parentCode": null,
|
|
138
|
+
"childCodes": [],
|
|
139
|
+
"definition": "Individuals with origins in any of the original peoples of Europe, including, for example, English, German, Irish, Italian, Polish, and Scottish."
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
@@ -260,3 +260,27 @@ export const IncidentInvolvementRoleKeys = {
|
|
|
260
260
|
} as const;
|
|
261
261
|
|
|
262
262
|
export type IncidentInvolvementRoleKey = keyof typeof IncidentInvolvementRoleKeys;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Key → positional code map for the `race_ethnicity` CVC domain.
|
|
266
|
+
*
|
|
267
|
+
* Domain: `race_ethnicity` · Version: 1.0.0 · Entries: 14
|
|
268
|
+
*/
|
|
269
|
+
export const RaceEthnicityKeys = {
|
|
270
|
+
missingness_root: "076-000-000-000-000-000-000",
|
|
271
|
+
unknown: "076-000-000-000-000-000-001",
|
|
272
|
+
anonymous: "076-000-000-000-000-000-002",
|
|
273
|
+
data_not_collected: "076-000-000-000-000-000-003",
|
|
274
|
+
prefer_not_to_answer: "076-000-000-000-000-000-004",
|
|
275
|
+
american_indian_or_alaska_native: "076-001-000-000-000-000-000",
|
|
276
|
+
asian: "076-002-000-000-000-000-000",
|
|
277
|
+
black_or_african_american: "076-003-000-000-000-000-000",
|
|
278
|
+
hispanic_or_latino: "076-004-000-000-000-000-000",
|
|
279
|
+
middle_eastern_or_north_african: "076-005-000-000-000-000-000",
|
|
280
|
+
multiple_races: "076-006-000-000-000-000-000",
|
|
281
|
+
native_hawaiian_or_pacific_islander: "076-007-000-000-000-000-000",
|
|
282
|
+
other_self_described: "076-008-000-000-000-000-000",
|
|
283
|
+
white: "076-009-000-000-000-000-000",
|
|
284
|
+
} as const;
|
|
285
|
+
|
|
286
|
+
export type RaceEthnicityKey = keyof typeof RaceEthnicityKeys;
|