gdc-common-utils-ts 2.0.18 → 2.2.2

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.
Files changed (185) hide show
  1. package/README.md +18 -1
  2. package/dist/claims/claims-helpers-allergy-intolerance.d.ts +8 -0
  3. package/dist/claims/claims-helpers-allergy-intolerance.js +30 -12
  4. package/dist/claims/claims-helpers-condition.d.ts +8 -0
  5. package/dist/claims/claims-helpers-condition.js +30 -12
  6. package/dist/claims/claims-helpers-consent.d.ts +4 -0
  7. package/dist/claims/claims-helpers-consent.js +15 -1
  8. package/dist/claims/claims-helpers-diagnostic-report.d.ts +4 -0
  9. package/dist/claims/claims-helpers-diagnostic-report.js +17 -2
  10. package/dist/claims/claims-helpers-medication-statement.d.ts +10 -2
  11. package/dist/claims/claims-helpers-medication-statement.js +32 -14
  12. package/dist/constants/didcomm.d.ts +22 -0
  13. package/dist/constants/didcomm.js +22 -0
  14. package/dist/constants/fhir-resource-types.d.ts +2 -0
  15. package/dist/constants/fhir-resource-types.js +1 -0
  16. package/dist/constants/index.d.ts +1 -0
  17. package/dist/constants/index.js +1 -0
  18. package/dist/constants/lifecycle.d.ts +2 -0
  19. package/dist/constants/lifecycle.js +2 -0
  20. package/dist/constants/verifiable-credentials.d.ts +9 -0
  21. package/dist/constants/verifiable-credentials.js +9 -0
  22. package/dist/examples/bundle-didcomm-payload.d.ts +11 -0
  23. package/dist/examples/bundle-didcomm-payload.js +15 -0
  24. package/dist/examples/communication-attached-bundle-session.js +28 -27
  25. package/dist/examples/communication-didcomm-payload.d.ts +39 -0
  26. package/dist/examples/communication-didcomm-payload.js +44 -0
  27. package/dist/examples/consent-access.js +2 -1
  28. package/dist/examples/employee.d.ts +21 -0
  29. package/dist/examples/employee.js +21 -0
  30. package/dist/examples/index.d.ts +4 -0
  31. package/dist/examples/index.js +4 -0
  32. package/dist/examples/individual-controller.d.ts +27 -0
  33. package/dist/examples/individual-controller.js +28 -1
  34. package/dist/examples/inter-tenant-access-contract.js +3 -2
  35. package/dist/examples/ips-bundle.js +17 -16
  36. package/dist/examples/lifecycle.js +13 -11
  37. package/dist/examples/profile-manager-mem.d.ts +45 -0
  38. package/dist/examples/profile-manager-mem.js +30 -0
  39. package/dist/examples/related-person.d.ts +14 -0
  40. package/dist/examples/related-person.js +18 -4
  41. package/dist/examples/shared.d.ts +13 -3
  42. package/dist/examples/shared.js +14 -4
  43. package/dist/examples/vital-signs.js +1 -1
  44. package/dist/examples/wallet-mem.d.ts +38 -0
  45. package/dist/examples/wallet-mem.js +42 -0
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.js +1 -0
  48. package/dist/interfaces/IProfileOutboxRepository.d.ts +36 -0
  49. package/dist/interfaces/IProfileOutboxRepository.js +2 -0
  50. package/dist/interfaces/IWallet.d.ts +74 -0
  51. package/dist/interfaces/IWallet.js +2 -0
  52. package/dist/interfaces/IWalletQueue.d.ts +30 -0
  53. package/dist/interfaces/IWalletQueue.js +2 -0
  54. package/dist/interfaces/index.d.ts +8 -0
  55. package/dist/interfaces/index.js +8 -0
  56. package/dist/models/authority-resolution.d.ts +56 -0
  57. package/dist/models/authority-resolution.js +2 -0
  58. package/dist/models/bundle-editor-types.d.ts +89 -0
  59. package/dist/models/bundle-editor-types.js +45 -0
  60. package/dist/models/bundle.d.ts +5 -0
  61. package/dist/models/communication-attached-bundle-session.d.ts +195 -0
  62. package/dist/models/communication-attached-bundle-session.js +36 -0
  63. package/dist/models/confidential-storage.d.ts +2 -1
  64. package/dist/models/consent-rule.d.ts +11 -1
  65. package/dist/models/consent-rule.js +9 -1
  66. package/dist/models/index.d.ts +5 -0
  67. package/dist/models/index.js +5 -0
  68. package/dist/models/individual-onboarding.d.ts +18 -0
  69. package/dist/models/interoperable-claims/allergy-intolerance-claims.d.ts +12 -1
  70. package/dist/models/interoperable-claims/allergy-intolerance-claims.js +12 -1
  71. package/dist/models/interoperable-claims/condition-claims.d.ts +12 -1
  72. package/dist/models/interoperable-claims/condition-claims.js +12 -1
  73. package/dist/models/interoperable-claims/diagnostic-report-claims.d.ts +14 -4
  74. package/dist/models/interoperable-claims/diagnostic-report-claims.js +13 -3
  75. package/dist/models/interoperable-claims/document-reference-claims.d.ts +1 -0
  76. package/dist/models/interoperable-claims/document-reference-claims.js +3 -0
  77. package/dist/models/interoperable-claims/medication-statement-claims.d.ts +17 -0
  78. package/dist/models/interoperable-claims/medication-statement-claims.js +17 -0
  79. package/dist/models/profile-manager.d.ts +85 -0
  80. package/dist/models/profile-manager.js +2 -0
  81. package/dist/models/wallet.d.ts +59 -0
  82. package/dist/models/wallet.js +22 -0
  83. package/dist/utils/allergy-intolerance-entry-editor.d.ts +51 -0
  84. package/dist/utils/allergy-intolerance-entry-editor.js +55 -0
  85. package/dist/utils/authority-resolution.d.ts +37 -0
  86. package/dist/utils/authority-resolution.js +112 -0
  87. package/dist/utils/backend-message-manager-mem.d.ts +78 -0
  88. package/dist/utils/backend-message-manager-mem.js +238 -0
  89. package/dist/utils/bundle-didcomm-payload.d.ts +29 -0
  90. package/dist/utils/bundle-didcomm-payload.js +49 -0
  91. package/dist/utils/bundle-document-builder.d.ts +1 -0
  92. package/dist/utils/bundle-document-builder.js +134 -14
  93. package/dist/utils/bundle-editor-core.d.ts +181 -0
  94. package/dist/utils/bundle-editor-core.js +467 -0
  95. package/dist/utils/bundle-editor-helpers.d.ts +53 -0
  96. package/dist/utils/bundle-editor-helpers.js +146 -0
  97. package/dist/utils/bundle-editor-registry.d.ts +6 -0
  98. package/dist/utils/bundle-editor-registry.js +14 -0
  99. package/dist/utils/bundle-editor.d.ts +21 -722
  100. package/dist/utils/bundle-editor.js +21 -1601
  101. package/dist/utils/bundle-entry-editor.d.ts +96 -0
  102. package/dist/utils/bundle-entry-editor.js +305 -0
  103. package/dist/utils/bundle-query.d.ts +1 -0
  104. package/dist/utils/bundle-query.js +12 -3
  105. package/dist/utils/bundle-reader.d.ts +48 -0
  106. package/dist/utils/bundle-reader.js +175 -1
  107. package/dist/utils/care-plan-entry-editor.d.ts +43 -0
  108. package/dist/utils/care-plan-entry-editor.js +47 -0
  109. package/dist/utils/client-assertion.d.ts +38 -0
  110. package/dist/utils/client-assertion.js +113 -0
  111. package/dist/utils/clinical-impression-entry-editor.d.ts +43 -0
  112. package/dist/utils/clinical-impression-entry-editor.js +47 -0
  113. package/dist/utils/clinical-resource-entry-editor.d.ts +123 -0
  114. package/dist/utils/clinical-resource-entry-editor.js +296 -0
  115. package/dist/utils/communication-attached-bundle-session-helpers.d.ts +54 -0
  116. package/dist/utils/communication-attached-bundle-session-helpers.js +519 -0
  117. package/dist/utils/communication-attached-bundle-session.d.ts +87 -304
  118. package/dist/utils/communication-attached-bundle-session.js +175 -841
  119. package/dist/utils/communication-consent-access-editor.d.ts +85 -0
  120. package/dist/utils/communication-consent-access-editor.js +244 -0
  121. package/dist/utils/communication-didcomm-payload.d.ts +38 -0
  122. package/dist/utils/communication-didcomm-payload.js +85 -0
  123. package/dist/utils/communication-document-reference.d.ts +23 -0
  124. package/dist/utils/communication-document-reference.js +89 -0
  125. package/dist/utils/communication-editor.d.ts +53 -0
  126. package/dist/utils/communication-editor.js +97 -0
  127. package/dist/utils/condition-entry-editor.d.ts +30 -0
  128. package/dist/utils/condition-entry-editor.js +34 -0
  129. package/dist/utils/consent-claim-helpers.d.ts +4 -0
  130. package/dist/utils/consent-claim-helpers.js +15 -1
  131. package/dist/utils/coverage-entry-editor.d.ts +51 -0
  132. package/dist/utils/coverage-entry-editor.js +55 -0
  133. package/dist/utils/device-entry-editor.d.ts +59 -0
  134. package/dist/utils/device-entry-editor.js +63 -0
  135. package/dist/utils/device-use-statement-entry-editor.d.ts +43 -0
  136. package/dist/utils/device-use-statement-entry-editor.js +47 -0
  137. package/dist/utils/diagnostic-report-entry-editor.d.ts +74 -0
  138. package/dist/utils/diagnostic-report-entry-editor.js +136 -0
  139. package/dist/utils/did.d.ts +8 -0
  140. package/dist/utils/did.js +22 -0
  141. package/dist/utils/document-reference-entry-editor.d.ts +62 -0
  142. package/dist/utils/document-reference-entry-editor.js +66 -0
  143. package/dist/utils/employee-entry-editor.d.ts +36 -0
  144. package/dist/utils/employee-entry-editor.js +88 -0
  145. package/dist/utils/employee.d.ts +1 -0
  146. package/dist/utils/employee.js +2 -1
  147. package/dist/utils/encounter-entry-editor.d.ts +51 -0
  148. package/dist/utils/encounter-entry-editor.js +55 -0
  149. package/dist/utils/flag-entry-editor.d.ts +47 -0
  150. package/dist/utils/flag-entry-editor.js +51 -0
  151. package/dist/utils/immunization-entry-editor.d.ts +87 -0
  152. package/dist/utils/immunization-entry-editor.js +169 -0
  153. package/dist/utils/index.d.ts +15 -0
  154. package/dist/utils/index.js +15 -0
  155. package/dist/utils/individual-onboarding-acceptance-credential.d.ts +35 -0
  156. package/dist/utils/individual-onboarding-acceptance-credential.js +55 -0
  157. package/dist/utils/individual-smart.d.ts +59 -0
  158. package/dist/utils/individual-smart.js +135 -0
  159. package/dist/utils/medication-statement-entry-editor.d.ts +90 -0
  160. package/dist/utils/medication-statement-entry-editor.js +94 -0
  161. package/dist/utils/observation-component-entry-editor.d.ts +57 -0
  162. package/dist/utils/observation-component-entry-editor.js +105 -0
  163. package/dist/utils/observation-entry-editor.d.ts +29 -0
  164. package/dist/utils/observation-entry-editor.js +68 -0
  165. package/dist/utils/procedure-entry-editor.d.ts +71 -0
  166. package/dist/utils/procedure-entry-editor.js +75 -0
  167. package/dist/utils/professional-smart.d.ts +87 -0
  168. package/dist/utils/professional-smart.js +118 -4
  169. package/dist/utils/profile-manager-mem.d.ts +69 -0
  170. package/dist/utils/profile-manager-mem.js +79 -0
  171. package/dist/utils/profile-outbox-memory-repository.d.ts +34 -0
  172. package/dist/utils/profile-outbox-memory-repository.js +57 -0
  173. package/dist/utils/same-as.d.ts +40 -0
  174. package/dist/utils/same-as.js +72 -0
  175. package/dist/utils/unified-health-id.d.ts +51 -0
  176. package/dist/utils/unified-health-id.js +92 -0
  177. package/dist/utils/vital-sign-day-batch.d.ts +25 -0
  178. package/dist/utils/vital-sign-day-batch.js +115 -0
  179. package/dist/utils/vital-sign-entry-editor.d.ts +61 -0
  180. package/dist/utils/vital-sign-entry-editor.js +152 -0
  181. package/dist/utils/wallet-mem.d.ts +93 -0
  182. package/dist/utils/wallet-mem.js +277 -0
  183. package/dist/utils/wallet-memory-queue.d.ts +32 -0
  184. package/dist/utils/wallet-memory-queue.js +82 -0
  185. package/package.json +2 -1
