gdc-common-utils-ts 2.1.0 → 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 (154) hide show
  1. package/README.md +18 -0
  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.js +4 -2
  23. package/dist/examples/communication-attached-bundle-session.js +27 -27
  24. package/dist/examples/communication-didcomm-payload.d.ts +8 -4
  25. package/dist/examples/communication-didcomm-payload.js +17 -11
  26. package/dist/examples/consent-access.js +2 -1
  27. package/dist/examples/employee.d.ts +21 -0
  28. package/dist/examples/employee.js +21 -0
  29. package/dist/examples/individual-controller.d.ts +27 -0
  30. package/dist/examples/individual-controller.js +28 -1
  31. package/dist/examples/inter-tenant-access-contract.js +3 -2
  32. package/dist/examples/ips-bundle.js +17 -16
  33. package/dist/examples/lifecycle.js +13 -11
  34. package/dist/examples/profile-manager-mem.js +2 -1
  35. package/dist/examples/related-person.d.ts +14 -0
  36. package/dist/examples/related-person.js +18 -4
  37. package/dist/examples/shared.d.ts +12 -3
  38. package/dist/examples/shared.js +13 -4
  39. package/dist/examples/vital-signs.js +1 -1
  40. package/dist/examples/wallet-mem.js +4 -2
  41. package/dist/models/authority-resolution.d.ts +56 -0
  42. package/dist/models/authority-resolution.js +2 -0
  43. package/dist/models/bundle-editor-types.d.ts +89 -0
  44. package/dist/models/bundle-editor-types.js +45 -0
  45. package/dist/models/bundle.d.ts +5 -0
  46. package/dist/models/communication-attached-bundle-session.d.ts +6 -4
  47. package/dist/models/communication-attached-bundle-session.js +6 -4
  48. package/dist/models/confidential-storage.d.ts +2 -1
  49. package/dist/models/consent-rule.d.ts +11 -1
  50. package/dist/models/consent-rule.js +9 -1
  51. package/dist/models/index.d.ts +2 -0
  52. package/dist/models/index.js +2 -0
  53. package/dist/models/individual-onboarding.d.ts +18 -0
  54. package/dist/models/interoperable-claims/allergy-intolerance-claims.d.ts +12 -1
  55. package/dist/models/interoperable-claims/allergy-intolerance-claims.js +12 -1
  56. package/dist/models/interoperable-claims/condition-claims.d.ts +12 -1
  57. package/dist/models/interoperable-claims/condition-claims.js +12 -1
  58. package/dist/models/interoperable-claims/diagnostic-report-claims.d.ts +13 -2
  59. package/dist/models/interoperable-claims/diagnostic-report-claims.js +12 -1
  60. package/dist/models/interoperable-claims/document-reference-claims.d.ts +1 -0
  61. package/dist/models/interoperable-claims/document-reference-claims.js +3 -0
  62. package/dist/models/interoperable-claims/medication-statement-claims.d.ts +17 -0
  63. package/dist/models/interoperable-claims/medication-statement-claims.js +17 -0
  64. package/dist/utils/allergy-intolerance-entry-editor.d.ts +51 -0
  65. package/dist/utils/allergy-intolerance-entry-editor.js +55 -0
  66. package/dist/utils/authority-resolution.d.ts +37 -0
  67. package/dist/utils/authority-resolution.js +112 -0
  68. package/dist/utils/backend-message-manager-mem.d.ts +11 -0
  69. package/dist/utils/backend-message-manager-mem.js +11 -0
  70. package/dist/utils/bundle-didcomm-payload.js +3 -2
  71. package/dist/utils/bundle-document-builder.d.ts +1 -0
  72. package/dist/utils/bundle-document-builder.js +134 -14
  73. package/dist/utils/bundle-editor-core.d.ts +181 -0
  74. package/dist/utils/bundle-editor-core.js +467 -0
  75. package/dist/utils/bundle-editor-helpers.d.ts +53 -0
  76. package/dist/utils/bundle-editor-helpers.js +146 -0
  77. package/dist/utils/bundle-editor-registry.d.ts +6 -0
  78. package/dist/utils/bundle-editor-registry.js +14 -0
  79. package/dist/utils/bundle-editor.d.ts +21 -722
  80. package/dist/utils/bundle-editor.js +21 -1601
  81. package/dist/utils/bundle-entry-editor.d.ts +96 -0
  82. package/dist/utils/bundle-entry-editor.js +305 -0
  83. package/dist/utils/bundle-query.d.ts +1 -0
  84. package/dist/utils/bundle-query.js +12 -3
  85. package/dist/utils/bundle-reader.d.ts +48 -0
  86. package/dist/utils/bundle-reader.js +175 -1
  87. package/dist/utils/care-plan-entry-editor.d.ts +43 -0
  88. package/dist/utils/care-plan-entry-editor.js +47 -0
  89. package/dist/utils/client-assertion.d.ts +38 -0
  90. package/dist/utils/client-assertion.js +113 -0
  91. package/dist/utils/clinical-impression-entry-editor.d.ts +43 -0
  92. package/dist/utils/clinical-impression-entry-editor.js +47 -0
  93. package/dist/utils/clinical-resource-entry-editor.d.ts +123 -0
  94. package/dist/utils/clinical-resource-entry-editor.js +296 -0
  95. package/dist/utils/communication-attached-bundle-session-helpers.js +8 -6
  96. package/dist/utils/communication-attached-bundle-session.d.ts +29 -3
  97. package/dist/utils/communication-attached-bundle-session.js +62 -3
  98. package/dist/utils/communication-didcomm-payload.d.ts +5 -0
  99. package/dist/utils/communication-didcomm-payload.js +28 -18
  100. package/dist/utils/communication-document-reference.d.ts +23 -0
  101. package/dist/utils/communication-document-reference.js +89 -0
  102. package/dist/utils/communication-editor.d.ts +53 -0
  103. package/dist/utils/communication-editor.js +97 -0
  104. package/dist/utils/condition-entry-editor.d.ts +30 -0
  105. package/dist/utils/condition-entry-editor.js +34 -0
  106. package/dist/utils/consent-claim-helpers.d.ts +4 -0
  107. package/dist/utils/consent-claim-helpers.js +15 -1
  108. package/dist/utils/coverage-entry-editor.d.ts +51 -0
  109. package/dist/utils/coverage-entry-editor.js +55 -0
  110. package/dist/utils/device-entry-editor.d.ts +59 -0
  111. package/dist/utils/device-entry-editor.js +63 -0
  112. package/dist/utils/device-use-statement-entry-editor.d.ts +43 -0
  113. package/dist/utils/device-use-statement-entry-editor.js +47 -0
  114. package/dist/utils/diagnostic-report-entry-editor.d.ts +74 -0
  115. package/dist/utils/diagnostic-report-entry-editor.js +136 -0
  116. package/dist/utils/did.d.ts +8 -0
  117. package/dist/utils/did.js +22 -0
  118. package/dist/utils/document-reference-entry-editor.d.ts +62 -0
  119. package/dist/utils/document-reference-entry-editor.js +66 -0
  120. package/dist/utils/employee-entry-editor.d.ts +36 -0
  121. package/dist/utils/employee-entry-editor.js +88 -0
  122. package/dist/utils/employee.d.ts +1 -0
  123. package/dist/utils/employee.js +2 -1
  124. package/dist/utils/encounter-entry-editor.d.ts +51 -0
  125. package/dist/utils/encounter-entry-editor.js +55 -0
  126. package/dist/utils/flag-entry-editor.d.ts +47 -0
  127. package/dist/utils/flag-entry-editor.js +51 -0
  128. package/dist/utils/immunization-entry-editor.d.ts +87 -0
  129. package/dist/utils/immunization-entry-editor.js +169 -0
  130. package/dist/utils/index.d.ts +7 -0
  131. package/dist/utils/index.js +7 -0
  132. package/dist/utils/individual-onboarding-acceptance-credential.d.ts +35 -0
  133. package/dist/utils/individual-onboarding-acceptance-credential.js +55 -0
  134. package/dist/utils/individual-smart.d.ts +59 -0
  135. package/dist/utils/individual-smart.js +135 -0
  136. package/dist/utils/medication-statement-entry-editor.d.ts +90 -0
  137. package/dist/utils/medication-statement-entry-editor.js +94 -0
  138. package/dist/utils/observation-component-entry-editor.d.ts +57 -0
  139. package/dist/utils/observation-component-entry-editor.js +105 -0
  140. package/dist/utils/observation-entry-editor.d.ts +29 -0
  141. package/dist/utils/observation-entry-editor.js +68 -0
  142. package/dist/utils/procedure-entry-editor.d.ts +71 -0
  143. package/dist/utils/procedure-entry-editor.js +75 -0
  144. package/dist/utils/professional-smart.d.ts +87 -0
  145. package/dist/utils/professional-smart.js +118 -4
  146. package/dist/utils/same-as.d.ts +40 -0
  147. package/dist/utils/same-as.js +72 -0
  148. package/dist/utils/unified-health-id.d.ts +51 -0
  149. package/dist/utils/unified-health-id.js +92 -0
  150. package/dist/utils/vital-sign-day-batch.d.ts +25 -0
  151. package/dist/utils/vital-sign-day-batch.js +115 -0
  152. package/dist/utils/vital-sign-entry-editor.d.ts +61 -0
  153. package/dist/utils/vital-sign-entry-editor.js +152 -0
  154. package/package.json +2 -1
