@metriport/fhir-sdk 1.2.7 → 1.3.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 (92) hide show
  1. package/README.md +207 -0
  2. package/dist/__tests__/clinical-dates.test.d.ts +2 -0
  3. package/dist/__tests__/clinical-dates.test.d.ts.map +1 -0
  4. package/dist/__tests__/clinical-dates.test.js +341 -0
  5. package/dist/__tests__/clinical-dates.test.js.map +1 -0
  6. package/dist/__tests__/date-range-performance.test.d.ts +2 -0
  7. package/dist/__tests__/date-range-performance.test.d.ts.map +1 -0
  8. package/dist/__tests__/date-range-performance.test.js +218 -0
  9. package/dist/__tests__/date-range-performance.test.js.map +1 -0
  10. package/dist/__tests__/date-range-search.test.d.ts +2 -0
  11. package/dist/__tests__/date-range-search.test.d.ts.map +1 -0
  12. package/dist/__tests__/date-range-search.test.js +215 -0
  13. package/dist/__tests__/date-range-search.test.js.map +1 -0
  14. package/dist/__tests__/fhir-bundle-sdk.test.js +467 -0
  15. package/dist/__tests__/fhir-bundle-sdk.test.js.map +1 -1
  16. package/dist/__tests__/reverse-references.test.d.ts +2 -0
  17. package/dist/__tests__/reverse-references.test.d.ts.map +1 -0
  18. package/dist/__tests__/reverse-references.test.js +241 -0
  19. package/dist/__tests__/reverse-references.test.js.map +1 -0
  20. package/dist/clinical-dates.d.ts +26 -0
  21. package/dist/clinical-dates.d.ts.map +1 -0
  22. package/dist/clinical-dates.js +571 -0
  23. package/dist/clinical-dates.js.map +1 -0
  24. package/dist/demo-reverse-references.d.ts +7 -0
  25. package/dist/demo-reverse-references.d.ts.map +1 -0
  26. package/dist/demo-reverse-references.js +207 -0
  27. package/dist/demo-reverse-references.js.map +1 -0
  28. package/dist/fhir-bundle-sdk.d.ts +222 -0
  29. package/dist/fhir-bundle-sdk.d.ts.map +1 -0
  30. package/dist/fhir-bundle-sdk.js +527 -0
  31. package/dist/fhir-bundle-sdk.js.map +1 -0
  32. package/dist/index.d.ts +3 -242
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +5 -678
  35. package/dist/index.js.map +1 -1
  36. package/dist/internal/bundle-operations.d.ts +14 -0
  37. package/dist/internal/bundle-operations.d.ts.map +1 -0
  38. package/dist/internal/bundle-operations.js +55 -0
  39. package/dist/internal/bundle-operations.js.map +1 -0
  40. package/dist/internal/date-extraction.d.ts +12 -0
  41. package/dist/internal/date-extraction.d.ts.map +1 -0
  42. package/dist/internal/date-extraction.js +629 -0
  43. package/dist/internal/date-extraction.js.map +1 -0
  44. package/dist/internal/graph-traversal.d.ts +13 -0
  45. package/dist/internal/graph-traversal.d.ts.map +1 -0
  46. package/dist/internal/graph-traversal.js +89 -0
  47. package/dist/internal/graph-traversal.js.map +1 -0
  48. package/dist/internal/indexing.d.ts +17 -0
  49. package/dist/internal/indexing.d.ts.map +1 -0
  50. package/dist/internal/indexing.js +118 -0
  51. package/dist/internal/indexing.js.map +1 -0
  52. package/dist/internal/llm-context.d.ts +39 -0
  53. package/dist/internal/llm-context.d.ts.map +1 -0
  54. package/dist/internal/llm-context.js +188 -0
  55. package/dist/internal/llm-context.js.map +1 -0
  56. package/dist/internal/reference-resolution.d.ts +25 -0
  57. package/dist/internal/reference-resolution.d.ts.map +1 -0
  58. package/dist/internal/reference-resolution.js +133 -0
  59. package/dist/internal/reference-resolution.js.map +1 -0
  60. package/dist/internal/reference-utils.d.ts +26 -0
  61. package/dist/internal/reference-utils.d.ts.map +1 -0
  62. package/dist/internal/reference-utils.js +89 -0
  63. package/dist/internal/reference-utils.js.map +1 -0
  64. package/dist/internal/validation.d.ts +16 -0
  65. package/dist/internal/validation.d.ts.map +1 -0
  66. package/dist/internal/validation.js +45 -0
  67. package/dist/internal/validation.js.map +1 -0
  68. package/dist/types/sdk-types.d.ts +107 -0
  69. package/dist/types/sdk-types.d.ts.map +1 -0
  70. package/dist/types/sdk-types.js +17 -0
  71. package/dist/types/sdk-types.js.map +1 -0
  72. package/dist/types/smart-resources.d.ts +97 -4
  73. package/dist/types/smart-resources.d.ts.map +1 -1
  74. package/dist/types/smart-resources.js +82 -5
  75. package/dist/types/smart-resources.js.map +1 -1
  76. package/dist/utils/interval-tree/index.d.ts +87 -0
  77. package/dist/utils/interval-tree/index.d.ts.map +1 -0
  78. package/dist/utils/interval-tree/index.js +774 -0
  79. package/dist/utils/interval-tree/index.js.map +1 -0
  80. package/dist/utils/interval-tree/shallowequal/arrays.d.ts +3 -0
  81. package/dist/utils/interval-tree/shallowequal/arrays.d.ts.map +1 -0
  82. package/dist/utils/interval-tree/shallowequal/arrays.js +25 -0
  83. package/dist/utils/interval-tree/shallowequal/arrays.js.map +1 -0
  84. package/dist/utils/interval-tree/shallowequal/index.d.ts +6 -0
  85. package/dist/utils/interval-tree/shallowequal/index.d.ts.map +1 -0
  86. package/dist/utils/interval-tree/shallowequal/index.js +28 -0
  87. package/dist/utils/interval-tree/shallowequal/index.js.map +1 -0
  88. package/dist/utils/interval-tree/shallowequal/objects.d.ts +3 -0
  89. package/dist/utils/interval-tree/shallowequal/objects.d.ts.map +1 -0
  90. package/dist/utils/interval-tree/shallowequal/objects.js +28 -0
  91. package/dist/utils/interval-tree/shallowequal/objects.js.map +1 -0
  92. package/package.json +1 -1
