fhir-data-utils-ts 0.6.3 → 0.6.5

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.
@@ -15,6 +15,11 @@ description: Complete or audit migrations, claim catalogs, converters, builders,
15
15
  authorization and product policy in their owning services or sector packages.
16
16
  4. Define every flat key once in its owning named catalog. Import that symbol in
17
17
  converters, builders, tests and examples; never repeat a claim-path literal.
18
+ 5. For SHC and DGC archaeology, treat `uhc-helpers-typescript` as the early
19
+ flow source, the later UHC common models/data/common/crypto split as the
20
+ preferred implementation evidence, and `gdc-common-utils-ts` as its later
21
+ consolidation. Do not copy an earlier helper when a later governed contract
22
+ exists.
18
23
 
19
24
  ## Separate catalogs, adapters and builders
20
25
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - Recover neutral SHC and EU DGC QR prefix classification from the later UHC
6
+ data-utility lineage, with exported repository-safe `*.data.ts` examples.
7
+ Recognition explicitly provides no decoding, verification or authorization.
8
+
9
+ - Export one repository-safe, telephone-free IPS demo document with all sixteen
10
+ clinical sections from the explicit `fhir-data-utils-ts/data` entry point so
11
+ product portals and visual tests share the same typed source data.
5
12
  - Publish repository-safe Appointment/Communication and Encounter-transfer
6
13
  fixtures from the explicit `fhir-data-utils-ts/data` entry point. Their
7
14
  `*.data.ts` implementations are excluded from executable coverage while the
@@ -0,0 +1,7 @@
1
+ /** Repository-safe non-clinical examples for classification tests and portal hints. */
2
+ export declare const HEALTH_CREDENTIAL_QR_EXAMPLES: Readonly<{
3
+ smartHealthCard: "shc:/123456";
4
+ europeanDigitalCertificate: "HC1:DEMO";
5
+ norwegianDigitalCertificate: "NO1:DEMO";
6
+ nonCredentialIdentifier: "urn:uuid:00000000-0000-4000-8000-000000000001";
7
+ }>;
@@ -0,0 +1,7 @@
1
+ /** Repository-safe non-clinical examples for classification tests and portal hints. */
2
+ export const HEALTH_CREDENTIAL_QR_EXAMPLES = Object.freeze({
3
+ smartHealthCard: 'shc:/123456',
4
+ europeanDigitalCertificate: 'HC1:DEMO',
5
+ norwegianDigitalCertificate: 'NO1:DEMO',
6
+ nonCredentialIdentifier: 'urn:uuid:00000000-0000-4000-8000-000000000001',
7
+ });
@@ -1,3 +1,5 @@
1
1
  /** Reusable, repository-safe examples for tests, docs and portal demos. */
2
2
  export * from './appointment-communication.data.js';
3
3
  export * from './encounter-transfer.data.js';
4
+ export * from './ips-all-sections.data.js';
5
+ export * from './health-credential-qr.data.js';
@@ -1,3 +1,5 @@
1
1
  /** Reusable, repository-safe examples for tests, docs and portal demos. */
2
2
  export * from './appointment-communication.data.js';
3
3
  export * from './encounter-transfer.data.js';