@@ -1,722 +1,21 @@
1
- import { type CodingDescriptor } from '../constants/vital-signs';
2
- import { type BundleEntry, type BundleJsonApi, type BundleRequest } from '../models/bundle';
3
- import { buildEmployeePurgeBundle, buildEmployeeSearchBundle, EmployeeBundleOperations, EmployeeClaims } from './employee';
4
- export type BundleOperation = (typeof EmployeeBundleOperations)[keyof typeof EmployeeBundleOperations];
5
- export declare const BundleEditableResourceTypes: Readonly<{
6
- readonly employee: "Employee";
7
- readonly consent: "Consent";
8
- readonly observation: "Observation";
9
- readonly vitalSign: "Observation";
10
- readonly allergyIntolerance: "AllergyIntolerance";
11
- readonly condition: "Condition";
12
- readonly medicationStatement: "MedicationStatement";
13
- readonly documentReference: "DocumentReference";
14
- readonly carePlan: "CarePlan";
15
- readonly flag: "Flag";
16
- readonly clinicalImpression: "ClinicalImpression";
17
- readonly device: "Device";
18
- readonly deviceUseStatement: "DeviceUseStatement";
19
- readonly encounter: "Encounter";
20
- readonly coverage: "Coverage";
21
- readonly immunization: "Immunization";
22
- readonly procedure: "Procedure";
23
- readonly diagnosticReport: "DiagnosticReport";
24
- }>;
25
- export type AllowedResourceType = string;
26
- export type BuiltBundleEntry = {
27
- type: string;
28
- request: {
29
- method: BundleRequest['method'];
30
- url?: string;
31
- };
32
- resource: {
33
- resourceType: string;
34
- id?: string;
35
- meta: {
36
- claims: EmployeeClaims;
37
- };
38
- [key: string]: unknown;
39
- };
40
- fullUrl?: string;
41
- };
42
- /**
43
- * Generic bundle editor for FHIR-like bundle payloads assembled in memory.
44
- *
45
- * This class owns bundle-level concerns:
46
- * - which business operation the bundle represents
47
- * - which resource type the bundle allows
48
- * - which entries belong to the bundle
49
- * - when the final bundle is materialized through `build()`
50
- *
51
- * Resource-specific semantics belong to resource entry editors such as
52
- * `EmployeeEntryEditor`.
53
- */
54
- export declare class BundleEditor {
55
- private bundleOperation;
56
- private allowedResourceType;
57
- private readonly entries;
58
- /**
59
- * Declares which business action this in-memory bundle is staging.
60
- *
61
- * Important distinction:
62
- * - this is **not** the same concept as FHIR `Bundle.entry.request.method`
63
- * - this is the higher-level action the editor is helping to assemble, for
64
- * example `create`, `search`, `disable`, or `purge`
65
- * - the lower-level transport/request method may later be derived from that
66
- * action, and may differ by backend contract
67
- *
68
- * Example:
69
- * - bundle operation `disable`
70
- * - current employee GW contract -> inner `entry.request.method = DELETE`
71
- * - current individual organization GW contract -> explicit `/_disable`
72
- * route with inner `entry.request.method = POST`
73
- */
74
- setBundleOperation(operation: BundleOperation): this;
75
- /**
76
- * Returns the current high-level business action assigned to the bundle.
77
- *
78
- * Read this as:
79
- * - "what am I trying to do?"
80
- *
81
- * not as:
82
- * - "which HTTP/FHIR request method will the final entry use?"
83
- */
84
- getBundleOperation(): BundleOperation | null;
85
- /**
86
- * Restricts the bundle to one resource type.
87
- *
88
- * For employee batch bundles this should be fixed to
89
- * `EmployeeResourceTypes.employee` so the editor cannot mix unrelated
90
- * resource kinds.
91
- */
92
- setAllowedResourceType(resourceType: AllowedResourceType): this;
93
- /** Returns the bundle resource type restriction when already declared. */
94
- getAllowedResourceType(): AllowedResourceType | null;
95
- /**
96
- * Opens one new entry and returns a generic entry editor for that slot.
97
- *
98
- * The entry editor can later expose resource-specific semantics through
99
- * methods such as `asEmployee()`.
100
- */
101
- newEntry(resourceId?: string): BundleEntryEditor;
102
- /** Reopens one existing entry by `resource.id` or `fullUrl`. */
103
- openEntry(resourceIdOrFullUrl: string): BundleEntryEditor;
104
- /** Returns cloned staged entries for inspection or debugging. */
105
- getEntries(): readonly BuiltBundleEntry[];
106
- /**
107
- * Materializes the final bundle payload from the editor state.
108
- *
109
- * `build()` does not send, sign, or wrap the payload. It only returns the
110
- * final bundle object for the declared operation and staged entries.
111
- */
112
- build(): ReturnType<typeof buildEmployeePurgeBundle> | ReturnType<typeof buildEmployeeSearchBundle> | {
113
- resourceType: 'Bundle';
114
- type: 'batch';
115
- entry: BuiltBundleEntry[];
116
- };
117
- /**
118
- * Materializes the staged entries as the `BundleJsonApi` shape used by
119
- * `CommunicationAttachedBundleSession` and `ConsentAccessEditor`.
120
- *
121
- * Use this when the next layer edits bundle entries in-memory before another
122
- * runtime wraps or sends the bundle.
123
- */
124
- buildJsonApi(): BundleJsonApi<BundleEntry>;
125
- /** @internal */
126
- getMutableEntry(entryIndex: number): BuiltBundleEntry;
127
- private createEntryDraft;
128
- private getSingleSearchClaims;
129
- private requireBundleOperation;
130
- private requireAllowedResourceType;
131
- }
132
- /**
133
- * Generic editor for one staged bundle entry.
134
- *
135
- * This class only knows generic entry concerns such as:
136
- * - resource id
137
- * - fullUrl
138
- * - meta claims
139
- * - conversion to one resource-specific entry editor
140
- */
141
- export declare class BundleEntryEditor {
142
- protected readonly bundleEditor: BundleEditor;
143
- protected readonly entryIndex: number;
144
- constructor(bundleEditor: BundleEditor, entryIndex: number);
145
- /** Opens the current entry as one employee-specific resource editor. */
146
- asEmployee(): EmployeeEntryEditor;
147
- /** Opens the current entry as one vital-sign-specific Observation editor. */
148
- asVitalSign(): VitalSignEntryEditor;
149
- /** Opens the current entry as one general Observation editor. */
150
- asObservation(): ObservationEntryEditor;
151
- /** Opens the current entry as one AllergyIntolerance editor. */
152
- asAllergy(): AllergyIntoleranceEntryEditor;
153
- /** Opens the current entry as one Condition editor. */
154
- asCondition(): ConditionEntryEditor;
155
- /** Opens the current entry as one MedicationStatement editor. */
156
- asMedicationStatement(): MedicationStatementEntryEditor;
157
- /** Opens the current entry as one DocumentReference editor. */
158
- asDocumentReference(): DocumentReferenceEntryEditor;
159
- /** Opens the current entry as one CarePlan editor. */
160
- asCarePlan(): CarePlanEntryEditor;
161
- /** Opens the current entry as one Flag editor. */
162
- asFlag(): FlagEntryEditor;
163
- /** Opens the current entry as one ClinicalImpression editor. */
164
- asClinicalImpression(): ClinicalImpressionEntryEditor;
165
- /** Opens the current entry as one Device editor. */
166
- asDevice(): DeviceEntryEditor;
167
- /** Opens the current entry as one DeviceUseStatement editor. */
168
- asDeviceUseStatement(): DeviceUseStatementEntryEditor;
169
- /** Opens the current entry as one Encounter editor. */
170
- asEncounter(): EncounterEntryEditor;
171
- /** Opens the current entry as one Coverage editor. */
172
- asCoverage(): CoverageEntryEditor;
173
- /** Opens the current entry as one Immunization editor. */
174
- asImmunization(): ImmunizationEntryEditor;
175
- /** Opens the current entry as one Procedure editor. */
176
- asProcedure(): ProcedureEntryEditor;
177
- /** Opens the current entry as one DiagnosticReport editor. */
178
- asDiagnosticReport(): DiagnosticReportEntryEditor;
179
- /** Reads one claim from this entry. */
180
- getClaim(key: string): unknown;
181
- /** Checks whether this entry contains one claim key. */
182
- hasClaim(key: string): boolean;
183
- /** Writes one claim on this entry. */
184
- setClaim(key: string, value: unknown): this;
185
- /** Appends one claim value on this entry. */
186
- addClaim(key: string, value: unknown): this;
187
- /** Removes one claim from this entry. */
188
- removeClaim(key: string): this;
189
- /** Writes the staged entry `resource.id`. */
190
- setResourceId(resourceId?: string | null): this;
191
- /** Reads the staged entry `resource.id` when present. */
192
- getResourceId(): string | undefined;
193
- /** Writes the staged entry `fullUrl`. */
194
- setFullUrl(fullUrl?: string | null): this;
195
- /** Reads the staged entry `fullUrl` when present. */
196
- getFullUrl(): string | undefined;
197
- /** Returns control to the parent bundle editor. */
198
- doneEntry(): BundleEditor;
199
- protected getMutableEntry(): BuiltBundleEntry;
200
- protected getClaims(): EmployeeClaims;
201
- }
202
- /**
203
- * Shared claims-first editor utilities for IPS clinical resource families.
204
- *
205
- * The concrete resource type changes, but the editing contract stays aligned:
206
- * identifier + subject + status + date + optional CSV-backed reference lists.
207
- */
208
- declare class ClinicalResourceEntryEditor extends BundleEntryEditor {
209
- protected getIdentifierValue(claimKey: string): string | undefined;
210
- protected setIdentifierValue(claimKey: string, identifier?: string | null): this;
211
- protected setSubjectClaims(subjectClaimKey: string, patientClaimKey: string, subject?: string | null): this;
212
- protected getSubjectClaims(subjectClaimKey: string, patientClaimKey: string): string | undefined;
213
- protected setScalarClaim(claimKey: string, value?: string | null): this;
214
- protected getScalarClaim(claimKey: string): string | undefined;
215
- protected setNumberClaim(claimKey: string, value?: number | null): this;
216
- protected getNumberClaim(claimKey: string): number | undefined;
217
- protected setBooleanClaim(claimKey: string, value?: boolean | null): this;
218
- protected getBooleanClaim(claimKey: string): boolean | undefined;
219
- protected setCsvClaimList(claimKey: string, values: readonly string[]): this;
220
- protected getCsvClaimList(claimKey: string): string[];
221
- protected ensureIdentifierValue(claimKey: string): string;
222
- }
223
- /**
224
- * Reduced Observation component-style editor surface.
225
- *
226
- * This base layer owns the reusable code/value authoring helpers shared by
227
- * Vital Signs and broader Observation entry editors.
228
- */
229
- export declare class ObservationComponentEntryEditor extends BundleEntryEditor {
230
- setCode(code: CodingDescriptor | string): this;
231
- getCode(): string | undefined;
232
- setCodeSystem(system: string): this;
233
- getCodeSystem(): string | undefined;
234
- setCodeValue(value: string): this;
235
- getCodeValue(): string | undefined;
236
- setCodeDisplay(display: string): this;
237
- getCodeDisplay(): string | undefined;
238
- /**
239
- * Stores the local-language label used by forms and local UI copy.
240
- *
241
- * Keep this distinct from `setCodeDisplay(...)`, which is the canonical
242
- * English/international display carried by the coded concept.
243
- */
244
- setCodeTextLocal(text: string): this;
245
- /**
246
- * Returns the local-language label used by forms and local UI copy.
247
- *
248
- * Keep this distinct from `getCodeDisplay()`, which returns the canonical
249
- * English/international display when present.
250
- */
251
- getCodeTextLocal(): string | undefined;
252
- /** Compatibility alias for older examples/tests. Prefer `setCodeTextLocal(...)`. */
253
- setLocalText(text: string): this;
254
- /** Compatibility alias for older examples/tests. Prefer `getCodeTextLocal()`. */
255
- getLocalText(): string | undefined;
256
- setValueQuantityNumber(value: number): this;
257
- getValueQuantityNumber(): number | undefined;
258
- setValueQuantityUnit(unit: CodingDescriptor | string): this;
259
- getValueQuantityUnit(): string | undefined;
260
- setValueString(value: string): this;
261
- getValueString(): string | undefined;
262
- setValueDate(value: string): this;
263
- getValueDate(): string | undefined;
264
- }
265
- /**
266
- * Vital-sign-specific editor surface for one staged Observation entry.
267
- *
268
- * This layer applies the visible/searchable Vital Signs claim contract on top
269
- * of the reduced Observation component helpers.
270
- */
271
- export declare class VitalSignEntryEditor extends ObservationComponentEntryEditor {
272
- setIdentifier(identifier?: string | null): this;
273
- getIdentifier(): string | undefined;
274
- ensureIdentifier(): string;
275
- setSubject(subject: string): this;
276
- getSubject(): string | undefined;
277
- setStatus(status: string): this;
278
- getStatus(): string | undefined;
279
- setCategory(category: CodingDescriptor | string): this;
280
- getCategory(): string | undefined;
281
- setDate(date: string): this;
282
- getDate(): string | undefined;
283
- setNote(note: string): this;
284
- getNote(): string | undefined;
285
- setVitalSignType(code: CodingDescriptor, unit?: CodingDescriptor): this;
286
- setHeartRate(value: number): this;
287
- getHeartRate(): number | undefined;
288
- setBodyTemperature(value: number): this;
289
- getBodyTemperature(): number | undefined;
290
- setSystolicBloodPressure(value: number): this;
291
- getSystolicBloodPressure(): number | undefined;
292
- setDiastolicBloodPressure(value: number): this;
293
- getDiastolicBloodPressure(): number | undefined;
294
- }
295
- /**
296
- * General Observation editor surface.
297
- *
298
- * This extends the Vital Sign editor so generic Observation rows can reuse the
299
- * same code/date/value helpers while adding broader Observation references.
300
- */
301
- export declare class ObservationEntryEditor extends VitalSignEntryEditor {
302
- setBasedOn(reference: string): this;
303
- getBasedOn(): string | undefined;
304
- setEncounter(reference: string): this;
305
- getEncounter(): string | undefined;
306
- setPerformer(reference: string): this;
307
- getPerformer(): string | undefined;
308
- setHasMember(reference: string): this;
309
- getHasMember(): string | undefined;
310
- setHasMemberList(references: readonly string[]): this;
311
- getHasMemberList(): string[];
312
- }
313
- /** Claims-first editor for one staged AllergyIntolerance entry. */
314
- export declare class AllergyIntoleranceEntryEditor extends ClinicalResourceEntryEditor {
315
- setIdentifier(identifier?: string | null): this;
316
- getIdentifier(): string | undefined;
317
- ensureIdentifier(): string;
318
- setSubject(subject?: string | null): this;
319
- getSubject(): string | undefined;
320
- setCode(code?: string | null): this;
321
- getCode(): string | undefined;
322
- setClinicalStatus(status?: string | null): this;
323
- getClinicalStatus(): string | undefined;
324
- setVerificationStatus(status?: string | null): this;
325
- getVerificationStatus(): string | undefined;
326
- setCategory(category?: string | null): this;
327
- getCategory(): string | undefined;
328
- setCriticality(criticality?: string | null): this;
329
- getCriticality(): string | undefined;
330
- setOnsetDateTime(value?: string | null): this;
331
- getOnsetDateTime(): string | undefined;
332
- setRecorder(reference?: string | null): this;
333
- getRecorder(): string | undefined;
334
- setContainedDocumentIdentifierList(identifiers: readonly string[]): this;
335
- getContainedDocumentIdentifierList(): string[];
336
- }
337
- /** Claims-first editor for one staged Condition entry. */
338
- export declare class ConditionEntryEditor extends ClinicalResourceEntryEditor {
339
- setIdentifier(identifier?: string | null): this;
340
- getIdentifier(): string | undefined;
341
- ensureIdentifier(): string;
342
- setSubject(subject?: string | null): this;
343
- getSubject(): string | undefined;
344
- setCode(code?: string | null): this;
345
- getCode(): string | undefined;
346
- setClinicalStatus(status?: string | null): this;
347
- getClinicalStatus(): string | undefined;
348
- setVerificationStatus(status?: string | null): this;
349
- getVerificationStatus(): string | undefined;
350
- setCategory(category?: string | null): this;
351
- getCategory(): string | undefined;
352
- setSeverity(severity?: string | null): this;
353
- getSeverity(): string | undefined;
354
- setOnsetDateTime(value?: string | null): this;
355
- getOnsetDateTime(): string | undefined;
356
- setRecorder(reference?: string | null): this;
357
- getRecorder(): string | undefined;
358
- setContainedDocumentIdentifierList(identifiers: readonly string[]): this;
359
- getContainedDocumentIdentifierList(): string[];
360
- }
361
- /** Claims-first editor for one staged MedicationStatement entry. */
362
- export declare class MedicationStatementEntryEditor extends ClinicalResourceEntryEditor {
363
- setIdentifier(identifier?: string | null): this;
364
- getIdentifier(): string | undefined;
365
- ensureIdentifier(): string;
366
- setSubject(subject?: string | null): this;
367
- getSubject(): string | undefined;
368
- setStatus(status?: string | null): this;
369
- getStatus(): string | undefined;
370
- setEffective(value?: string | null): this;
371
- getEffective(): string | undefined;
372
- setCode(code?: string | null): this;
373
- getCode(): string | undefined;
374
- setMedicationText(text?: string | null): this;
375
- getMedicationText(): string | undefined;
376
- setNote(note?: string | null): this;
377
- getNote(): string | undefined;
378
- setDosageInstruction(value?: string | null): this;
379
- getDosageInstruction(): string | undefined;
380
- setCategoryList(values: readonly string[]): this;
381
- getCategoryList(): string[];
382
- setDoseQuantityValue(value?: number | null): this;
383
- getDoseQuantityValue(): number | undefined;
384
- setDoseQuantityUnit(value?: string | null): this;
385
- getDoseQuantityUnit(): string | undefined;
386
- setTimingFrequency(value?: number | null): this;
387
- getTimingFrequency(): number | undefined;
388
- setTimingPeriod(value?: number | null): this;
389
- getTimingPeriod(): number | undefined;
390
- setTimingPeriodUnit(value?: string | null): this;
391
- getTimingPeriodUnit(): string | undefined;
392
- setDosageAsNeeded(value?: boolean | null): this;
393
- getDosageAsNeeded(): boolean | undefined;
394
- }
395
- /** Claims-first editor for one staged DocumentReference entry. */
396
- export declare class DocumentReferenceEntryEditor extends ClinicalResourceEntryEditor {
397
- setIdentifier(identifier?: string | null): this;
398
- getIdentifier(): string | undefined;
399
- ensureIdentifier(): string;
400
- setSubject(subject?: string | null): this;
401
- getSubject(): string | undefined;
402
- setType(value?: string | null): this;
403
- getType(): string | undefined;
404
- setCategory(value?: string | null): this;
405
- getCategory(): string | undefined;
406
- setContentType(value?: string | null): this;
407
- getContentType(): string | undefined;
408
- setContentData(value?: string | null): this;
409
- getContentData(): string | undefined;
410
- setContentHash(value?: string | null): this;
411
- getContentHash(): string | undefined;
412
- setLocation(value?: string | null): this;
413
- getLocation(): string | undefined;
414
- setDescription(value?: string | null): this;
415
- getDescription(): string | undefined;
416
- setDate(value?: string | null): this;
417
- getDate(): string | undefined;
418
- setAuthor(value?: string | null): this;
419
- getAuthor(): string | undefined;
420
- }
421
- /** Claims-first editor for one staged CarePlan entry. */
422
- export declare class CarePlanEntryEditor extends ClinicalResourceEntryEditor {
423
- setIdentifier(identifier?: string | null): this;
424
- getIdentifier(): string | undefined;
425
- ensureIdentifier(): string;
426
- setSubject(subject?: string | null): this;
427
- getSubject(): string | undefined;
428
- setStatus(value?: string | null): this;
429
- getStatus(): string | undefined;
430
- setIntent(value?: string | null): this;
431
- getIntent(): string | undefined;
432
- setCategory(value?: string | null): this;
433
- getCategory(): string | undefined;
434
- setEncounter(value?: string | null): this;
435
- getEncounter(): string | undefined;
436
- setDate(value?: string | null): this;
437
- getDate(): string | undefined;
438
- setNote(value?: string | null): this;
439
- getNote(): string | undefined;
440
- }
441
- /** Claims-first editor for one staged Flag entry. */
442
- export declare class FlagEntryEditor extends ClinicalResourceEntryEditor {
443
- setIdentifier(identifier?: string | null): this;
444
- getIdentifier(): string | undefined;
445
- ensureIdentifier(): string;
446
- setSubject(subject?: string | null): this;
447
- getSubject(): string | undefined;
448
- setStatus(value?: string | null): this;
449
- getStatus(): string | undefined;
450
- setCategory(value?: string | null): this;
451
- getCategory(): string | undefined;
452
- setCode(value?: string | null): this;
453
- getCode(): string | undefined;
454
- setDate(value?: string | null): this;
455
- getDate(): string | undefined;
456
- setEncounter(value?: string | null): this;
457
- getEncounter(): string | undefined;
458
- setPeriodStart(value?: string | null): this;
459
- getPeriodStart(): string | undefined;
460
- setPeriodEnd(value?: string | null): this;
461
- getPeriodEnd(): string | undefined;
462
- }
463
- /** Claims-first editor for one staged ClinicalImpression entry. */
464
- export declare class ClinicalImpressionEntryEditor extends ClinicalResourceEntryEditor {
465
- setIdentifier(identifier?: string | null): this;
466
- getIdentifier(): string | undefined;
467
- ensureIdentifier(): string;
468
- setSubject(subject?: string | null): this;
469
- getSubject(): string | undefined;
470
- setStatus(value?: string | null): this;
471
- getStatus(): string | undefined;
472
- setDescription(value?: string | null): this;
473
- getDescription(): string | undefined;
474
- setEncounter(value?: string | null): this;
475
- getEncounter(): string | undefined;
476
- setEffectiveDateTime(value?: string | null): this;
477
- getEffectiveDateTime(): string | undefined;
478
- setAssessor(value?: string | null): this;
479
- getAssessor(): string | undefined;
480
- setSummary(value?: string | null): this;
481
- getSummary(): string | undefined;
482
- }
483
- /** Claims-first editor for one staged Device entry. */
484
- export declare class DeviceEntryEditor extends ClinicalResourceEntryEditor {
485
- setIdentifier(identifier?: string | null): this;
486
- getIdentifier(): string | undefined;
487
- ensureIdentifier(): string;
488
- setPatient(value?: string | null): this;
489
- getPatient(): string | undefined;
490
- setStatus(value?: string | null): this;
491
- getStatus(): string | undefined;
492
- setType(value?: string | null): this;
493
- getType(): string | undefined;
494
- setManufacturer(value?: string | null): this;
495
- getManufacturer(): string | undefined;
496
- setModel(value?: string | null): this;
497
- getModel(): string | undefined;
498
- setDeviceName(value?: string | null): this;
499
- getDeviceName(): string | undefined;
500
- setSerialNumber(value?: string | null): this;
501
- getSerialNumber(): string | undefined;
502
- setOrganization(value?: string | null): this;
503
- getOrganization(): string | undefined;
504
- setLocation(value?: string | null): this;
505
- getLocation(): string | undefined;
506
- setUrl(value?: string | null): this;
507
- getUrl(): string | undefined;
508
- setNote(value?: string | null): this;
509
- getNote(): string | undefined;
510
- }
511
- /** Claims-first editor for one staged DeviceUseStatement entry. */
512
- export declare class DeviceUseStatementEntryEditor extends ClinicalResourceEntryEditor {
513
- setIdentifier(identifier?: string | null): this;
514
- getIdentifier(): string | undefined;
515
- ensureIdentifier(): string;
516
- setSubject(subject?: string | null): this;
517
- getSubject(): string | undefined;
518
- setStatus(value?: string | null): this;
519
- getStatus(): string | undefined;
520
- setDevice(value?: string | null): this;
521
- getDevice(): string | undefined;
522
- setRecordedOn(value?: string | null): this;
523
- getRecordedOn(): string | undefined;
524
- setTimingDateTime(value?: string | null): this;
525
- getTimingDateTime(): string | undefined;
526
- setReasonCode(value?: string | null): this;
527
- getReasonCode(): string | undefined;
528
- setSource(value?: string | null): this;
529
- getSource(): string | undefined;
530
- }
531
- /** Claims-first editor for one staged Encounter entry. */
532
- export declare class EncounterEntryEditor extends ClinicalResourceEntryEditor {
533
- setIdentifier(identifier?: string | null): this;
534
- getIdentifier(): string | undefined;
535
- ensureIdentifier(): string;
536
- setSubject(subject?: string | null): this;
537
- getSubject(): string | undefined;
538
- setStatus(value?: string | null): this;
539
- getStatus(): string | undefined;
540
- setClass(value?: string | null): this;
541
- getClass(): string | undefined;
542
- setType(value?: string | null): this;
543
- getType(): string | undefined;
544
- setParticipantList(values: readonly string[]): this;
545
- getParticipantList(): string[];
546
- setServiceProvider(value?: string | null): this;
547
- getServiceProvider(): string | undefined;
548
- setPeriodStart(value?: string | null): this;
549
- getPeriodStart(): string | undefined;
550
- setPeriodEnd(value?: string | null): this;
551
- getPeriodEnd(): string | undefined;
552
- setReasonCode(value?: string | null): this;
553
- getReasonCode(): string | undefined;
554
- }
555
- /** Claims-first editor for one staged Coverage entry. */
556
- export declare class CoverageEntryEditor extends ClinicalResourceEntryEditor {
557
- setIdentifier(identifier?: string | null): this;
558
- getIdentifier(): string | undefined;
559
- ensureIdentifier(): string;
560
- setStatus(value?: string | null): this;
561
- getStatus(): string | undefined;
562
- setType(value?: string | null): this;
563
- getType(): string | undefined;
564
- setPolicyHolder(value?: string | null): this;
565
- getPolicyHolder(): string | undefined;
566
- setSubscriber(value?: string | null): this;
567
- getSubscriber(): string | undefined;
568
- setBeneficiary(value?: string | null): this;
569
- getBeneficiary(): string | undefined;
570
- setRelationship(value?: string | null): this;
571
- getRelationship(): string | undefined;
572
- setPeriodStart(value?: string | null): this;
573
- getPeriodStart(): string | undefined;
574
- setPeriodEnd(value?: string | null): this;
575
- getPeriodEnd(): string | undefined;
576
- setPayorList(values: readonly string[]): this;
577
- getPayorList(): string[];
578
- }
579
- /** Claims-first editor for one staged Immunization entry. */
580
- export declare class ImmunizationEntryEditor extends ClinicalResourceEntryEditor {
581
- setIdentifier(identifier?: string | null): this;
582
- getIdentifier(): string | undefined;
583
- ensureIdentifier(): string;
584
- setSubject(subject?: string | null): this;
585
- getSubject(): string | undefined;
586
- setStatus(status?: string | null): this;
587
- getStatus(): string | undefined;
588
- setDate(date?: string | null): this;
589
- getDate(): string | undefined;
590
- setVaccineCode(code?: string | null): this;
591
- getVaccineCode(): string | undefined;
592
- setVaccineCodeTextLocal(text?: string | null): this;
593
- getVaccineCodeTextLocal(): string | undefined;
594
- setVaccineCodeDisplay(display?: string | null): this;
595
- getVaccineCodeDisplay(): string | undefined;
596
- setLocation(reference?: string | null): this;
597
- getLocation(): string | undefined;
598
- setManufacturer(reference?: string | null): this;
599
- getManufacturer(): string | undefined;
600
- setLotNumber(lotNumber?: string | null): this;
601
- getLotNumber(): string | undefined;
602
- setPerformerList(references: readonly string[]): this;
603
- getPerformerList(): string[];
604
- setReasonCode(code?: string | null): this;
605
- getReasonCode(): string | undefined;
606
- setStatusReason(reason?: string | null): this;
607
- getStatusReason(): string | undefined;
608
- setTargetDisease(code?: string | null): this;
609
- getTargetDisease(): string | undefined;
610
- setDoseSequence(sequence?: string | null): this;
611
- getDoseSequence(): string | undefined;
612
- setSeries(series?: string | null): this;
613
- getSeries(): string | undefined;
614
- setReactionDate(date?: string | null): this;
615
- getReactionDate(): string | undefined;
616
- setNote(note?: string | null): this;
617
- getNote(): string | undefined;
618
- setClinicalNote(note?: string | null): this;
619
- getClinicalNote(): string | undefined;
620
- }
621
- /** Claims-first editor for one staged Procedure entry. */
622
- export declare class ProcedureEntryEditor extends ClinicalResourceEntryEditor {
623
- setIdentifier(identifier?: string | null): this;
624
- getIdentifier(): string | undefined;
625
- ensureIdentifier(): string;
626
- setSubject(subject?: string | null): this;
627
- getSubject(): string | undefined;
628
- setStatus(status?: string | null): this;
629
- getStatus(): string | undefined;
630
- setDate(date?: string | null): this;
631
- getDate(): string | undefined;
632
- setCode(code?: string | null): this;
633
- getCode(): string | undefined;
634
- setCodeTextLocal(text?: string | null): this;
635
- getCodeTextLocal(): string | undefined;
636
- setCodeDisplay(display?: string | null): this;
637
- getCodeDisplay(): string | undefined;
638
- setEncounter(reference?: string | null): this;
639
- getEncounter(): string | undefined;
640
- setLocation(reference?: string | null): this;
641
- getLocation(): string | undefined;
642
- setReasonCode(code?: string | null): this;
643
- getReasonCode(): string | undefined;
644
- setNote(note?: string | null): this;
645
- getNote(): string | undefined;
646
- setClinicalNote(note?: string | null): this;
647
- getClinicalNote(): string | undefined;
648
- setPerformerList(references: readonly string[]): this;
649
- getPerformerList(): string[];
650
- setBasedOnList(references: readonly string[]): this;
651
- getBasedOnList(): string[];
652
- setReasonReferenceList(references: readonly string[]): this;
653
- getReasonReferenceList(): string[];
654
- }
655
- /** Claims-first editor for one staged DiagnosticReport entry. */
656
- export declare class DiagnosticReportEntryEditor extends ClinicalResourceEntryEditor {
657
- setIdentifier(identifier?: string | null): this;
658
- getIdentifier(): string | undefined;
659
- ensureIdentifier(): string;
660
- setSubject(subject?: string | null): this;
661
- getSubject(): string | undefined;
662
- setStatus(status?: string | null): this;
663
- getStatus(): string | undefined;
664
- setDate(date?: string | null): this;
665
- getDate(): string | undefined;
666
- setCategory(category?: string | null): this;
667
- getCategory(): string | undefined;
668
- setCode(code?: string | null): this;
669
- getCode(): string | undefined;
670
- setEncounter(reference?: string | null): this;
671
- getEncounter(): string | undefined;
672
- setPerformerList(references: readonly string[]): this;
673
- getPerformerList(): string[];
674
- setResultList(references: readonly string[]): this;
675
- getResultList(): string[];
676
- setSpecimenList(references: readonly string[]): this;
677
- getSpecimenList(): string[];
678
- setContainedDocumentIdentifierList(identifiers: readonly string[]): this;
679
- getContainedDocumentIdentifierList(): string[];
680
- setPresentedFormContentType(contentType?: string | null): this;
681
- getPresentedFormContentType(): string | undefined;
682
- setPresentedFormData(data?: string | null): this;
683
- getPresentedFormData(): string | undefined;
684
- setPresentedFormUrl(url?: string | null): this;
685
- getPresentedFormUrl(): string | undefined;
686
- }
687
- /**
688
- * Employee-specific editor for one staged bundle entry.
689
- *
690
- * Use this class after `bundle.newEntry().asEmployee()` or
691
- * `bundle.openEntry(...).asEmployee()`.
692
- */
693
- export declare class EmployeeEntryEditor extends BundleEntryEditor {
694
- /**
695
- * Writes the canonical employee identifier.
696
- *
697
- * The identifier is synchronized across:
698
- * - `entry.fullUrl`
699
- * - `resource.id`
700
- * - `org.schema.Person.identifier`
701
- */
702
- setIdentifier(identifier?: string | null): this;
703
- /** Reads the canonical employee identifier from claims, resource id, or fullUrl. */
704
- getIdentifier(): string | undefined;
705
- /** Ensures the employee entry carries one canonical `urn:uuid:*` identifier. */
706
- ensureIdentifier(): string;
707
- /** Writes the canonical employee email claim on this entry. */
708
- setEmail(email: string): this;
709
- /** Reads the canonical employee email claim from this entry. */
710
- getEmail(): string | undefined;
711
- /** Writes the canonical employee occupational role claim on this entry. */
712
- setRole(role: string): this;
713
- /** Reads the canonical employee occupational role claim from this entry. */
714
- getRole(): string | undefined;
715
- /** Writes the canonical employee `worksFor` claim on this entry. */
716
- setWorksFor(worksFor: string): this;
717
- /** Writes the canonical employee `memberOf` claim on this entry. */
718
- setMemberOf(memberOf: string): this;
719
- /** Writes the canonical employee organization tax id claim on this entry. */
720
- setMemberOfOrgTaxId(taxId: string): this;
721
- }
722
- export {};
1
+ export * from '../models/bundle-editor-types';
2
+ export * from './bundle-editor-core';
3
+ export * from './bundle-entry-editor';
4
+ export * from './observation-component-entry-editor';
5
+ export * from './vital-sign-entry-editor';
6
+ export * from './observation-entry-editor';
7
+ export * from './allergy-intolerance-entry-editor';
8
+ export * from './condition-entry-editor';
9
+ export * from './medication-statement-entry-editor';
10
+ export * from './document-reference-entry-editor';
11
+ export * from './care-plan-entry-editor';
12
+ export * from './flag-entry-editor';
13
+ export * from './clinical-impression-entry-editor';
14
+ export * from './device-entry-editor';
15
+ export * from './device-use-statement-entry-editor';
16
+ export * from './encounter-entry-editor';
17
+ export * from './coverage-entry-editor';
18
+ export * from './immunization-entry-editor';
19
+ export * from './procedure-entry-editor';
20
+ export * from './diagnostic-report-entry-editor';
21
+ export * from './employee-entry-editor';