package/README.md CHANGED
@@ -67,6 +67,170 @@ console.log(result.hasBrokenReferences); // true if at least one broken referenc
67
67
  console.log(result.brokenReferences); // All broken references in bundle
68
68
  ```
69
69
 
70
+ ### 5. Reverse Reference Lookup
71
+
72
+ Find all resources that reference a given resource (reverse lookup). This is useful for discovering what refers to a specific resource.
73
+
74
+ ```typescript
75
+ const patient = sdk.getPatientById("patient-123");
76
+
77
+ // Find all resources that reference this patient
78
+ const referencingResources = sdk.getResourcesReferencingId("patient-123");
79
+ console.log(referencingResources); // [Observation, Encounter, DiagnosticReport, ...]
80
+
81
+ // Filter by resource type
82
+ const observations = sdk.getResourcesReferencingId("patient-123", {
83
+ resourceType: "Observation",
84
+ });
85
+
86
+ // Filter by reference field
87
+ const subjectReferences = sdk.getResourcesReferencingId("patient-123", {
88
+ referenceField: "subject",
89
+ });
90
+
91
+ // Use smart resource method
92
+ const backRefs = patient.getReferencingResources();
93
+ const encounteredObs = patient.getReferencingResources({
94
+ resourceType: "Observation",
95
+ referenceField: "subject",
96
+ });
97
+ ```
98
+
99
+ **Key Features:**
100
+
101
+ - **O(1) lookup** - constant time performance
102
+ - **Flexible filtering** - by resource type and/or reference field
103
+ - **Smart resources** - returns fully functional Smart resources
104
+ - **Bi-directional** - complements forward reference navigation
105
+
106
+ ### 6. Date Range Search
107
+
108
+ Search for resources by date range using an interval tree index. This is useful for filtering resources by clinical dates efficiently.
109
+
110
+ ```typescript
111
+ const sdk = await FhirBundleSdk.create(bundle);
112
+
113
+ // Basic date range search
114
+ const results = sdk.searchByDateRange({
115
+ dateFrom: "2024-01-01",
116
+ dateTo: "2024-01-31",
117
+ });
118
+
119
+ // Filter by resource type
120
+ const observations = sdk.searchByDateRange({
121
+ dateFrom: "2024-01-01",
122
+ dateTo: "2024-12-31",
123
+ resourceTypes: ["Observation", "Condition"],
124
+ });
125
+
126
+ // Filter by specific date field
127
+ const recordedConditions = sdk.searchByDateRange({
128
+ dateFrom: "2024-01-01",
129
+ dateTo: "2024-12-31",
130
+ dateFields: ["recordedDate"],
131
+ });
132
+
133
+ // Use Date objects
134
+ const recentResources = sdk.searchByDateRange({
135
+ dateFrom: new Date("2024-01-01"),
136
+ dateTo: new Date(),
137
+ });
138
+ ```
139
+
140
+ **Key Features:**
141
+
142
+ - **O(log n + k) search** - efficient interval tree-based search where k is the number of matching resources
143
+ - **Multiple date fields** - indexes primary clinical dates (effectiveDateTime, onset, performed) and recorded dates
144
+ - **Flexible filtering** - by resource type and/or specific date fields
145
+ - **Smart resources** - returns fully functional Smart resources
146
+ - **Period support** - handles both single date fields and date periods/ranges
147
+
148
+ **Indexed Resource Types:**
149
+
150
+ The following resource types and date fields are automatically indexed:
151
+
152
+ - **Observation**: effectiveDateTime, effectivePeriod, effectiveInstant, issued
153
+ - **Condition**: onsetDateTime, onsetPeriod, abatementDateTime, abatementPeriod, recordedDate
154
+ - **Encounter**: period
155
+ - **Procedure**: performedDateTime, performedPeriod
156
+ - **Immunization**: occurrenceDateTime, recorded
157
+ - **DiagnosticReport**: effectiveDateTime, effectivePeriod, issued
158
+ - **MedicationRequest**: authoredOn
159
+ - **MedicationAdministration**: effectiveDateTime, effectivePeriod
160
+ - **MedicationStatement**: effectiveDateTime, effectivePeriod
161
+ - **MedicationDispense**: whenHandedOver, whenPrepared
162
+ - **DocumentReference**: date, context.period
163
+ - **Composition**: date
164
+ - **Coverage**: period
165
+ - **AllergyIntolerance**: onsetDateTime, onsetPeriod, lastOccurrence, recordedDate
166
+
167
+ ### 7. Reference Walking (BFS Traversal)
168
+
169
+ Walk the reference graph starting from any resource using breadth-first search (BFS). This is useful for discovering all resources connected to a specific resource.
170
+
171
+ ```typescript
172
+ const observation = sdk.getObservationById("obs-123");
173
+
174
+ // Walk all reachable resources
175
+ const result = sdk.walkReferences(observation);
176
+ console.log(result.allResources); // All resources reachable from observation
177
+ console.log(result.resourcesByDepth); // Resources organized by depth level
178
+ console.log(result.depthReached); // Maximum depth traversed
179
+
180
+ // Limit traversal depth
181
+ const limitedResult = sdk.walkReferences(observation, { maxDepth: 2 });
182
+
183
+ // Exclude the start resource from results
184
+ const withoutStart = sdk.walkReferences(observation, { includeStartResource: false });
185
+ ```
186
+
187
+ ### 7. LLM Context Generation
188
+
189
+ Generate comprehensive, LLM-friendly context from a resource and its related resources. This automatically performs BFS traversal, strips non-clinical metadata, and formats the output for optimal LLM consumption.
190
+
191
+ ```typescript
192
+ const observation = sdk.getObservationById("obs-123");
193
+
194
+ // Generate structured text context (default, best for LLMs)
195
+ const llmContext = sdk.generateLLMContext(observation, {
196
+ maxDepth: 2, // Default: 2
197
+ format: "structured-text", // Default: 'structured-text'
198
+ });
199
+
200
+ // Send to your LLM
201
+ await llm.chat({
202
+ messages: [
203
+ { role: "system", content: "You are a medical data analyst." },
204
+ { role: "user", content: `Analyze this patient data:\n\n${llmContext}` },
205
+ ],
206
+ });
207
+
208
+ // Alternative: JSON format
209
+ const jsonContext = sdk.generateLLMContext(observation, {
210
+ format: "json",
211
+ });
212
+ ```
213
+
214
+ **Features:**
215
+
216
+ - Automatically discovers all related resources via BFS traversal
217
+ - Strips non-clinical metadata (`meta`, `extension`, `text`) to reduce tokens by ~30-40%
218
+ - Organizes resources hierarchically (primary → directly referenced → indirectly referenced)
219
+ - Groups resources by type within each depth level
220
+ - Logs resource counts for debugging (not included in output)
221
+
222
+ **Static Helper:**
223
+
224
+ You can also strip non-clinical data from any resource independently:
225
+
226
+ ```typescript
227
+ import { FhirBundleSdk } from "@metriport/fhir-sdk";
228
+
229
+ const cleanedPatient = FhirBundleSdk.stripNonClinicalData(patient);
230
+ // Removes: meta, extension, modifierExtension, text
231
+ // Returns immutable copy
232
+ ```
233
+
70
234
  ## Example Use Cases
71
235
 
72
236
  ### Patient Summary
@@ -91,6 +255,28 @@ const buildPatientSummary = (patientId: string) => {
91
255
  const orgName = sdk.getPatients()[0]?.getManagingOrganization()?.name;
92
256
  ```
