gdc-common-utils-ts 1.14.2 → 1.14.4
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 +4 -0
- package/dist/constants/healthcare.d.ts +240 -0
- package/dist/constants/healthcare.js +10 -8
- package/dist/examples/communication-bundle-session.js +12 -13
- package/dist/examples/index.d.ts +1 -0
- package/dist/examples/index.js +1 -0
- package/dist/examples/ips-bundle.d.ts +25 -0
- package/dist/examples/ips-bundle.js +106 -0
- package/dist/examples/shared.d.ts +6 -0
- package/dist/examples/shared.js +7 -1
- package/dist/models/consent-rule.d.ts +7 -0
- package/dist/models/consent-rule.js +5 -0
- package/dist/models/dataspace-discovery-defaults.d.ts +2 -1
- package/dist/models/interoperable-claims/allergy-intolerance-claims.d.ts +43 -0
- package/dist/models/interoperable-claims/allergy-intolerance-claims.js +54 -0
- package/dist/models/interoperable-claims/condition-claims.d.ts +40 -0
- package/dist/models/interoperable-claims/condition-claims.js +50 -0
- package/dist/models/interoperable-claims/diagnostic-report-claims.d.ts +96 -0
- package/dist/models/interoperable-claims/diagnostic-report-claims.js +105 -0
- package/dist/models/interoperable-claims/index.d.ts +1 -0
- package/dist/models/interoperable-claims/index.js +1 -0
- package/dist/models/interoperable-claims/medication-statement-claims.d.ts +102 -0
- package/dist/models/interoperable-claims/medication-statement-claims.js +172 -0
- package/dist/utils/allergy-intolerance-claim-helpers.d.ts +10 -0
- package/dist/utils/allergy-intolerance-claim-helpers.js +47 -0
- package/dist/utils/claim-list-helpers.d.ts +21 -0
- package/dist/utils/claim-list-helpers.js +50 -0
- package/dist/utils/clinical-resource-view.d.ts +19 -7
- package/dist/utils/clinical-resource-view.js +142 -17
- package/dist/utils/communication-bundle-session.d.ts +65 -0
- package/dist/utils/communication-bundle-session.js +194 -0
- package/dist/utils/condition-claim-helpers.d.ts +10 -0
- package/dist/utils/condition-claim-helpers.js +47 -0
- package/dist/utils/consent-claim-helpers.d.ts +19 -13
- package/dist/utils/consent-claim-helpers.js +72 -49
- package/dist/utils/dataspace-discovery-defaults.d.ts +64 -0
- package/dist/utils/dataspace-discovery-defaults.js +135 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/medication-claim-helpers.d.ts +20 -1
- package/dist/utils/medication-claim-helpers.js +62 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,6 +94,8 @@ import { JweObject, JwtCompactParts } from 'gdc-common-utils-ts/models';
|
|
|
94
94
|
`internet-first` discovery seeding by `jurisdiction + version + networkType`
|
|
95
95
|
- [docs/consent-access-matrix-task.md](docs/consent-access-matrix-task.md)
|
|
96
96
|
- next-step design/task document for active consent aggregation, explicit deny precedence, controller views, permission-request communications, and SMART access evaluation
|
|
97
|
+
- [docs/IPS_BUNDLE_101.md](docs/IPS_BUNDLE_101.md)
|
|
98
|
+
- quick guide for editing IPS-like bundle history in `Communication.content-attachment-data`, reading `resource.meta.claims`, and building frontend cards by section
|
|
97
99
|
|
|
98
100
|
## Dataspace Protocol And Discovery
|
|
99
101
|
|
|
@@ -111,6 +113,8 @@ Main entry points:
|
|
|
111
113
|
- [`src/utils/dataspace-discovery-defaults.ts`](src/utils/dataspace-discovery-defaults.ts)
|
|
112
114
|
- defaults registry for ICAs and hosting operators plus the backend
|
|
113
115
|
`default-first` bootstrap plan used to unblock portal integration
|
|
116
|
+
- includes authority-based helpers so integrators can seed from a single
|
|
117
|
+
domain/IP instead of manually assembling `did:web` and discovery URLs
|
|
114
118
|
- [`src/examples/dataspace-discovery.ts`](src/examples/dataspace-discovery.ts)
|
|
115
119
|
- synthetic provider/operator examples that distinguish discovery URL from
|
|
116
120
|
derived catalog artifact URL
|
|
@@ -3,6 +3,12 @@ import { type DataspaceSector } from './sectors';
|
|
|
3
3
|
export type HealthcareSectionDescriptor = Readonly<{
|
|
4
4
|
system: typeof LOINC_SYSTEM_URL;
|
|
5
5
|
code: string;
|
|
6
|
+
attributeValue: string;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use `attributeValue`.
|
|
9
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
10
|
+
* not a claim key/attribute name.
|
|
11
|
+
*/
|
|
6
12
|
claim: string;
|
|
7
13
|
i18nKey: `org.loinc.${string}`;
|
|
8
14
|
titleEn?: string;
|
|
@@ -34,6 +40,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
34
40
|
PatientSummaryDocument: Readonly<{
|
|
35
41
|
system: typeof LOINC_SYSTEM_URL;
|
|
36
42
|
code: string;
|
|
43
|
+
attributeValue: string;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use `attributeValue`.
|
|
46
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
47
|
+
* not a claim key/attribute name.
|
|
48
|
+
*/
|
|
37
49
|
claim: string;
|
|
38
50
|
i18nKey: `org.loinc.${string}`;
|
|
39
51
|
titleEn?: string;
|
|
@@ -41,6 +53,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
41
53
|
AllergiesAndIntolerances: Readonly<{
|
|
42
54
|
system: typeof LOINC_SYSTEM_URL;
|
|
43
55
|
code: string;
|
|
56
|
+
attributeValue: string;
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated Use `attributeValue`.
|
|
59
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
60
|
+
* not a claim key/attribute name.
|
|
61
|
+
*/
|
|
44
62
|
claim: string;
|
|
45
63
|
i18nKey: `org.loinc.${string}`;
|
|
46
64
|
titleEn?: string;
|
|
@@ -48,6 +66,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
48
66
|
HistoryOfMedicationUse: Readonly<{
|
|
49
67
|
system: typeof LOINC_SYSTEM_URL;
|
|
50
68
|
code: string;
|
|
69
|
+
attributeValue: string;
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated Use `attributeValue`.
|
|
72
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
73
|
+
* not a claim key/attribute name.
|
|
74
|
+
*/
|
|
51
75
|
claim: string;
|
|
52
76
|
i18nKey: `org.loinc.${string}`;
|
|
53
77
|
titleEn?: string;
|
|
@@ -55,6 +79,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
55
79
|
ProblemList: Readonly<{
|
|
56
80
|
system: typeof LOINC_SYSTEM_URL;
|
|
57
81
|
code: string;
|
|
82
|
+
attributeValue: string;
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated Use `attributeValue`.
|
|
85
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
86
|
+
* not a claim key/attribute name.
|
|
87
|
+
*/
|
|
58
88
|
claim: string;
|
|
59
89
|
i18nKey: `org.loinc.${string}`;
|
|
60
90
|
titleEn?: string;
|
|
@@ -62,6 +92,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
62
92
|
Results: Readonly<{
|
|
63
93
|
system: typeof LOINC_SYSTEM_URL;
|
|
64
94
|
code: string;
|
|
95
|
+
attributeValue: string;
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated Use `attributeValue`.
|
|
98
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
99
|
+
* not a claim key/attribute name.
|
|
100
|
+
*/
|
|
65
101
|
claim: string;
|
|
66
102
|
i18nKey: `org.loinc.${string}`;
|
|
67
103
|
titleEn?: string;
|
|
@@ -69,6 +105,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
69
105
|
Procedures: Readonly<{
|
|
70
106
|
system: typeof LOINC_SYSTEM_URL;
|
|
71
107
|
code: string;
|
|
108
|
+
attributeValue: string;
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Use `attributeValue`.
|
|
111
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
112
|
+
* not a claim key/attribute name.
|
|
113
|
+
*/
|
|
72
114
|
claim: string;
|
|
73
115
|
i18nKey: `org.loinc.${string}`;
|
|
74
116
|
titleEn?: string;
|
|
@@ -76,6 +118,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
76
118
|
Immunizations: Readonly<{
|
|
77
119
|
system: typeof LOINC_SYSTEM_URL;
|
|
78
120
|
code: string;
|
|
121
|
+
attributeValue: string;
|
|
122
|
+
/**
|
|
123
|
+
* @deprecated Use `attributeValue`.
|
|
124
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
125
|
+
* not a claim key/attribute name.
|
|
126
|
+
*/
|
|
79
127
|
claim: string;
|
|
80
128
|
i18nKey: `org.loinc.${string}`;
|
|
81
129
|
titleEn?: string;
|
|
@@ -83,6 +131,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
83
131
|
MedicalDevices: Readonly<{
|
|
84
132
|
system: typeof LOINC_SYSTEM_URL;
|
|
85
133
|
code: string;
|
|
134
|
+
attributeValue: string;
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated Use `attributeValue`.
|
|
137
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
138
|
+
* not a claim key/attribute name.
|
|
139
|
+
*/
|
|
86
140
|
claim: string;
|
|
87
141
|
i18nKey: `org.loinc.${string}`;
|
|
88
142
|
titleEn?: string;
|
|
@@ -90,6 +144,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
90
144
|
FunctionalStatus: Readonly<{
|
|
91
145
|
system: typeof LOINC_SYSTEM_URL;
|
|
92
146
|
code: string;
|
|
147
|
+
attributeValue: string;
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Use `attributeValue`.
|
|
150
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
151
|
+
* not a claim key/attribute name.
|
|
152
|
+
*/
|
|
93
153
|
claim: string;
|
|
94
154
|
i18nKey: `org.loinc.${string}`;
|
|
95
155
|
titleEn?: string;
|
|
@@ -97,6 +157,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
97
157
|
PlanOfCare: Readonly<{
|
|
98
158
|
system: typeof LOINC_SYSTEM_URL;
|
|
99
159
|
code: string;
|
|
160
|
+
attributeValue: string;
|
|
161
|
+
/**
|
|
162
|
+
* @deprecated Use `attributeValue`.
|
|
163
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
164
|
+
* not a claim key/attribute name.
|
|
165
|
+
*/
|
|
100
166
|
claim: string;
|
|
101
167
|
i18nKey: `org.loinc.${string}`;
|
|
102
168
|
titleEn?: string;
|
|
@@ -104,6 +170,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
104
170
|
SocialHistory: Readonly<{
|
|
105
171
|
system: typeof LOINC_SYSTEM_URL;
|
|
106
172
|
code: string;
|
|
173
|
+
attributeValue: string;
|
|
174
|
+
/**
|
|
175
|
+
* @deprecated Use `attributeValue`.
|
|
176
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
177
|
+
* not a claim key/attribute name.
|
|
178
|
+
*/
|
|
107
179
|
claim: string;
|
|
108
180
|
i18nKey: `org.loinc.${string}`;
|
|
109
181
|
titleEn?: string;
|
|
@@ -111,6 +183,12 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
111
183
|
VitalSigns: Readonly<{
|
|
112
184
|
system: typeof LOINC_SYSTEM_URL;
|
|
113
185
|
code: string;
|
|
186
|
+
attributeValue: string;
|
|
187
|
+
/**
|
|
188
|
+
* @deprecated Use `attributeValue`.
|
|
189
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
190
|
+
* not a claim key/attribute name.
|
|
191
|
+
*/
|
|
114
192
|
claim: string;
|
|
115
193
|
i18nKey: `org.loinc.${string}`;
|
|
116
194
|
titleEn?: string;
|
|
@@ -120,6 +198,12 @@ export declare const HealthcareAdditionalSections: Readonly<{
|
|
|
120
198
|
AdvanceDirectives: Readonly<{
|
|
121
199
|
system: typeof LOINC_SYSTEM_URL;
|
|
122
200
|
code: string;
|
|
201
|
+
attributeValue: string;
|
|
202
|
+
/**
|
|
203
|
+
* @deprecated Use `attributeValue`.
|
|
204
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
205
|
+
* not a claim key/attribute name.
|
|
206
|
+
*/
|
|
123
207
|
claim: string;
|
|
124
208
|
i18nKey: `org.loinc.${string}`;
|
|
125
209
|
titleEn?: string;
|
|
@@ -127,6 +211,12 @@ export declare const HealthcareAdditionalSections: Readonly<{
|
|
|
127
211
|
DiagnosticImaging: Readonly<{
|
|
128
212
|
system: typeof LOINC_SYSTEM_URL;
|
|
129
213
|
code: string;
|
|
214
|
+
attributeValue: string;
|
|
215
|
+
/**
|
|
216
|
+
* @deprecated Use `attributeValue`.
|
|
217
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
218
|
+
* not a claim key/attribute name.
|
|
219
|
+
*/
|
|
130
220
|
claim: string;
|
|
131
221
|
i18nKey: `org.loinc.${string}`;
|
|
132
222
|
titleEn?: string;
|
|
@@ -134,6 +224,12 @@ export declare const HealthcareAdditionalSections: Readonly<{
|
|
|
134
224
|
HistoryOfPastIllness: Readonly<{
|
|
135
225
|
system: typeof LOINC_SYSTEM_URL;
|
|
136
226
|
code: string;
|
|
227
|
+
attributeValue: string;
|
|
228
|
+
/**
|
|
229
|
+
* @deprecated Use `attributeValue`.
|
|
230
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
231
|
+
* not a claim key/attribute name.
|
|
232
|
+
*/
|
|
137
233
|
claim: string;
|
|
138
234
|
i18nKey: `org.loinc.${string}`;
|
|
139
235
|
titleEn?: string;
|
|
@@ -141,6 +237,12 @@ export declare const HealthcareAdditionalSections: Readonly<{
|
|
|
141
237
|
ReasonForReferral: Readonly<{
|
|
142
238
|
system: typeof LOINC_SYSTEM_URL;
|
|
143
239
|
code: string;
|
|
240
|
+
attributeValue: string;
|
|
241
|
+
/**
|
|
242
|
+
* @deprecated Use `attributeValue`.
|
|
243
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
244
|
+
* not a claim key/attribute name.
|
|
245
|
+
*/
|
|
144
246
|
claim: string;
|
|
145
247
|
i18nKey: `org.loinc.${string}`;
|
|
146
248
|
titleEn?: string;
|
|
@@ -148,6 +250,12 @@ export declare const HealthcareAdditionalSections: Readonly<{
|
|
|
148
250
|
ChiefComplaint: Readonly<{
|
|
149
251
|
system: typeof LOINC_SYSTEM_URL;
|
|
150
252
|
code: string;
|
|
253
|
+
attributeValue: string;
|
|
254
|
+
/**
|
|
255
|
+
* @deprecated Use `attributeValue`.
|
|
256
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
257
|
+
* not a claim key/attribute name.
|
|
258
|
+
*/
|
|
151
259
|
claim: string;
|
|
152
260
|
i18nKey: `org.loinc.${string}`;
|
|
153
261
|
titleEn?: string;
|
|
@@ -155,6 +263,12 @@ export declare const HealthcareAdditionalSections: Readonly<{
|
|
|
155
263
|
HealthcareGeneral: Readonly<{
|
|
156
264
|
system: typeof LOINC_SYSTEM_URL;
|
|
157
265
|
code: string;
|
|
266
|
+
attributeValue: string;
|
|
267
|
+
/**
|
|
268
|
+
* @deprecated Use `attributeValue`.
|
|
269
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
270
|
+
* not a claim key/attribute name.
|
|
271
|
+
*/
|
|
158
272
|
claim: string;
|
|
159
273
|
i18nKey: `org.loinc.${string}`;
|
|
160
274
|
titleEn?: string;
|
|
@@ -164,6 +278,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
164
278
|
AdvanceDirectives: Readonly<{
|
|
165
279
|
system: typeof LOINC_SYSTEM_URL;
|
|
166
280
|
code: string;
|
|
281
|
+
attributeValue: string;
|
|
282
|
+
/**
|
|
283
|
+
* @deprecated Use `attributeValue`.
|
|
284
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
285
|
+
* not a claim key/attribute name.
|
|
286
|
+
*/
|
|
167
287
|
claim: string;
|
|
168
288
|
i18nKey: `org.loinc.${string}`;
|
|
169
289
|
titleEn?: string;
|
|
@@ -171,6 +291,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
171
291
|
DiagnosticImaging: Readonly<{
|
|
172
292
|
system: typeof LOINC_SYSTEM_URL;
|
|
173
293
|
code: string;
|
|
294
|
+
attributeValue: string;
|
|
295
|
+
/**
|
|
296
|
+
* @deprecated Use `attributeValue`.
|
|
297
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
298
|
+
* not a claim key/attribute name.
|
|
299
|
+
*/
|
|
174
300
|
claim: string;
|
|
175
301
|
i18nKey: `org.loinc.${string}`;
|
|
176
302
|
titleEn?: string;
|
|
@@ -178,6 +304,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
178
304
|
HistoryOfPastIllness: Readonly<{
|
|
179
305
|
system: typeof LOINC_SYSTEM_URL;
|
|
180
306
|
code: string;
|
|
307
|
+
attributeValue: string;
|
|
308
|
+
/**
|
|
309
|
+
* @deprecated Use `attributeValue`.
|
|
310
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
311
|
+
* not a claim key/attribute name.
|
|
312
|
+
*/
|
|
181
313
|
claim: string;
|
|
182
314
|
i18nKey: `org.loinc.${string}`;
|
|
183
315
|
titleEn?: string;
|
|
@@ -185,6 +317,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
185
317
|
ReasonForReferral: Readonly<{
|
|
186
318
|
system: typeof LOINC_SYSTEM_URL;
|
|
187
319
|
code: string;
|
|
320
|
+
attributeValue: string;
|
|
321
|
+
/**
|
|
322
|
+
* @deprecated Use `attributeValue`.
|
|
323
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
324
|
+
* not a claim key/attribute name.
|
|
325
|
+
*/
|
|
188
326
|
claim: string;
|
|
189
327
|
i18nKey: `org.loinc.${string}`;
|
|
190
328
|
titleEn?: string;
|
|
@@ -192,6 +330,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
192
330
|
ChiefComplaint: Readonly<{
|
|
193
331
|
system: typeof LOINC_SYSTEM_URL;
|
|
194
332
|
code: string;
|
|
333
|
+
attributeValue: string;
|
|
334
|
+
/**
|
|
335
|
+
* @deprecated Use `attributeValue`.
|
|
336
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
337
|
+
* not a claim key/attribute name.
|
|
338
|
+
*/
|
|
195
339
|
claim: string;
|
|
196
340
|
i18nKey: `org.loinc.${string}`;
|
|
197
341
|
titleEn?: string;
|
|
@@ -199,6 +343,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
199
343
|
HealthcareGeneral: Readonly<{
|
|
200
344
|
system: typeof LOINC_SYSTEM_URL;
|
|
201
345
|
code: string;
|
|
346
|
+
attributeValue: string;
|
|
347
|
+
/**
|
|
348
|
+
* @deprecated Use `attributeValue`.
|
|
349
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
350
|
+
* not a claim key/attribute name.
|
|
351
|
+
*/
|
|
202
352
|
claim: string;
|
|
203
353
|
i18nKey: `org.loinc.${string}`;
|
|
204
354
|
titleEn?: string;
|
|
@@ -206,6 +356,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
206
356
|
PatientSummaryDocument: Readonly<{
|
|
207
357
|
system: typeof LOINC_SYSTEM_URL;
|
|
208
358
|
code: string;
|
|
359
|
+
attributeValue: string;
|
|
360
|
+
/**
|
|
361
|
+
* @deprecated Use `attributeValue`.
|
|
362
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
363
|
+
* not a claim key/attribute name.
|
|
364
|
+
*/
|
|
209
365
|
claim: string;
|
|
210
366
|
i18nKey: `org.loinc.${string}`;
|
|
211
367
|
titleEn?: string;
|
|
@@ -213,6 +369,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
213
369
|
AllergiesAndIntolerances: Readonly<{
|
|
214
370
|
system: typeof LOINC_SYSTEM_URL;
|
|
215
371
|
code: string;
|
|
372
|
+
attributeValue: string;
|
|
373
|
+
/**
|
|
374
|
+
* @deprecated Use `attributeValue`.
|
|
375
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
376
|
+
* not a claim key/attribute name.
|
|
377
|
+
*/
|
|
216
378
|
claim: string;
|
|
217
379
|
i18nKey: `org.loinc.${string}`;
|
|
218
380
|
titleEn?: string;
|
|
@@ -220,6 +382,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
220
382
|
HistoryOfMedicationUse: Readonly<{
|
|
221
383
|
system: typeof LOINC_SYSTEM_URL;
|
|
222
384
|
code: string;
|
|
385
|
+
attributeValue: string;
|
|
386
|
+
/**
|
|
387
|
+
* @deprecated Use `attributeValue`.
|
|
388
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
389
|
+
* not a claim key/attribute name.
|
|
390
|
+
*/
|
|
223
391
|
claim: string;
|
|
224
392
|
i18nKey: `org.loinc.${string}`;
|
|
225
393
|
titleEn?: string;
|
|
@@ -227,6 +395,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
227
395
|
ProblemList: Readonly<{
|
|
228
396
|
system: typeof LOINC_SYSTEM_URL;
|
|
229
397
|
code: string;
|
|
398
|
+
attributeValue: string;
|
|
399
|
+
/**
|
|
400
|
+
* @deprecated Use `attributeValue`.
|
|
401
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
402
|
+
* not a claim key/attribute name.
|
|
403
|
+
*/
|
|
230
404
|
claim: string;
|
|
231
405
|
i18nKey: `org.loinc.${string}`;
|
|
232
406
|
titleEn?: string;
|
|
@@ -234,6 +408,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
234
408
|
Results: Readonly<{
|
|
235
409
|
system: typeof LOINC_SYSTEM_URL;
|
|
236
410
|
code: string;
|
|
411
|
+
attributeValue: string;
|
|
412
|
+
/**
|
|
413
|
+
* @deprecated Use `attributeValue`.
|
|
414
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
415
|
+
* not a claim key/attribute name.
|
|
416
|
+
*/
|
|
237
417
|
claim: string;
|
|
238
418
|
i18nKey: `org.loinc.${string}`;
|
|
239
419
|
titleEn?: string;
|
|
@@ -241,6 +421,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
241
421
|
Procedures: Readonly<{
|
|
242
422
|
system: typeof LOINC_SYSTEM_URL;
|
|
243
423
|
code: string;
|
|
424
|
+
attributeValue: string;
|
|
425
|
+
/**
|
|
426
|
+
* @deprecated Use `attributeValue`.
|
|
427
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
428
|
+
* not a claim key/attribute name.
|
|
429
|
+
*/
|
|
244
430
|
claim: string;
|
|
245
431
|
i18nKey: `org.loinc.${string}`;
|
|
246
432
|
titleEn?: string;
|
|
@@ -248,6 +434,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
248
434
|
Immunizations: Readonly<{
|
|
249
435
|
system: typeof LOINC_SYSTEM_URL;
|
|
250
436
|
code: string;
|
|
437
|
+
attributeValue: string;
|
|
438
|
+
/**
|
|
439
|
+
* @deprecated Use `attributeValue`.
|
|
440
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
441
|
+
* not a claim key/attribute name.
|
|
442
|
+
*/
|
|
251
443
|
claim: string;
|
|
252
444
|
i18nKey: `org.loinc.${string}`;
|
|
253
445
|
titleEn?: string;
|
|
@@ -255,6 +447,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
255
447
|
MedicalDevices: Readonly<{
|
|
256
448
|
system: typeof LOINC_SYSTEM_URL;
|
|
257
449
|
code: string;
|
|
450
|
+
attributeValue: string;
|
|
451
|
+
/**
|
|
452
|
+
* @deprecated Use `attributeValue`.
|
|
453
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
454
|
+
* not a claim key/attribute name.
|
|
455
|
+
*/
|
|
258
456
|
claim: string;
|
|
259
457
|
i18nKey: `org.loinc.${string}`;
|
|
260
458
|
titleEn?: string;
|
|
@@ -262,6 +460,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
262
460
|
FunctionalStatus: Readonly<{
|
|
263
461
|
system: typeof LOINC_SYSTEM_URL;
|
|
264
462
|
code: string;
|
|
463
|
+
attributeValue: string;
|
|
464
|
+
/**
|
|
465
|
+
* @deprecated Use `attributeValue`.
|
|
466
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
467
|
+
* not a claim key/attribute name.
|
|
468
|
+
*/
|
|
265
469
|
claim: string;
|
|
266
470
|
i18nKey: `org.loinc.${string}`;
|
|
267
471
|
titleEn?: string;
|
|
@@ -269,6 +473,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
269
473
|
PlanOfCare: Readonly<{
|
|
270
474
|
system: typeof LOINC_SYSTEM_URL;
|
|
271
475
|
code: string;
|
|
476
|
+
attributeValue: string;
|
|
477
|
+
/**
|
|
478
|
+
* @deprecated Use `attributeValue`.
|
|
479
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
480
|
+
* not a claim key/attribute name.
|
|
481
|
+
*/
|
|
272
482
|
claim: string;
|
|
273
483
|
i18nKey: `org.loinc.${string}`;
|
|
274
484
|
titleEn?: string;
|
|
@@ -276,6 +486,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
276
486
|
SocialHistory: Readonly<{
|
|
277
487
|
system: typeof LOINC_SYSTEM_URL;
|
|
278
488
|
code: string;
|
|
489
|
+
attributeValue: string;
|
|
490
|
+
/**
|
|
491
|
+
* @deprecated Use `attributeValue`.
|
|
492
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
493
|
+
* not a claim key/attribute name.
|
|
494
|
+
*/
|
|
279
495
|
claim: string;
|
|
280
496
|
i18nKey: `org.loinc.${string}`;
|
|
281
497
|
titleEn?: string;
|
|
@@ -283,6 +499,12 @@ export declare const HealthcareAllSections: Readonly<{
|
|
|
283
499
|
VitalSigns: Readonly<{
|
|
284
500
|
system: typeof LOINC_SYSTEM_URL;
|
|
285
501
|
code: string;
|
|
502
|
+
attributeValue: string;
|
|
503
|
+
/**
|
|
504
|
+
* @deprecated Use `attributeValue`.
|
|
505
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
506
|
+
* not a claim key/attribute name.
|
|
507
|
+
*/
|
|
286
508
|
claim: string;
|
|
287
509
|
i18nKey: `org.loinc.${string}`;
|
|
288
510
|
titleEn?: string;
|
|
@@ -301,6 +523,12 @@ export declare const HealthcareSectionsByFamily: Readonly<{
|
|
|
301
523
|
readonly summary: Readonly<Record<string, Readonly<{
|
|
302
524
|
system: typeof LOINC_SYSTEM_URL;
|
|
303
525
|
code: string;
|
|
526
|
+
attributeValue: string;
|
|
527
|
+
/**
|
|
528
|
+
* @deprecated Use `attributeValue`.
|
|
529
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
530
|
+
* not a claim key/attribute name.
|
|
531
|
+
*/
|
|
304
532
|
claim: string;
|
|
305
533
|
i18nKey: `org.loinc.${string}`;
|
|
306
534
|
titleEn?: string;
|
|
@@ -308,6 +536,12 @@ export declare const HealthcareSectionsByFamily: Readonly<{
|
|
|
308
536
|
readonly management: Readonly<Record<string, Readonly<{
|
|
309
537
|
system: typeof LOINC_SYSTEM_URL;
|
|
310
538
|
code: string;
|
|
539
|
+
attributeValue: string;
|
|
540
|
+
/**
|
|
541
|
+
* @deprecated Use `attributeValue`.
|
|
542
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
543
|
+
* not a claim key/attribute name.
|
|
544
|
+
*/
|
|
311
545
|
claim: string;
|
|
312
546
|
i18nKey: `org.loinc.${string}`;
|
|
313
547
|
titleEn?: string;
|
|
@@ -315,6 +549,12 @@ export declare const HealthcareSectionsByFamily: Readonly<{
|
|
|
315
549
|
readonly subjectMatterDomain: Readonly<Record<string, Readonly<{
|
|
316
550
|
system: typeof LOINC_SYSTEM_URL;
|
|
317
551
|
code: string;
|
|
552
|
+
attributeValue: string;
|
|
553
|
+
/**
|
|
554
|
+
* @deprecated Use `attributeValue`.
|
|
555
|
+
* Kept as compatibility alias because this token is a reusable claim value,
|
|
556
|
+
* not a claim key/attribute name.
|
|
557
|
+
*/
|
|
318
558
|
claim: string;
|
|
319
559
|
i18nKey: `org.loinc.${string}`;
|
|
320
560
|
titleEn?: string;
|
|
@@ -10,10 +10,12 @@ export const HealthcareRoleFamilies = Object.freeze({
|
|
|
10
10
|
LegalRepresentativeHl7: 'legalRepresentativeHl7',
|
|
11
11
|
});
|
|
12
12
|
function defineSection(code, titleEn) {
|
|
13
|
+
const attributeValue = `LOINC|${code}`;
|
|
13
14
|
return Object.freeze({
|
|
14
15
|
system: LOINC_SYSTEM_URL,
|
|
15
16
|
code,
|
|
16
|
-
|
|
17
|
+
attributeValue,
|
|
18
|
+
claim: attributeValue,
|
|
17
19
|
i18nKey: loincI18nKey(code),
|
|
18
20
|
titleEn,
|
|
19
21
|
});
|
|
@@ -264,11 +266,11 @@ export function getHealthcareRolesBySector(sector, family) {
|
|
|
264
266
|
return HealthcareRolesBySector[sector]?.[family] || {};
|
|
265
267
|
}
|
|
266
268
|
export const HealthcareConsentActions = Object.freeze({
|
|
267
|
-
PatientSummaryDocument: HealthcareBasicSections.PatientSummaryDocument.
|
|
268
|
-
AllergiesAndIntolerances: HealthcareBasicSections.AllergiesAndIntolerances.
|
|
269
|
-
HistoryOfMedicationUse: HealthcareBasicSections.HistoryOfMedicationUse.
|
|
270
|
-
ProblemList: HealthcareBasicSections.ProblemList.
|
|
271
|
-
Results: HealthcareBasicSections.Results.
|
|
272
|
-
Procedures: HealthcareBasicSections.Procedures.
|
|
273
|
-
Immunizations: HealthcareBasicSections.Immunizations.
|
|
269
|
+
PatientSummaryDocument: HealthcareBasicSections.PatientSummaryDocument.attributeValue,
|
|
270
|
+
AllergiesAndIntolerances: HealthcareBasicSections.AllergiesAndIntolerances.attributeValue,
|
|
271
|
+
HistoryOfMedicationUse: HealthcareBasicSections.HistoryOfMedicationUse.attributeValue,
|
|
272
|
+
ProblemList: HealthcareBasicSections.ProblemList.attributeValue,
|
|
273
|
+
Results: HealthcareBasicSections.Results.attributeValue,
|
|
274
|
+
Procedures: HealthcareBasicSections.Procedures.attributeValue,
|
|
275
|
+
Immunizations: HealthcareBasicSections.Immunizations.attributeValue,
|
|
274
276
|
});
|
|
@@ -5,7 +5,7 @@ import { CommunicationCategoryCodes } from '../constants/communication.js';
|
|
|
5
5
|
import { ClaimConsent } from '../models/consent-rule.js';
|
|
6
6
|
import { CommunicationClaim } from '../models/interoperable-claims/communication-claims.js';
|
|
7
7
|
import { MedicationStatementClaim } from '../models/interoperable-claims/medication-statement-claims.js';
|
|
8
|
-
import { EXAMPLE_COMMUNICATION_IDENTIFIER, EXAMPLE_CONSENT_DATE, EXAMPLE_CONSENT_IDENTIFIER, EXAMPLE_CONSENT_PERIOD_END, EXAMPLE_CONSENT_PERIOD_START, EXAMPLE_CONSENT_PURPOSE_TREATMENT, EXAMPLE_EMAIL_PROFESSIONAL, EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN, EXAMPLE_IPS_BUNDLE_NOTE_TEXT,
|
|
8
|
+
import { EXAMPLE_COMMUNICATION_IDENTIFIER, EXAMPLE_CONSENT_DATE, EXAMPLE_CONSENT_IDENTIFIER, EXAMPLE_CONSENT_PERIOD_END, EXAMPLE_CONSENT_PERIOD_START, EXAMPLE_CONSENT_PURPOSE_TREATMENT, EXAMPLE_EMAIL_PROFESSIONAL, EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN, EXAMPLE_IPS_BUNDLE_NOTE_TEXT, EXAMPLE_MEDICATION_STATEMENT_IDENTIFIER, EXAMPLE_MEDICATION_STATEMENT_STATUS, EXAMPLE_MEDICATION_STATEMENT_TEXT, EXAMPLE_SUBJECT_DID, } from './shared.js';
|
|
9
9
|
import { CommunicationBundleSession } from '../utils/communication-bundle-session.js';
|
|
10
10
|
/**
|
|
11
11
|
* First developer use case:
|
|
@@ -15,7 +15,7 @@ import { CommunicationBundleSession } from '../utils/communication-bundle-sessio
|
|
|
15
15
|
* - release active entry memory when finished
|
|
16
16
|
*/
|
|
17
17
|
export function buildConsentEditingCommunicationSessionExample() {
|
|
18
|
-
const
|
|
18
|
+
const bundleEditor = new CommunicationBundleSession({
|
|
19
19
|
communicationClaims: {
|
|
20
20
|
'@context': 'org.hl7.fhir.r4',
|
|
21
21
|
[CommunicationClaim.Identifier]: EXAMPLE_COMMUNICATION_IDENTIFIER,
|
|
@@ -24,7 +24,7 @@ export function buildConsentEditingCommunicationSessionExample() {
|
|
|
24
24
|
[CommunicationClaim.Text]: EXAMPLE_IPS_BUNDLE_NOTE_TEXT,
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
bundleEditor.upsertActiveConsentEntry({
|
|
28
28
|
claims: {
|
|
29
29
|
'@context': 'org.hl7.fhir.api',
|
|
30
30
|
[ClaimConsent.decision]: 'permit',
|
|
@@ -34,16 +34,16 @@ export function buildConsentEditingCommunicationSessionExample() {
|
|
|
34
34
|
[ClaimConsent.periodStart]: EXAMPLE_CONSENT_PERIOD_START,
|
|
35
35
|
[ClaimConsent.periodEnd]: EXAMPLE_CONSENT_PERIOD_END,
|
|
36
36
|
[ClaimConsent.purpose]: EXAMPLE_CONSENT_PURPOSE_TREATMENT,
|
|
37
|
-
[ClaimConsent.action]: HealthcareBasicSections.AllergiesAndIntolerances.
|
|
37
|
+
[ClaimConsent.action]: HealthcareBasicSections.AllergiesAndIntolerances.attributeValue,
|
|
38
38
|
[ClaimConsent.actorIdentifier]: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
39
39
|
[ClaimConsent.actorRole]: EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN,
|
|
40
40
|
},
|
|
41
41
|
fullUrl: `urn:uuid:${EXAMPLE_CONSENT_IDENTIFIER}`,
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
bundleEditor.saveAndReleaseActiveEntry();
|
|
44
44
|
return {
|
|
45
|
-
communicationClaims:
|
|
46
|
-
bundleInMemory:
|
|
45
|
+
communicationClaims: bundleEditor.getCommunicationClaims(),
|
|
46
|
+
bundleInMemory: bundleEditor.getBundleInMemory(),
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
@@ -53,7 +53,7 @@ export function buildConsentEditingCommunicationSessionExample() {
|
|
|
53
53
|
* - apply save/release lifecycle consistently
|
|
54
54
|
*/
|
|
55
55
|
export function buildMedicationEditingCommunicationSessionExample() {
|
|
56
|
-
const
|
|
56
|
+
const bundleEditor = new CommunicationBundleSession({
|
|
57
57
|
communicationClaims: {
|
|
58
58
|
'@context': 'org.hl7.fhir.r4',
|
|
59
59
|
[CommunicationClaim.Identifier]: EXAMPLE_COMMUNICATION_IDENTIFIER,
|
|
@@ -62,20 +62,19 @@ export function buildMedicationEditingCommunicationSessionExample() {
|
|
|
62
62
|
[CommunicationClaim.Text]: EXAMPLE_IPS_BUNDLE_NOTE_TEXT,
|
|
63
63
|
},
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
bundleEditor.upsertActiveMedicationStatementEntry({
|
|
66
66
|
claims: {
|
|
67
67
|
'@context': 'org.hl7.fhir.api',
|
|
68
68
|
[MedicationStatementClaim.Identifier]: EXAMPLE_MEDICATION_STATEMENT_IDENTIFIER,
|
|
69
69
|
[MedicationStatementClaim.Subject]: EXAMPLE_SUBJECT_DID,
|
|
70
70
|
[MedicationStatementClaim.Status]: EXAMPLE_MEDICATION_STATEMENT_STATUS,
|
|
71
|
-
[MedicationStatementClaim.Code]: EXAMPLE_MEDICATION_STATEMENT_CODE,
|
|
72
71
|
[MedicationStatementClaim.MedicationText]: EXAMPLE_MEDICATION_STATEMENT_TEXT,
|
|
73
72
|
},
|
|
74
73
|
fullUrl: `urn:uuid:${EXAMPLE_MEDICATION_STATEMENT_IDENTIFIER}`,
|
|
75
74
|
});
|
|
76
|
-
|
|
75
|
+
bundleEditor.saveAndReleaseActiveEntry();
|
|
77
76
|
return {
|
|
78
|
-
communicationClaims:
|
|
79
|
-
bundleInMemory:
|
|
77
|
+
communicationClaims: bundleEditor.getCommunicationClaims(),
|
|
78
|
+
bundleInMemory: bundleEditor.getBundleInMemory(),
|
|
80
79
|
};
|
|
81
80
|
}
|
package/dist/examples/index.d.ts
CHANGED
package/dist/examples/index.js
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BundleEntry, BundleJsonApi } from '../models/bundle';
|
|
2
|
+
import { toClinicalResourceCardViews, toClinicalResourceCommonViews } from '../utils/clinical-resource-view';
|
|
3
|
+
export type IpsClinicalHistoryBundleExample = Readonly<{
|
|
4
|
+
communicationClaims: Record<string, unknown>;
|
|
5
|
+
bundleInMemory: BundleJsonApi<BundleEntry>;
|
|
6
|
+
}>;
|
|
7
|
+
export type IpsBundleFrontCardsExample = Readonly<{
|
|
8
|
+
communicationClaims: Record<string, unknown>;
|
|
9
|
+
bundleInMemory: BundleJsonApi<BundleEntry>;
|
|
10
|
+
medicationEntryIds: string[];
|
|
11
|
+
allergyEntryIds: string[];
|
|
12
|
+
conditionEntryIds: string[];
|
|
13
|
+
cardViews: ReturnType<typeof toClinicalResourceCardViews>;
|
|
14
|
+
commonViews: ReturnType<typeof toClinicalResourceCommonViews>;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Builds a minimal IPS-like history bundle with common clinical resource types
|
|
18
|
+
* authored as `resource.meta.claims`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildIpsClinicalHistoryBundleExample(): IpsClinicalHistoryBundleExample;
|
|
21
|
+
/**
|
|
22
|
+
* Builds the bundle plus section-level ids and UI-friendly card/common views
|
|
23
|
+
* for frontend resource cards.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildIpsBundleFrontCardsExample(): IpsBundleFrontCardsExample;
|