gdc-sdk-node-ts 2.4.30 → 2.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/digital-twin.d.ts +8 -0
- package/dist/digital-twin.js +10 -0
- package/package.json +1 -1
package/dist/digital-twin.d.ts
CHANGED
|
@@ -3,6 +3,14 @@ import type { MetaTagCoding } from 'gdc-common-utils-ts/models/confidential-stor
|
|
|
3
3
|
import type { RouteContext } from './individual-onboarding.js';
|
|
4
4
|
import type { PollOptions, SubmitAndPollResult } from './orchestration/client-port.js';
|
|
5
5
|
export type DigitalTwinFhirFormat = 'org.hl7.fhir.r4' | 'org.hl7.fhir.api';
|
|
6
|
+
/**
|
|
7
|
+
* Creates the opaque FHIR identifier for the provider-level secondary-use
|
|
8
|
+
* Consent. Call this exactly once when the server creates the subject's index
|
|
9
|
+
* enrollment, persist the result there, and reuse it for every permit/deny.
|
|
10
|
+
* It is intentionally random and must not be derived from a subject or tenant
|
|
11
|
+
* identifier.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createDigitalTwinSecondaryUseConsentIdentifier(): string;
|
|
6
14
|
/** Returns whether a value can be used as a pseudonymous digital-twin subject. */
|
|
7
15
|
export declare function isDigitalTwinSubjectId(value: unknown): value is string;
|
|
8
16
|
/** Rejects operational DIDs and malformed or caller-invented subject shapes. */
|
package/dist/digital-twin.js
CHANGED
|
@@ -3,6 +3,16 @@ import { randomUUID } from 'node:crypto';
|
|
|
3
3
|
import { HealthcareDocumentTypes } from 'gdc-common-utils-ts/constants';
|
|
4
4
|
import { CompositionClaim } from 'gdc-common-utils-ts/models';
|
|
5
5
|
const DIGITAL_TWIN_SUBJECT_URN_UUID = /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
6
|
+
/**
|
|
7
|
+
* Creates the opaque FHIR identifier for the provider-level secondary-use
|
|
8
|
+
* Consent. Call this exactly once when the server creates the subject's index
|
|
9
|
+
* enrollment, persist the result there, and reuse it for every permit/deny.
|
|
10
|
+
* It is intentionally random and must not be derived from a subject or tenant
|
|
11
|
+
* identifier.
|
|
12
|
+
*/
|
|
13
|
+
export function createDigitalTwinSecondaryUseConsentIdentifier() {
|
|
14
|
+
return `urn:uuid:${randomUUID()}`;
|
|
15
|
+
}
|
|
6
16
|
/** Returns whether a value can be used as a pseudonymous digital-twin subject. */
|
|
7
17
|
export function isDigitalTwinSubjectId(value) {
|
|
8
18
|
return DIGITAL_TWIN_SUBJECT_URN_UUID.test(String(value || '').trim());
|