93
257
 
258
+ ### Extract Related Resources
259
+
260
+ ```typescript
261
+ // Get all resources related to a specific observation
262
+ const extractRelatedResources = (observationId: string) => {
263
+ const observation = sdk.getObservationById(observationId);
264
+ if (!observation) return null;
265
+
266
+ // Walk the graph to find all related resources up to 2 levels deep
267
+ const result = sdk.walkReferences(observation, { maxDepth: 2 });
268
+
269
+ return {
270
+ observation,
271
+ relatedResourceCount: result.allResources.length,
272
+ resourcesByType: result.allResources.reduce((acc, resource) => {
273
+ acc[resource.resourceType] = (acc[resource.resourceType] || 0) + 1;
274
+ return acc;
275
+ }, {} as Record<string, number>),
276
+ };
277
+ };
278
+ ```
279
+
94
280
  ### Example Use Case: Processing a bundle
95
281
 
96
282
  ```typescript
@@ -122,3 +308,24 @@ const processBundle = async (bundle: Bundle) => {
122
308
  - **getById**: O(1) lookup
123
309
  - **getByType**: O(n) where n = resources of that type
124
310
  - **Reference resolution**: O(1) traversal
311
+ - **Reverse reference lookup**: O(1) lookup
312
+
313
+ ## Demo
314
+
315
+ To see reverse reference functionality in action, run:
316
+
317
+ ```bash
318
+ # From the utils package
319
+ cd packages/utils
320
+ npx ts-node src/fhir-sdk/demo-reverse-references.ts --bundle-path /path/to/your/bundle.json
321
+ ```
322
+
323
+ The demo will:
324
+
325
+ - Automatically find the first patient in your bundle
326
+ - Showcase all reverse reference capabilities:
327
+ - Finding all resources that reference a specific resource
328
+ - Filtering by resource type and reference field
329
+ - Using smart resource methods
330
+ - Bi-directional navigation
331
+ - Performance characteristics
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=clinical-dates.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clinical-dates.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/clinical-dates.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,341 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const clinical_dates_1 = require("../clinical-dates");
4
+ describe("getClinicalDateRange", () => {
5
+ describe("Observation", () => {
6
+ it("returns effectiveDateTime as primary date", () => {
7
+ const observation = {
8
+ resourceType: "Observation",
9
+ id: "obs-1",
10
+ status: "final",
11
+ code: { text: "Test" },
12
+ effectiveDateTime: "2023-05-15T10:30:00Z",
13
+ issued: "2023-05-16T08:00:00Z",
14
+ };
15
+ const result = (0, clinical_dates_1.getClinicalDateRange)(observation);
16
+ expect(result).toEqual({
17
+ startDate: "2023-05-15T10:30:00Z",
18
+ });
19
+ });
20
+ it("returns effectivePeriod when effectiveDateTime not present", () => {
21
+ const observation = {
22
+ resourceType: "Observation",
23
+ id: "obs-2",
24
+ status: "final",
25
+ code: { text: "Test" },
26
+ effectivePeriod: {
27
+ start: "2023-05-10T00:00:00Z",
28
+ end: "2023-05-15T00:00:00Z",
29
+ },
30
+ issued: "2023-05-16T08:00:00Z",
31
+ };
32
+ const result = (0, clinical_dates_1.getClinicalDateRange)(observation);
33
+ expect(result).toEqual({
34
+ startDate: "2023-05-10T00:00:00Z",
35
+ endDate: "2023-05-15T00:00:00Z",
36
+ });
37
+ });
38
+ it("returns effectivePeriod with only end date", () => {
39
+ const observation = {
40
+ resourceType: "Observation",
41
+ id: "obs-3",
42
+ status: "final",
43
+ code: { text: "Test" },
44
+ effectivePeriod: {
45
+ end: "2023-05-15T00:00:00Z",
46
+ },
47
+ };
48
+ const result = (0, clinical_dates_1.getClinicalDateRange)(observation);
49
+ expect(result).toEqual({
50
+ startDate: "2023-05-15T00:00:00Z",
51
+ endDate: "2023-05-15T00:00:00Z",
52
+ });
53
+ });
54
+ it("returns issued when no effective date", () => {
55
+ const observation = {
56
+ resourceType: "Observation",
57
+ id: "obs-4",
58
+ status: "final",
59
+ code: { text: "Test" },
60
+ issued: "2023-05-16T08:00:00Z",
61
+ };
62
+ const result = (0, clinical_dates_1.getClinicalDateRange)(observation);
63
+ expect(result).toEqual({
64
+ startDate: "2023-05-16T08:00:00Z",
65
+ });
66
+ });
67
+ it("returns undefined when no dates present", () => {
68
+ const observation = {
69
+ resourceType: "Observation",
70
+ id: "obs-5",
71
+ status: "final",
72
+ code: { text: "Test" },
73
+ };
74
+ const result = (0, clinical_dates_1.getClinicalDateRange)(observation);
75
+ expect(result).toBeUndefined();
76
+ });
77
+ });
78
+ describe("Condition", () => {
79
+ it("returns onsetDateTime as primary date", () => {
80
+ const condition = {
81
+ resourceType: "Condition",
82
+ id: "cond-1",
83
+ subject: { reference: "Patient/1" },
84
+ onsetDateTime: "2023-01-15T00:00:00Z",
85
+ recordedDate: "2023-01-20T00:00:00Z",
86
+ };
87
+ const result = (0, clinical_dates_1.getClinicalDateRange)(condition);
88
+ expect(result).toEqual({
89
+ startDate: "2023-01-15T00:00:00Z",
90
+ });
91
+ });
92
+ it("returns onsetPeriod when onsetDateTime not present", () => {
93
+ const condition = {
94
+ resourceType: "Condition",
95
+ id: "cond-2",
96
+ subject: { reference: "Patient/1" },
97
+ onsetPeriod: {
98
+ start: "2023-01-01T00:00:00Z",
99
+ end: "2023-01-31T00:00:00Z",
100
+ },
101
+ };
102
+ const result = (0, clinical_dates_1.getClinicalDateRange)(condition);
103
+ expect(result).toEqual({
104
+ startDate: "2023-01-01T00:00:00Z",
105
+ endDate: "2023-01-31T00:00:00Z",
106
+ });
107
+ });
108
+ it("returns recordedDate as fallback", () => {
109
+ const condition = {
110
+ resourceType: "Condition",
111
+ id: "cond-3",
112
+ subject: { reference: "Patient/1" },
113
+ recordedDate: "2023-01-20T00:00:00Z",
114
+ };
115
+ const result = (0, clinical_dates_1.getClinicalDateRange)(condition);
116
+ expect(result).toEqual({
117
+ startDate: "2023-01-20T00:00:00Z",
118
+ });
119
+ });
120
+ });
121
+ describe("Procedure", () => {
122
+ it("returns performedDateTime as primary date", () => {
123
+ const procedure = {
124
+ resourceType: "Procedure",
125
+ id: "proc-1",
126
+ status: "completed",
127
+ subject: { reference: "Patient/1" },
128
+ performedDateTime: "2023-03-10T14:30:00Z",
129
+ };
130
+ const result = (0, clinical_dates_1.getClinicalDateRange)(procedure);
131
+ expect(result).toEqual({
132
+ startDate: "2023-03-10T14:30:00Z",
133
+ });
134
+ });
135
+ it("returns performedPeriod when performedDateTime not present", () => {
136
+ const procedure = {
137
+ resourceType: "Procedure",
138
+ id: "proc-2",
139
+ status: "completed",
140
+ subject: { reference: "Patient/1" },
141
+ performedPeriod: {
142
+ start: "2023-03-10T14:00:00Z",
143
+ end: "2023-03-10T16:00:00Z",
144
+ },
145
+ };
146
+ const result = (0, clinical_dates_1.getClinicalDateRange)(procedure);
147
+ expect(result).toEqual({
148
+ startDate: "2023-03-10T14:00:00Z",
149
+ endDate: "2023-03-10T16:00:00Z",
150
+ });
151
+ });
152
+ });
153
+ describe("Encounter", () => {
154
+ it("returns period as primary date", () => {
155
+ const encounter = {
156
+ resourceType: "Encounter",
157
+ id: "enc-1",
158
+ status: "finished",
159
+ class: { code: "AMB" },
160
+ period: {
161
+ start: "2023-04-01T09:00:00Z",
162
+ end: "2023-04-01T10:00:00Z",
163
+ },
164
+ };
165
+ const result = (0, clinical_dates_1.getClinicalDateRange)(encounter);
166
+ expect(result).toEqual({
167
+ startDate: "2023-04-01T09:00:00Z",
168
+ endDate: "2023-04-01T10:00:00Z",
169
+ });
170
+ });
171
+ it("returns undefined when no period", () => {
172
+ const encounter = {
173
+ resourceType: "Encounter",
174
+ id: "enc-2",
175
+ status: "finished",
176
+ class: { code: "AMB" },
177
+ };
178
+ const result = (0, clinical_dates_1.getClinicalDateRange)(encounter);
179
+ expect(result).toBeUndefined();
180
+ });
181
+ });
182
+ describe("AllergyIntolerance", () => {
183
+ it("returns onsetDateTime as primary date", () => {
184
+ const allergy = {
185
+ resourceType: "AllergyIntolerance",
186
+ id: "allergy-1",
187
+ patient: { reference: "Patient/1" },
188
+ onsetDateTime: "2022-06-15T00:00:00Z",
189
+ recordedDate: "2022-06-20T00:00:00Z",
190
+ };
191
+ const result = (0, clinical_dates_1.getClinicalDateRange)(allergy);
192
+ expect(result).toEqual({
193
+ startDate: "2022-06-15T00:00:00Z",
194
+ });
195
+ });
196
+ });
197
+ describe("DiagnosticReport", () => {
198
+ it("returns effectiveDateTime as primary date", () => {
199
+ const report = {
200
+ resourceType: "DiagnosticReport",
201
+ id: "report-1",
202
+ status: "final",
203
+ code: { text: "Lab Report" },
204
+ effectiveDateTime: "2023-07-10T08:00:00Z",
205
+ issued: "2023-07-11T10:00:00Z",
206
+ };
207
+ const result = (0, clinical_dates_1.getClinicalDateRange)(report);
208
+ expect(result).toEqual({
209
+ startDate: "2023-07-10T08:00:00Z",
210
+ });
211
+ });
212
+ });
213
+ describe("MedicationRequest", () => {
214
+ it("returns authoredOn as primary date", () => {
215
+ const medRequest = {
216
+ resourceType: "MedicationRequest",
217
+ id: "med-1",
218
+ status: "active",
219
+ intent: "order",
220
+ subject: { reference: "Patient/1" },
221
+ authoredOn: "2023-08-05T12:00:00Z",
222
+ };
223
+ const result = (0, clinical_dates_1.getClinicalDateRange)(medRequest);
224
+ expect(result).toEqual({
225
+ startDate: "2023-08-05T12:00:00Z",
226
+ });
227
+ });
228
+ });
229
+ describe("Immunization", () => {
230
+ it("returns occurrenceDateTime as primary date", () => {
231
+ const immunization = {
232
+ resourceType: "Immunization",
233
+ id: "imm-1",
234
+ status: "completed",
235
+ vaccineCode: { text: "Flu vaccine" },
236
+ patient: { reference: "Patient/1" },
237
+ occurrenceDateTime: "2023-09-15T10:00:00Z",
238
+ };
239
+ const result = (0, clinical_dates_1.getClinicalDateRange)(immunization);
240
+ expect(result).toEqual({
241
+ startDate: "2023-09-15T10:00:00Z",
242
+ });
243
+ });
244
+ it("returns recorded when occurrenceDateTime not present", () => {
245
+ const immunization = {
246
+ resourceType: "Immunization",
247
+ id: "imm-2",
248
+ status: "completed",
249
+ vaccineCode: { text: "Flu vaccine" },
250
+ patient: { reference: "Patient/1" },
251
+ recorded: "2023-09-16T08:00:00Z",
252
+ };
253
+ const result = (0, clinical_dates_1.getClinicalDateRange)(immunization);
254
+ expect(result).toEqual({
255
+ startDate: "2023-09-16T08:00:00Z",
256
+ });
257
+ });
258
+ });
259
+ describe("DocumentReference", () => {
260
+ it("returns date as primary date", () => {
261
+ const doc = {
262
+ resourceType: "DocumentReference",
263
+ id: "doc-1",
264
+ status: "current",
265
+ content: [],
266
+ date: "2023-10-01T00:00:00Z",
267
+ };
268
+ const result = (0, clinical_dates_1.getClinicalDateRange)(doc);
269
+ expect(result).toEqual({
270
+ startDate: "2023-10-01T00:00:00Z",
271
+ });
272
+ });
273
+ it("returns context period when date not present", () => {
274
+ const doc = {
275
+ resourceType: "DocumentReference",
276
+ id: "doc-2",
277
+ status: "current",
278
+ content: [],
279
+ context: {
280
+ period: {
281
+ start: "2023-09-01T00:00:00Z",
282
+ end: "2023-09-30T00:00:00Z",
283
+ },
284
+ },
285
+ };
286
+ const result = (0, clinical_dates_1.getClinicalDateRange)(doc);
287
+ expect(result).toEqual({
288
+ startDate: "2023-09-01T00:00:00Z",
289
+ endDate: "2023-09-30T00:00:00Z",
290
+ });
291
+ });
292
+ });
293
+ describe("Composition", () => {
294
+ it("returns date as primary date", () => {
295
+ const composition = {
296
+ resourceType: "Composition",
297
+ id: "comp-1",
298
+ status: "final",
299
+ type: { text: "Clinical Note" },
300
+ author: [{ reference: "Practitioner/1" }],
301
+ title: "Note",
302
+ date: "2023-11-01T00:00:00Z",
303
+ };
304
+ const result = (0, clinical_dates_1.getClinicalDateRange)(composition);
305
+ expect(result).toEqual({
306
+ startDate: "2023-11-01T00:00:00Z",
307
+ });
308
+ });
309
+ });
310
+ describe("Coverage", () => {
311
+ it("returns period as primary date", () => {
312
+ const coverage = {
313
+ resourceType: "Coverage",
314
+ id: "cov-1",
315
+ status: "active",
316
+ beneficiary: { reference: "Patient/1" },
317
+ payor: [{ reference: "Organization/1" }],
318
+ period: {
319
+ start: "2023-01-01T00:00:00Z",
320
+ end: "2023-12-31T23:59:59Z",
321
+ },
322
+ };
323
+ const result = (0, clinical_dates_1.getClinicalDateRange)(coverage);
324
+ expect(result).toEqual({
325
+ startDate: "2023-01-01T00:00:00Z",
326
+ endDate: "2023-12-31T23:59:59Z",
327
+ });
328
+ });
329
+ });
330
+ describe("unsupported resource types", () => {
331
+ it("returns undefined for Patient", () => {
332
+ const patient = {
333
+ resourceType: "Patient",
334
+ id: "pat-1",
335
+ };
336
+ const result = (0, clinical_dates_1.getClinicalDateRange)(patient);
337
+ expect(result).toBeUndefined();
338
+ });
339
+ });
340
+ });
341
+ //# sourceMappingURL=clinical-dates.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clinical-dates.test.js","sourceRoot":"","sources":["../../src/__tests__/clinical-dates.test.ts"],"names":[],"mappings":";;AAcA,sDAAyD;AAEzD,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QAC3B,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACnD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iBAC5B;aACF,CAAC;YAEF,MAAM,MAAM,GAAG,IAAA,qCAAoB,EAAC,QAAQ,CAAC,CAAC;YAE9C,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;gBACrB,SAAS,EAAE,sBAAsB;gBACjC,OAAO,EAAE,sBAAsB;aAChC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;QAC1C,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;YACvC,MAAM,OAAO,GAAY;gBACvB,YAAY,EAAE,SAAS;gBACvB,EAAE,EAAE,OAAO;aACZ,CAAC;YAEF,MAAM,MAAM,GAAG,IAAA,qCAAoB,EAAC,OAAO,CAAC,CAAC;YAE7C,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=date-range-performance.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-performance.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/date-range-performance.test.ts"],"names":[],"mappings":""}