gdc-sdk-node-ts 2.7.7 → 2.7.9
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
CHANGED
|
@@ -437,6 +437,12 @@ grant/deny operation and retains the original Communication identifier/thread.
|
|
|
437
437
|
and `GatewayActiveConsentProvider` supplies `evaluateRequestedAccess(...)` from
|
|
438
438
|
the GW Consent source of truth rather than a parallel application table.
|
|
439
439
|
There is no `AccessRequest` FHIR resource or `AccessRequest.*` claim family.
|
|
440
|
+
The Communication itself uses the standard FHIR `notification` category;
|
|
441
|
+
`permission-request` is workflow meaning carried by the attached draft Consent,
|
|
442
|
+
not a custom category. See the
|
|
443
|
+
[HL7 category value set](https://www.hl7.org/fhir/valueset-communication-category.html),
|
|
444
|
+
[HL7 `v3-ActReason` BTG code system](http://terminology.hl7.org/CodeSystem/v3-ActReason),
|
|
445
|
+
and the [IHE compound normal/break-glass Consent example](https://profiles.ihe.net/ITI/PCF/Consent-ex-consent-advanced-normal-break-glass-restricted.json.html).
|
|
440
446
|
|
|
441
447
|
## Main Flows
|
|
442
448
|
|
|
@@ -704,6 +710,17 @@ modules below.
|
|
|
704
710
|
`recipient`, never a portal alias
|
|
705
711
|
- vital-sign helpers
|
|
706
712
|
|
|
713
|
+
### Composition provenance in clinical Bundles
|
|
714
|
+
|
|
715
|
+
A document Bundle keeps `Composition.author` (who created the content) separate
|
|
716
|
+
from `Composition.attester` (the registered personal or professional assignment
|
|
717
|
+
that submitted/attested it). For a member or professional, the protected BFF
|
|
718
|
+
profile selects only `owner` or `creator`; a `RelatedPerson` or
|
|
719
|
+
`PractitionerRole` may be both author and attester when that actor created the
|
|
720
|
+
content. DIDComm sender and signing keys remain audit/transport identities.
|
|
721
|
+
See [Clinical writes from a Node BFF](./docs/101-BFF_CLINICAL_WRITES.md) and the
|
|
722
|
+
[gateway authorship contract](https://github.com/Global-DataCare/gwtemplate-node-ts/blob/main/docs/01-OVERVIEW-AND-GUIDES/101-01.N-AUTHENTICATED-CLINICAL-AUTHOR.md).
|
|
723
|
+
|
|
707
724
|
### Node runtime client
|
|
708
725
|
|
|
709
726
|
- [`NodeHttpClient`](src/node-runtime-client.ts)
|
|
@@ -407,7 +407,12 @@ export type CommunicationParticipantRuntimeSearchInput = {
|
|
|
407
407
|
};
|
|
408
408
|
/** Subject/requester filters for canonical permission-request Communications. */
|
|
409
409
|
export type ProfessionalAccessRequestSearchInput = CommunicationParticipantRuntimeSearchInput;
|
|
410
|
-
/**
|
|
410
|
+
/**
|
|
411
|
+
* Restricts a Communication participant search to standard notifications.
|
|
412
|
+
* A permission request is identified by its attached draft Consent contract;
|
|
413
|
+
* it is not an invented fifth FHIR category. See
|
|
414
|
+
* https://www.hl7.org/fhir/valueset-communication-category.html
|
|
415
|
+
*/
|
|
411
416
|
export declare function buildProfessionalAccessRequestSearchInput(input: ProfessionalAccessRequestSearchInput): CommunicationParticipantRuntimeSearchInput;
|
|
412
417
|
export type ClinicalDateRange = DateRange;
|
|
413
418
|
export type ClinicalBundleSearchInput = Omit<BundleSearchQuery, 'section' | 'searchParams'> & {
|
|
@@ -6,6 +6,7 @@ import { CommunicationClaim } from 'gdc-common-utils-ts/models/interoperable-cla
|
|
|
6
6
|
import { BundleEditor, buildCommunicationParticipantSearchBundle, buildBlockchainArtifactDocumentReference, BundleQuery, createInteroperableResourceOperationEditor, IndividualOrganizationLifecycleEditor, LicenseOfferSearchEditor, LicenseOrderSearchEditor, InteroperableLifecycleStatuses, LicenseListSearchEditor, buildLicenseIssueEntry, buildLicensePurchaseEntry, } from 'gdc-common-utils-ts';
|
|
7
7
|
import { EmployeeBundleOperations, EmployeeResourceTypes, } from 'gdc-common-utils-ts/utils/employee';
|
|
8
8
|
import { DeviceAppTypes, DeviceUserClasses } from 'gdc-common-utils-ts/constants/device';
|
|
9
|
+
import { CommunicationCategoryCodes } from 'gdc-common-utils-ts/constants/communication';
|
|
9
10
|
import { addFhirResourceToCommunication, createCommunicationResource, buildClinicalSummaryCommunicationJob, buildPermissionRequestCommunication, createClinicalSectionUpdateOutboxJob, createClinicalSummaryUpdateOutboxJob, readClinicalSummaryOperationResult, TransportProfiles, } from 'gdc-sdk-core-ts';
|
|
10
11
|
import { GwCoreLifecycleRequestMethod, GwCoreLifecycleRequestType, GwCoreLifecycleTodo, } from './constants/lifecycle.js';
|
|
11
12
|
import { buildEmployeeSearchBundle, ConsentClaims, } from 'gdc-sdk-core-ts';
|
|
@@ -27,13 +28,18 @@ export function buildClinicalSummaryUpdateIngestion(input) {
|
|
|
27
28
|
pollOptions: input.pollOptions,
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Restricts a Communication participant search to standard notifications.
|
|
33
|
+
* A permission request is identified by its attached draft Consent contract;
|
|
34
|
+
* it is not an invented fifth FHIR category. See
|
|
35
|
+
* https://www.hl7.org/fhir/valueset-communication-category.html
|
|
36
|
+
*/
|
|
31
37
|
export function buildProfessionalAccessRequestSearchInput(input) {
|
|
32
38
|
return {
|
|
33
39
|
...input,
|
|
34
40
|
searchParams: {
|
|
35
41
|
...input.searchParams,
|
|
36
|
-
[CommunicationClaim.Category]:
|
|
42
|
+
[CommunicationClaim.Category]: CommunicationCategoryCodes.Notification.attributeValue,
|
|
37
43
|
},
|
|
38
44
|
};
|
|
39
45
|
}
|
|
@@ -520,7 +526,7 @@ export async function requestProfessionalAccessWithDeps(routeCtx, input, deps) {
|
|
|
520
526
|
});
|
|
521
527
|
const communicationClaims = {
|
|
522
528
|
...communication.claims,
|
|
523
|
-
[CommunicationClaim.Category]:
|
|
529
|
+
[CommunicationClaim.Category]: CommunicationCategoryCodes.Notification.attributeValue,
|
|
524
530
|
[CommunicationClaim.NoteText]: communication.text,
|
|
525
531
|
};
|
|
526
532
|
const persistedCommunication = { ...communication, claims: communicationClaims };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JWK } from 'gdc-common-utils-ts/models/jwk';
|
|
2
2
|
import type { ActorKind } from 'gdc-common-utils-ts/models/actor-session';
|
|
3
3
|
import type { LegalOrganizationVerificationTransactionInput } from 'gdc-common-utils-ts/utils/legal-organization-verification-transaction';
|
|
4
|
-
import { type AppInfo, type ConfidentialStorageProfile, type PollOptions, type SubmitAndPollResult, type ClinicalCreatorBinding, type ClinicalCreatorIpsExport } from 'gdc-sdk-core-ts';
|
|
4
|
+
import { type AppInfo, type ConfidentialStorageProfile, type PollOptions, type SubmitAndPollResult, type ClinicalCreatorBinding, type ClinicalCreatorIpsExport, type ClinicalSourceAuthorSelection } from 'gdc-sdk-core-ts';
|
|
5
5
|
import { OrganizationControllerSdk } from './orchestration/organization-controller-sdk.js';
|
|
6
6
|
import { IndividualControllerSdk } from './orchestration/individual-controller-sdk.js';
|
|
7
7
|
import { ProfessionalSdk } from './orchestration/professional-sdk.js';
|
|
@@ -343,6 +343,8 @@ export declare class ServerProfileSessionManager {
|
|
|
343
343
|
exportClinicalCreatorIps(input: Readonly<{
|
|
344
344
|
ownerId: string;
|
|
345
345
|
profileId: string;
|
|
346
|
+
/** Closed BFF choice: content owner or authenticated registered creator. */
|
|
347
|
+
sourceAuthor?: ClinicalSourceAuthorSelection;
|
|
346
348
|
}>): Promise<ClinicalCreatorIpsExport>;
|
|
347
349
|
enroll(input: ServerProfileEnrollmentInput): Promise<ServerProfileRecord>;
|
|
348
350
|
/**
|
|
@@ -435,7 +437,11 @@ export declare class ServerProfileSessionManager {
|
|
|
435
437
|
private now;
|
|
436
438
|
}
|
|
437
439
|
/**
|
|
438
|
-
* Exports the stable FHIR IPS creator attached to a server profile.
|
|
439
|
-
*
|
|
440
|
+
* Exports the stable FHIR IPS creator attached to a server profile. The
|
|
441
|
+
* optional closed selection determines whether the owner or the authenticated
|
|
442
|
+
* registered creator authored the content. DIDComm sender and signing keys
|
|
443
|
+
* remain transport/audit evidence and never become FHIR provenance.
|
|
440
444
|
*/
|
|
441
|
-
export declare function exportServerProfileClinicalCreatorIps(profile: ServerProfileRecord
|
|
445
|
+
export declare function exportServerProfileClinicalCreatorIps(profile: ServerProfileRecord, options?: Readonly<{
|
|
446
|
+
sourceAuthor?: ClinicalSourceAuthorSelection;
|
|
447
|
+
}>): ClinicalCreatorIpsExport;
|
|
@@ -30,7 +30,7 @@ export class ServerProfileSessionManager {
|
|
|
30
30
|
* profile without exposing its protected wallet material to the portal.
|
|
31
31
|
*/
|
|
32
32
|
async exportClinicalCreatorIps(input) {
|
|
33
|
-
return exportServerProfileClinicalCreatorIps(await this.requireOwnedProfile(input.ownerId, input.profileId));
|
|
33
|
+
return exportServerProfileClinicalCreatorIps(await this.requireOwnedProfile(input.ownerId, input.profileId), { sourceAuthor: input.sourceAuthor });
|
|
34
34
|
}
|
|
35
35
|
async enroll(input) {
|
|
36
36
|
requireEnrollment(input);
|
|
@@ -829,16 +829,19 @@ function requireBase64UrlSeed32(seed) {
|
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
/**
|
|
832
|
-
* Exports the stable FHIR IPS creator attached to a server profile.
|
|
833
|
-
*
|
|
832
|
+
* Exports the stable FHIR IPS creator attached to a server profile. The
|
|
833
|
+
* optional closed selection determines whether the owner or the authenticated
|
|
834
|
+
* registered creator authored the content. DIDComm sender and signing keys
|
|
835
|
+
* remain transport/audit evidence and never become FHIR provenance.
|
|
834
836
|
*/
|
|
835
|
-
export function exportServerProfileClinicalCreatorIps(profile) {
|
|
837
|
+
export function exportServerProfileClinicalCreatorIps(profile, options = {}) {
|
|
836
838
|
if (!profile.clinicalCreatorBinding) {
|
|
837
839
|
throw new Error('Server profile has no clinical creator binding.');
|
|
838
840
|
}
|
|
839
841
|
return resolveClinicalCreatorIpsExport({
|
|
840
842
|
bindings: [profile.clinicalCreatorBinding],
|
|
841
843
|
evidence: { actorDid: profile.actorDid },
|
|
844
|
+
sourceAuthor: options.sourceAuthor,
|
|
842
845
|
});
|
|
843
846
|
}
|
|
844
847
|
function bindClinicalCreatorChannels(binding, channel) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdc-sdk-node-ts",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.9",
|
|
4
4
|
"description": "Next-generation Node runtime package for the GDC SDK family",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Antifraud Services Inc.",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"test:e2e:live-gw:clean": "bash ./scripts/run-live-gw-clean.sh"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"gdc-common-utils-ts": "2.8.
|
|
42
|
-
"gdc-sdk-core-ts": "2.5.
|
|
41
|
+
"gdc-common-utils-ts": "2.8.8",
|
|
42
|
+
"gdc-sdk-core-ts": "2.5.7"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^20.14.10",
|