gdc-common-utils-ts 1.5.1 → 1.7.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 +36 -4
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +2 -0
- package/dist/constants/schemaorg.d.ts +2 -0
- package/dist/constants/schemaorg.js +2 -0
- package/dist/constants/service-capabilities.d.ts +53 -0
- package/dist/constants/service-capabilities.js +72 -0
- package/dist/constants/verifiable-credentials.d.ts +34 -0
- package/dist/constants/verifiable-credentials.js +42 -0
- package/dist/examples/api-flow-examples.d.ts +2 -0
- package/dist/examples/api-flow-examples.js +2 -0
- package/dist/examples/consent-access.d.ts +19 -127
- package/dist/examples/consent-access.js +42 -25
- package/dist/examples/contract-examples.d.ts +2 -0
- package/dist/examples/contract-examples.js +2 -0
- package/dist/examples/frontend-session.d.ts +0 -4
- package/dist/examples/frontend-session.js +13 -7
- package/dist/examples/ica-activation-proof.d.ts +55 -0
- package/dist/examples/ica-activation-proof.js +67 -0
- package/dist/examples/index.d.ts +3 -0
- package/dist/examples/index.js +3 -0
- package/dist/examples/individual-controller.d.ts +4 -15
- package/dist/examples/individual-controller.js +17 -31
- package/dist/examples/lifecycle.d.ts +505 -0
- package/dist/examples/lifecycle.js +291 -0
- package/dist/examples/organization-controller.d.ts +7 -2
- package/dist/examples/organization-controller.js +19 -10
- package/dist/examples/professional.d.ts +9 -2
- package/dist/examples/professional.js +24 -12
- package/dist/examples/relationship-access.d.ts +11 -0
- package/dist/examples/relationship-access.js +96 -0
- package/dist/examples/shared.d.ts +95 -7
- package/dist/examples/shared.js +85 -31
- package/dist/models/consent-rule.d.ts +1 -0
- package/dist/models/consent-rule.js +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/interoperable-claims/allergy-intolerance-claims.js +1 -0
- package/dist/models/interoperable-claims/communication-claims.d.ts +14 -0
- package/dist/models/interoperable-claims/communication-claims.js +15 -0
- package/dist/models/interoperable-claims/condition-claims.js +1 -0
- package/dist/models/interoperable-claims/device-use-statement-claims.js +1 -0
- package/dist/models/interoperable-claims/document-reference-claims.js +1 -0
- package/dist/models/interoperable-claims/medication-statement-claims.d.ts +17 -0
- package/dist/models/interoperable-claims/medication-statement-claims.js +18 -0
- package/dist/models/relationship-access.d.ts +160 -0
- package/dist/models/relationship-access.js +21 -0
- package/dist/utils/activation-policy.d.ts +8 -3
- package/dist/utils/activation-policy.js +26 -12
- package/dist/utils/activation-request.d.ts +42 -0
- package/dist/utils/activation-request.js +42 -0
- package/dist/utils/clinical-resource-converters.js +70 -64
- package/dist/utils/communication-document-reference.js +10 -4
- package/dist/utils/communication-fhir-r4.js +40 -34
- package/dist/utils/communication-identity.d.ts +25 -15
- package/dist/utils/communication-identity.js +23 -13
- package/dist/utils/consent.d.ts +1 -1
- package/dist/utils/consent.js +21 -20
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/individual-form-pdf.d.ts +55 -0
- package/dist/utils/individual-form-pdf.js +191 -0
- package/dist/utils/vp-token.js +8 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,6 +117,7 @@ The canonical API contract should live in JSDoc on exported code. The README act
|
|
|
117
117
|
- Shared network/environment labels for node-operator discovery/bootstrap.
|
|
118
118
|
- [`SmartGatewayScopesFhirR4`](src/constants/smart.ts)
|
|
119
119
|
- Current CORE GW SMART scope literals such as `organization/Consent.cruds`.
|
|
120
|
+
- Treat these as optional elevated scopes. Do not add them to the first read-only tutorial by default.
|
|
120
121
|
|
|
121
122
|
### Root exports
|
|
122
123
|
|
|
@@ -129,13 +130,14 @@ The canonical API contract should live in JSDoc on exported code. The README act
|
|
|
129
130
|
|
|
130
131
|
### Communication / document utilities
|
|
131
132
|
|
|
132
|
-
- [`
|
|
133
|
+
- [`initializeCommunicationIdentity(...)`](src/utils/communication-identity.ts)
|
|
133
134
|
- Derives the technical ML-DSA/ML-KEM communication identity for a device, portal, or app profile and returns JOSE header templates for `meta.jws.protected` and `meta.jwe.header`.
|
|
134
|
-
-
|
|
135
|
+
- Uses explicit `seedMaterial` for deterministic derivation. Without `seedMaterial`, it defaults to random generation. `mode = deterministic` requires `seedMaterial`.
|
|
135
136
|
- [`buildOrganizationDidWeb(...)`, `buildProfessionalDidWeb(...)`, `buildIndividualDidWeb(...)`](src/utils/did.ts)
|
|
136
137
|
- Build canonical data-space `did:web` identifiers for hosted organizations, professionals, and individuals/family actors.
|
|
137
138
|
- [`buildSmartCompositionReadScope(...)`](src/utils/smart-scope.ts)
|
|
138
139
|
- Builds the current CORE GW pinned SMART root scope for `organization/Composition...` token requests.
|
|
140
|
+
- This is the preferred first scope to teach when the backend only needs subject-scoped read access.
|
|
139
141
|
- [`getOrganizationCredentialFromVpToken(...)`, `getLegalRepresentativeCredentialFromVpToken(...)`](src/utils/vp-token.ts)
|
|
140
142
|
- Extract typed VC objects from a VP token when GW/SDK flows carry canonical proof only in `vp_token`.
|
|
141
143
|
- [`validateCommunicationResourceFhirR4(...)`](src/utils/communication-fhir-r4.ts)
|
|
@@ -156,6 +158,14 @@ The canonical API contract should live in JSDoc on exported code. The README act
|
|
|
156
158
|
- [`ControllerBindingInput`, `OrganizationBindingInput`, `ActivationProofInput`, `OrganizationActivationRequest`](src/models/identity-bootstrap.ts)
|
|
157
159
|
- Canonical bootstrap contracts that explicitly separate person/controller key binding from provider/organization key binding.
|
|
158
160
|
- `vp_token` is the canonical proof carrier; `controller.*` and `organization.*` carry public key binding material for DID publication.
|
|
161
|
+
- [`buildControllerBindingInput(...)`, `buildOrganizationBindingInput(...)`](src/utils/activation-request.ts)
|
|
162
|
+
- Build canonical `controller.*` and `organization.*` binding fragments from semantic variables such as `publicSignKey`, `publicKeys`, `did`, `sameAs`, or `url`.
|
|
163
|
+
- [`RelationshipChannelInvitationInput`, `RelationshipChannelInvitationSummary`, `RelationshipChannelOtpStartInput`, `RelationshipChannelOtpConfirmInput`](src/models/relationship-access.ts)
|
|
164
|
+
- Shared contracts for controller-driven invitation and acceptance flows between an individual/subject and a related person or professional across phone, email, and app channels.
|
|
165
|
+
- [`RelationshipEnrollmentChannels`, `RelationshipSubjectKinds`, `RelationshipAccessActorKinds`, `RelationshipOtpDeliveryChannels`](src/models/relationship-access.ts)
|
|
166
|
+
- Shared constant objects for relationship flows so docs and app code do not hardcode actor kinds or channel labels inline.
|
|
167
|
+
- [`RelationshipChannelOtpChallengeSummary`, `RelationshipPinPolicy`, `RelationshipPinSetInput`, `RelationshipPinVerifyInput`, `RelationshipLocalKeyEnvelope`](src/models/relationship-access.ts)
|
|
168
|
+
- Shared OTP, relationship PIN, and offline-first local-key envelope contracts for channel enrollment and subject-scoped local protection.
|
|
159
169
|
- [`IdentityBootstrapValidationIssue`, `IdentityBootstrapValidationResult`](src/models/identity-bootstrap.ts)
|
|
160
170
|
- Shared validation result shapes used by bootstrap builders/validators.
|
|
161
171
|
- [`buildOrganizationActivationRequest(...)`](src/utils/activation-request.ts)
|
|
@@ -186,13 +196,35 @@ The canonical API contract should live in JSDoc on exported code. The README act
|
|
|
186
196
|
- CORE canonical examples are email-first and do not require phone-only fields unless an extension layer adds them.
|
|
187
197
|
- [`src/examples/professional.ts`](src/examples/professional.ts)
|
|
188
198
|
- Professional/physician runtime access examples such as SMART token and clinical access request payloads.
|
|
199
|
+
- The base token examples are read-only; richer scenario fixtures intentionally add `organization/Consent.cruds`.
|
|
189
200
|
- [`src/examples/related-person.ts`](src/examples/related-person.ts)
|
|
190
201
|
- RelatedPerson/family-member examples.
|
|
191
202
|
- [`src/examples/frontend-session.ts`](src/examples/frontend-session.ts)
|
|
192
203
|
- Frontend profile/session bootstrap examples.
|
|
204
|
+
- [`src/examples/lifecycle.ts`](src/examples/lifecycle.ts)
|
|
205
|
+
- Canonical `enable/disable/delete` lifecycle examples with placeholders and no personal data.
|
|
206
|
+
- This is the source of truth for GW, Swagger, Node SDK, Front SDK, and portal examples.
|
|
193
207
|
- [`src/examples/shared.ts`](src/examples/shared.ts)
|
|
194
208
|
- Shared route contexts, controller binding fragments, and reusable helper builders.
|
|
195
209
|
- `tenantId` is modeled as an identifier-like route token (`acme-id`), not as a friendly alternate name.
|
|
210
|
+
- [`docs/LIFECYCLE_101.md`](docs/LIFECYCLE_101.md)
|
|
211
|
+
- Copy/paste lifecycle guide "for torpes" with semantic rules and reusable placeholders.
|
|
212
|
+
|
|
213
|
+
## Documentation Naming Rules
|
|
214
|
+
|
|
215
|
+
Prefer these semantic names in docs and examples:
|
|
216
|
+
|
|
217
|
+
- `subjectDid`
|
|
218
|
+
- `professionalDid`
|
|
219
|
+
- `orgControllerDid`
|
|
220
|
+
- `individualControllerDid`
|
|
221
|
+
- `emailProfessional`
|
|
222
|
+
- `emailControllerOrg`
|
|
223
|
+
- `emailControllerIndividual`
|
|
224
|
+
- `emailRelatedPerson`
|
|
225
|
+
|
|
226
|
+
Avoid teaching new integrations from legacy names such as `individualDidWeb`
|
|
227
|
+
when the active runtime variable is really the subject identifier.
|
|
196
228
|
- [`src/examples/api-flow-examples.ts`](src/examples/api-flow-examples.ts)
|
|
197
229
|
- Preferred compatibility aggregator for consumers that want one import surface without using the overloaded term `contract`.
|
|
198
230
|
- [`src/examples/contract-examples.ts`](src/examples/contract-examples.ts)
|
|
@@ -347,7 +379,7 @@ Those request/response flows belong in connector SDKs and backend orchestration
|
|
|
347
379
|
|
|
348
380
|
When integrating the converged SDKs:
|
|
349
381
|
|
|
350
|
-
- use [`
|
|
382
|
+
- use [`initializeCommunicationIdentity(...)`](src/utils/communication-identity.ts) from this package for the technical communication identity bootstrap
|
|
351
383
|
- use `gdc-sdk-core-ts` for runtime-neutral communication/document helpers
|
|
352
384
|
- use `gdc-sdk-front-ts` or `gdc-sdk-node-ts` for the runtime-specific session and orchestration layer
|
|
353
385
|
|
|
@@ -360,5 +392,5 @@ When integrating the converged SDKs:
|
|
|
360
392
|
- The `files` field only publishes `dist/`, so source imports should use the documented package entry points rather than local file paths.
|
|
361
393
|
|
|
362
394
|
## Roadmap and Briefing
|
|
363
|
-
- `BRIEFING_DATASPACE_EN.md`
|
|
395
|
+
- `docs/BRIEFING_DATASPACE_EN.md`
|
|
364
396
|
- `TODO_ROADMAP.md`
|
package/dist/constants/index.js
CHANGED
|
@@ -43,6 +43,8 @@ export declare enum ClaimsOrganizationSchemaorg {
|
|
|
43
43
|
ownerEmail = "org.schema.Organization.owner.email",
|
|
44
44
|
/** Individual/family owner telephone used by subject-index registration flows. */
|
|
45
45
|
ownerTelephone = "org.schema.Organization.owner.telephone",
|
|
46
|
+
/** Individual/family owner legal identifier used by subject-index registration flows. */
|
|
47
|
+
ownerIdentifierValue = "org.schema.Organization.owner.identifier.value",
|
|
46
48
|
numberOfEmployees = "org.schema.Organization.numberOfEmployees.value"
|
|
47
49
|
}
|
|
48
50
|
export declare enum ClaimsOfferSchemaorg {
|
|
@@ -46,6 +46,8 @@ export var ClaimsOrganizationSchemaorg;
|
|
|
46
46
|
ClaimsOrganizationSchemaorg["ownerEmail"] = "org.schema.Organization.owner.email";
|
|
47
47
|
/** Individual/family owner telephone used by subject-index registration flows. */
|
|
48
48
|
ClaimsOrganizationSchemaorg["ownerTelephone"] = "org.schema.Organization.owner.telephone";
|
|
49
|
+
/** Individual/family owner legal identifier used by subject-index registration flows. */
|
|
50
|
+
ClaimsOrganizationSchemaorg["ownerIdentifierValue"] = "org.schema.Organization.owner.identifier.value";
|
|
49
51
|
ClaimsOrganizationSchemaorg["numberOfEmployees"] = "org.schema.Organization.numberOfEmployees.value"; // to purchase licenses for device profile's activation
|
|
50
52
|
})(ClaimsOrganizationSchemaorg || (ClaimsOrganizationSchemaorg = {}));
|
|
51
53
|
export var ClaimsOfferSchemaorg;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical capability families persisted through
|
|
3
|
+
* `org.schema.Service.serviceType`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ServiceCapabilityFamily: {
|
|
6
|
+
readonly Indexing: "indexing";
|
|
7
|
+
readonly DigitalTwin: "digitaltwin";
|
|
8
|
+
};
|
|
9
|
+
export type ServiceCapabilityFamilyValue = typeof ServiceCapabilityFamily[keyof typeof ServiceCapabilityFamily];
|
|
10
|
+
/**
|
|
11
|
+
* Canonical capability tokens currently documented for tenant activation.
|
|
12
|
+
*
|
|
13
|
+
* The family prefix is the stable part of the contract. Suffixes such as
|
|
14
|
+
* `.rs` and `.cruds` can evolve independently across runtimes.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ServiceCapabilityToken: {
|
|
17
|
+
readonly IndexingReadSearch: "indexing.rs";
|
|
18
|
+
readonly IndexingCruds: "indexing.cruds";
|
|
19
|
+
readonly DigitalTwinReadSearch: "digitaltwin.rs";
|
|
20
|
+
readonly DigitalTwinCruds: "digitaltwin.cruds";
|
|
21
|
+
};
|
|
22
|
+
export type ServiceCapabilityTokenValue = typeof ServiceCapabilityToken[keyof typeof ServiceCapabilityToken];
|
|
23
|
+
/**
|
|
24
|
+
* SDK-facing capability names.
|
|
25
|
+
*
|
|
26
|
+
* These names are intentionally more explicit than the persisted claim tokens:
|
|
27
|
+
* - `Provider` maps to write/manage capability (`*.cruds`)
|
|
28
|
+
* - `Reader` maps to read/search capability (`*.rs`)
|
|
29
|
+
*/
|
|
30
|
+
export declare const ServiceCapability: {
|
|
31
|
+
readonly IndexingProvider: "indexing.cruds";
|
|
32
|
+
readonly IndexingReader: "indexing.rs";
|
|
33
|
+
readonly DigitalTwinProvider: "digitaltwin.cruds";
|
|
34
|
+
readonly DigitalTwinReader: "digitaltwin.rs";
|
|
35
|
+
};
|
|
36
|
+
export type ServiceCapabilityValue = typeof ServiceCapability[keyof typeof ServiceCapability];
|
|
37
|
+
/**
|
|
38
|
+
* Parses the CSV stored in `org.schema.Service.serviceType`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseServiceCapabilityTokens(value: unknown): string[];
|
|
41
|
+
/**
|
|
42
|
+
* Serializes capability tokens into the canonical CSV claim format.
|
|
43
|
+
*/
|
|
44
|
+
export declare function serializeServiceCapabilityTokens(values: ReadonlyArray<string | undefined | null>): string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the capability family prefix from a token.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getServiceCapabilityFamily(value: string | undefined): string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Checks whether the claim contains at least one capability from the requested
|
|
51
|
+
* family.
|
|
52
|
+
*/
|
|
53
|
+
export declare function hasServiceCapabilityFamily(value: unknown, family: ServiceCapabilityFamilyValue | string): boolean;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
3
|
+
/**
|
|
4
|
+
* Canonical capability families persisted through
|
|
5
|
+
* `org.schema.Service.serviceType`.
|
|
6
|
+
*/
|
|
7
|
+
export const ServiceCapabilityFamily = {
|
|
8
|
+
Indexing: 'indexing',
|
|
9
|
+
DigitalTwin: 'digitaltwin',
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Canonical capability tokens currently documented for tenant activation.
|
|
13
|
+
*
|
|
14
|
+
* The family prefix is the stable part of the contract. Suffixes such as
|
|
15
|
+
* `.rs` and `.cruds` can evolve independently across runtimes.
|
|
16
|
+
*/
|
|
17
|
+
export const ServiceCapabilityToken = {
|
|
18
|
+
IndexingReadSearch: 'indexing.rs',
|
|
19
|
+
IndexingCruds: 'indexing.cruds',
|
|
20
|
+
DigitalTwinReadSearch: 'digitaltwin.rs',
|
|
21
|
+
DigitalTwinCruds: 'digitaltwin.cruds',
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* SDK-facing capability names.
|
|
25
|
+
*
|
|
26
|
+
* These names are intentionally more explicit than the persisted claim tokens:
|
|
27
|
+
* - `Provider` maps to write/manage capability (`*.cruds`)
|
|
28
|
+
* - `Reader` maps to read/search capability (`*.rs`)
|
|
29
|
+
*/
|
|
30
|
+
export const ServiceCapability = {
|
|
31
|
+
IndexingProvider: ServiceCapabilityToken.IndexingCruds,
|
|
32
|
+
IndexingReader: ServiceCapabilityToken.IndexingReadSearch,
|
|
33
|
+
DigitalTwinProvider: ServiceCapabilityToken.DigitalTwinCruds,
|
|
34
|
+
DigitalTwinReader: ServiceCapabilityToken.DigitalTwinReadSearch,
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Parses the CSV stored in `org.schema.Service.serviceType`.
|
|
38
|
+
*/
|
|
39
|
+
export function parseServiceCapabilityTokens(value) {
|
|
40
|
+
return Array.from(new Set(String(value || '')
|
|
41
|
+
.split(',')
|
|
42
|
+
.map((item) => item.trim())
|
|
43
|
+
.filter(Boolean)));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Serializes capability tokens into the canonical CSV claim format.
|
|
47
|
+
*/
|
|
48
|
+
export function serializeServiceCapabilityTokens(values) {
|
|
49
|
+
const normalized = Array.from(new Set(values
|
|
50
|
+
.map((item) => String(item || '').trim())
|
|
51
|
+
.filter(Boolean)));
|
|
52
|
+
return normalized.length ? normalized.join(',') : undefined;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Returns the capability family prefix from a token.
|
|
56
|
+
*/
|
|
57
|
+
export function getServiceCapabilityFamily(value) {
|
|
58
|
+
const normalized = String(value || '').trim().toLowerCase();
|
|
59
|
+
if (!normalized)
|
|
60
|
+
return undefined;
|
|
61
|
+
return normalized.split('.')[0] || undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Checks whether the claim contains at least one capability from the requested
|
|
65
|
+
* family.
|
|
66
|
+
*/
|
|
67
|
+
export function hasServiceCapabilityFamily(value, family) {
|
|
68
|
+
const normalizedFamily = String(family || '').trim().toLowerCase();
|
|
69
|
+
if (!normalizedFamily)
|
|
70
|
+
return false;
|
|
71
|
+
return parseServiceCapabilityTokens(value).some((item) => getServiceCapabilityFamily(item) === normalizedFamily);
|
|
72
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical W3C credential contexts reused by activation/VP helpers and tests.
|
|
3
|
+
*
|
|
4
|
+
* Keep these values centralized so examples and unit suites do not re-hardcode
|
|
5
|
+
* W3C context URLs inline.
|
|
6
|
+
*/
|
|
7
|
+
export declare const W3cCredentialContexts: Readonly<{
|
|
8
|
+
V1: "https://www.w3.org/2018/credentials/v1";
|
|
9
|
+
V2: "https://www.w3.org/ns/credentials/v2";
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Canonical W3C credential and presentation base types.
|
|
13
|
+
*/
|
|
14
|
+
export declare const W3cCredentialTypes: Readonly<{
|
|
15
|
+
VerifiableCredential: "VerifiableCredential";
|
|
16
|
+
VerifiablePresentation: "VerifiablePresentation";
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Canonical activation VC subtype names currently accepted by CORE helpers.
|
|
20
|
+
*
|
|
21
|
+
* Notes:
|
|
22
|
+
* - `LegalOrganizationCredential` and `PersonCredential` remain accepted as
|
|
23
|
+
* compatibility aliases while ICA/GW contracts converge.
|
|
24
|
+
* - Example/test code must import these constants instead of re-hardcoding the
|
|
25
|
+
* subtype strings inline.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ActivationCredentialTypes: Readonly<{
|
|
28
|
+
OrganizationCredential: "OrganizationCredential";
|
|
29
|
+
LegalOrganizationCredential: "LegalOrganizationCredential";
|
|
30
|
+
LegalRepresentativeCredential: "LegalRepresentativeCredential";
|
|
31
|
+
PersonCredential: "PersonCredential";
|
|
32
|
+
}>;
|
|
33
|
+
export declare const ORGANIZATION_ACTIVATION_VC_TYPES: readonly ("OrganizationCredential" | "LegalOrganizationCredential")[];
|
|
34
|
+
export declare const REPRESENTATIVE_ACTIVATION_VC_TYPES: readonly ("LegalRepresentativeCredential" | "PersonCredential")[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
3
|
+
/**
|
|
4
|
+
* Canonical W3C credential contexts reused by activation/VP helpers and tests.
|
|
5
|
+
*
|
|
6
|
+
* Keep these values centralized so examples and unit suites do not re-hardcode
|
|
7
|
+
* W3C context URLs inline.
|
|
8
|
+
*/
|
|
9
|
+
export const W3cCredentialContexts = Object.freeze({
|
|
10
|
+
V1: 'https://www.w3.org/2018/credentials/v1',
|
|
11
|
+
V2: 'https://www.w3.org/ns/credentials/v2',
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Canonical W3C credential and presentation base types.
|
|
15
|
+
*/
|
|
16
|
+
export const W3cCredentialTypes = Object.freeze({
|
|
17
|
+
VerifiableCredential: 'VerifiableCredential',
|
|
18
|
+
VerifiablePresentation: 'VerifiablePresentation',
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Canonical activation VC subtype names currently accepted by CORE helpers.
|
|
22
|
+
*
|
|
23
|
+
* Notes:
|
|
24
|
+
* - `LegalOrganizationCredential` and `PersonCredential` remain accepted as
|
|
25
|
+
* compatibility aliases while ICA/GW contracts converge.
|
|
26
|
+
* - Example/test code must import these constants instead of re-hardcoding the
|
|
27
|
+
* subtype strings inline.
|
|
28
|
+
*/
|
|
29
|
+
export const ActivationCredentialTypes = Object.freeze({
|
|
30
|
+
OrganizationCredential: 'OrganizationCredential',
|
|
31
|
+
LegalOrganizationCredential: 'LegalOrganizationCredential',
|
|
32
|
+
LegalRepresentativeCredential: 'LegalRepresentativeCredential',
|
|
33
|
+
PersonCredential: 'PersonCredential',
|
|
34
|
+
});
|
|
35
|
+
export const ORGANIZATION_ACTIVATION_VC_TYPES = Object.freeze([
|
|
36
|
+
ActivationCredentialTypes.OrganizationCredential,
|
|
37
|
+
ActivationCredentialTypes.LegalOrganizationCredential,
|
|
38
|
+
]);
|
|
39
|
+
export const REPRESENTATIVE_ACTIVATION_VC_TYPES = Object.freeze([
|
|
40
|
+
ActivationCredentialTypes.LegalRepresentativeCredential,
|
|
41
|
+
ActivationCredentialTypes.PersonCredential,
|
|
42
|
+
]);
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
* while preserving a stable migration target for older imports.
|
|
7
7
|
*/
|
|
8
8
|
export * from './shared';
|
|
9
|
+
export * from './ica-activation-proof';
|
|
9
10
|
export * from './organization-controller';
|
|
10
11
|
export * from './individual-controller';
|
|
11
12
|
export * from './professional';
|
|
12
13
|
export * from './related-person';
|
|
13
14
|
export * from './frontend-session';
|
|
15
|
+
export * from './lifecycle';
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
* while preserving a stable migration target for older imports.
|
|
8
8
|
*/
|
|
9
9
|
export * from './shared.js';
|
|
10
|
+
export * from './ica-activation-proof.js';
|
|
10
11
|
export * from './organization-controller.js';
|
|
11
12
|
export * from './individual-controller.js';
|
|
12
13
|
export * from './professional.js';
|
|
13
14
|
export * from './related-person.js';
|
|
14
15
|
export * from './frontend-session.js';
|
|
16
|
+
export * from './lifecycle.js';
|
|
@@ -1,135 +1,27 @@
|
|
|
1
|
+
import { ClaimConsent, type ConsentRule } from '../models/consent-rule';
|
|
2
|
+
import { EXAMPLE_EMAIL_PROFESSIONAL, EXAMPLE_EMAIL_RELATED_PERSON } from './shared';
|
|
3
|
+
export declare const EXAMPLE_INDIVIDUAL_DID_WEB: "did:web:api.acme.org:individual:123";
|
|
4
|
+
export declare const EXAMPLE_PROVIDER_ORGANIZATION_DID_WEB: "did:web:hospital.acme.org";
|
|
5
|
+
export { EXAMPLE_EMAIL_PROFESSIONAL, EXAMPLE_EMAIL_RELATED_PERSON };
|
|
6
|
+
export declare const EXAMPLE_CONSENT_ACCESS_JURISDICTION: "ES";
|
|
7
|
+
/**
|
|
8
|
+
* Legacy compatibility aliases kept so older docs/tests/imports continue to work
|
|
9
|
+
* while the canonical variable names converge.
|
|
10
|
+
*/
|
|
1
11
|
export declare const EXAMPLE_CONSENT_ACCESS_SUBJECT: "did:web:api.acme.org:individual:123";
|
|
2
12
|
export declare const EXAMPLE_CONSENT_ACCESS_PROVIDER_DID: "did:web:hospital.acme.org";
|
|
3
13
|
export declare const EXAMPLE_CONSENT_ACCESS_PROVIDER_EMAIL: "doctor.oncall@example.org";
|
|
4
14
|
export declare const EXAMPLE_CONSENT_ACCESS_RELATED_PERSON_EMAIL: "parent.guardian@example.org";
|
|
5
|
-
export declare const EXAMPLE_CONSENT_ACCESS_JURISDICTION: "ES";
|
|
6
15
|
export declare const EXAMPLE_CONSENT_ACCESS_RULES: Readonly<{
|
|
7
|
-
physicianByEmailContinuousCare:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly 'Consent.actor-role': string;
|
|
17
|
-
readonly 'Consent.decision': "permit" | "deny";
|
|
18
|
-
readonly 'Consent.purpose': string;
|
|
19
|
-
readonly 'Consent.action': string;
|
|
20
|
-
};
|
|
21
|
-
physicianByEmailEmergency: {
|
|
22
|
-
readonly 'Consent.date': "2026-05-20";
|
|
23
|
-
readonly 'Consent.period-end'?: string | undefined;
|
|
24
|
-
readonly 'Consent.period-start'?: string | undefined;
|
|
25
|
-
readonly 'Consent.resourceType'?: string | undefined;
|
|
26
|
-
readonly '@context': "org.hl7.fhir.api";
|
|
27
|
-
readonly 'Consent.identifier': string;
|
|
28
|
-
readonly 'Consent.subject': "did:web:api.acme.org:individual:123";
|
|
29
|
-
readonly 'Consent.actor-identifier': string;
|
|
30
|
-
readonly 'Consent.actor-role': string;
|
|
31
|
-
readonly 'Consent.decision': "permit" | "deny";
|
|
32
|
-
readonly 'Consent.purpose': string;
|
|
33
|
-
readonly 'Consent.action': string;
|
|
34
|
-
};
|
|
35
|
-
physicianByOrganizationContinuousCare: {
|
|
36
|
-
readonly 'Consent.date': "2026-05-20";
|
|
37
|
-
readonly 'Consent.period-end'?: string | undefined;
|
|
38
|
-
readonly 'Consent.period-start'?: string | undefined;
|
|
39
|
-
readonly 'Consent.resourceType'?: string | undefined;
|
|
40
|
-
readonly '@context': "org.hl7.fhir.api";
|
|
41
|
-
readonly 'Consent.identifier': string;
|
|
42
|
-
readonly 'Consent.subject': "did:web:api.acme.org:individual:123";
|
|
43
|
-
readonly 'Consent.actor-identifier': string;
|
|
44
|
-
readonly 'Consent.actor-role': string;
|
|
45
|
-
readonly 'Consent.decision': "permit" | "deny";
|
|
46
|
-
readonly 'Consent.purpose': string;
|
|
47
|
-
readonly 'Consent.action': string;
|
|
48
|
-
};
|
|
49
|
-
physicianByJurisdictionEmergency: {
|
|
50
|
-
readonly 'Consent.date': "2026-05-20";
|
|
51
|
-
readonly 'Consent.period-end'?: string | undefined;
|
|
52
|
-
readonly 'Consent.period-start'?: string | undefined;
|
|
53
|
-
readonly 'Consent.resourceType'?: string | undefined;
|
|
54
|
-
readonly '@context': "org.hl7.fhir.api";
|
|
55
|
-
readonly 'Consent.identifier': string;
|
|
56
|
-
readonly 'Consent.subject': "did:web:api.acme.org:individual:123";
|
|
57
|
-
readonly 'Consent.actor-identifier': string;
|
|
58
|
-
readonly 'Consent.actor-role': string;
|
|
59
|
-
readonly 'Consent.decision': "permit" | "deny";
|
|
60
|
-
readonly 'Consent.purpose': string;
|
|
61
|
-
readonly 'Consent.action': string;
|
|
62
|
-
};
|
|
63
|
-
nurseByOrganization: {
|
|
64
|
-
readonly 'Consent.date': "2026-05-20";
|
|
65
|
-
readonly 'Consent.period-end'?: string | undefined;
|
|
66
|
-
readonly 'Consent.period-start'?: string | undefined;
|
|
67
|
-
readonly 'Consent.resourceType'?: string | undefined;
|
|
68
|
-
readonly '@context': "org.hl7.fhir.api";
|
|
69
|
-
readonly 'Consent.identifier': string;
|
|
70
|
-
readonly 'Consent.subject': "did:web:api.acme.org:individual:123";
|
|
71
|
-
readonly 'Consent.actor-identifier': string;
|
|
72
|
-
readonly 'Consent.actor-role': string;
|
|
73
|
-
readonly 'Consent.decision': "permit" | "deny";
|
|
74
|
-
readonly 'Consent.purpose': string;
|
|
75
|
-
readonly 'Consent.action': string;
|
|
76
|
-
};
|
|
77
|
-
paramedicByJurisdiction: {
|
|
78
|
-
readonly 'Consent.date': "2026-05-20";
|
|
79
|
-
readonly 'Consent.period-end'?: string | undefined;
|
|
80
|
-
readonly 'Consent.period-start'?: string | undefined;
|
|
81
|
-
readonly 'Consent.resourceType'?: string | undefined;
|
|
82
|
-
readonly '@context': "org.hl7.fhir.api";
|
|
83
|
-
readonly 'Consent.identifier': string;
|
|
84
|
-
readonly 'Consent.subject': "did:web:api.acme.org:individual:123";
|
|
85
|
-
readonly 'Consent.actor-identifier': string;
|
|
86
|
-
readonly 'Consent.actor-role': string;
|
|
87
|
-
readonly 'Consent.decision': "permit" | "deny";
|
|
88
|
-
readonly 'Consent.purpose': string;
|
|
89
|
-
readonly 'Consent.action': string;
|
|
90
|
-
};
|
|
91
|
-
directPhysicianDenyInsideAllowedOrganization: {
|
|
92
|
-
readonly 'Consent.date': "2026-05-20";
|
|
93
|
-
readonly 'Consent.period-end'?: string | undefined;
|
|
94
|
-
readonly 'Consent.period-start'?: string | undefined;
|
|
95
|
-
readonly 'Consent.resourceType'?: string | undefined;
|
|
96
|
-
readonly '@context': "org.hl7.fhir.api";
|
|
97
|
-
readonly 'Consent.identifier': string;
|
|
98
|
-
readonly 'Consent.subject': "did:web:api.acme.org:individual:123";
|
|
99
|
-
readonly 'Consent.actor-identifier': string;
|
|
100
|
-
readonly 'Consent.actor-role': string;
|
|
101
|
-
readonly 'Consent.decision': "permit" | "deny";
|
|
102
|
-
readonly 'Consent.purpose': string;
|
|
103
|
-
readonly 'Consent.action': string;
|
|
104
|
-
};
|
|
105
|
-
relatedPersonByEmail: {
|
|
106
|
-
readonly 'Consent.date': "2026-05-20";
|
|
107
|
-
readonly 'Consent.period-end'?: string | undefined;
|
|
108
|
-
readonly 'Consent.period-start'?: string | undefined;
|
|
109
|
-
readonly 'Consent.resourceType'?: string | undefined;
|
|
110
|
-
readonly '@context': "org.hl7.fhir.api";
|
|
111
|
-
readonly 'Consent.identifier': string;
|
|
112
|
-
readonly 'Consent.subject': "did:web:api.acme.org:individual:123";
|
|
113
|
-
readonly 'Consent.actor-identifier': string;
|
|
114
|
-
readonly 'Consent.actor-role': string;
|
|
115
|
-
readonly 'Consent.decision': "permit" | "deny";
|
|
116
|
-
readonly 'Consent.purpose': string;
|
|
117
|
-
readonly 'Consent.action': string;
|
|
118
|
-
};
|
|
119
|
-
revokedPhysicianEmailConsent: {
|
|
120
|
-
readonly 'Consent.date': "2026-05-20";
|
|
121
|
-
readonly 'Consent.period-end'?: string | undefined;
|
|
122
|
-
readonly 'Consent.period-start'?: string | undefined;
|
|
123
|
-
readonly 'Consent.resourceType'?: string | undefined;
|
|
124
|
-
readonly '@context': "org.hl7.fhir.api";
|
|
125
|
-
readonly 'Consent.identifier': string;
|
|
126
|
-
readonly 'Consent.subject': "did:web:api.acme.org:individual:123";
|
|
127
|
-
readonly 'Consent.actor-identifier': string;
|
|
128
|
-
readonly 'Consent.actor-role': string;
|
|
129
|
-
readonly 'Consent.decision': "permit" | "deny";
|
|
130
|
-
readonly 'Consent.purpose': string;
|
|
131
|
-
readonly 'Consent.action': string;
|
|
132
|
-
};
|
|
16
|
+
physicianByEmailContinuousCare: ConsentRule & Partial<Record<ClaimConsent.resourceType, string>>;
|
|
17
|
+
physicianByEmailEmergency: ConsentRule & Partial<Record<ClaimConsent.resourceType, string>>;
|
|
18
|
+
physicianByOrganizationContinuousCare: ConsentRule & Partial<Record<ClaimConsent.resourceType, string>>;
|
|
19
|
+
physicianByJurisdictionEmergency: ConsentRule & Partial<Record<ClaimConsent.resourceType, string>>;
|
|
20
|
+
nurseByOrganization: ConsentRule & Partial<Record<ClaimConsent.resourceType, string>>;
|
|
21
|
+
paramedicByJurisdiction: ConsentRule & Partial<Record<ClaimConsent.resourceType, string>>;
|
|
22
|
+
directPhysicianDenyInsideAllowedOrganization: ConsentRule & Partial<Record<ClaimConsent.resourceType, string>>;
|
|
23
|
+
relatedPersonByEmail: ConsentRule & Partial<Record<ClaimConsent.resourceType, string>>;
|
|
24
|
+
revokedPhysicianEmailConsent: ConsentRule & Partial<Record<ClaimConsent.resourceType, string>>;
|
|
133
25
|
}>;
|
|
134
26
|
export declare const EXAMPLE_CONSENT_PHONE_EXTENSION_PENDING: Readonly<{
|
|
135
27
|
target: "tel:+34600111222";
|
|
@@ -1,31 +1,48 @@
|
|
|
1
1
|
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
2
|
import { HealthcareActorRoles, HealthcareBasicSections, HealthcareConsentPurposes, } from '../constants/healthcare.js';
|
|
3
|
+
import { ClaimConsent } from '../models/consent-rule.js';
|
|
3
4
|
import { ResourceTypesFhirR4 } from '../constants/fhir-resource-types.js';
|
|
4
|
-
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export
|
|
8
|
-
export const EXAMPLE_CONSENT_ACCESS_JURISDICTION =
|
|
5
|
+
import { EXAMPLE_CONSENT_DATE, EXAMPLE_CONSENT_PERIOD_END, EXAMPLE_EMAIL_PROFESSIONAL, EXAMPLE_EMAIL_RELATED_PERSON, EXAMPLE_HEALTHCARE_JURISDICTION, EXAMPLE_PROVIDER_ORGANIZATION_DID, EXAMPLE_RELATED_PERSON_ROLE, EXAMPLE_SUBJECT_DID, } from './shared.js';
|
|
6
|
+
export const EXAMPLE_INDIVIDUAL_DID_WEB = EXAMPLE_SUBJECT_DID;
|
|
7
|
+
export const EXAMPLE_PROVIDER_ORGANIZATION_DID_WEB = EXAMPLE_PROVIDER_ORGANIZATION_DID;
|
|
8
|
+
export { EXAMPLE_EMAIL_PROFESSIONAL, EXAMPLE_EMAIL_RELATED_PERSON };
|
|
9
|
+
export const EXAMPLE_CONSENT_ACCESS_JURISDICTION = EXAMPLE_HEALTHCARE_JURISDICTION;
|
|
10
|
+
/**
|
|
11
|
+
* Legacy compatibility aliases kept so older docs/tests/imports continue to work
|
|
12
|
+
* while the canonical variable names converge.
|
|
13
|
+
*/
|
|
14
|
+
export const EXAMPLE_CONSENT_ACCESS_SUBJECT = EXAMPLE_INDIVIDUAL_DID_WEB;
|
|
15
|
+
export const EXAMPLE_CONSENT_ACCESS_PROVIDER_DID = EXAMPLE_PROVIDER_ORGANIZATION_DID_WEB;
|
|
16
|
+
export const EXAMPLE_CONSENT_ACCESS_PROVIDER_EMAIL = EXAMPLE_EMAIL_PROFESSIONAL;
|
|
17
|
+
export const EXAMPLE_CONSENT_ACCESS_RELATED_PERSON_EMAIL = EXAMPLE_EMAIL_RELATED_PERSON;
|
|
18
|
+
/**
|
|
19
|
+
* Consent example builder used by docs/tests.
|
|
20
|
+
*
|
|
21
|
+
* Contract note:
|
|
22
|
+
* repeated actor identifiers, dates, jurisdictions, role fixtures, and
|
|
23
|
+
* canonical consent claim keys must be imported, never re-hardcoded inline in
|
|
24
|
+
* each example rule.
|
|
25
|
+
*/
|
|
9
26
|
function buildRule(input) {
|
|
10
27
|
return {
|
|
11
28
|
'@context': 'org.hl7.fhir.api',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
...(input.resourceTypes?.length ? {
|
|
20
|
-
...(input.periodStart ? {
|
|
21
|
-
...(input.periodEnd ? {
|
|
22
|
-
|
|
29
|
+
[ClaimConsent.identifier]: input.identifier,
|
|
30
|
+
[ClaimConsent.subject]: EXAMPLE_INDIVIDUAL_DID_WEB,
|
|
31
|
+
[ClaimConsent.actorIdentifier]: input.actorIdentifier,
|
|
32
|
+
[ClaimConsent.actorRole]: input.actorRole,
|
|
33
|
+
[ClaimConsent.decision]: input.decision || 'permit',
|
|
34
|
+
[ClaimConsent.purpose]: input.purpose,
|
|
35
|
+
[ClaimConsent.action]: input.actions.join(','),
|
|
36
|
+
...(input.resourceTypes?.length ? { [ClaimConsent.resourceType]: input.resourceTypes.join(',') } : {}),
|
|
37
|
+
...(input.periodStart ? { [ClaimConsent.periodStart]: input.periodStart } : {}),
|
|
38
|
+
...(input.periodEnd ? { [ClaimConsent.periodEnd]: input.periodEnd } : {}),
|
|
39
|
+
[ClaimConsent.date]: EXAMPLE_CONSENT_DATE,
|
|
23
40
|
};
|
|
24
41
|
}
|
|
25
42
|
export const EXAMPLE_CONSENT_ACCESS_RULES = Object.freeze({
|
|
26
43
|
physicianByEmailContinuousCare: buildRule({
|
|
27
44
|
identifier: 'urn:uuid:consent-physician-email-treatment',
|
|
28
|
-
actorIdentifier:
|
|
45
|
+
actorIdentifier: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
29
46
|
actorRole: HealthcareActorRoles.Physician,
|
|
30
47
|
purpose: HealthcareConsentPurposes.Treatment,
|
|
31
48
|
actions: [HealthcareBasicSections.AllergiesAndIntolerances.claim],
|
|
@@ -33,7 +50,7 @@ export const EXAMPLE_CONSENT_ACCESS_RULES = Object.freeze({
|
|
|
33
50
|
}),
|
|
34
51
|
physicianByEmailEmergency: buildRule({
|
|
35
52
|
identifier: 'urn:uuid:consent-physician-email-emergency',
|
|
36
|
-
actorIdentifier:
|
|
53
|
+
actorIdentifier: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
37
54
|
actorRole: HealthcareActorRoles.Physician,
|
|
38
55
|
purpose: HealthcareConsentPurposes.EmergencyTreatment,
|
|
39
56
|
actions: [HealthcareBasicSections.PatientSummaryDocument.claim],
|
|
@@ -41,7 +58,7 @@ export const EXAMPLE_CONSENT_ACCESS_RULES = Object.freeze({
|
|
|
41
58
|
}),
|
|
42
59
|
physicianByOrganizationContinuousCare: buildRule({
|
|
43
60
|
identifier: 'urn:uuid:consent-physician-org-treatment',
|
|
44
|
-
actorIdentifier:
|
|
61
|
+
actorIdentifier: EXAMPLE_PROVIDER_ORGANIZATION_DID_WEB,
|
|
45
62
|
actorRole: HealthcareActorRoles.Physician,
|
|
46
63
|
purpose: HealthcareConsentPurposes.Treatment,
|
|
47
64
|
actions: [HealthcareBasicSections.Results.claim],
|
|
@@ -57,7 +74,7 @@ export const EXAMPLE_CONSENT_ACCESS_RULES = Object.freeze({
|
|
|
57
74
|
}),
|
|
58
75
|
nurseByOrganization: buildRule({
|
|
59
76
|
identifier: 'urn:uuid:consent-nurse-org-treatment',
|
|
60
|
-
actorIdentifier:
|
|
77
|
+
actorIdentifier: EXAMPLE_PROVIDER_ORGANIZATION_DID_WEB,
|
|
61
78
|
actorRole: HealthcareActorRoles.NursingProfessional,
|
|
62
79
|
purpose: HealthcareConsentPurposes.Treatment,
|
|
63
80
|
actions: [HealthcareBasicSections.HistoryOfMedicationUse.claim],
|
|
@@ -73,7 +90,7 @@ export const EXAMPLE_CONSENT_ACCESS_RULES = Object.freeze({
|
|
|
73
90
|
}),
|
|
74
91
|
directPhysicianDenyInsideAllowedOrganization: buildRule({
|
|
75
92
|
identifier: 'urn:uuid:consent-physician-direct-deny',
|
|
76
|
-
actorIdentifier:
|
|
93
|
+
actorIdentifier: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
77
94
|
actorRole: HealthcareActorRoles.Physician,
|
|
78
95
|
decision: 'deny',
|
|
79
96
|
purpose: HealthcareConsentPurposes.Treatment,
|
|
@@ -82,19 +99,19 @@ export const EXAMPLE_CONSENT_ACCESS_RULES = Object.freeze({
|
|
|
82
99
|
}),
|
|
83
100
|
relatedPersonByEmail: buildRule({
|
|
84
101
|
identifier: 'urn:uuid:consent-related-person-email',
|
|
85
|
-
actorIdentifier:
|
|
86
|
-
actorRole:
|
|
102
|
+
actorIdentifier: EXAMPLE_EMAIL_RELATED_PERSON,
|
|
103
|
+
actorRole: EXAMPLE_RELATED_PERSON_ROLE,
|
|
87
104
|
purpose: HealthcareConsentPurposes.Treatment,
|
|
88
105
|
actions: [HealthcareBasicSections.PatientSummaryDocument.claim],
|
|
89
106
|
resourceTypes: [ResourceTypesFhirR4.Composition, ResourceTypesFhirR4.DocumentReference],
|
|
90
107
|
}),
|
|
91
108
|
revokedPhysicianEmailConsent: buildRule({
|
|
92
109
|
identifier: 'urn:uuid:consent-physician-email-revoked',
|
|
93
|
-
actorIdentifier:
|
|
110
|
+
actorIdentifier: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
94
111
|
actorRole: HealthcareActorRoles.Physician,
|
|
95
112
|
purpose: HealthcareConsentPurposes.EmergencyTreatment,
|
|
96
113
|
actions: [HealthcareBasicSections.PatientSummaryDocument.claim],
|
|
97
|
-
periodEnd:
|
|
114
|
+
periodEnd: EXAMPLE_CONSENT_PERIOD_END,
|
|
98
115
|
}),
|
|
99
116
|
});
|
|
100
117
|
export const EXAMPLE_CONSENT_PHONE_EXTENSION_PENDING = Object.freeze({
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
* breaking while the examples are reorganized by flow/case of use.
|
|
7
7
|
*/
|
|
8
8
|
export * from './shared';
|
|
9
|
+
export * from './ica-activation-proof';
|
|
9
10
|
export * from './organization-controller';
|
|
10
11
|
export * from './individual-controller';
|
|
11
12
|
export * from './professional';
|
|
12
13
|
export * from './related-person';
|
|
13
14
|
export * from './frontend-session';
|
|
15
|
+
export * from './lifecycle';
|