fhir-data-utils-ts 0.6.4 → 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,10 @@
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
+
5
9
  - Export one repository-safe, telephone-free IPS demo document with all sixteen
6
10
  clinical sections from the explicit `fhir-data-utils-ts/data` entry point so
7
11
  product portals and visual tests share the same typed source data.
@@ -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
+ });
@@ -2,3 +2,4 @@
2
2
  export * from './appointment-communication.data.js';
3
3
  export * from './encounter-transfer.data.js';
4
4
  export * from './ips-all-sections.data.js';
5
+ export * from './health-credential-qr.data.js';
@@ -2,3 +2,4 @@
2
2
  export * from './appointment-communication.data.js';
3
3
  export * from './encounter-transfer.data.js';
4
4
  export * from './ips-all-sections.data.js';
5
+ export * from './health-credential-qr.data.js';
@@ -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.4",
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"