@@ -1,123 +1,9 @@
1
- import { type HealthcareCanonicalSectionFamily, type HealthcareActorRoleDescriptor, type HealthcareRoleFamily, type HealthcareSectionDescriptor } from '../constants/healthcare';
2
- import { type DataspaceSector } from '../constants/sectors';
3
- import { BundleEntry, BundleJsonApi, BundleRequest } from '../models/bundle';
1
+ import { BundleEntry, BundleJsonApi } from '../models/bundle';
2
+ import { type ActiveEntrySelection, type AddContainedDocumentToActiveEntryInput, type CommunicationAttachedBundleSessionOptions, type UpsertClaimsResourceEntryInput, type UpsertEntryInput } from '../models/communication-attached-bundle-session';
4
3
  import { type BundleResourceIdFilters } from './bundle-query';
5
- import { type ConsentDuplicateRuleConflict } from './consent-duplicate-rules.js';
6
- import { type MedicationStatementClaimsFlat } from '../models/interoperable-claims/medication-statement-claims';
7
- export type CommunicationAttachedBundleSessionMode = 'strict' | 'normalize';
8
- export type CommunicationAttachedBundleSessionOptions = Readonly<{
9
- communicationClaims?: Record<string, unknown>;
10
- initialBundle?: BundleJsonApi<BundleEntry>;
11
- mode?: CommunicationAttachedBundleSessionMode;
12
- }>;
13
- export type ActiveEntrySelection = Readonly<{
14
- index?: number;
15
- fullUrl?: string;
16
- }>;
17
- export type UpsertEntryInput = Readonly<{
18
- resourceType: string;
19
- claims: Record<string, unknown>;
20
- type?: string;
21
- fullUrl?: string;
22
- request?: BundleRequest;
23
- }>;
24
- export type AddContainedDocumentToActiveEntryInput = Readonly<{
25
- identifier?: string;
26
- fullUrl?: string;
27
- claims?: Record<string, unknown>;
28
- attachmentContentType?: string;
29
- attachmentDataBase64?: string;
30
- attachmentUrl?: string;
31
- description?: string;
32
- date?: string;
33
- language?: string;
34
- }>;
35
- export declare const ConsentEditorTargetKinds: Readonly<{
36
- readonly Section: "section";
37
- readonly ResourceType: "resource-type";
38
- }>;
39
- export type ConsentEditorTargetKind = typeof ConsentEditorTargetKinds[keyof typeof ConsentEditorTargetKinds];
40
- export declare const ConsentEditorScopeCodes: Readonly<{
41
- readonly Search: "s";
42
- readonly Read: "r";
43
- readonly Create: "c";
44
- readonly Update: "u";
45
- readonly Delete: "d";
46
- }>;
47
- export type ConsentEditorScopeCode = typeof ConsentEditorScopeCodes[keyof typeof ConsentEditorScopeCodes];
48
- export type ConsentEditorClassifiedScope = Readonly<{
49
- code: ConsentEditorScopeCode;
50
- display?: string;
51
- }>;
52
- export type ConsentEditorClassifiedTarget = Readonly<{
53
- target: Readonly<{
54
- kind: ConsentEditorTargetKind;
55
- code: string;
56
- display?: string;
57
- sectionFamily?: HealthcareCanonicalSectionFamily;
58
- }>;
59
- scopes: readonly ConsentEditorClassifiedScope[];
60
- }>;
61
- export type ConsentEditorClassifiedActorRole = Readonly<{
62
- codingSystem: string;
63
- code: string;
64
- display?: string;
65
- }>;
66
- export type ConsentEditorClassifiedRole = Readonly<{
67
- family?: HealthcareRoleFamily;
68
- codingSystem: string;
69
- code: string;
70
- display?: string;
71
- definition?: string;
72
- }>;
73
- export type ConsentEditorClassifiedRoles = Readonly<{
74
- professional: readonly ConsentEditorClassifiedRole[];
75
- relationship: readonly ConsentEditorClassifiedRole[];
76
- legalRepresentative: readonly ConsentEditorClassifiedRole[];
77
- other: readonly ConsentEditorClassifiedRole[];
78
- }>;
79
- export type ConsentEditorClassifiedDepartment = Readonly<{
80
- code: string;
81
- display?: string;
82
- }>;
83
- export type ConsentEditorClassifiedLocation = Readonly<{
84
- code: string;
85
- display?: string;
86
- }>;
87
- export type ConsentEditorClassifiedOrganization = Readonly<{
88
- domain: string;
89
- display?: string;
90
- departments: readonly ConsentEditorClassifiedDepartment[];
91
- locations: readonly ConsentEditorClassifiedLocation[];
92
- }>;
93
- export type ConsentEditorClassifiedJurisdiction = Readonly<{
94
- code: string;
95
- display?: string;
96
- }>;
97
- export type ConsentEditorClassifiedUser = Readonly<{
98
- email?: string;
99
- phone?: string;
100
- role?: ConsentEditorClassifiedActorRole;
101
- }>;
102
- export type ConsentEditorClassifiedActors = Readonly<{
103
- jurisdictions: readonly ConsentEditorClassifiedJurisdiction[];
104
- organizations: readonly ConsentEditorClassifiedOrganization[];
105
- users: readonly ConsentEditorClassifiedUser[];
106
- }>;
107
- export type ConsentEditorClassifiedPurpose = Readonly<{
108
- code: string;
109
- display?: string;
110
- }>;
111
- export type ConsentViewModel = Readonly<{
112
- fullUrl?: string;
113
- identifier: string;
114
- subject: string;
115
- decision: string;
116
- classifiedActors: ConsentEditorClassifiedActors;
117
- classifiedRoles: ConsentEditorClassifiedRoles;
118
- classifiedPurposes: readonly ConsentEditorClassifiedPurpose[];
119
- classifiedTargets: readonly ConsentEditorClassifiedTarget[];
120
- }>;
4
+ import type { MedicationStatementClaimsFlat } from '../models/interoperable-claims/medication-statement-claims';
5
+ export { BundleEntryClaimsContext, CommunicationClaimsContext, CommunicationAttachmentClaimsContext, ConsentEditorScopeCodes, ConsentEditorTargetKinds, } from '../models/communication-attached-bundle-session';
6
+ export type { ActiveEntrySelection, AddContainedDocumentToActiveEntryInput, CommunicationAttachedBundleSessionMode, CommunicationAttachedBundleSessionOptions, ConsentEditorClassifiedActors, ConsentEditorClassifiedPurpose, ConsentEditorClassifiedRole, ConsentEditorClassifiedRoles, ConsentEditorClassifiedTarget, ConsentEditorScopeCode, ConsentEditorTargetKind, ConsentViewModel, UpsertClaimsResourceEntryInput, UpsertEntryInput, } from '../models/communication-attached-bundle-session';
121
7
  /**
122
8
  * Communication editing session with bundle-in-memory as source of truth.
123
9
  *
@@ -138,12 +24,40 @@ export declare class CommunicationAttachedBundleSession {
138
24
  constructor(options?: CommunicationAttachedBundleSessionOptions);
139
25
  /** Returns a deep copy of communication claims. */
