@metriport/fhir-sdk 0.30.0-alpha.1

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 (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +564 -0
  3. package/dist/__tests__/careplan.test.d.ts +2 -0
  4. package/dist/__tests__/careplan.test.d.ts.map +1 -0
  5. package/dist/__tests__/careplan.test.js +544 -0
  6. package/dist/__tests__/careplan.test.js.map +1 -0
  7. package/dist/__tests__/clinical-dates.test.d.ts +2 -0
  8. package/dist/__tests__/clinical-dates.test.d.ts.map +1 -0
  9. package/dist/__tests__/clinical-dates.test.js +341 -0
  10. package/dist/__tests__/clinical-dates.test.js.map +1 -0
  11. package/dist/__tests__/coding-utilities.test.d.ts +2 -0
  12. package/dist/__tests__/coding-utilities.test.d.ts.map +1 -0
  13. package/dist/__tests__/coding-utilities.test.js +482 -0
  14. package/dist/__tests__/coding-utilities.test.js.map +1 -0
  15. package/dist/__tests__/date-range-performance.test.d.ts +2 -0
  16. package/dist/__tests__/date-range-performance.test.d.ts.map +1 -0
  17. package/dist/__tests__/date-range-performance.test.js +218 -0
  18. package/dist/__tests__/date-range-performance.test.js.map +1 -0
  19. package/dist/__tests__/date-range-search.test.d.ts +2 -0
  20. package/dist/__tests__/date-range-search.test.d.ts.map +1 -0
  21. package/dist/__tests__/date-range-search.test.js +215 -0
  22. package/dist/__tests__/date-range-search.test.js.map +1 -0
  23. package/dist/__tests__/env-setup.d.ts +2 -0
  24. package/dist/__tests__/env-setup.d.ts.map +1 -0
  25. package/dist/__tests__/env-setup.js +37 -0
  26. package/dist/__tests__/env-setup.js.map +1 -0
  27. package/dist/__tests__/fhir-bundle-sdk-basic.test.d.ts +2 -0
  28. package/dist/__tests__/fhir-bundle-sdk-basic.test.d.ts.map +1 -0
  29. package/dist/__tests__/fhir-bundle-sdk-basic.test.js +19 -0
  30. package/dist/__tests__/fhir-bundle-sdk-basic.test.js.map +1 -0
  31. package/dist/__tests__/fhir-bundle-sdk.test.d.ts +2 -0
  32. package/dist/__tests__/fhir-bundle-sdk.test.d.ts.map +1 -0
  33. package/dist/__tests__/fhir-bundle-sdk.test.js +953 -0
  34. package/dist/__tests__/fhir-bundle-sdk.test.js.map +1 -0
  35. package/dist/__tests__/fixtures/fhir-bundles.d.ts +31 -0
  36. package/dist/__tests__/fixtures/fhir-bundles.d.ts.map +1 -0
  37. package/dist/__tests__/fixtures/fhir-bundles.js +487 -0
  38. package/dist/__tests__/fixtures/fhir-bundles.js.map +1 -0
  39. package/dist/__tests__/phase1-verification.test.d.ts +2 -0
  40. package/dist/__tests__/phase1-verification.test.d.ts.map +1 -0
  41. package/dist/__tests__/phase1-verification.test.js +141 -0
  42. package/dist/__tests__/phase1-verification.test.js.map +1 -0
  43. package/dist/__tests__/phase2-verification.test.d.ts +2 -0
  44. package/dist/__tests__/phase2-verification.test.d.ts.map +1 -0
  45. package/dist/__tests__/phase2-verification.test.js +234 -0
  46. package/dist/__tests__/phase2-verification.test.js.map +1 -0
  47. package/dist/__tests__/phase3-verification.test.d.ts +2 -0
  48. package/dist/__tests__/phase3-verification.test.d.ts.map +1 -0
  49. package/dist/__tests__/phase3-verification.test.js +121 -0
  50. package/dist/__tests__/phase3-verification.test.js.map +1 -0
  51. package/dist/__tests__/phase4-verification.test.d.ts +2 -0
  52. package/dist/__tests__/phase4-verification.test.d.ts.map +1 -0
  53. package/dist/__tests__/phase4-verification.test.js +168 -0
  54. package/dist/__tests__/phase4-verification.test.js.map +1 -0
  55. package/dist/__tests__/phase5-verification.test.d.ts +2 -0
  56. package/dist/__tests__/phase5-verification.test.d.ts.map +1 -0
  57. package/dist/__tests__/phase5-verification.test.js +397 -0
  58. package/dist/__tests__/phase5-verification.test.js.map +1 -0
  59. package/dist/__tests__/reverse-references.test.d.ts +2 -0
  60. package/dist/__tests__/reverse-references.test.d.ts.map +1 -0
  61. package/dist/__tests__/reverse-references.test.js +294 -0
  62. package/dist/__tests__/reverse-references.test.js.map +1 -0
  63. package/dist/__tests__/type-guards.test.d.ts +2 -0
  64. package/dist/__tests__/type-guards.test.d.ts.map +1 -0
  65. package/dist/__tests__/type-guards.test.js +163 -0
  66. package/dist/__tests__/type-guards.test.js.map +1 -0
  67. package/dist/clinical-dates.d.ts +26 -0
  68. package/dist/clinical-dates.d.ts.map +1 -0
  69. package/dist/clinical-dates.js +571 -0
  70. package/dist/clinical-dates.js.map +1 -0
  71. package/dist/fhir-bundle-sdk.d.ts +233 -0
  72. package/dist/fhir-bundle-sdk.d.ts.map +1 -0
  73. package/dist/fhir-bundle-sdk.js +545 -0
  74. package/dist/fhir-bundle-sdk.js.map +1 -0
  75. package/dist/index.d.ts +8 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +23 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/internal/bundle-operations.d.ts +14 -0
  80. package/dist/internal/bundle-operations.d.ts.map +1 -0
  81. package/dist/internal/bundle-operations.js +55 -0
  82. package/dist/internal/bundle-operations.js.map +1 -0
  83. package/dist/internal/coding-systems.d.ts +48 -0
  84. package/dist/internal/coding-systems.d.ts.map +1 -0
  85. package/dist/internal/coding-systems.js +55 -0
  86. package/dist/internal/coding-systems.js.map +1 -0
  87. package/dist/internal/coding-utilities.d.ts +27 -0
  88. package/dist/internal/coding-utilities.d.ts.map +1 -0
  89. package/dist/internal/coding-utilities.js +297 -0
  90. package/dist/internal/coding-utilities.js.map +1 -0
  91. package/dist/internal/date-extraction.d.ts +12 -0
  92. package/dist/internal/date-extraction.d.ts.map +1 -0
  93. package/dist/internal/date-extraction.js +629 -0
  94. package/dist/internal/date-extraction.js.map +1 -0
  95. package/dist/internal/graph-traversal.d.ts +13 -0
  96. package/dist/internal/graph-traversal.d.ts.map +1 -0
  97. package/dist/internal/graph-traversal.js +89 -0
  98. package/dist/internal/graph-traversal.js.map +1 -0
  99. package/dist/internal/indexing.d.ts +17 -0
  100. package/dist/internal/indexing.d.ts.map +1 -0
  101. package/dist/internal/indexing.js +129 -0
  102. package/dist/internal/indexing.js.map +1 -0
  103. package/dist/internal/llm-context.d.ts +40 -0
  104. package/dist/internal/llm-context.d.ts.map +1 -0
  105. package/dist/internal/llm-context.js +214 -0
  106. package/dist/internal/llm-context.js.map +1 -0
  107. package/dist/internal/reference-resolution.d.ts +29 -0
  108. package/dist/internal/reference-resolution.d.ts.map +1 -0
  109. package/dist/internal/reference-resolution.js +338 -0
  110. package/dist/internal/reference-resolution.js.map +1 -0
  111. package/dist/internal/reference-utils.d.ts +26 -0
  112. package/dist/internal/reference-utils.d.ts.map +1 -0
  113. package/dist/internal/reference-utils.js +89 -0
  114. package/dist/internal/reference-utils.js.map +1 -0
  115. package/dist/internal/transparent-proxy.d.ts +12 -0
  116. package/dist/internal/transparent-proxy.d.ts.map +1 -0
  117. package/dist/internal/transparent-proxy.js +81 -0
  118. package/dist/internal/transparent-proxy.js.map +1 -0
  119. package/dist/internal/validation.d.ts +16 -0
  120. package/dist/internal/validation.d.ts.map +1 -0
  121. package/dist/internal/validation.js +45 -0
  122. package/dist/internal/validation.js.map +1 -0
  123. package/dist/type-guards.d.ts +212 -0
  124. package/dist/type-guards.d.ts.map +1 -0
  125. package/dist/type-guards.js +375 -0
  126. package/dist/type-guards.js.map +1 -0
  127. package/dist/types/coding-fields.d.ts +311 -0
  128. package/dist/types/coding-fields.d.ts.map +1 -0
  129. package/dist/types/coding-fields.js +3 -0
  130. package/dist/types/coding-fields.js.map +1 -0
  131. package/dist/types/sdk-types.d.ts +107 -0
  132. package/dist/types/sdk-types.d.ts.map +1 -0
  133. package/dist/types/sdk-types.js +17 -0
  134. package/dist/types/sdk-types.js.map +1 -0
  135. package/dist/types/smart-resources.d.ts +470 -0
  136. package/dist/types/smart-resources.d.ts.map +1 -0
  137. package/dist/types/smart-resources.js +249 -0
  138. package/dist/types/smart-resources.js.map +1 -0
  139. package/dist/utils/interval-tree/index.d.ts +87 -0
  140. package/dist/utils/interval-tree/index.d.ts.map +1 -0
  141. package/dist/utils/interval-tree/index.js +774 -0
  142. package/dist/utils/interval-tree/index.js.map +1 -0
  143. package/dist/utils/interval-tree/shallowequal/arrays.d.ts +3 -0
  144. package/dist/utils/interval-tree/shallowequal/arrays.d.ts.map +1 -0
  145. package/dist/utils/interval-tree/shallowequal/arrays.js +25 -0
  146. package/dist/utils/interval-tree/shallowequal/arrays.js.map +1 -0
  147. package/dist/utils/interval-tree/shallowequal/index.d.ts +6 -0
  148. package/dist/utils/interval-tree/shallowequal/index.d.ts.map +1 -0
  149. package/dist/utils/interval-tree/shallowequal/index.js +28 -0
  150. package/dist/utils/interval-tree/shallowequal/index.js.map +1 -0
  151. package/dist/utils/interval-tree/shallowequal/objects.d.ts +3 -0
  152. package/dist/utils/interval-tree/shallowequal/objects.d.ts.map +1 -0
  153. package/dist/utils/interval-tree/shallowequal/objects.js +28 -0
  154. package/dist/utils/interval-tree/shallowequal/objects.js.map +1 -0
  155. package/package.json +70 -0
@@ -0,0 +1,233 @@
1
+ import { Bundle, BundleEntry, Resource } from "@medplum/fhirtypes";
2
+ import { SmartAllergyIntolerance, SmartCarePlan, SmartComposition, SmartCondition, SmartCoverage, SmartDiagnosticReport, SmartDocumentReference, SmartEncounter, SmartFamilyMemberHistory, SmartImmunization, SmartLocation, SmartMedication, SmartMedicationAdministration, SmartMedicationDispense, SmartMedicationRequest, SmartMedicationStatement, SmartObservation, SmartOrganization, SmartPatient, SmartPractitioner, SmartProcedure, SmartRelatedPerson, SmartRiskAssessment, SmartServiceRequest, ToSmart } from "./types/coding-fields";
3
+ import { Smart } from "./types/smart-resources";
4
+ import { ValidationResult, BundleDiffResult, WalkOptions, LLMContextOptions, WalkResult, ReverseReferenceOptions, DateRangeSearchOptions } from "./types/sdk-types";
5
+ /**
6
+ * FHIR Bundle SDK for parsing, querying, and manipulating FHIR bundles with reference resolution
7
+ */
8
+ export declare class FhirBundleSdk {
9
+ private bundle;
10
+ private resourcesById;
11
+ private resourcesByFullUrl;
12
+ private resourcesByType;
13
+ private reverseReferencesById;
14
+ private dateRangeIndex;
15
+ private smartResourceCache;
16
+ private smartResourceArrayCache;
17
+ private resolutionStack;
18
+ /**
19
+ * Configuration for dynamically generated resource getter methods.
20
+ *
21
+ * Each entry in this array automatically generates both single and collection getter methods.
22
+ *
23
+ * **Example:**
24
+ * ```typescript
25
+ * {
26
+ * resourceType: 'Patient',
27
+ * singleGetterMethodName: 'getPatientById',
28
+ * collectionGetterMethodName: 'getPatients'
29
+ * }
30
+ * ```
31
+ *
32
+ * **Generates the equivalent of:**
33
+ * ```typescript
34
+ * // Single resource getter
35
+ * getPatientById(id: string): Smart<Patient> | undefined {
36
+ * return this.getResourceByIdAndType<Patient>(id, 'Patient');
37
+ * }
38
+ *
39
+ * // Collection getter
40
+ * getPatients(): Smart<Patient>[] {
41
+ * return this.getResourcesByType<Patient>('Patient');
42
+ * }
43
+ * ```
44
+ *
45
+ * **Usage:**
46
+ * ```typescript
47
+ * const sdk = await FhirBundleSdk.create(bundle);
48
+ * const patient = sdk.getPatientById('patient-123'); // Smart<Patient> | undefined
49
+ * const allPatients = sdk.getPatients(); // Smart<Patient>[]
50
+ * ```
51
+ *
52
+ * To add a new resource type, simply add a new entry to this array and declare
53
+ * the corresponding method signatures in the class body.
54
+ */
55
+ private static readonly RESOURCE_METHODS;
56
+ private constructor();
57
+ get total(): number;
58
+ get entry(): BundleEntry[];
59
+ toObject(): Bundle;
60
+ /**
61
+ * Strip non-clinical metadata from a FHIR resource to reduce noise for LLM consumption.
62
+ * Removes: meta, extension, modifierExtension, text, id, identifier, and all reference fields
63
+ * Returns an immutable copy without mutating the original.
64
+ */
65
+ static stripNonClinicalData<T extends Resource>(resource: T): T;
66
+ /**
67
+ * Create a new FhirBundleSdk instance (async for backwards compatibility)
68
+ * FR-1.2: Validate bundle resourceType
69
+ */
70
+ static create(bundle: Bundle): Promise<FhirBundleSdk>;
71
+ /**
72
+ * Create a new FhirBundleSdk instance synchronously
73
+ * FR-1.2: Validate bundle resourceType
74
+ */
75
+ static createSync(bundle: Bundle): FhirBundleSdk;
76
+ /**
77
+ * Create a smart resource with reference resolution methods
78
+ * FR-5.1: Resources returned by SDK have additional getter methods for each Reference field
79
+ * FR-5.7: Reference resolution operates in O(1) time complexity per reference
80
+ * FR-5.8: Original reference fields remain unchanged
81
+ */
82
+ private createSmartResource;
83
+ /**
84
+ * FR-2.1: Validate all references in the bundle
85
+ * FR-2.2: Identifies references by Resource/id pattern and fullUrl references
86
+ * FR-2.3: Handles both relative and absolute references
87
+ * FR-2.4: Returns validation result with broken reference details
88
+ */
89
+ lookForBrokenReferences(): ValidationResult;
90
+ /**
91
+ * FR-3.1: Get resource by ID with type parameter support
92
+ * FR-3.2: Method searches both resource.id and entry.fullUrl for matches
93
+ * FR-3.4: Method returns undefined if resource not found
94
+ * FR-3.5: Lookup operates in O(1) time complexity
95
+ * FR-5.1: Returns smart resource with reference resolution methods
96
+ */
97
+ getResourceById<T extends Resource>(id: string): ToSmart<T> | undefined;
98
+ /**
99
+ * Generic helper method to get a resource by ID with type validation
100
+ */
101
+ private getResourceByIdAndType;
102
+ getPatientById: (id: string) => SmartPatient | undefined;
103
+ getObservationById: (id: string) => SmartObservation | undefined;
104
+ getEncounterById: (id: string) => SmartEncounter | undefined;
105
+ getAllergyIntoleranceById: (id: string) => SmartAllergyIntolerance | undefined;
106
+ getConditionById: (id: string) => SmartCondition | undefined;
107
+ getOrganizationById: (id: string) => SmartOrganization | undefined;
108
+ getLocationById: (id: string) => SmartLocation | undefined;
109
+ getPractitionerById: (id: string) => SmartPractitioner | undefined;
110
+ getDiagnosticReportById: (id: string) => SmartDiagnosticReport | undefined;
111
+ getCompositionById: (id: string) => SmartComposition | undefined;
112
+ getCoverageById: (id: string) => SmartCoverage | undefined;
113
+ getDocumentReferenceById: (id: string) => SmartDocumentReference | undefined;
114
+ getImmunizationById: (id: string) => SmartImmunization | undefined;
115
+ getMedicationById: (id: string) => SmartMedication | undefined;
116
+ getMedicationRequestById: (id: string) => SmartMedicationRequest | undefined;
117
+ getProcedureById: (id: string) => SmartProcedure | undefined;
118
+ getFamilyMemberHistoryById: (id: string) => SmartFamilyMemberHistory | undefined;
119
+ getMedicationAdministrationById: (id: string) => SmartMedicationAdministration | undefined;
120
+ getMedicationDispenseById: (id: string) => SmartMedicationDispense | undefined;
121
+ getMedicationStatementById: (id: string) => SmartMedicationStatement | undefined;
122
+ getRelatedPersonById: (id: string) => SmartRelatedPerson | undefined;
123
+ getRiskAssessmentById: (id: string) => SmartRiskAssessment | undefined;
124
+ getServiceRequestById: (id: string) => SmartServiceRequest | undefined;
125
+ getCarePlanById: (id: string) => SmartCarePlan | undefined;
126
+ /**
127
+ * Generic helper method to get all resources of a specific type
128
+ * FR-10.1: Returns references to cached objects, not copies
129
+ */
130
+ private getResourcesByType;
131
+ getPatients: () => SmartPatient[];
132
+ getObservations: () => SmartObservation[];
133
+ getEncounters: () => SmartEncounter[];
134
+ getPractitioners: () => SmartPractitioner[];
135
+ getDiagnosticReports: () => SmartDiagnosticReport[];
136
+ getAllergyIntolerances: () => SmartAllergyIntolerance[];
137
+ getConditions: () => SmartCondition[];
138
+ getOrganizations: () => SmartOrganization[];
139
+ getLocations: () => SmartLocation[];
140
+ getCompositions: () => SmartComposition[];
141
+ getCoverages: () => SmartCoverage[];
142
+ getDocumentReferences: () => SmartDocumentReference[];
143
+ getImmunizations: () => SmartImmunization[];
144
+ getMedications: () => SmartMedication[];
145
+ getMedicationRequests: () => SmartMedicationRequest[];
146
+ getProcedures: () => SmartProcedure[];
147
+ getFamilyMemberHistories: () => SmartFamilyMemberHistory[];
148
+ getMedicationAdministrations: () => SmartMedicationAdministration[];
149
+ getMedicationDispenses: () => SmartMedicationDispense[];
150
+ getMedicationStatements: () => SmartMedicationStatement[];
151
+ getRelatedPersons: () => SmartRelatedPerson[];
152
+ getRiskAssessments: () => SmartRiskAssessment[];
153
+ getServiceRequests: () => SmartServiceRequest[];
154
+ getCarePlans: () => SmartCarePlan[];
155
+ /**
156
+ * FR-6.1: Export subset of resources by their IDs
157
+ * FR-6.4: Exported bundles maintain original bundle metadata but update total count
158
+ * FR-6.5: Exported bundles include only resources that exist in the original bundle
159
+ * FR-6.6: Exported bundles preserve original entry.fullUrl values
160
+ */
161
+ exportSubset(resourceIds: string[]): Bundle;
162
+ /**
163
+ * FR-6.2: Export all resources of a specific type
164
+ * FR-6.4: Exported bundles maintain original bundle metadata but update total count
165
+ * FR-6.6: Exported bundles preserve original entry.fullUrl values
166
+ */
167
+ exportByType(resourceType: string): Bundle;
168
+ /**
169
+ * FR-6.3: Export all resources of specified types
170
+ * FR-6.4: Exported bundles maintain original bundle metadata but update total count
171
+ * FR-6.6: Exported bundles preserve original entry.fullUrl values
172
+ */
173
+ exportByTypes(resourceTypes: string[]): Bundle;
174
+ /**
175
+ * Concatenate entries from another FhirBundleSdk with this bundle
176
+ * Returns a new bundle with combined entries while preserving original metadata
177
+ */
178
+ concatEntries(otherSdk: FhirBundleSdk): Promise<FhirBundleSdk>;
179
+ /**
180
+ * Diff this bundle with another FHIR Bundle by comparing resource ids.
181
+ * Returns three FhirBundleSdk instances: common, baseOnly, parameterOnly.
182
+ */
183
+ diff(other: Bundle): Promise<BundleDiffResult>;
184
+ /**
185
+ * Diff this bundle with another FhirBundleSdk by comparing resource ids.
186
+ * Returns three FhirBundleSdk instances: common, baseOnly, parameterOnly.
187
+ */
188
+ diff(other: FhirBundleSdk): Promise<BundleDiffResult>;
189
+ /**
190
+ * Walk references from a starting resource using BFS traversal.
191
+ * Discovers all reachable resources up to maxDepth levels.
192
+ *
193
+ * @param startResource - The smart resource to start traversal from
194
+ * @param options - Walk options including maxDepth and includeStartResource
195
+ * @returns WalkResult containing all discovered resources organized by depth
196
+ */
197
+ walkReferences<T extends Resource>(startResource: Smart<T>, options?: WalkOptions): WalkResult<T>;
198
+ /**
199
+ * Generate LLM-friendly context from a starting resource and its related resources.
200
+ * Uses BFS to discover related resources, strips non-clinical data, and formats output.
201
+ *
202
+ * @param startResource - The smart resource to start traversal from
203
+ * @param options - Options for depth, inclusion, and format
204
+ * @returns Formatted string suitable for LLM context
205
+ */
206
+ generateLLMContext<T extends Resource>(startResource: Smart<T>, options?: LLMContextOptions): string;
207
+ /**
208
+ * Get all resources that reference a given resource ID (reverse reference lookup).
209
+ * Operates in O(1) time complexity.
210
+ *
211
+ * @param targetId - The ID of the resource to find references to
212
+ * @param options - Optional filters for resourceType and referenceField
213
+ * @returns Array of smart resources that reference the target resource
214
+ */
215
+ getResourcesReferencingId<T extends Resource = Resource>(targetId: string, options?: ReverseReferenceOptions): ToSmart<T>[];
216
+ /**
217
+ * Get all resources referenced by a given resource (forward reference lookup).
218
+ * Returns all resources that the given resource points to based on REFERENCE_METHOD_MAPPING.
219
+ *
220
+ * @param resource - The smart resource to get references from
221
+ * @returns Array of smart resources referenced by the given resource
222
+ */
223
+ getResourcesReferencedBy<T extends Resource = Resource>(resource: Smart<Resource>): ToSmart<T>[];
224
+ /**
225
+ * Search for resources by date range using interval tree.
226
+ * Operates in O(log n + k) time complexity, where k is the number of matching intervals.
227
+ *
228
+ * @param options - Search options including date range and optional filters
229
+ * @returns Array of smart resources that match the date range criteria
230
+ */
231
+ searchByDateRange<T extends Resource = Resource>(options: DateRangeSearchOptions): ToSmart<T>[];
232
+ }
233
+ //# sourceMappingURL=fhir-bundle-sdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fhir-bundle-sdk.d.ts","sourceRoot":"","sources":["../src/fhir-bundle-sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,E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