gdc-common-utils-ts 2.7.5 → 2.7.7
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/constants/Schemas.d.ts +2 -0
- package/dist/constants/Schemas.js +2 -0
- package/dist/constants/composition.d.ts +13 -0
- package/dist/constants/composition.js +15 -0
- package/dist/constants/data-capabilities.d.ts +7 -7
- package/dist/constants/didcomm.d.ts +4 -0
- package/dist/constants/didcomm.js +4 -0
- package/dist/constants/fhir-resource-types.d.ts +55 -0
- package/dist/constants/fhir-resource-types.js +14 -0
- package/dist/constants/gateway-response.d.ts +100 -0
- package/dist/constants/gateway-response.js +104 -0
- package/dist/constants/http.d.ts +14 -0
- package/dist/constants/http.js +14 -0
- package/dist/constants/identity-auth.d.ts +16 -0
- package/dist/constants/identity-auth.js +16 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.js +3 -0
- package/dist/constants/jsonld.d.ts +5 -0
- package/dist/constants/jsonld.js +5 -0
- package/dist/constants/schemaorg.d.ts +5 -0
- package/dist/constants/schemaorg.js +5 -0
- package/dist/constants/urn.d.ts +2 -0
- package/dist/constants/urn.js +2 -0
- package/dist/examples/index.d.ts +1 -0
- package/dist/examples/index.js +1 -0
- package/dist/examples/researcher-working-selection.d.ts +68 -0
- package/dist/examples/researcher-working-selection.js +59 -0
- package/dist/examples/shared.d.ts +1 -0
- package/dist/examples/shared.js +1 -0
- package/dist/models/bundle-editor-types.d.ts +3 -0
- package/dist/models/bundle-editor-types.js +3 -0
- package/dist/models/interoperable-claims/index.d.ts +1 -0
- package/dist/models/interoperable-claims/index.js +1 -0
- package/dist/models/interoperable-claims/research-subject-claims.d.ts +4 -0
- package/dist/models/interoperable-claims/research-subject-claims.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Format } from '../constants/Schemas.js';
|
|
2
|
+
import { CompositionRequestPaths, CompositionSemanticTypes } from '../constants/composition.js';
|
|
3
|
+
import { HealthcareBasicSections } from '../constants/healthcare.js';
|
|
4
|
+
import { HttpAuthorizationSchemes, HttpRequestMethods } from '../constants/http.js';
|
|
5
|
+
import { JsonLdKeywords } from '../constants/jsonld.js';
|
|
6
|
+
import { ResourceTypesFhirR4 } from '../constants/fhir-resource-types.js';
|
|
7
|
+
import { UrnPrefixes } from '../constants/urn.js';
|
|
8
|
+
import { BundleTypes } from '../models/bundle-editor-types.js';
|
|
9
|
+
import { CompositionClaim } from '../models/interoperable-claims/composition-claims.js';
|
|
10
|
+
import { EXAMPLE_COMPOSITION_DATE_MEDICATION_DOCUMENT, EXAMPLE_LICENSE_SEAT_UUID_ACTIVE, EXAMPLE_PROFESSIONAL_DID, } from './shared.js';
|
|
11
|
+
export const EXAMPLE_RESEARCHER_WORKING_SELECTION_COMPOSITION_ID = EXAMPLE_LICENSE_SEAT_UUID_ACTIVE;
|
|
12
|
+
export const EXAMPLE_RESEARCHER_WORKING_SELECTION_SUBJECT_ID = `${UrnPrefixes.Uuid}${EXAMPLE_LICENSE_SEAT_UUID_ACTIVE}`;
|
|
13
|
+
export const EXAMPLE_RESEARCHER_WORKING_SELECTION_AUTHOR_ID = EXAMPLE_PROFESSIONAL_DID;
|
|
14
|
+
export const EXAMPLE_RESEARCHER_WORKING_SELECTION_DATE = EXAMPLE_COMPOSITION_DATE_MEDICATION_DOCUMENT;
|
|
15
|
+
export const EXAMPLE_RESEARCHER_WORKING_SELECTION_THREAD_ID = 'researcher-selection-composition-save-001';
|
|
16
|
+
export const EXAMPLE_RESEARCHER_WORKING_SELECTION_SEARCH_THREAD_ID = 'researcher-selection-composition-search-001';
|
|
17
|
+
export const EXAMPLE_RESEARCHER_WORKING_SELECTION_ACCESS_TOKEN = 'demo-token';
|
|
18
|
+
export const EXAMPLE_RESEARCHER_WORKING_SELECTION_AUTHORIZATION = `${HttpAuthorizationSchemes.Bearer} ${EXAMPLE_RESEARCHER_WORKING_SELECTION_ACCESS_TOKEN}`;
|
|
19
|
+
export const EXAMPLE_RESEARCHER_WORKING_SELECTION_TAG = Object.freeze({
|
|
20
|
+
id: 'Composition.meta.tag[0]',
|
|
21
|
+
system: 'urn:research:tag:score',
|
|
22
|
+
code: '10',
|
|
23
|
+
});
|
|
24
|
+
export function buildResearcherWorkingSelectionBundle(input = {}) {
|
|
25
|
+
const compositionId = input.compositionId
|
|
26
|
+
?? EXAMPLE_RESEARCHER_WORKING_SELECTION_COMPOSITION_ID;
|
|
27
|
+
const subjectId = input.subjectId ?? EXAMPLE_RESEARCHER_WORKING_SELECTION_SUBJECT_ID;
|
|
28
|
+
const authorId = input.authorId ?? EXAMPLE_RESEARCHER_WORKING_SELECTION_AUTHOR_ID;
|
|
29
|
+
const date = input.date ?? EXAMPLE_RESEARCHER_WORKING_SELECTION_DATE;
|
|
30
|
+
const tag = input.tag ? { tag: [input.tag] } : {};
|
|
31
|
+
return {
|
|
32
|
+
resourceType: ResourceTypesFhirR4.Bundle,
|
|
33
|
+
type: BundleTypes.batch,
|
|
34
|
+
entry: [{
|
|
35
|
+
type: ResourceTypesFhirR4.Composition,
|
|
36
|
+
request: {
|
|
37
|
+
method: HttpRequestMethods.Post,
|
|
38
|
+
url: CompositionRequestPaths.ResearcherWorkingSelection,
|
|
39
|
+
},
|
|
40
|
+
resource: {
|
|
41
|
+
resourceType: ResourceTypesFhirR4.Composition,
|
|
42
|
+
id: compositionId,
|
|
43
|
+
meta: {
|
|
44
|
+
claims: {
|
|
45
|
+
[JsonLdKeywords.Context]: Format.FHIR_R4,
|
|
46
|
+
[JsonLdKeywords.Type]: CompositionSemanticTypes.ResearcherWorkingSelection,
|
|
47
|
+
[CompositionClaim.Identifier]: compositionId,
|
|
48
|
+
[CompositionClaim.Subject]: subjectId,
|
|
49
|
+
[CompositionClaim.Section]: HealthcareBasicSections.HistoryOfMedicationUse.attributeValue,
|
|
50
|
+
[CompositionClaim.Type]: HealthcareBasicSections.PatientSummaryDocument.attributeValue,
|
|
51
|
+
[CompositionClaim.Author]: authorId,
|
|
52
|
+
[CompositionClaim.Date]: date,
|
|
53
|
+
},
|
|
54
|
+
...tag,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
}],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -141,6 +141,7 @@ export declare const EXAMPLE_PROVIDER_ORGANIZATION_DID: "did:web:hospital.acme.o
|
|
|
141
141
|
export declare const EXAMPLE_PROVIDER_ORGANIZATION_URL: "https://hospital.acme.org";
|
|
142
142
|
export declare const EXAMPLE_GATEWAY_PUBLIC_ORIGIN: "https://gateway.example.com";
|
|
143
143
|
export declare const EXAMPLE_HOST_PUBLIC_HOSTNAME: "host.example.com";
|
|
144
|
+
export declare const EXAMPLE_HOST_PUBLIC_DID: "did:web:host.example.com";
|
|
144
145
|
export declare const EXAMPLE_PERSON_CARD_URI: "urn:example:card:person:subject-001";
|
|
145
146
|
export declare const EXAMPLE_ANIMAL_CARD_URI: "urn:example:card:animal:subject-002";
|
|
146
147
|
export declare const EXAMPLE_PROVIDER_TAX_ID: "VATES-B00112233";
|
package/dist/examples/shared.js
CHANGED
|
@@ -159,6 +159,7 @@ export const EXAMPLE_PROVIDER_ORGANIZATION_DID = 'did:web:hospital.acme.org';
|
|
|
159
159
|
export const EXAMPLE_PROVIDER_ORGANIZATION_URL = 'https://hospital.acme.org';
|
|
160
160
|
export const EXAMPLE_GATEWAY_PUBLIC_ORIGIN = 'https://gateway.example.com';
|
|
161
161
|
export const EXAMPLE_HOST_PUBLIC_HOSTNAME = 'host.example.com';
|
|
162
|
+
export const EXAMPLE_HOST_PUBLIC_DID = `did:web:${EXAMPLE_HOST_PUBLIC_HOSTNAME}`;
|
|
162
163
|
export const EXAMPLE_PERSON_CARD_URI = 'urn:example:card:person:subject-001';
|
|
163
164
|
export const EXAMPLE_ANIMAL_CARD_URI = 'urn:example:card:animal:subject-002';
|
|
164
165
|
export const EXAMPLE_PROVIDER_TAX_ID = 'VATES-B00112233';
|
|
@@ -73,9 +73,12 @@ export type BuiltBundleEntry = {
|
|
|
73
73
|
};
|
|
74
74
|
export declare const BundleTypes: Readonly<{
|
|
75
75
|
readonly batch: "batch";
|
|
76
|
+
readonly batchResponse: "batch-response";
|
|
76
77
|
readonly document: "document";
|
|
77
78
|
readonly collection: "collection";
|
|
79
|
+
readonly searchset: "searchset";
|
|
78
80
|
readonly transaction: "transaction";
|
|
81
|
+
readonly transactionResponse: "transaction-response";
|
|
79
82
|
}>;
|
|
80
83
|
export type BundleType = (typeof BundleTypes)[keyof typeof BundleTypes];
|
|
81
84
|
/** Canonical validation issues returned by `BundleEditor.validateDocumentAuthoring()`. */
|
|
@@ -37,9 +37,12 @@ export const BundleEditableResourceTypes = Object.freeze({
|
|
|
37
37
|
});
|
|
38
38
|
export const BundleTypes = Object.freeze({
|
|
39
39
|
batch: 'batch',
|
|
40
|
+
batchResponse: 'batch-response',
|
|
40
41
|
document: 'document',
|
|
41
42
|
collection: 'collection',
|
|
43
|
+
searchset: 'searchset',
|
|
42
44
|
transaction: 'transaction',
|
|
45
|
+
transactionResponse: 'transaction-response',
|
|
43
46
|
});
|
|
44
47
|
/** Canonical validation issues returned by `BundleEditor.validateDocumentAuthoring()`. */
|
|
45
48
|
export const BundleEditorValidationIssues = Object.freeze({
|
|
@@ -20,6 +20,7 @@ export * from './appointment-claims';
|
|
|
20
20
|
export * from './appointment-response-claims';
|
|
21
21
|
export * from './encounter-claims';
|
|
22
22
|
export * from './related-person-claims';
|
|
23
|
+
export * from './research-subject-claims';
|
|
23
24
|
export * from './coverage-claims';
|
|
24
25
|
export * from './clinical-impression-claims';
|
|
25
26
|
export * from './task-claims';
|
|
@@ -22,6 +22,7 @@ export * from './appointment-claims.js';
|
|
|
22
22
|
export * from './appointment-response-claims.js';
|
|
23
23
|
export * from './encounter-claims.js';
|
|
24
24
|
export * from './related-person-claims.js';
|
|
25
|
+
export * from './research-subject-claims.js';
|
|
25
26
|
export * from './coverage-claims.js';
|
|
26
27
|
export * from './clinical-impression-claims.js';
|
|
27
28
|
export * from './task-claims.js';
|