140
26
  getCommunicationClaims(): Record<string, unknown>;
27
+ /** Returns the canonical outer Communication identifier. */
28
+ getCommunicationIdentifier(): string;
29
+ /** Sets the canonical outer Communication identifier. */
30
+ setCommunicationIdentifier(value: unknown): this;
31
+ /** Returns the canonical outer Communication subject. */
32
+ getCommunicationSubject(): string;
33
+ /** Sets the canonical outer Communication subject. */
34
+ setCommunicationSubject(value: unknown): this;
35
+ /** Returns the canonical outer Communication categories. */
36
+ getCommunicationCategoryList(): string[];
37
+ /** Replaces the canonical outer Communication categories. */
38
+ setCommunicationCategory(value: string | readonly string[]): this;
39
+ /** Returns the canonical outer Communication topic. */
40
+ getCommunicationTopic(): string;
41
+ /** Sets the canonical outer Communication topic. */
42
+ setCommunicationTopic(value: unknown): this;
43
+ /** Returns the canonical outer Communication text. */
44
+ getCommunicationText(): string;
45
+ /** Sets the canonical outer Communication text. */
46
+ setCommunicationText(value: unknown): this;
141
47
  /** Returns a deep copy of the current in-memory bundle. */
142
48
  getBundleInMemory(): BundleJsonApi<BundleEntry>;