4
+ export * from './ips-all-sections.data.js';
5
+ export * from './health-credential-qr.data.js';
@@ -0,0 +1,327 @@
1
+ /** Repository-safe synthetic IPS document used by portal demos and visual tests. */
2
+ /**
3
+ * Complete synthetic IPS screen fixture.
4
+ *
5
+ * It intentionally uses `Doe`, contains no telephone number, and covers the
6
+ * sixteen clinical sections in the official IPS all-sections order. It is
7
+ * presentation/test data only and never represents authorization or consent.
8
+ */
9
+ export declare const FHIR_IPS_ALL_SECTIONS_DEMO_DATA: Readonly<{
10
+ subject: Readonly<{
11
+ reference: "Patient/jane-doe-demo";
12
+ givenName: "Jane";
13
+ familyName: "Doe";
14
+ displayName: "Jane Doe";
15
+ }>;
16
+ sectionCount: 16;
17
+ bundle: Readonly<{
18
+ resourceType: "Bundle";
19
+ id: "bundle-ips-all-sections-demo";
20
+ type: "document";
21
+ timestamp: "2026-09-30T10:20:00Z";
22
+ entry: readonly ({
23
+ fullUrl: string;
24
+ resource: {
25
+ patient: {
26
+ reference: string;
27
+ };
28
+ clinicalStatus: {
29
+ text: string;
30
+ };
31
+ verificationStatus: {
32
+ text: string;
33
+ };
34
+ code: {
35
+ text: string;
36
+ coding: {
37
+ system: string;
38
+ code: string;
39
+ display: string;
40
+ }[];
41
+ };
42
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
43
+ id: string;
44
+ status: string;
45
+ subject: {
46
+ reference: string;
47
+ };
48
+ } | {
49
+ status: string;
50
+ medicationCodeableConcept: {
51
+ text: string;
52
+ coding: {
53
+ system: string;
54
+ code: string;
55
+ display: string;
56
+ }[];
57
+ };
58
+ effectiveDateTime: string;
59
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
60
+ id: string;
61
+ subject: {
62
+ reference: string;
63
+ };
64
+ } | {
65
+ status: string;
66
+ patient: {
67
+ reference: string;
68
+ };
69
+ vaccineCode: {
70
+ text: string;
71
+ coding: {
72
+ system: string;
73
+ code: string;
74
+ display: string;
75
+ }[];
76
+ };
77
+ occurrenceDateTime: string;
78
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
79
+ id: string;
80
+ subject: {
81
+ reference: string;
82
+ };
83
+ } | {
84
+ status: string;
85
+ code: {
86
+ text: string;
87
+ coding: {
88
+ system: string;
89
+ code: string;
90
+ display: string;
91
+ }[];
92
+ };
93
+ effectiveDateTime: string;
94
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
95
+ id: string;
96
+ subject: {
97
+ reference: string;
98
+ };
99
+ } | {
100
+ status: string;
101
+ code: {
102
+ text: string;
103
+ coding: {
104
+ system: string;
105
+ code: string;
106
+ display: string;
107
+ }[];
108
+ };
109
+ performedDateTime: string;
110
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
111
+ id: string;
112
+ subject: {
113
+ reference: string;
114
+ };
115
+ } | {
116
+ status: string;
117
+ device: {
118
+ display: "Corrective lens use";
119
+ };
120
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
121
+ id: string;
122
+ subject: {
123
+ reference: string;
124
+ };
125
+ } | {
126
+ code: {
127
+ text: string;
128
+ coding: {
129
+ system: string;
130
+ code: string;
131
+ display: string;
132
+ }[];
133
+ };
134
+ effectiveDateTime: string;
135
+ valueQuantity: {
136
+ value: number;
137
+ unit: string;
138
+ system: string;
139
+ code: string;
140
+ };
141
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
142
+ id: string;
143
+ status: string;
144
+ subject: {
145
+ reference: string;
146
+ };
147
+ } | {
148
+ code: {
149
+ text: string;
150
+ coding: {
151
+ system: string;
152
+ code: string;
153
+ display: string;
154
+ }[];
155
+ };
156
+ effectiveDateTime: string;
157
+ valueCodeableConcept: {
158
+ text: string;
159
+ coding: {
160
+ system: string;
161
+ code: string;
162
+ display: string;
163
+ }[];
164
+ };
165
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
166
+ id: string;
167
+ status: string;
168
+ subject: {
169
+ reference: string;
170
+ };
171
+ } | {
172
+ status: string;
173
+ code: {
174
+ text: string;
175
+ coding: {
176
+ system: string;
177
+ code: string;
178
+ display: string;
179
+ }[];
180
+ };
181
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
182
+ id: string;
183
+ subject: {
184
+ reference: string;
185
+ };
186
+ } | {
187
+ lifecycleStatus: string;
188
+ description: {
189
+ text: string;
190
+ coding: {
191
+ system: string;
192
+ code: string;
193
+ display: string;
194
+ }[];
195
+ };
196
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
197
+ id: string;
198
+ status: string;
199
+ subject: {
200
+ reference: string;
201
+ };
202
+ } | {
203
+ status: string;
204
+ scope: {
205
+ text: string;
206
+ coding: {
207
+ system: string;
208
+ code: string;
209
+ display: string;
210
+ }[];
211
+ };
212
+ category: {
213
+ text: string;
214
+ coding: {
215
+ system: string;
216
+ code: string;
217
+ display: string;
218
+ }[];
219
+ }[];
220
+ patient: {
221
+ reference: string;
222
+ };
223
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
224
+ id: string;
225
+ subject: {
226
+ reference: string;
227
+ };
228
+ } | {
229
+ status: string;
230
+ description: "Independent daily activities";
231
+ summary: "Independent daily activities";
232
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
233
+ id: string;
234
+ subject: {
235
+ reference: string;
236
+ };
237
+ } | {
238
+ status: string;
239
+ intent: string;
240
+ title: "Emergency follow-up plan";
241
+ category: {
242
+ text: string;
243
+ coding: {
244
+ system: string;
245
+ code: string;
246
+ display: string;
247
+ }[];
248
+ }[];
249
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
250
+ id: string;
251
+ subject: {
252
+ reference: string;
253
+ };
254
+ } | {
255
+ clinicalStatus: {
256
+ text: string;
257
+ };
258
+ code: {
259
+ text: string;
260
+ coding: {
261
+ system: string;
262
+ code: string;
263
+ display: string;
264
+ }[];
265
+ };
266
+ resourceType: "Condition" | "Goal" | "AllergyIntolerance" | "Procedure" | "DiagnosticReport" | "Observation" | "Immunization" | "CarePlan" | "ClinicalImpression" | "Consent" | "DeviceUseStatement" | "Flag" | "MedicationStatement";
267
+ id: string;
268
+ status: string;
269
+ subject: {
270
+ reference: string;
271
+ };
272
+ };
273
+ } | {
274
+ fullUrl: string;
275
+ resource: Readonly<{
276
+ resourceType: "Composition";
277
+ id: "ips-all-sections-demo";
278
+ status: "final";
279
+ type: {
280
+ coding: {
281
+ system: string;
282
+ code: string;
283
+ display: string;
284
+ }[];
285
+ };
286
+ subject: {
287
+ reference: string;
288
+ };
289
+ date: "2026-09-30T10:20:00Z";
290
+ author: {
291
+ reference: string;
292
+ }[];
293
+ title: "International Patient Summary";
294
+ section: {
295
+ title: "Problem list" | "Allergies and adverse reactions" | "History of medication use" | "History of immunization" | "Relevant diagnostic tests and laboratory data" | "History of procedures" | "History of medical device use" | "Vital signs" | "Social history" | "Alerts" | "Goals and preferences" | "Advance directives" | "Functional status" | "History of past illness" | "Pregnancy history" | "Plan of care";
296
+ code: {
297
+ coding: {
298
+ system: string;
299
+ code: "11450-4" | "48765-2" | "10160-0" | "11369-6" | "30954-2" | "47519-4" | "46264-8" | "8716-3" | "29762-2" | "104605-1" | "81338-6" | "42348-3" | "47420-5" | "11348-0" | "10162-6" | "18776-5";
300
+ display: "Problem list" | "Allergies and adverse reactions" | "History of medication use" | "History of immunization" | "Relevant diagnostic tests and laboratory data" | "History of procedures" | "History of medical device use" | "Vital signs" | "Social history" | "Alerts" | "Goals and preferences" | "Advance directives" | "Functional status" | "History of past illness" | "Pregnancy history" | "Plan of care";
301
+ }[];
302
+ };
303
+ entry: {
304
+ reference: string;
305
+ }[];
306
+ }[];
307
+ }>;
308
+ } | {
309
+ fullUrl: string;
310
+ resource: {
311
+ resourceType: string;
312
+ id: string;
313
+ name: {
314
+ given: string[];
315
+ family: string;
316
+ }[];
317
+ };
318
+ } | {
319
+ fullUrl: string;
320
+ resource: {
321
+ resourceType: string;
322
+ id: string;
323
+ name: string;
324
+ };
325
+ })[];
326
+ }>;
327
+ }>;
@@ -0,0 +1,114 @@
1
+ /** Repository-safe synthetic IPS document used by portal demos and visual tests. */
2
+ const LOINC_SYSTEM = 'http://loinc.org';
3
+ const SNOMED_SYSTEM = 'http://snomed.info/sct';
4
+ const SUBJECT_REFERENCE = 'Patient/jane-doe-demo';
5
+ const sectionDefinitions = Object.freeze([
6
+ ['11450-4', 'Problem list', 'Condition', 'Hypertensive disorder'],
7
+ ['48765-2', 'Allergies and adverse reactions', 'AllergyIntolerance', 'Penicillin allergy'],
8
+ ['10160-0', 'History of medication use', 'MedicationStatement', 'Metformin therapy'],
9
+ ['11369-6', 'History of immunization', 'Immunization', 'Influenza immunization'],
10
+ ['30954-2', 'Relevant diagnostic tests and laboratory data', 'DiagnosticReport', 'Emergency laboratory panel'],
11
+ ['47519-4', 'History of procedures', 'Procedure', 'Appendectomy'],
12
+ ['46264-8', 'History of medical device use', 'DeviceUseStatement', 'Corrective lens use'],
13
+ ['8716-3', 'Vital signs', 'Observation', 'Oxygen saturation'],
14
+ ['29762-2', 'Social history', 'Observation', 'Tobacco use assessment'],
15
+ ['104605-1', 'Alerts', 'Flag', 'Fall risk'],
16
+ ['81338-6', 'Goals and preferences', 'Goal', 'Maintain independent mobility'],
17
+ ['42348-3', 'Advance directives', 'Consent', 'Advance care directive'],
18
+ ['47420-5', 'Functional status', 'ClinicalImpression', 'Independent daily activities'],
19
+ ['11348-0', 'History of past illness', 'Condition', 'Resolved viral infection'],
20
+ ['10162-6', 'Pregnancy history', 'Observation', 'Not pregnant'],
21
+ ['18776-5', 'Plan of care', 'CarePlan', 'Emergency follow-up plan'],
22
+ ]);
23
+ function concept(text, code) {
24
+ return { text, coding: [{ system: SNOMED_SYSTEM, code, display: text }] };
25
+ }
26
+ function clinicalResource([sectionCode, , resourceType, title], index) {
27
+ const id = `ips-demo-${sectionCode.replace(/\D/g, '')}-${index + 1}`;
28
+ const common = { resourceType, id, status: resourceType === 'Goal' ? 'active' : 'final', subject: { reference: SUBJECT_REFERENCE } };
29
+ const coded = concept(title, String(100000 + index));
30
+ switch (resourceType) {
31
+ case 'AllergyIntolerance':
32
+ return { ...common, patient: common.subject, clinicalStatus: { text: 'Active' }, verificationStatus: { text: 'Confirmed' }, code: coded };
33
+ case 'MedicationStatement':
34
+ return { ...common, status: 'active', medicationCodeableConcept: coded, effectiveDateTime: '2026-09-01T08:00:00Z' };
35
+ case 'Immunization':
36
+ return { ...common, status: 'completed', patient: common.subject, vaccineCode: coded, occurrenceDateTime: '2026-04-10T10:00:00Z' };
37
+ case 'DiagnosticReport':
38
+ return { ...common, status: 'final', code: coded, effectiveDateTime: '2026-09-30T09:20:00Z' };
39
+ case 'Procedure':
40
+ return { ...common, status: 'completed', code: coded, performedDateTime: '2019-06-12T10:00:00Z' };
41
+ case 'DeviceUseStatement':
42
+ return { ...common, status: 'active', device: { display: title } };
43
+ case 'Observation':
44
+ return sectionCode === '8716-3'
45
+ ? { ...common, code: coded, effectiveDateTime: '2026-09-30T10:15:00Z', valueQuantity: { value: 97, unit: '%', system: 'http://unitsofmeasure.org', code: '%' } }
46
+ : { ...common, code: coded, effectiveDateTime: '2026-09-01T08:00:00Z', valueCodeableConcept: concept(title, String(200000 + index)) };
47
+ case 'Flag':
48
+ return { ...common, status: 'active', code: coded };
49
+ case 'Goal':
50
+ return { ...common, lifecycleStatus: 'active', description: coded };
51
+ case 'Consent':
52
+ return { ...common, status: 'active', scope: concept('Advance care', '385431004'), category: [coded], patient: common.subject };
53
+ case 'ClinicalImpression':
54
+ return { ...common, status: 'completed', description: title, summary: title };
55
+ case 'CarePlan':
56
+ return { ...common, status: 'active', intent: 'plan', title, category: [coded] };
57
+ default:
58
+ return { ...common, clinicalStatus: { text: sectionCode === '11348-0' ? 'Resolved' : 'Active' }, code: coded };
59
+ }
60
+ }
61
+ const clinicalResources = sectionDefinitions.map(clinicalResource);
62
+ const composition = Object.freeze({
63
+ resourceType: 'Composition',
64
+ id: 'ips-all-sections-demo',
65
+ status: 'final',
66
+ type: { coding: [{ system: LOINC_SYSTEM, code: '60591-5', display: 'Patient summary document' }] },
67
+ subject: { reference: SUBJECT_REFERENCE },
68
+ date: '2026-09-30T10:20:00Z',
69
+ author: [{ reference: 'Organization/demo-hospital' }],
70
+ title: 'International Patient Summary',
71
+ section: sectionDefinitions.map(([code, title], index) => ({
72
+ title,
73
+ code: { coding: [{ system: LOINC_SYSTEM, code, display: title }] },
74
+ entry: [{ reference: `${clinicalResources[index].resourceType}/${clinicalResources[index].id}` }],
75
+ })),
76
+ });
77
+ /**
78
+ * Complete synthetic IPS screen fixture.
79
+ *
80
+ * It intentionally uses `Doe`, contains no telephone number, and covers the
81
+ * sixteen clinical sections in the official IPS all-sections order. It is
82
+ * presentation/test data only and never represents authorization or consent.
83
+ */
84
+ export const FHIR_IPS_ALL_SECTIONS_DEMO_DATA = Object.freeze({
85
+ subject: Object.freeze({
86
+ reference: SUBJECT_REFERENCE,
87
+ givenName: 'Jane',
88
+ familyName: 'Doe',
89
+ displayName: 'Jane Doe',
90
+ }),
91
+ sectionCount: sectionDefinitions.length,
92
+ bundle: Object.freeze({
93
+ resourceType: 'Bundle',
94
+ id: 'bundle-ips-all-sections-demo',
95
+ type: 'document',
96
+ timestamp: '2026-09-30T10:20:00Z',
97
+ entry: Object.freeze([
98
+ { fullUrl: 'Composition/ips-all-sections-demo', resource: composition },
99
+ {
100
+ fullUrl: SUBJECT_REFERENCE,
101
+ resource: {
102
+ resourceType: 'Patient',
103
+ id: 'jane-doe-demo',
104
+ name: [{ given: ['Jane'], family: 'Doe' }],
105
+ },
106
+ },
107
+ {
108
+ fullUrl: 'Organization/demo-hospital',
109
+ resource: { resourceType: 'Organization', id: 'demo-hospital', name: 'Demo Hospital' },
110
+ },
111
+ ...clinicalResources.map(resource => ({ fullUrl: `${resource.resourceType}/${resource.id}`, resource })),
112
+ ]),
113
+ }),
114
+ });
@@ -0,0 +1,15 @@
1
+ export declare const HealthCredentialQrPayloadKinds: Readonly<{
2
+ readonly SmartHealthCard: "smart-health-card";
3
+ readonly DigitalGreenCertificate: "digital-green-certificate";
4
+ readonly Unknown: "unknown";
5
+ }>;
6
+ export type HealthCredentialQrPayloadKind = typeof HealthCredentialQrPayloadKinds[keyof typeof HealthCredentialQrPayloadKinds];
7
+ export type HealthCredentialQrClassification = Readonly<{
8
+ kind: HealthCredentialQrPayloadKind;
9
+ value: string;
10
+ }>;
11
+ /**
12
+ * Recognizes the wire prefix only. This function does not decode, verify,
13
+ * authorize, trust or persist the credential or any embedded FHIR resource.
14
+ */
15
+ export declare function classifyHealthCredentialQrPayload(value: unknown): HealthCredentialQrClassification;
@@ -0,0 +1,18 @@
1
+ export const HealthCredentialQrPayloadKinds = Object.freeze({
2
+ SmartHealthCard: 'smart-health-card',
3
+ DigitalGreenCertificate: 'digital-green-certificate',
4
+ Unknown: 'unknown',
5
+ });
6
+ /**
7
+ * Recognizes the wire prefix only. This function does not decode, verify,
8
+ * authorize, trust or persist the credential or any embedded FHIR resource.
9
+ */
10
+ export function classifyHealthCredentialQrPayload(value) {
11
+ const normalized = String(value ?? '').trim();
12
+ const upper = normalized.toUpperCase();
13
+ if (normalized.toLowerCase().startsWith('shc:/'))
14
+ return Object.freeze({ kind: HealthCredentialQrPayloadKinds.SmartHealthCard, value: normalized });
15
+ if (upper.startsWith('HC1:') || upper.startsWith('NO1:'))
16
+ return Object.freeze({ kind: HealthCredentialQrPayloadKinds.DigitalGreenCertificate, value: normalized });
17
+ return Object.freeze({ kind: HealthCredentialQrPayloadKinds.Unknown, value: normalized });
18
+ }
package/dist/index.d.ts CHANGED
@@ -26,3 +26,4 @@ export * from './subscription-r5.js';
26
26
  export * from './healthcare-service-specialty-map.js';
