gdc-common-utils-ts 2.0.11 → 2.0.13
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 +6 -2
- package/dist/examples/employee.d.ts +9 -1
- package/dist/examples/employee.js +7 -4
- package/dist/examples/shared.d.ts +1 -1
- package/dist/examples/shared.js +6 -2
- package/dist/models/consent-rule.d.ts +2 -2
- package/dist/models/consent-rule.js +1 -1
- package/dist/utils/actor.d.ts +3 -1
- package/package.json +1 -5
- package/dist/examples/communication-bundle-session.d.ts +0 -22
- package/dist/examples/communication-bundle-session.js +0 -79
- package/dist/interfaces/IWallet.d.ts +0 -55
- package/dist/interfaces/IWallet.js +0 -3
- package/dist/models/fhir-related-person.d.ts +0 -61
- package/dist/models/fhir-related-person.js +0 -108
- package/dist/models/related-profile.d.ts +0 -42
- package/dist/models/related-profile.js +0 -16
- package/dist/utils/allergy-intolerance-claim-helpers.d.ts +0 -10
- package/dist/utils/allergy-intolerance-claim-helpers.js +0 -47
- package/dist/utils/appointment-claim-helpers.d.ts +0 -10
- package/dist/utils/appointment-claim-helpers.js +0 -26
- package/dist/utils/appointment-response-claim-helpers.d.ts +0 -8
- package/dist/utils/appointment-response-claim-helpers.js +0 -20
- package/dist/utils/claim-list-helpers.d.ts +0 -21
- package/dist/utils/claim-list-helpers.js +0 -50
- package/dist/utils/clinical-impression-claim-helpers.d.ts +0 -10
- package/dist/utils/clinical-impression-claim-helpers.js +0 -26
- package/dist/utils/communication-bundle-session.d.ts +0 -175
- package/dist/utils/communication-bundle-session.js +0 -524
- package/dist/utils/composition-claim-helpers.d.ts +0 -12
- package/dist/utils/composition-claim-helpers.js +0 -32
- package/dist/utils/condition-claim-helpers.d.ts +0 -10
- package/dist/utils/condition-claim-helpers.js +0 -47
- package/dist/utils/convert-allergy-intolerance.d.ts +0 -3
- package/dist/utils/convert-allergy-intolerance.js +0 -34
- package/dist/utils/convert-appointment-response.d.ts +0 -3
- package/dist/utils/convert-appointment-response.js +0 -32
- package/dist/utils/convert-appointment.d.ts +0 -3
- package/dist/utils/convert-appointment.js +0 -61
- package/dist/utils/convert-care-plan.d.ts +0 -3
- package/dist/utils/convert-care-plan.js +0 -58
- package/dist/utils/convert-clinical-impression.d.ts +0 -3
- package/dist/utils/convert-clinical-impression.js +0 -42
- package/dist/utils/convert-composition.d.ts +0 -3
- package/dist/utils/convert-composition.js +0 -35
- package/dist/utils/convert-condition.d.ts +0 -3
- package/dist/utils/convert-condition.js +0 -24
- package/dist/utils/convert-coverage.d.ts +0 -3
- package/dist/utils/convert-coverage.js +0 -51
- package/dist/utils/convert-device-use-statement.d.ts +0 -3
- package/dist/utils/convert-device-use-statement.js +0 -28
- package/dist/utils/convert-device.d.ts +0 -3
- package/dist/utils/convert-device.js +0 -37
- package/dist/utils/convert-diagnostic-report.d.ts +0 -3
- package/dist/utils/convert-diagnostic-report.js +0 -55
- package/dist/utils/convert-document-reference.d.ts +0 -3
- package/dist/utils/convert-document-reference.js +0 -35
- package/dist/utils/convert-encounter.d.ts +0 -3
- package/dist/utils/convert-encounter.js +0 -68
- package/dist/utils/convert-flag.d.ts +0 -3
- package/dist/utils/convert-flag.js +0 -34
- package/dist/utils/convert-immunization.d.ts +0 -3
- package/dist/utils/convert-immunization.js +0 -56
- package/dist/utils/convert-medication-statement.d.ts +0 -3
- package/dist/utils/convert-medication-statement.js +0 -64
- package/dist/utils/convert-observation.d.ts +0 -3
- package/dist/utils/convert-observation.js +0 -57
- package/dist/utils/convert-procedure.d.ts +0 -3
- package/dist/utils/convert-procedure.js +0 -50
- package/dist/utils/convert-related-person.d.ts +0 -3
- package/dist/utils/convert-related-person.js +0 -31
- package/dist/utils/convert-shared.d.ts +0 -34
- package/dist/utils/convert-shared.js +0 -179
- package/dist/utils/coverage-claim-helpers.d.ts +0 -10
- package/dist/utils/coverage-claim-helpers.js +0 -26
- package/dist/utils/diagnostic-report-claim-helpers.d.ts +0 -12
- package/dist/utils/diagnostic-report-claim-helpers.js +0 -32
- package/dist/utils/employee-editor.d.ts +0 -24
- package/dist/utils/employee-editor.js +0 -41
- package/dist/utils/encounter-claim-helpers.d.ts +0 -10
- package/dist/utils/encounter-claim-helpers.js +0 -26
- package/dist/utils/gateway-index-params.d.ts +0 -44
- package/dist/utils/gateway-index-params.js +0 -80
- package/dist/utils/medication-claim-helpers.d.ts +0 -88
- package/dist/utils/medication-claim-helpers.js +0 -259
- package/dist/utils/normalize-subject-uuid.d.ts +0 -1
- package/dist/utils/normalize-subject-uuid.js +0 -24
- package/dist/utils/related-person-claim-helpers.d.ts +0 -8
- package/dist/utils/related-person-claim-helpers.js +0 -20
- package/dist/utils/search-parameter-catalog.d.ts +0 -31
- package/dist/utils/search-parameter-catalog.js +0 -81
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type GenericInteroperableClaims } from './claim-list-helpers.js';
|
|
2
|
-
export type AppointmentInteroperableClaims = GenericInteroperableClaims;
|
|
3
|
-
export declare function getAppointmentClaimList(claims: AppointmentInteroperableClaims, claimKey: string): string[];
|
|
4
|
-
export declare function setAppointmentClaimList(claims: AppointmentInteroperableClaims, claimKey: string, values: string | readonly string[]): AppointmentInteroperableClaims;
|
|
5
|
-
export declare function addAppointmentClaimList(claims: AppointmentInteroperableClaims, claimKey: string, values: string | readonly string[]): AppointmentInteroperableClaims;
|
|
6
|
-
export declare function removeAppointmentClaimList(claims: AppointmentInteroperableClaims, claimKey: string, values: string | readonly string[]): AppointmentInteroperableClaims;
|
|
7
|
-
export declare function getAppointmentIdentifier(claims: AppointmentInteroperableClaims): string;
|
|
8
|
-
export declare function setAppointmentIdentifier(claims: AppointmentInteroperableClaims, value: string): AppointmentInteroperableClaims;
|
|
9
|
-
export declare function getAppointmentParticipantActorList(claims: AppointmentInteroperableClaims): string[];
|
|
10
|
-
export declare function setAppointmentParticipantActorList(claims: AppointmentInteroperableClaims, values: string | readonly string[]): AppointmentInteroperableClaims;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { AppointmentClaim } from '../models/interoperable-claims/appointment-claims.js';
|
|
2
|
-
import { addClaimValues, getClaimValues, normalizeClaimScalar, removeClaimValues, setClaimValues, } from './claim-list-helpers.js';
|
|
3
|
-
export function getAppointmentClaimList(claims, claimKey) {
|
|
4
|
-
return getClaimValues(claims, claimKey);
|
|
5
|
-
}
|
|
6
|
-
export function setAppointmentClaimList(claims, claimKey, values) {
|
|
7
|
-
return setClaimValues(claims, claimKey, values);
|
|
8
|
-
}
|
|
9
|
-
export function addAppointmentClaimList(claims, claimKey, values) {
|
|
10
|
-
return addClaimValues(claims, claimKey, values);
|
|
11
|
-
}
|
|
12
|
-
export function removeAppointmentClaimList(claims, claimKey, values) {
|
|
13
|
-
return removeClaimValues(claims, claimKey, values);
|
|
14
|
-
}
|
|
15
|
-
export function getAppointmentIdentifier(claims) {
|
|
16
|
-
return normalizeClaimScalar(claims[AppointmentClaim.Identifier]);
|
|
17
|
-
}
|
|
18
|
-
export function setAppointmentIdentifier(claims, value) {
|
|
19
|
-
return { ...claims, [AppointmentClaim.Identifier]: normalizeClaimScalar(value) };
|
|
20
|
-
}
|
|
21
|
-
export function getAppointmentParticipantActorList(claims) {
|
|
22
|
-
return getAppointmentClaimList(claims, AppointmentClaim.ParticipantActor);
|
|
23
|
-
}
|
|
24
|
-
export function setAppointmentParticipantActorList(claims, values) {
|
|
25
|
-
return setAppointmentClaimList(claims, AppointmentClaim.ParticipantActor, values);
|
|
26
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type GenericInteroperableClaims } from './claim-list-helpers.js';
|
|
2
|
-
export type AppointmentResponseInteroperableClaims = GenericInteroperableClaims;
|
|
3
|
-
export declare function getAppointmentResponseClaimList(claims: AppointmentResponseInteroperableClaims, claimKey: string): string[];
|
|
4
|
-
export declare function setAppointmentResponseClaimList(claims: AppointmentResponseInteroperableClaims, claimKey: string, values: string | readonly string[]): AppointmentResponseInteroperableClaims;
|
|
5
|
-
export declare function addAppointmentResponseClaimList(claims: AppointmentResponseInteroperableClaims, claimKey: string, values: string | readonly string[]): AppointmentResponseInteroperableClaims;
|
|
6
|
-
export declare function removeAppointmentResponseClaimList(claims: AppointmentResponseInteroperableClaims, claimKey: string, values: string | readonly string[]): AppointmentResponseInteroperableClaims;
|
|
7
|
-
export declare function getAppointmentResponseIdentifier(claims: AppointmentResponseInteroperableClaims): string;
|
|
8
|
-
export declare function setAppointmentResponseIdentifier(claims: AppointmentResponseInteroperableClaims, value: string): AppointmentResponseInteroperableClaims;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AppointmentResponseClaim } from '../models/interoperable-claims/appointment-response-claims.js';
|
|
2
|
-
import { addClaimValues, getClaimValues, normalizeClaimScalar, removeClaimValues, setClaimValues, } from './claim-list-helpers.js';
|
|
3
|
-
export function getAppointmentResponseClaimList(claims, claimKey) {
|
|
4
|
-
return getClaimValues(claims, claimKey);
|
|
5
|
-
}
|
|
6
|
-
export function setAppointmentResponseClaimList(claims, claimKey, values) {
|
|
7
|
-
return setClaimValues(claims, claimKey, values);
|
|
8
|
-
}
|
|
9
|
-
export function addAppointmentResponseClaimList(claims, claimKey, values) {
|
|
10
|
-
return addClaimValues(claims, claimKey, values);
|
|
11
|
-
}
|
|
12
|
-
export function removeAppointmentResponseClaimList(claims, claimKey, values) {
|
|
13
|
-
return removeClaimValues(claims, claimKey, values);
|
|
14
|
-
}
|
|
15
|
-
export function getAppointmentResponseIdentifier(claims) {
|
|
16
|
-
return normalizeClaimScalar(claims[AppointmentResponseClaim.Identifier]);
|
|
17
|
-
}
|
|
18
|
-
export function setAppointmentResponseIdentifier(claims, value) {
|
|
19
|
-
return { ...claims, [AppointmentResponseClaim.Identifier]: normalizeClaimScalar(value) };
|
|
20
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type GenericInteroperableClaims = Record<string, unknown>;
|
|
2
|
-
export declare function splitClaimCsv(value: unknown): string[];
|
|
3
|
-
export declare function normalizeClaimTokens(values: readonly string[]): string[];
|
|
4
|
-
export declare function normalizeClaimInput(values: string | readonly string[]): string[];
|
|
5
|
-
export declare function normalizeClaimScalar(value: unknown): string;
|
|
6
|
-
/**
|
|
7
|
-
* Returns the tokenized values for a claims field stored as CSV.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getClaimValues(claims: GenericInteroperableClaims, claimKey: string): string[];
|
|
10
|
-
/**
|
|
11
|
-
* Replaces a claims CSV field with the provided values.
|
|
12
|
-
*/
|
|
13
|
-
export declare function setClaimValues(claims: GenericInteroperableClaims, claimKey: string, values: string | readonly string[]): GenericInteroperableClaims;
|
|
14
|
-
/**
|
|
15
|
-
* Adds one or many values into a claims CSV field while preserving uniqueness.
|
|
16
|
-
*/
|
|
17
|
-
export declare function addClaimValues(claims: GenericInteroperableClaims, claimKey: string, values: string | readonly string[]): GenericInteroperableClaims;
|
|
18
|
-
/**
|
|
19
|
-
* Removes one or many values from a claims CSV field while preserving uniqueness.
|
|
20
|
-
*/
|
|
21
|
-
export declare function removeClaimValues(claims: GenericInteroperableClaims, claimKey: string, values: string | readonly string[]): GenericInteroperableClaims;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
export function splitClaimCsv(value) {
|
|
3
|
-
return String(value || '')
|
|
4
|
-
.split(',')
|
|
5
|
-
.map((item) => item.trim())
|
|
6
|
-
.filter(Boolean);
|
|
7
|
-
}
|
|
8
|
-
export function normalizeClaimTokens(values) {
|
|
9
|
-
return [...new Set(values.map((value) => String(value || '').trim()).filter(Boolean))];
|
|
10
|
-
}
|
|
11
|
-
export function normalizeClaimInput(values) {
|
|
12
|
-
return Array.isArray(values)
|
|
13
|
-
? normalizeClaimTokens(values)
|
|
14
|
-
: normalizeClaimTokens(splitClaimCsv(values));
|
|
15
|
-
}
|
|
16
|
-
export function normalizeClaimScalar(value) {
|
|
17
|
-
return String(value || '').trim();
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Returns the tokenized values for a claims field stored as CSV.
|
|
21
|
-
*/
|
|
22
|
-
export function getClaimValues(claims, claimKey) {
|
|
23
|
-
return normalizeClaimTokens(splitClaimCsv(claims[claimKey]));
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Replaces a claims CSV field with the provided values.
|
|
27
|
-
*/
|
|
28
|
-
export function setClaimValues(claims, claimKey, values) {
|
|
29
|
-
const nextValues = normalizeClaimInput(values);
|
|
30
|
-
return {
|
|
31
|
-
...claims,
|
|
32
|
-
[claimKey]: nextValues.join(','),
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Adds one or many values into a claims CSV field while preserving uniqueness.
|
|
37
|
-
*/
|
|
38
|
-
export function addClaimValues(claims, claimKey, values) {
|
|
39
|
-
const current = getClaimValues(claims, claimKey);
|
|
40
|
-
const additions = normalizeClaimInput(values);
|
|
41
|
-
return setClaimValues(claims, claimKey, [...current, ...additions]);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Removes one or many values from a claims CSV field while preserving uniqueness.
|
|
45
|
-
*/
|
|
46
|
-
export function removeClaimValues(claims, claimKey, values) {
|
|
47
|
-
const removals = new Set(normalizeClaimInput(values));
|
|
48
|
-
const nextValues = getClaimValues(claims, claimKey).filter((value) => !removals.has(value));
|
|
49
|
-
return setClaimValues(claims, claimKey, nextValues);
|
|
50
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type GenericInteroperableClaims } from './claim-list-helpers.js';
|
|
2
|
-
export type ClinicalImpressionInteroperableClaims = GenericInteroperableClaims;
|
|
3
|
-
export declare function getClinicalImpressionClaimList(claims: ClinicalImpressionInteroperableClaims, claimKey: string): string[];
|
|
4
|
-
export declare function setClinicalImpressionClaimList(claims: ClinicalImpressionInteroperableClaims, claimKey: string, values: string | readonly string[]): ClinicalImpressionInteroperableClaims;
|
|
5
|
-
export declare function addClinicalImpressionClaimList(claims: ClinicalImpressionInteroperableClaims, claimKey: string, values: string | readonly string[]): ClinicalImpressionInteroperableClaims;
|
|
6
|
-
export declare function removeClinicalImpressionClaimList(claims: ClinicalImpressionInteroperableClaims, claimKey: string, values: string | readonly string[]): ClinicalImpressionInteroperableClaims;
|
|
7
|
-
export declare function getClinicalImpressionIdentifier(claims: ClinicalImpressionInteroperableClaims): string;
|
|
8
|
-
export declare function setClinicalImpressionIdentifier(claims: ClinicalImpressionInteroperableClaims, value: string): ClinicalImpressionInteroperableClaims;
|
|
9
|
-
export declare function getClinicalImpressionProblemList(claims: ClinicalImpressionInteroperableClaims): string[];
|
|
10
|
-
export declare function setClinicalImpressionProblemList(claims: ClinicalImpressionInteroperableClaims, values: string | readonly string[]): ClinicalImpressionInteroperableClaims;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ClinicalImpressionClaim } from '../models/interoperable-claims/clinical-impression-claims.js';
|
|
2
|
-
import { addClaimValues, getClaimValues, normalizeClaimScalar, removeClaimValues, setClaimValues, } from './claim-list-helpers.js';
|
|
3
|
-
export function getClinicalImpressionClaimList(claims, claimKey) {
|
|
4
|
-
return getClaimValues(claims, claimKey);
|
|
5
|
-
}
|
|
6
|
-
export function setClinicalImpressionClaimList(claims, claimKey, values) {
|
|
7
|
-
return setClaimValues(claims, claimKey, values);
|
|
8
|
-
}
|
|
9
|
-
export function addClinicalImpressionClaimList(claims, claimKey, values) {
|
|
10
|
-
return addClaimValues(claims, claimKey, values);
|
|
11
|
-
}
|
|
12
|
-
export function removeClinicalImpressionClaimList(claims, claimKey, values) {
|
|
13
|
-
return removeClaimValues(claims, claimKey, values);
|
|
14
|
-
}
|
|
15
|
-
export function getClinicalImpressionIdentifier(claims) {
|
|
16
|
-
return normalizeClaimScalar(claims[ClinicalImpressionClaim.Identifier]);
|
|
17
|
-
}
|
|
18
|
-
export function setClinicalImpressionIdentifier(claims, value) {
|
|
19
|
-
return { ...claims, [ClinicalImpressionClaim.Identifier]: normalizeClaimScalar(value) };
|
|
20
|
-
}
|
|
21
|
-
export function getClinicalImpressionProblemList(claims) {
|
|
22
|
-
return getClinicalImpressionClaimList(claims, ClinicalImpressionClaim.Problem);
|
|
23
|
-
}
|
|
24
|
-
export function setClinicalImpressionProblemList(claims, values) {
|
|
25
|
-
return setClinicalImpressionClaimList(claims, ClinicalImpressionClaim.Problem, values);
|
|
26
|
-
}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { BundleEntry, BundleJsonApi, BundleRequest } from '../models/bundle';
|
|
2
|
-
import { type BundleResourceIdFilters } from './bundle-query';
|
|
3
|
-
import { type MedicationStatementClaimsFlat } from '../models/interoperable-claims/medication-statement-claims';
|
|
4
|
-
export type CommunicationBundleSessionMode = 'strict' | 'normalize';
|
|
5
|
-
export type CommunicationBundleSessionOptions = Readonly<{
|
|
6
|
-
communicationClaims?: Record<string, unknown>;
|
|
7
|
-
initialBundle?: BundleJsonApi<BundleEntry>;
|
|
8
|
-
mode?: CommunicationBundleSessionMode;
|
|
9
|
-
}>;
|
|
10
|
-
export type ActiveEntrySelection = Readonly<{
|
|
11
|
-
index?: number;
|
|
12
|
-
fullUrl?: string;
|
|
13
|
-
}>;
|
|
14
|
-
export type UpsertEntryInput = Readonly<{
|
|
15
|
-
resourceType: string;
|
|
16
|
-
claims: Record<string, unknown>;
|
|
17
|
-
type?: string;
|
|
18
|
-
fullUrl?: string;
|
|
19
|
-
request?: BundleRequest;
|
|
20
|
-
}>;
|
|
21
|
-
export type AddContainedDocumentToActiveEntryInput = Readonly<{
|
|
22
|
-
identifier?: string;
|
|
23
|
-
fullUrl?: string;
|
|
24
|
-
claims?: Record<string, unknown>;
|
|
25
|
-
attachmentContentType?: string;
|
|
26
|
-
attachmentDataBase64?: string;
|
|
27
|
-
attachmentUrl?: string;
|
|
28
|
-
description?: string;
|
|
29
|
-
date?: string;
|
|
30
|
-
language?: string;
|
|
31
|
-
}>;
|
|
32
|
-
/**
|
|
33
|
-
* Communication editing session with bundle-in-memory as source of truth.
|
|
34
|
-
*
|
|
35
|
-
* Design contract:
|
|
36
|
-
* - `activeEntry` is the real editing unit (not only `activeResource`), because
|
|
37
|
-
* it can include `fullUrl`, `request`, and entry-level context.
|
|
38
|
-
* - `Communication.content-attachment-data` is always derived from the
|
|
39
|
-
* in-memory bundle after each committed update.
|
|
40
|
-
* - saving can release active entry memory via `saveAndReleaseActiveEntry()`.
|
|
41
|
-
*/
|
|
42
|
-
export declare class CommunicationBundleSession {
|
|
43
|
-
private communicationClaims;
|
|
44
|
-
private bundleInMemory;
|
|
45
|
-
private activeEntryIndex;
|
|
46
|
-
private mode;
|
|
47
|
-
constructor(options?: CommunicationBundleSessionOptions);
|
|
48
|
-
/** Returns a deep copy of communication claims. */
|
|
49
|
-
getCommunicationClaims(): Record<string, unknown>;
|
|
50
|
-
/** Returns a deep copy of the current in-memory bundle. */
|
|
51
|
-
getBundleInMemory(): BundleJsonApi<BundleEntry>;
|
|
52
|
-
/** Returns the active entry index, or null when no entry is selected. */
|
|
53
|
-
getActiveEntryIndex(): number | null;
|
|
54
|
-
/** Returns a deep copy of the active entry when selected. */
|
|
55
|
-
getActiveEntry(): BundleEntry | null;
|
|
56
|
-
/** Selects an active entry by index or fullUrl. */
|
|
57
|
-
selectActiveEntry(selection: ActiveEntrySelection): this;
|
|
58
|
-
/** Clears active entry selection from memory. */
|
|
59
|
-
clearActiveEntry(): this;
|
|
60
|
-
/**
|
|
61
|
-
* Upserts an entry in bundle memory and marks it as active.
|
|
62
|
-
* Matching priority: `fullUrl` if present, then resource claim identifier.
|
|
63
|
-
*/
|
|
64
|
-
upsertActiveEntry(input: UpsertEntryInput): this;
|
|
65
|
-
/**
|
|
66
|
-
* Consent-first helper for developer onboarding.
|
|
67
|
-
*
|
|
68
|
-
* Expected keys should come from `ClaimConsent` in caller code.
|
|
69
|
-
*/
|
|
70
|
-
upsertActiveConsentEntry(input: Readonly<{
|
|
71
|
-
claims: Record<string, unknown>;
|
|
72
|
-
fullUrl?: string;
|
|
73
|
-
type?: string;
|
|
74
|
-
request?: BundleRequest;
|
|
75
|
-
}>): this;
|
|
76
|
-
/**
|
|
77
|
-
* MedicationStatement helper for IPS-in-Communication use cases.
|
|
78
|
-
*
|
|
79
|
-
* Expected keys should come from MedicationStatement claims constants.
|
|
80
|
-
*/
|
|
81
|
-
upsertActiveMedicationStatementEntry(input: Readonly<{
|
|
82
|
-
claims: MedicationStatementClaimsFlat | Record<string, unknown>;
|
|
83
|
-
fullUrl?: string;
|
|
84
|
-
type?: string;
|
|
85
|
-
request?: BundleRequest;
|
|
86
|
-
}>): this;
|
|
87
|
-
/**
|
|
88
|
-
* DocumentReference helper for bundle-contained attachments linked from
|
|
89
|
-
* other clinical resources through `*.contained-documents`.
|
|
90
|
-
*/
|
|
91
|
-
upsertActiveDocumentReferenceEntry(input: Readonly<{
|
|
92
|
-
claims: Record<string, unknown>;
|
|
93
|
-
fullUrl?: string;
|
|
94
|
-
type?: string;
|
|
95
|
-
request?: BundleRequest;
|
|
96
|
-
}>): this;
|
|
97
|
-
/**
|
|
98
|
-
* Condition helper for IPS-in-Communication use cases.
|
|
99
|
-
*
|
|
100
|
-
* Expected keys should come from Condition claims constants.
|
|
101
|
-
*/
|
|
102
|
-
upsertActiveConditionEntry(input: Readonly<{
|
|
103
|
-
claims: Record<string, unknown>;
|
|
104
|
-
fullUrl?: string;
|
|
105
|
-
type?: string;
|
|
106
|
-
request?: BundleRequest;
|
|
107
|
-
}>): this;
|
|
108
|
-
/**
|
|
109
|
-
* AllergyIntolerance helper for IPS-in-Communication use cases.
|
|
110
|
-
*
|
|
111
|
-
* Expected keys should come from AllergyIntolerance claims constants.
|
|
112
|
-
*/
|
|
113
|
-
upsertActiveAllergyIntoleranceEntry(input: Readonly<{
|
|
114
|
-
claims: Record<string, unknown>;
|
|
115
|
-
fullUrl?: string;
|
|
116
|
-
type?: string;
|
|
117
|
-
request?: BundleRequest;
|
|
118
|
-
}>): this;
|
|
119
|
-
/**
|
|
120
|
-
* TODO(ips-next):
|
|
121
|
-
* Add `upsertActiveDiagnosticReportEntry(...)` once the shared claim helpers
|
|
122
|
-
* for `DiagnosticReport` are in place.
|
|
123
|
-
*
|
|
124
|
-
* Expected shape should mirror the existing resource helpers:
|
|
125
|
-
* - `claims` authored with `@context = org.hl7.fhir.api`
|
|
126
|
-
* - matching priority by `DiagnosticReport.identifier`
|
|
127
|
-
* - support for linked `DocumentReference` ids through
|
|
128
|
-
* `DiagnosticReport.contained-documents`
|
|
129
|
-
*
|
|
130
|
-
* Intentionally not implemented in this pass:
|
|
131
|
-
* - IPS authoring already works for the currently documented resources
|
|
132
|
-
* - GW Core can already consume bundle-contained `DocumentReference` rows
|
|
133
|
-
* - adding the DiagnosticReport editing surface now would expand the IPS
|
|
134
|
-
* contract further than intended for this release slice
|
|
135
|
-
*/
|
|
136
|
-
/**
|
|
137
|
-
* Creates or updates a linked `DocumentReference` entry and stores its
|
|
138
|
-
* identifier under the active resource `*.contained-documents` claim.
|
|
139
|
-
*/
|
|
140
|
-
addContainedDocumentToActiveEntry(input: AddContainedDocumentToActiveEntryInput): this;
|
|
141
|
-
/**
|
|
142
|
-
* Patches active entry `resource.meta.claims` and synchronizes attachment data.
|
|
143
|
-
*/
|
|
144
|
-
patchActiveEntryClaims(claimPatch: Record<string, unknown>): this;
|
|
145
|
-
/**
|
|
146
|
-
* Persists current memory state into communication claims attachment.
|
|
147
|
-
* No-op for active entry pointer.
|
|
148
|
-
*/
|
|
149
|
-
saveActiveEntry(): this;
|
|
150
|
-
/**
|
|
151
|
-
* Persists and releases active entry memory pointer.
|
|
152
|
-
* This is the recommended step after a successful save operation.
|
|
153
|
-
*/
|
|
154
|
-
saveAndReleaseActiveEntry(): this;
|
|
155
|
-
/**
|
|
156
|
-
* Returns stable resource IDs from bundle entries with optional filters.
|
|
157
|
-
*/
|
|
158
|
-
getResourceIds(filters?: BundleResourceIdFilters): string[];
|
|
159
|
-
/**
|
|
160
|
-
* Returns bundle entries matching resource IDs produced by `getResourceIds`.
|
|
161
|
-
*/
|
|
162
|
-
getResourceEntriesByIds(resourceIds: readonly string[]): BundleEntry[];
|
|
163
|
-
/**
|
|
164
|
-
* Resolves the entry URL (`fullUrl`) for a given entry/resource identifier.
|
|
165
|
-
*/
|
|
166
|
-
getEntryUrl(entryId: string): string | undefined;
|
|
167
|
-
private decodeBundleFromClaims;
|
|
168
|
-
private syncAttachmentFromBundle;
|
|
169
|
-
private resolveCurrentSubject;
|
|
170
|
-
private findUpsertIndex;
|
|
171
|
-
private resolveEntryIdentifier;
|
|
172
|
-
private createBundleEntry;
|
|
173
|
-
private resolveEntryCanonicalIdValue;
|
|
174
|
-
private assertEntryIndex;
|
|
175
|
-
}
|