49
+ /** Replaces the attached clinical bundle and resyncs the outer Communication attachment. */
50
+ setAttachedBundle(bundle: BundleJsonApi<BundleEntry>): this;
51
+ /** Alias of `getBundleInMemory()` with communication wording. */
52
+ getAttachedBundle(): BundleJsonApi<BundleEntry>;
143
53
  /** Returns the active entry index, or null when no entry is selected. */
144
54
  getActiveEntryIndex(): number | null;
55
+ /** Returns the active entry position, or null when no entry is selected. */
56
+ getActiveEntryPosition(): number | null;
145
57
  /** Alias of `getActiveEntryIndex()` with entry-selection wording. */
146
58
  getSelectedEntryIndex(): number | null;
59
+ /** Alias of `getActiveEntryPosition()` with entry-selection wording. */
60
+ getSelectedEntryPosition(): number | null;
147
61
  /** Returns a deep copy of the active entry when selected. */
148
62
  getActiveEntry(): BundleEntry | null;
149
63
  /** Alias of `getActiveEntry()` with entry-selection wording. */
@@ -164,7 +78,7 @@ export declare class CommunicationAttachedBundleSession {
164
78
  addActiveEntryClaim(key: string, value: unknown): this;
165
79
  /** Removes one claim from the currently selected active entry and syncs the bundle attachment. */
166
80
  removeActiveEntryClaim(key: string): this;
167
- /** Selects an active entry by index or fullUrl. */
81
+ /** Selects an active entry by position or fullUrl. */
168
82
  selectActiveEntry(selection: ActiveEntrySelection): this;
169
83
  /** Alias of `selectActiveEntry()` with entry-selection wording. */
170
84
  selectEntry(selection: ActiveEntrySelection): this;
@@ -175,91 +89,89 @@ export declare class CommunicationAttachedBundleSession {
175
89
  * Matching priority: `fullUrl` if present, then resource claim identifier.
176
90
  */
177
91
  upsertActiveEntry(input: UpsertEntryInput): this;
92
+ /**
93
+ * Reusable resource-typed wrapper around `upsertActiveEntry(...)`.
94
+ *
95
+ * Resource-specific helpers should delegate here instead of re-embedding the
96
+ * same `resourceType/fullUrl/type/request/claims` plumbing.
97
+ */
98
+ private upsertActiveClaimsResourceEntry;
178
99
  /**
179
100
  * Consent-first helper for developer onboarding.
180
101
  *
181
102
  * Expected keys should come from `ClaimConsent` in caller code.
182
103
  */
183
- upsertActiveConsentEntry(input: Readonly<{
184
- claims: Record<string, unknown>;
185
- fullUrl?: string;
186
- type?: string;
187
- request?: BundleRequest;
188
- }>): this;
104
+ upsertActiveConsentEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
189
105
  /**
190
106
  * MedicationStatement helper for IPS-in-Communication use cases.
191
107
  *
192
108
  * Expected keys should come from MedicationStatement claims constants.
193
109
  */
194
- upsertActiveMedicationStatementEntry(input: Readonly<{
195
- claims: MedicationStatementClaimsFlat | Record<string, unknown>;
196
- fullUrl?: string;
197
- type?: string;
198
- request?: BundleRequest;
199
- }>): this;
110
+ upsertActiveMedicationStatementEntry(input: UpsertClaimsResourceEntryInput<MedicationStatementClaimsFlat | Record<string, unknown>>): this;
200
111
  /**
201
112
  * DocumentReference helper for bundle-contained attachments linked from
202
- * other clinical resources through `*.contained-documents`.
113
+ * other clinical resources through `*.contained-reference-list`
114
+ * (with `*.contained-documents` kept as legacy compatibility alias).
203
115
  */
204
- upsertActiveDocumentReferenceEntry(input: Readonly<{
205
- claims: Record<string, unknown>;
206
- fullUrl?: string;
207
- type?: string;
208
- request?: BundleRequest;
209
- }>): this;
116
+ upsertActiveDocumentReferenceEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
210
117
  /**
211
118
  * Condition helper for IPS-in-Communication use cases.
212
119
  *
213
120
  * Expected keys should come from Condition claims constants.
214
121
  */
215
- upsertActiveConditionEntry(input: Readonly<{
216
- claims: Record<string, unknown>;
217
- fullUrl?: string;
218
- type?: string;
219
- request?: BundleRequest;
220
- }>): this;
122
+ upsertActiveConditionEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
123
+ /**
124
+ * Appointment helper for schedule/event flows carried inside Communication.
125
+ *
126
+ * Expected keys should come from Appointment claims constants.
127
+ */
128
+ upsertActiveAppointmentEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
221
129
  /**
222
130
  * Observation helper for IPS-style and sectioned bundle authoring.
223
131
  *
224
132
  * Expected keys should come from Observation claims constants.
225
133
  */
226
- upsertActiveObservationEntry(input: Readonly<{
227
- claims: Record<string, unknown>;
228
- fullUrl?: string;
229
- type?: string;
230
- request?: BundleRequest;
231
- }>): this;
134
+ upsertActiveObservationEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
232
135
  /**
233
136
  * AllergyIntolerance helper for IPS-in-Communication use cases.
234
137
  *
235
138
  * Expected keys should come from AllergyIntolerance claims constants.
236
139
  */
237
- upsertActiveAllergyIntoleranceEntry(input: Readonly<{
238
- claims: Record<string, unknown>;
239
- fullUrl?: string;
240
- type?: string;
241
- request?: BundleRequest;
242
- }>): this;
243
- /**
244
- * TODO(ips-next):
245
- * Add `upsertActiveDiagnosticReportEntry(...)` once the shared claim helpers
246
- * for `DiagnosticReport` are in place.
247
- *
248
- * Expected shape should mirror the existing resource helpers:
249
- * - `claims` authored with `@context = org.hl7.fhir.api`
250
- * - matching priority by `DiagnosticReport.identifier`
251
- * - support for linked `DocumentReference` ids through
252
- * `DiagnosticReport.contained-documents`
253
- *
254
- * Intentionally not implemented in this pass:
255
- * - IPS authoring already works for the currently documented resources
256
- * - GW Core can already consume bundle-contained `DocumentReference` rows
257
- * - adding the DiagnosticReport editing surface now would expand the IPS
258
- * contract further than intended for this release slice
259
- */
140
+ upsertActiveAllergyIntoleranceEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
141
+ /** DiagnosticReport helper for report-in-Communication use cases. */
142
+ upsertActiveDiagnosticReportEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
143
+ /** CarePlan helper for plan-in-Communication use cases. */
144
+ upsertActiveCarePlanEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
145
+ /** Procedure helper for procedure-in-Communication use cases. */
146
+ upsertActiveProcedureEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
147
+ /** Immunization helper for immunization-in-Communication use cases. */
148
+ upsertActiveImmunizationEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
149
+ /** Encounter helper for visit/event flows carried inside Communication. */
150
+ upsertActiveEncounterEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
151
+ /** Device helper for device catalog or implant/device context flows. */
152
+ upsertActiveDeviceEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
153
+ /** DeviceUseStatement helper for device usage flows carried inside Communication. */
154
+ upsertActiveDeviceUseStatementEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
155
+ /** Flag helper for alert/banner flows carried inside Communication. */
156
+ upsertActiveFlagEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
157
+ /** ClinicalImpression helper for assessment flows carried inside Communication. */
158
+ upsertActiveClinicalImpressionEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
159
+ /** Coverage helper for entitlement/insurance flows carried inside Communication. */
160
+ upsertActiveCoverageEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
161
+ /** AppointmentResponse helper for schedule-response flows carried inside Communication. */
162
+ upsertActiveAppointmentResponseEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
163
+ /** Composition helper for document-structure flows carried inside Communication. */
164
+ upsertActiveCompositionEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
165
+ /** Location helper for schedule/place flows carried inside Communication. */
166
+ upsertActiveLocationEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
167
+ /** Organization helper for provider/payer/department flows carried inside Communication. */
168
+ upsertActiveOrganizationEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
169
+ /** RelatedPerson helper for relationship/member flows carried inside Communication. */
170
+ upsertActiveRelatedPersonEntry(input: UpsertClaimsResourceEntryInput<Record<string, unknown>>): this;
260
171
  /**
261
172
  * Creates or updates a linked `DocumentReference` entry and stores its
262
- * identifier under the active resource `*.contained-documents` claim.
173
+ * identifier/reference under the active resource
174
+ * `*.contained-reference-list` claim.
263
175
  */
264
176
  addContainedDocumentToActiveEntry(input: AddContainedDocumentToActiveEntryInput): this;
265
177
  /**
@@ -299,132 +211,3 @@ export declare class CommunicationAttachedBundleSession {
299
211
  private resolveEntryCanonicalIdValue;
300
212
  private assertEntryIndex;
301
213
  }
302
- /**
303
- * High-level consent-access editor alias for onboarding and app-facing code.
304
- *
305
- * This keeps the business intent explicit for developers who are editing
306
- * Consent access rules inside a Communication-carried bundle and should not
307
- * need to start from the lower-level generic session name.
308
- */
309
- export declare class ConsentAccessEditor extends CommunicationAttachedBundleSession {
310
- /** Returns duplicate atomic consent-rule conflicts across the current bundle. */
311
- getConsentRuleDuplicateConflicts(): ConsentDuplicateRuleConflict[];
312
- /** Returns duplicate atomic consent-rule conflicts affecting the active Consent entry. */
313
- getActiveConsentRuleDuplicateConflicts(): ConsentDuplicateRuleConflict[];
314
- /** Returns one frontend-facing editable view model for the active Consent entry. */
315
- getConsentViewModel(): ConsentViewModel;
316
- /** Applies one frontend-facing editable view model back into the active Consent entry. */
317
- applyConsentViewModel(viewModel: ConsentViewModel): this;
318
- /** Returns the canonical permit/deny decision from the active Consent entry. */
319
- getDecision(): string;
320
- /**
321
- * @deprecated Use `getDecision()`.
322
- * Kept as a compatibility alias for the previous helper name.
323
- */
324
- getPermit(): string;
325
- /**
326
- * Returns target classification derived from the current consent claim
327
- * contract without altering or extending the persisted claim keys.
328
- */
329
- getTargetsClassified(): ConsentEditorClassifiedTarget[];
330
- /** Returns the catalog of core-section targets available for picker UIs. */
331
- getCoreSectionOptions(): readonly ConsentEditorClassifiedTarget[];
332
- /** Returns the core-section catalog keyed by LOINC code. */
333
- getCoreSectionCatalog(): Readonly<Record<string, HealthcareSectionDescriptor>>;
334
- /** Returns the catalog of kind-of-document targets available for picker UIs. */
335
- getKindOfDocumentOptions(): readonly ConsentEditorClassifiedTarget[];
336
- /** Returns the kind-of-document catalog keyed by LOINC code. */
337
- getKindOfDocumentCatalog(): Readonly<Record<string, HealthcareSectionDescriptor>>;
338
- /** Returns the catalog of type-of-service targets available for picker UIs. */
339
- getTypeOfServiceOptions(): readonly ConsentEditorClassifiedTarget[];
340
- /** Returns the type-of-service catalog keyed by LOINC code. */
341
- getTypeOfServiceCatalog(): Readonly<Record<string, HealthcareSectionDescriptor>>;
342
- /** Returns the catalog of subject-matter-domain targets available for picker UIs. */
343
- getSubjectMatterDomainOptions(): readonly ConsentEditorClassifiedTarget[];
344
- /** Returns the subject-matter-domain catalog keyed by LOINC code. */
345
- getSubjectMatterDomainCatalog(): Readonly<Record<string, HealthcareSectionDescriptor>>;
346
- /** Returns resource-type targets currently known in the active consent entry. */
347
- getResourceTypeOptions(): readonly ConsentEditorClassifiedTarget[];
348
- /** Returns the supported resource-type catalog. */
349
- getResourceTypeCatalog(): readonly string[];
350
- /** Returns the available professional roles for one sector. */
351
- getAvailableProfessionalRolesBySector(sector: DataspaceSector): Readonly<Record<string, HealthcareActorRoleDescriptor>>;
352
- /** Returns the available HL7 relationship roles. */
353
- getAvailableRelationshipRoles(): Readonly<Record<string, HealthcareActorRoleDescriptor>>;
354
- /** Returns selected core-section claim values. */
355
- getSelectedCoreSections(): string[];
356
- /** Returns selected kind-of-document claim values. */
357
- getSelectedKindOfDocuments(): string[];
358
- /** Returns selected type-of-service claim values. */
359
- getSelectedTypeOfServices(): string[];
360
- /** Returns selected subject-matter-domain claim values. */
361
- getSelectedSubjectMatterDomains(): string[];
362
- /** Returns selected resource-type claim values. */
363
- getSelectedResourceTypes(): string[];
364
- /** Replaces selected core-section claim values while preserving other families. */
365
- setSelectedCoreSections(codes: readonly string[]): this;
366
- /** Replaces selected kind-of-document claim values. */
367
- setSelectedKindOfDocuments(codes: readonly string[]): this;
368
- /** Replaces selected type-of-service claim values while preserving other families. */
369
- setSelectedTypeOfServices(codes: readonly string[]): this;
370
- /** Replaces selected subject-matter-domain claim values while preserving other families. */
371
- setSelectedSubjectMatterDomains(codes: readonly string[]): this;
372
- /** Replaces selected resource-type claim values. */
373
- setSelectedResourceTypes(codes: readonly string[]): this;
374
- /** Adds core-section claim values without removing other selected targets. */
375
- addCoreSections(codes: readonly string[]): this;
376
- /** Removes selected core-section claim values. */
377
- removeCoreSections(codes: readonly string[]): this;
378
- /** Adds kind-of-document claim values. */
379
- addKindOfDocuments(codes: readonly string[]): this;
380
- /** Removes kind-of-document claim values. */
381
- removeKindOfDocuments(codes: readonly string[]): this;
382
- /** Adds type-of-service claim values without removing other selected targets. */
383
- addTypeOfServices(codes: readonly string[]): this;
384
- /** Removes selected type-of-service claim values. */
385
- removeTypeOfServices(codes: readonly string[]): this;
386
- /** Adds subject-matter-domain claim values without removing other selected targets. */
387
- addSubjectMatterDomains(codes: readonly string[]): this;
388
- /** Removes selected subject-matter-domain claim values. */
389
- removeSubjectMatterDomains(codes: readonly string[]): this;
390
- /** Adds resource-type claim values. */
391
- addResourceTypes(codes: readonly string[]): this;
392
- /** Removes resource-type claim values. */
393
- removeResourceTypes(codes: readonly string[]): this;
394
- /** Returns purposes as explicit classified items. */
395
- getPurposesClassified(): ConsentEditorClassifiedPurpose[];
396
- /** Returns selected purpose claim values. */
397
- getSelectedPurposes(): string[];
398
- /** Replaces selected purpose claim values. */
399
- setSelectedPurposes(codes: readonly string[]): this;
400
- /** Adds purpose claim values. */
401
- addPurposes(codes: readonly string[]): this;
402
- /** Removes purpose claim values. */
403
- removePurposes(codes: readonly string[]): this;
404
- /** Returns selected actor roles as explicit classified items. */
405
- getRolesClassified(): ConsentEditorClassifiedRoles;
406
- /** Returns selected actor-role claim values. */
407
- getSelectedRoles(): string[];
408
- /** Replaces selected actor-role claim values. */
409
- setSelectedRoles(codes: readonly string[]): this;
410
- /** Adds actor-role claim values. */
411
- addRoles(codes: readonly string[]): this;
412
- /** Removes actor-role claim values. */
413
- removeRoles(codes: readonly string[]): this;
414
- /** Returns consent actors grouped by jurisdiction, organization, and user. */
415
- getActorsClassified(): ConsentEditorClassifiedActors;
416
- private getSelectedSectionCodesByFamily;
417
- private setSelectedSectionCodesByFamily;
418
- private addSectionCodesByFamily;
419
- private removeSectionCodesByFamily;
420
- private setActiveEntryClaimList;
421
- private addActiveEntryClaimList;
422
- private removeActiveEntryClaimList;
423
- }
424
- /**
425
- * High-level factory for consent-access editing.
426
- *
427
- * Prefer this name in onboarding docs when the developer intent is:
428
- * "edit a Consent access bundle carried by a Communication".
429
- */
430
- export declare function createConsentAccessEditor(options?: CommunicationAttachedBundleSessionOptions): ConsentAccessEditor;