27
27
  export * from './data/index.js';
28
28
  export * from './fhir-instant.js';
29
+ export * from './health-credential-qr.js';
package/dist/index.js CHANGED
@@ -26,3 +26,4 @@ export * from './subscription-r5.js';
26
26
  export * from './healthcare-service-specialty-map.js';
27
27
  export * from './data/index.js';
28
28
  export * from './fhir-instant.js';
29
+ export * from './health-credential-qr.js';
@@ -5,6 +5,14 @@ this package. Its useful behavior must be recovered behind neutral, typed and
5
5
  version-explicit contracts. Its product branding, obsolete security choices
6
6
  and transport assumptions must not be copied.
7
7
 
8
+ The wider historical lineage began with early helpers in
9
+ `uhc-helpers-typescript`, was then split and improved across
10
+ `uhc-common-models-typescript`, `uhc-common-utils-typescript`,
11
+ `data-utils-typescript` and the crypto utilities, and later contributed to
12
+ `gdc-common-utils-ts`. For SHC and DGC, the later split packages are the
13
+ preferred behavioural and type evidence; the early helper remains UI-flow
14
+ evidence only.
15
+
8
16
  ## Migration rules
9
17
 
10
18
  1. Add the smallest failing contract test here before porting behavior.
@@ -43,6 +51,7 @@ and transport assumptions must not be copied.
43
51
  | `gdc-common-utils-ts` converters | Every product-neutral R4/R5 converter present there; Observation component writing was corrected to use a resource graph | Network, persistence and authorization orchestration |
