gdc-common-utils-ts 2.0.7 → 2.0.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/dist/constants/clinical-statuses.d.ts +19 -0
- package/dist/constants/clinical-statuses.js +19 -0
- package/dist/convert/convert-immunization.js +15 -1
- package/dist/convert/convert-procedure.js +15 -1
- package/dist/examples/organization-controller.d.ts +20 -1
- package/dist/examples/organization-controller.js +10 -1
- package/dist/examples/shared.d.ts +129 -0
- package/dist/examples/shared.js +129 -0
- package/dist/models/interoperable-claims/immunization-claims.d.ts +2 -0
- package/dist/models/interoperable-claims/immunization-claims.js +4 -0
- package/dist/models/interoperable-claims/observation-claims.d.ts +5 -0
- package/dist/models/interoperable-claims/observation-claims.js +5 -0
- package/dist/models/interoperable-claims/procedure-claims.d.ts +2 -0
- package/dist/models/interoperable-claims/procedure-claims.js +4 -0
- package/dist/utils/bundle-editor.d.ts +456 -1
- package/dist/utils/bundle-editor.js +851 -4
- package/dist/utils/communication-attached-bundle-session.d.ts +12 -0
- package/dist/utils/communication-attached-bundle-session.js +24 -0
- package/package.json +1 -1
|
@@ -142,20 +142,32 @@ export declare class CommunicationAttachedBundleSession {
|
|
|
142
142
|
getBundleInMemory(): BundleJsonApi<BundleEntry>;
|
|
143
143
|
/** Returns the active entry index, or null when no entry is selected. */
|
|
144
144
|
getActiveEntryIndex(): number | null;
|
|
145
|
+
/** Alias of `getActiveEntryIndex()` with entry-selection wording. */
|
|
146
|
+
getSelectedEntryIndex(): number | null;
|
|
145
147
|
/** Returns a deep copy of the active entry when selected. */
|
|
146
148
|
getActiveEntry(): BundleEntry | null;
|
|
149
|
+
/** Alias of `getActiveEntry()` with entry-selection wording. */
|
|
150
|
+
getSelectedEntry(): BundleEntry | null;
|
|
147
151
|
/** Returns one claim from the currently selected active entry. */
|
|
148
152
|
getActiveEntryClaim(key: string): unknown;
|
|
153
|
+
/** Alias of `getActiveEntryClaim()` with entry-selection wording. */
|
|
154
|
+
getSelectedEntryClaim(key: string): unknown;
|
|
149
155
|
/** Returns whether the currently selected active entry carries one claim key. */
|
|
150
156
|
hasActiveEntryClaim(key: string): boolean;
|
|
157
|
+
/** Alias of `hasActiveEntryClaim()` with entry-selection wording. */
|
|
158
|
+
hasSelectedEntryClaim(key: string): boolean;
|
|
151
159
|
/** Sets one claim on the currently selected active entry and syncs the bundle attachment. */
|
|
152
160
|
setActiveEntryClaim(key: string, value: unknown): this;
|
|
161
|
+
/** Alias of `setActiveEntryClaim()` with entry-selection wording. */
|
|
162
|
+
setSelectedEntryClaim(key: string, value: unknown): this;
|
|
153
163
|
/** Appends one claim value on the currently selected active entry and syncs the bundle attachment. */
|
|
154
164
|
addActiveEntryClaim(key: string, value: unknown): this;
|
|
155
165
|
/** Removes one claim from the currently selected active entry and syncs the bundle attachment. */
|
|
156
166
|
removeActiveEntryClaim(key: string): this;
|
|
157
167
|
/** Selects an active entry by index or fullUrl. */
|
|
158
168
|
selectActiveEntry(selection: ActiveEntrySelection): this;
|
|
169
|
+
/** Alias of `selectActiveEntry()` with entry-selection wording. */
|
|
170
|
+
selectEntry(selection: ActiveEntrySelection): this;
|
|
159
171
|
/** Clears active entry selection from memory. */
|
|
160
172
|
clearActiveEntry(): this;
|
|
161
173
|
/**
|
|
@@ -64,6 +64,10 @@ export class CommunicationAttachedBundleSession {
|
|
|
64
64
|
getActiveEntryIndex() {
|
|
65
65
|
return this.activeEntryIndex;
|
|
66
66
|
}
|
|
67
|
+
/** Alias of `getActiveEntryIndex()` with entry-selection wording. */
|
|
68
|
+
getSelectedEntryIndex() {
|
|
69
|
+
return this.getActiveEntryIndex();
|
|
70
|
+
}
|
|
67
71
|
/** Returns a deep copy of the active entry when selected. */
|
|
68
72
|
getActiveEntry() {
|
|
69
73
|
if (this.activeEntryIndex === null) {
|
|
@@ -71,16 +75,28 @@ export class CommunicationAttachedBundleSession {
|
|
|
71
75
|
}
|
|
72
76
|
return cloneEntry(this.bundleInMemory.data[this.activeEntryIndex]);
|
|
73
77
|
}
|
|
78
|
+
/** Alias of `getActiveEntry()` with entry-selection wording. */
|
|
79
|
+
getSelectedEntry() {
|
|
80
|
+
return this.getActiveEntry();
|
|
81
|
+
}
|
|
74
82
|
/** Returns one claim from the currently selected active entry. */
|
|
75
83
|
getActiveEntryClaim(key) {
|
|
76
84
|
const claims = this.getRequiredActiveEntryClaims();
|
|
77
85
|
return cloneUnknownValue(claims[key]);
|
|
78
86
|
}
|
|
87
|
+
/** Alias of `getActiveEntryClaim()` with entry-selection wording. */
|
|
88
|
+
getSelectedEntryClaim(key) {
|
|
89
|
+
return this.getActiveEntryClaim(key);
|
|
90
|
+
}
|
|
79
91
|
/** Returns whether the currently selected active entry carries one claim key. */
|
|
80
92
|
hasActiveEntryClaim(key) {
|
|
81
93
|
const claims = this.getRequiredActiveEntryClaims();
|
|
82
94
|
return Object.prototype.hasOwnProperty.call(claims, key);
|
|
83
95
|
}
|
|
96
|
+
/** Alias of `hasActiveEntryClaim()` with entry-selection wording. */
|
|
97
|
+
hasSelectedEntryClaim(key) {
|
|
98
|
+
return this.hasActiveEntryClaim(key);
|
|
99
|
+
}
|
|
84
100
|
/** Sets one claim on the currently selected active entry and syncs the bundle attachment. */
|
|
85
101
|
setActiveEntryClaim(key, value) {
|
|
86
102
|
const current = cloneEntry(this.getRequiredActiveEntry());
|
|
@@ -95,6 +111,10 @@ export class CommunicationAttachedBundleSession {
|
|
|
95
111
|
this.syncAttachmentFromBundle();
|
|
96
112
|
return this;
|
|
97
113
|
}
|
|
114
|
+
/** Alias of `setActiveEntryClaim()` with entry-selection wording. */
|
|
115
|
+
setSelectedEntryClaim(key, value) {
|
|
116
|
+
return this.setActiveEntryClaim(key, value);
|
|
117
|
+
}
|
|
98
118
|
/** Appends one claim value on the currently selected active entry and syncs the bundle attachment. */
|
|
99
119
|
addActiveEntryClaim(key, value) {
|
|
100
120
|
const current = cloneEntry(this.getRequiredActiveEntry());
|
|
@@ -152,6 +172,10 @@ export class CommunicationAttachedBundleSession {
|
|
|
152
172
|
}
|
|
153
173
|
throw new Error('selectActiveEntry requires either index or fullUrl.');
|
|
154
174
|
}
|
|
175
|
+
/** Alias of `selectActiveEntry()` with entry-selection wording. */
|
|
176
|
+
selectEntry(selection) {
|
|
177
|
+
return this.selectActiveEntry(selection);
|
|
178
|
+
}
|
|
155
179
|
/** Clears active entry selection from memory. */
|
|
156
180
|
clearActiveEntry() {
|
|
157
181
|
this.activeEntryIndex = null;
|