44
52
  | `uhc-fhir-utils-typescript` models | ATC/FHIR/LOINC/SNOMED model types, all resource search parameter enums and template interfaces, strict replacement FHIR primitives | Embedded terminology JSON is not authoritative data |
45
53
  | `uhc-fhir-utils-typescript` helpers | Coding/token, Identifier, Reference, Quantity, telecom, RelatedPerson search projection and non-mutating Bundle traversal/classification/reference lookup | Message transport, SHA-1 writers, COVID-era product presets and mutation-heavy manager facades |
54
+ | Later UHC data/common packages | SHC and EU DGC QR prefix classification plus repository-safe examples | Signature verification, issuer trust, credential import and authorization remain separate future contracts |
46
55
  | `uhc-fhir-utils-typescript` imaging | DICOMDIR structural types only | Byte parsing and pixel extraction require a separately versioned imaging package |
47
56
  | `sos-data-utils-ts` | Cross-sector terminology contract and fixtures, Immunization graph and reminder planning | SOS authorization, repository and emergency policy |
48
57
  | `vet-data-utils-ts` | Product-neutral FHIR R5 Group and ResearchStudy contracts/search projections | Animal identity, veterinary sections, species, insurance, payment and other Vet policy |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fhir-data-utils-ts",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "FHIR-version-neutral flat-claim and SearchParameter data utilities",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -107,6 +107,10 @@
107
107
  "types": "./dist/healthcare-service-specialty-map.d.ts",
108
108
  "default": "./dist/healthcare-service-specialty-map.js"
109
109
  },
110
+ "./health-credential-qr": {
111
+ "types": "./dist/health-credential-qr.d.ts",
112
+ "default": "./dist/health-credential-qr.js"
113
+ },
110
114
  "./research-study-r5": {
111
115
  "types": "./dist/research-study-r5.d.ts",
112
116
  "default": "./dist/research-study-r5.js"