@metriport/shared 0.32.1 → 0.32.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 (59) hide show
  1. package/dist/common/date.d.ts +1 -0
  2. package/dist/common/date.d.ts.map +1 -1
  3. package/dist/common/date.js +5 -1
  4. package/dist/common/date.js.map +1 -1
  5. package/dist/domain/patient/patient-import/schemas.js +1 -1
  6. package/dist/domain/patient/patient-import/schemas.js.map +1 -1
  7. package/dist/external/hl7v2/constants.d.ts +1 -1
  8. package/dist/external/hl7v2/constants.d.ts.map +1 -1
  9. package/dist/external/hl7v2/constants.js +2 -2
  10. package/dist/external/hl7v2/constants.js.map +1 -1
  11. package/dist/interface/external/ehr/canvas/cx-mapping.d.ts +3 -0
  12. package/dist/interface/external/ehr/canvas/cx-mapping.d.ts.map +1 -1
  13. package/dist/interface/external/ehr/canvas/cx-mapping.js +1 -0
  14. package/dist/interface/external/ehr/canvas/cx-mapping.js.map +1 -1
  15. package/dist/interface/external/ehr/canvas/external-event.d.ts +67 -0
  16. package/dist/interface/external/ehr/canvas/external-event.d.ts.map +1 -0
  17. package/dist/interface/external/ehr/canvas/external-event.js +48 -0
  18. package/dist/interface/external/ehr/canvas/external-event.js.map +1 -0
  19. package/dist/interface/external/ehr/canvas/index.d.ts +1 -0
  20. package/dist/interface/external/ehr/canvas/index.d.ts.map +1 -1
  21. package/dist/interface/external/ehr/canvas/index.js +1 -0
  22. package/dist/interface/external/ehr/canvas/index.js.map +1 -1
  23. package/dist/interface/external/ehr/canvas/jwt-token.d.ts +15 -0
  24. package/dist/interface/external/ehr/canvas/jwt-token.d.ts.map +1 -1
  25. package/dist/interface/external/ehr/canvas/jwt-token.js +7 -1
  26. package/dist/interface/external/ehr/canvas/jwt-token.js.map +1 -1
  27. package/dist/interface/external/ehr/healthie/allergy.d.ts +18 -18
  28. package/dist/interface/external/ehr/source.d.ts +2 -0
  29. package/dist/interface/external/ehr/source.d.ts.map +1 -1
  30. package/dist/interface/external/ehr/source.js +6 -1
  31. package/dist/interface/external/ehr/source.js.map +1 -1
  32. package/dist/medical/fhir/coding.d.ts +11 -0
  33. package/dist/medical/fhir/coding.d.ts.map +1 -1
  34. package/dist/medical/fhir/coding.js +27 -1
  35. package/dist/medical/fhir/coding.js.map +1 -1
  36. package/dist/medical/fhir/imaging-detection.d.ts +706 -0
  37. package/dist/medical/fhir/imaging-detection.d.ts.map +1 -0
  38. package/dist/medical/fhir/imaging-detection.js +361 -0
  39. package/dist/medical/fhir/imaging-detection.js.map +1 -0
  40. package/dist/medical/fhir/loinc/loinc-class-display-lookup.json +1730 -0
  41. package/dist/medical/fhir/loinc/loinc-code-class-lookup.json +432994 -0
  42. package/dist/medical/fhir/procedure-type.d.ts +1316 -0
  43. package/dist/medical/fhir/procedure-type.d.ts.map +1 -0
  44. package/dist/medical/fhir/procedure-type.js +263 -0
  45. package/dist/medical/fhir/procedure-type.js.map +1 -0
  46. package/dist/medical/index.d.ts +1 -0
  47. package/dist/medical/index.d.ts.map +1 -1
  48. package/dist/medical/index.js +1 -0
  49. package/dist/medical/index.js.map +1 -1
  50. package/dist/medical/webhook/webhook-request.d.ts +56 -56
  51. package/dist/util/index.d.ts +1 -0
  52. package/dist/util/index.d.ts.map +1 -1
  53. package/dist/util/index.js +1 -0
  54. package/dist/util/index.js.map +1 -1
  55. package/dist/util/sqs-delay-from-uuid.d.ts +11 -0
  56. package/dist/util/sqs-delay-from-uuid.d.ts.map +1 -0
  57. package/dist/util/sqs-delay-from-uuid.js +21 -0
  58. package/dist/util/sqs-delay-from-uuid.js.map +1 -0
  59. package/package.json +2 -2
@@ -0,0 +1,706 @@
1
+ import { DiagnosticReport, Encounter, Organization, Practitioner, Procedure } from "@medplum/fhirtypes";
2
+ /**
3
+ * Imaging procedure ranges - filtered from PROCEDURE_TYPE_RANGES where modality exists
4
+ */
5
+ export declare const IMAGING_PROCEDURE_RANGES: (({
6
+ readonly start: 70010;
7
+ readonly end: 70390;
8
+ readonly type: "X-Ray";
9
+ readonly category: "Head/Neck X-Ray";
10
+ readonly modality: "DX";
11
+ } | {
12
+ readonly start: 71010;
13
+ readonly end: 71035;
14
+ readonly type: "X-Ray";
15
+ readonly category: "Chest X-Ray";
16
+ readonly modality: "DX";
17
+ } | {
18
+ readonly start: 72010;
19
+ readonly end: 72120;
20
+ readonly type: "X-Ray";
21
+ readonly category: "Spine X-Ray";
22
+ readonly modality: "DX";
23
+ } | {
24
+ readonly start: 73000;
25
+ readonly end: 73140;
26
+ readonly type: "X-Ray";
27
+ readonly category: "Upper Extremity X-Ray";
28
+ readonly modality: "DX";
29
+ } | {
30
+ readonly start: 73500;
31
+ readonly end: 73660;
32
+ readonly type: "X-Ray";
33
+ readonly category: "Lower Extremity X-Ray";
34
+ readonly modality: "DX";
35
+ } | {
36
+ readonly start: 74018;
37
+ readonly end: 74022;
38
+ readonly type: "X-Ray";
39
+ readonly category: "Abdomen X-Ray";
40
+ readonly modality: "DX";
41
+ } | {
42
+ readonly start: 70450;
43
+ readonly end: 70498;
44
+ readonly type: "CT";
45
+ readonly category: "Head/Neck CT";
46
+ readonly modality: "CT";
47
+ } | {
48
+ readonly start: 71250;
49
+ readonly end: 71275;
50
+ readonly type: "CT";
51
+ readonly category: "Chest CT";
52
+ readonly modality: "CT";
53
+ } | {
54
+ readonly start: 72125;
55
+ readonly end: 72133;
56
+ readonly type: "CT"; /**
57
+ * Check if a Procedure is an imaging procedure based on CPT codes
58
+ */
59
+ readonly category: "Spine CT";
60
+ readonly modality: "CT";
61
+ } | {
62
+ readonly start: 73200;
63
+ readonly end: 73225;
64
+ readonly type: "CT";
65
+ readonly category: "Upper Extremity CT";
66
+ readonly modality: "CT";
67
+ } | {
68
+ readonly start: 73700;
69
+ readonly end: 73725;
70
+ readonly type: "CT";
71
+ readonly category: "Lower Extremity CT";
72
+ readonly modality: "CT";
73
+ } | {
74
+ readonly start: 74150;
75
+ readonly end: 74178;
76
+ readonly type: "CT";
77
+ readonly category: "Abdomen/Pelvis CT";
78
+ readonly modality: "CT";
79
+ } | {
80
+ readonly start: 70540;
81
+ readonly end: 70559;
82
+ readonly type: "MRI";
83
+ readonly category: "Head/Neck MRI";
84
+ readonly modality: "MR";
85
+ } | {
86
+ readonly start: 71550;
87
+ readonly end: 71555;
88
+ readonly type: "MRI";
89
+ readonly category: "Chest MRI";
90
+ readonly modality: "MR";
91
+ } | {
92
+ readonly start: 72141;
93
+ readonly end: 72159;
94
+ readonly type: "MRI";
95
+ readonly category: "Spine MRI";
96
+ readonly modality: "MR";
97
+ } | {
98
+ readonly start: 73218;
99
+ readonly end: 73223;
100
+ readonly type: "MRI";
101
+ readonly category: "Upper Extremity MRI";
102
+ readonly modality: "MR";
103
+ } | {
104
+ readonly start: 73718;
105
+ readonly end: 73723;
106
+ readonly type: "MRI";
107
+ readonly category: "Lower Extremity MRI";
108
+ readonly modality: "MR";
109
+ } | {
110
+ readonly start: 74181;
111
+ readonly end: 74185;
112
+ readonly type: "MRI";
113
+ readonly category: "Abdomen/Pelvis MRI";
114
+ readonly modality: "MR";
115
+ } | {
116
+ readonly start: 76506;
117
+ readonly end: 76999;
118
+ readonly type: "Ultrasound";
119
+ readonly category: "General Ultrasound";
120
+ readonly modality: "US";
121
+ } | {
122
+ readonly start: 93303;
123
+ readonly end: 93355;
124
+ readonly type: "Ultrasound";
125
+ readonly category: "Echocardiography";
126
+ readonly modality: "US";
127
+ } | {
128
+ readonly start: 93880;
129
+ readonly end: 93998;
130
+ readonly type: "Ultrasound";
131
+ readonly category: "Vascular Ultrasound";
132
+ readonly modality: "US";
133
+ } | {
134
+ readonly start: 77046;
135
+ readonly end: 77067;
136
+ readonly type: "Mammography";
137
+ readonly category: "Breast Imaging";
138
+ readonly modality: "MG";
139
+ } | {
140
+ readonly start: 77078;
141
+ readonly end: 77086;
142
+ readonly type: "Bone Density";
143
+ readonly category: "Bone Density";
144
+ readonly modality: "BMD";
145
+ } | {
146
+ readonly start: 78012;
147
+ readonly end: 78099;
148
+ readonly type: "Nuclear Medicine";
149
+ readonly category: "Bone Scan";
150
+ readonly modality: "NM";
151
+ } | {
152
+ readonly start: 78102;
153
+ readonly end: 78199;
154
+ readonly type: "Nuclear Medicine";
155
+ readonly category: "Nuclear Medicine - GI";
156
+ readonly modality: "NM";
157
+ } | {
158
+ readonly start: 78201;
159
+ readonly end: 78299;
160
+ readonly type: "Nuclear Medicine";
161
+ readonly category: "Nuclear Medicine - GU";
162
+ readonly modality: "NM";
163
+ } | {
164
+ readonly start: 78300;
165
+ readonly end: 78399;
166
+ readonly type: "Nuclear Medicine";
167
+ readonly category: "Nuclear Medicine - Musculoskeletal";
168
+ readonly modality: "NM";
169
+ } | {
170
+ readonly start: 78608;
171
+ readonly end: 78650;
172
+ readonly type: "Nuclear Medicine";
173
+ readonly category: "Nuclear Medicine - Cardiac";
174
+ readonly modality: "NM";
175
+ } | {
176
+ readonly start: 78414;
177
+ readonly end: 78499;
178
+ readonly type: "PET";
179
+ readonly category: "PET Scan";
180
+ readonly modality: "PT";
181
+ } | {
182
+ readonly start: 78800;
183
+ readonly end: 78899;
184
+ readonly type: "PET";
185
+ readonly category: "PET - Tumor Imaging";
186
+ readonly modality: "PT";
187
+ } | {
188
+ readonly start: 75600;
189
+ readonly end: 75989;
190
+ readonly type: "Angiography";
191
+ readonly category: "Vascular Imaging";
192
+ readonly modality: "XA";
193
+ } | {
194
+ readonly start: 36200;
195
+ readonly end: 36299;
196
+ readonly type: "Vascular Injection";
197
+ readonly category: "Vascular Injection";
198
+ readonly modality: "XA";
199
+ } | {
200
+ readonly start: 93451;
201
+ readonly end: 93533;
202
+ readonly type: "Cardiac Catheterization";
203
+ readonly category: "Cardiac Imaging";
204
+ readonly modality: "XA";
205
+ } | {
206
+ readonly start: 92133;
207
+ readonly end: 92136;
208
+ readonly type: "Ophthalmic Imaging";
209
+ readonly category: "Ophthalmic OCT";
210
+ readonly modality: "OCT";
211
+ } | {
212
+ readonly start: 92225;
213
+ readonly end: 92287;
214
+ readonly type: "Ophthalmic Imaging";
215
+ readonly category: "Ophthalmic Imaging";
216
+ readonly modality: "OP";
217
+ } | {
218
+ readonly start: 93000;
219
+ readonly end: 93010;
220
+ readonly type: "ECG";
221
+ readonly category: "Electrocardiography";
222
+ readonly modality: "ECG";
223
+ } | {
224
+ readonly start: 93224;
225
+ readonly end: 93278;
226
+ readonly type: "Cardiac Monitor";
227
+ readonly category: "Ambulatory ECG";
228
+ readonly modality: "ECG";
229
+ } | {
230
+ readonly start: 93561;
231
+ readonly end: 93572;
232
+ readonly type: "Cardiac EP Study";
233
+ readonly category: "Electrophysiology";
234
+ readonly modality: "EPS";
235
+ } | {
236
+ readonly start: 43200;
237
+ readonly end: 43273;
238
+ readonly type: "Endoscopy";
239
+ readonly category: "Upper GI Endoscopy";
240
+ readonly modality: "ES";
241
+ } | {
242
+ readonly start: 44360;
243
+ readonly end: 44408;
244
+ readonly type: "Endoscopy";
245
+ readonly category: "Small Bowel Endoscopy";
246
+ readonly modality: "ES";
247
+ } | {
248
+ readonly start: 45300;
249
+ readonly end: 45398;
250
+ readonly type: "Endoscopy";
251
+ readonly category: "Colonoscopy";
252
+ readonly modality: "ES";
253
+ } | {
254
+ readonly start: 31231;
255
+ readonly end: 31298;
256
+ readonly type: "Endoscopy";
257
+ readonly category: "Nasal/Sinus Endoscopy";
258
+ readonly modality: "ES";
259
+ } | {
260
+ readonly start: 43235;
261
+ readonly end: 43259;
262
+ readonly type: "Endoscopy";
263
+ readonly category: "Esophagogastroduodenoscopy";
264
+ readonly modality: "ES";
265
+ } | {
266
+ readonly start: 10021;
267
+ readonly end: 10022;
268
+ readonly type: "Surgery";
269
+ readonly category: "Fine Needle Aspiration";
270
+ } | {
271
+ readonly start: 10030;
272
+ readonly end: 10036;
273
+ readonly type: "Surgery";
274
+ readonly category: "Image-guided Procedures";
275
+ } | {
276
+ readonly start: 11000;
277
+ readonly end: 11047;
278
+ readonly type: "Surgery";
279
+ readonly category: "Debridement";
280
+ } | {
281
+ readonly start: 11055;
282
+ readonly end: 11057;
283
+ readonly type: "Surgery";
284
+ readonly category: "Paring/Cutting";
285
+ } | {
286
+ readonly start: 11100;
287
+ readonly end: 11107;
288
+ readonly type: "Surgery";
289
+ readonly category: "Skin Biopsy";
290
+ } | {
291
+ readonly start: 11200;
292
+ readonly end: 11201;
293
+ readonly type: "Surgery";
294
+ readonly category: "Skin Tag Removal";
295
+ } | {
296
+ readonly start: 11400;
297
+ readonly end: 11471;
298
+ readonly type: "Surgery";
299
+ readonly category: "Excision - Benign Lesions";
300
+ } | {
301
+ /**
302
+ * Check if a report is an MRI (Magnetic Resonance Imaging) report
303
+ */
304
+ readonly start: 11600;
305
+ readonly end: 11646;
306
+ readonly type: "Surgery";
307
+ readonly category: "Excision - Malignant Lesions";
308
+ } | {
309
+ readonly start: 12001;
310
+ readonly end: 12057;
311
+ readonly type: "Surgery";
312
+ readonly category: "Simple Repair";
313
+ } | {
314
+ readonly start: 13100;
315
+ readonly end: 13160;
316
+ readonly type: "Surgery";
317
+ readonly category: "Complex Repair";
318
+ } | {
319
+ readonly start: 20200;
320
+ readonly end: 20999;
321
+ readonly type: "Surgery";
322
+ readonly category: "Musculoskeletal";
323
+ } | {
324
+ readonly start: 21010;
325
+ readonly end: 21499;
326
+ readonly type: "Surgery";
327
+ readonly category: "Head/Skull Surgery";
328
+ } | {
329
+ readonly start: 22010;
330
+ readonly end: 22899;
331
+ readonly type: "Surgery";
332
+ readonly category: "Spine Surgery";
333
+ } | {
334
+ readonly start: 23000;
335
+ readonly end: 23929;
336
+ readonly type: "Surgery";
337
+ readonly category: "Shoulder Surgery";
338
+ } | {
339
+ readonly start: 24000;
340
+ readonly end: 24999;
341
+ readonly type: "Surgery";
342
+ readonly category: "Elbow/Arm Surgery";
343
+ } | {
344
+ readonly start: 25000;
345
+ readonly end: 25999;
346
+ readonly type: "Surgery";
347
+ readonly category: "Forearm/Wrist Surgery";
348
+ } | {
349
+ readonly start: 26010;
350
+ readonly end: 26989;
351
+ readonly type: "Surgery";
352
+ readonly category: "Hand Surgery";
353
+ } | {
354
+ readonly start: 27000;
355
+ readonly end: 27299;
356
+ readonly type: "Surgery";
357
+ readonly category: "Hip/Pelvis Surgery";
358
+ } | {
359
+ readonly start: 27301;
360
+ readonly end: 27599;
361
+ readonly type: "Surgery";
362
+ readonly category: "Thigh/Knee Surgery";
363
+ } | {
364
+ readonly start: 27600;
365
+ readonly end: 27899;
366
+ readonly type: "Surgery";
367
+ readonly category: "Leg/Ankle Surgery";
368
+ } | {
369
+ readonly start: 28001;
370
+ readonly end: 28899;
371
+ readonly type: "Surgery";
372
+ readonly category: "Foot Surgery";
373
+ } | {
374
+ readonly start: 30000; /**
375
+ * Check if a report is an Ultrasound imaging report
376
+ */
377
+ readonly end: 30999;
378
+ readonly type: "Surgery";
379
+ readonly category: "Nose Surgery";
380
+ } | {
381
+ readonly start: 31000;
382
+ readonly end: 31899;
383
+ readonly type: "Surgery";
384
+ readonly category: "Larynx Surgery";
385
+ } | {
386
+ readonly start: 32035;
387
+ readonly end: 32999;
388
+ readonly type: "Surgery";
389
+ readonly category: "Chest/Lung Surgery";
390
+ } | {
391
+ readonly start: 33010;
392
+ readonly end: 33999;
393
+ readonly type: "Surgery";
394
+ readonly category: "Heart Surgery";
395
+ } | {
396
+ readonly start: 34001;
397
+ readonly end: 34834;
398
+ readonly type: "Surgery";
399
+ readonly category: "Vascular Surgery";
400
+ } | {
401
+ readonly start: 40490;
402
+ readonly end: 40799;
403
+ readonly type: "Surgery";
404
+ readonly category: "Mouth Surgery";
405
+ } | {
406
+ readonly start: 41000;
407
+ readonly end: 41599;
408
+ readonly type: "Surgery";
409
+ readonly category: "Tongue/Floor of Mouth Surgery";
410
+ } | {
411
+ readonly start: 42000;
412
+ readonly end: 42999;
413
+ readonly type: "Surgery";
414
+ readonly category: "Throat Surgery";
415
+ } | {
416
+ readonly start: 43020;
417
+ readonly end: 43499;
418
+ readonly type: "Surgery";
419
+ readonly category: "Esophagus Surgery";
420
+ } | {
421
+ readonly start: 43500;
422
+ readonly end: 43999;
423
+ readonly type: "Surgery";
424
+ readonly category: "Stomach Surgery";
425
+ } | {
426
+ readonly start: 44005;
427
+ readonly end: 44799;
428
+ readonly type: "Surgery";
429
+ readonly category: "Intestine Surgery";
430
+ } | {
431
+ readonly start: 45000;
432
+ readonly end: 45999;
433
+ readonly type: "Surgery";
434
+ readonly category: "Rectum Surgery";
435
+ } | {
436
+ readonly start: 46020;
437
+ readonly end: 46999;
438
+ readonly type: "Surgery";
439
+ readonly category: "Anus Surgery";
440
+ } | {
441
+ readonly start: 47000;
442
+ readonly end: 47399;
443
+ readonly type: "Surgery";
444
+ readonly category: "Liver Surgery";
445
+ } | {
446
+ readonly start: 47400;
447
+ readonly end: 47999;
448
+ readonly type: "Surgery";
449
+ readonly category: "Biliary Surgery";
450
+ } | {
451
+ readonly start: 48000;
452
+ readonly end: 48999;
453
+ readonly type: "Surgery";
454
+ readonly category: "Pancreas Surgery";
455
+ } | {
456
+ readonly start: 49000;
457
+ readonly end: 49999;
458
+ readonly type: "Surgery";
459
+ readonly category: "Abdomen Surgery";
460
+ } | {
461
+ readonly start: 50010;
462
+ readonly end: 50593;
463
+ readonly type: "Surgery";
464
+ readonly category: "Kidney Surgery";
465
+ } | {
466
+ readonly start: 50600;
467
+ readonly end: 50980;
468
+ readonly type: "Surgery";
469
+ readonly category: "Ureter Surgery";
470
+ } | {
471
+ readonly start: 51020;
472
+ readonly end: 51999;
473
+ readonly type: "Surgery";
474
+ readonly category: "Bladder Surgery";
475
+ } | {
476
+ readonly start: 52000;
477
+ readonly end: 52700;
478
+ readonly type: "Surgery";
479
+ readonly category: "Urethra Surgery";
480
+ } | {
481
+ readonly start: 53000;
482
+ readonly end: 53899;
483
+ readonly type: "Surgery";
484
+ readonly category: "Urethra Surgery";
485
+ } | {
486
+ readonly start: 54000;
487
+ readonly end: 54699;
488
+ readonly type: "Surgery";
489
+ readonly category: "Male Genital Surgery";
490
+ } | {
491
+ readonly start: 55000;
492
+ readonly end: 55899;
493
+ readonly type: "Surgery";
494
+ readonly category: "Prostate Surgery";
495
+ } | {
496
+ readonly start: 56405;
497
+ readonly end: 56821;
498
+ readonly type: "Surgery";
499
+ readonly category: "Vulva Surgery";
500
+ } | {
501
+ readonly start: 57000;
502
+ readonly end: 57426;
503
+ readonly type: "Surgery";
504
+ readonly category: "Vagina Surgery";
505
+ } | {
506
+ readonly start: 58100;
507
+ readonly end: 58579;
508
+ readonly type: "Surgery";
509
+ readonly category: "Uterus Surgery";
510
+ } | {
511
+ readonly start: 58600;
512
+ readonly end: 58770;
513
+ readonly type: "Surgery";
514
+ readonly category: "Ovary Surgery";
515
+ } | {
516
+ readonly start: 80047;
517
+ readonly end: 80076;
518
+ readonly type: "Lab";
519
+ readonly category: "Organ/Disease Panels";
520
+ } | {
521
+ readonly start: 80150;
522
+ /**
523
+ * Get practitioners from an Encounter
524
+ */
525
+ readonly end: 80299;
526
+ readonly type: "Lab";
527
+ readonly category: "Drug Testing";
528
+ } | {
529
+ readonly start: 80400;
530
+ readonly end: 80439;
531
+ readonly type: "Lab";
532
+ readonly category: "Evocative Testing";
533
+ } | {
534
+ readonly start: 81000;
535
+ readonly end: 81099;
536
+ readonly type: "Lab";
537
+ readonly category: "Urinalysis";
538
+ } | {
539
+ readonly start: 81105;
540
+ readonly end: 81408;
541
+ readonly type: "Lab";
542
+ readonly category: "Molecular Pathology";
543
+ } | {
544
+ readonly start: 82009;
545
+ readonly end: 84999;
546
+ readonly type: "Lab";
547
+ readonly category: "Chemistry";
548
+ } | {
549
+ readonly start: 85002;
550
+ readonly end: 85999;
551
+ readonly type: "Lab";
552
+ readonly category: "Hematology";
553
+ } | {
554
+ readonly start: 86000;
555
+ readonly end: 86849;
556
+ readonly type: "Lab";
557
+ readonly category: "Immunology";
558
+ } | {
559
+ readonly start: 87001;
560
+ readonly end: 87999;
561
+ readonly type: "Lab";
562
+ readonly category: "Microbiology";
563
+ } | {
564
+ readonly start: 88000;
565
+ readonly end: 88099;
566
+ readonly type: "Lab";
567
+ readonly category: "Necropsy";
568
+ } | {
569
+ readonly start: 88104;
570
+ readonly end: 88199;
571
+ readonly type: "Lab";
572
+ readonly category: "Cytopathology";
573
+ } | {
574
+ readonly start: 88300;
575
+ readonly end: 88399;
576
+ readonly type: "Lab";
577
+ readonly category: "Surgical Pathology";
578
+ } | {
579
+ readonly start: 97010;
580
+ readonly end: 97039;
581
+ readonly type: "Physical Therapy";
582
+ readonly category: "Modalities";
583
+ } | {
584
+ readonly start: 97110;
585
+ readonly end: 97546;
586
+ readonly type: "Physical Therapy";
587
+ readonly category: "Therapeutic Procedures";
588
+ } | {
589
+ readonly start: 97597;
590
+ readonly end: 97610;
591
+ readonly type: "Physical Therapy";
592
+ readonly category: "Active Wound Care";
593
+ } | {
594
+ readonly start: 98940;
595
+ readonly end: 98943;
596
+ readonly type: "Chiropractic";
597
+ readonly category: "Spinal Manipulation";
598
+ } | {
599
+ readonly start: 96360;
600
+ readonly end: 96379;
601
+ readonly type: "Infusion";
602
+ readonly category: "Hydration/Infusion";
603
+ } | {
604
+ readonly start: 96401;
605
+ readonly end: 96549;
606
+ readonly type: "Chemotherapy";
607
+ readonly category: "Chemotherapy Administration";
608
+ } | {
609
+ readonly start: 20550;
610
+ readonly end: 20553;
611
+ readonly type: "Injection";
612
+ readonly category: "Trigger Point Injection";
613
+ } | {
614
+ readonly start: 20600;
615
+ readonly end: 20611;
616
+ readonly type: "Injection";
617
+ readonly category: "Joint Injection";
618
+ } | {
619
+ readonly start: 0;
620
+ readonly end: 1999;
621
+ readonly type: "Anesthesia";
622
+ readonly category: "Anesthesia Services";
623
+ } | {
624
+ readonly start: 99201;
625
+ readonly end: 99215;
626
+ readonly type: "Office Visit";
627
+ readonly category: "Office/Outpatient Visits";
628
+ } | {
629
+ readonly start: 99217;
630
+ readonly end: 99220;
631
+ readonly type: "Hospital Care";
632
+ readonly category: "Observation Care"; /**
633
+ * Main function to determine if a DiagnosticReport is an imaging report
634
+ * This is the primary logic used to split DiagnosticReports into Imaging vs Clinical Notes
635
+ */
636
+ } | {
637
+ readonly start: 99221;
638
+ readonly end: 99239;
639
+ readonly type: "Hospital Care";
640
+ readonly category: "Hospital Inpatient Services";
641
+ } | {
642
+ readonly start: 99241;
643
+ readonly end: 99255;
644
+ readonly type: "Consultation";
645
+ readonly category: "Consultations";
646
+ } | {
647
+ readonly start: 99281;
648
+ readonly end: 99288;
649
+ readonly type: "Emergency";
650
+ readonly category: "Emergency Department";
651
+ } | {
652
+ readonly start: 99304;
653
+ readonly end: 99318;
654
+ readonly type: "Nursing Facility";
655
+ readonly category: "Nursing Facility Services";
656
+ } | {
657
+ readonly start: 99341;
658
+ readonly end: 99350;
659
+ readonly type: "Home Visit";
660
+ readonly category: "Home Services";
661
+ } | {
662
+ readonly start: 99381;
663
+ readonly end: 99397;
664
+ readonly type: "Preventive";
665
+ readonly category: "Preventive Medicine";
666
+ }) & {
667
+ modality: string;
668
+ })[];
669
+ /**
670
+ * Check if a CPT code is in the imaging range
671
+ */
672
+ export declare function isImagingCptCode(cptCode: string): boolean;
673
+ /**
674
+ * Get set of DiagnosticReport IDs that are linked to imaging Procedures
675
+ * This is the PRIMARY method for identifying imaging reports
676
+ */
677
+ export declare function getImagingReportIdsFromProcedures(procedures: Procedure[]): Set<string>;
678
+ /**
679
+ * Check if a report is an imaging report based on display value parsing
680
+ * This is a fallback for when the report is not categorized by a LOINC code
681
+ */
682
+ export declare function isImagingReportBasedOnDisplayValueParsing(report: DiagnosticReport): boolean;
683
+ export type ImagingDetectionContext = {
684
+ practitioners: Practitioner[];
685
+ organizations: Organization[];
686
+ encounters: Encounter[];
687
+ };
688
+ type PrecomputedMaps = {
689
+ practitionerMap: Map<string, Practitioner>;
690
+ organizationMap: Map<string, Organization>;
691
+ encounterMap: Map<string, Encounter>;
692
+ };
693
+ /**
694
+ * Main function to determine if a DiagnosticReport is an imaging report
695
+ * This is the primary logic used to split DiagnosticReports into Imaging vs Clinical Notes
696
+ */
697
+ export declare function isImagingReport(report: DiagnosticReport, imagingReportIds: Set<string>, context: ImagingDetectionContext, maps?: PrecomputedMaps): boolean;
698
+ /**
699
+ * Split diagnostic reports into imaging reports and clinical notes
700
+ */
701
+ export declare function splitDiagnosticReports(diagnosticReports: DiagnosticReport[], procedures: Procedure[], context: ImagingDetectionContext): {
702
+ imagingReports: DiagnosticReport[];
703
+ clinicalNotes: DiagnosticReport[];
704
+ };
705
+ export {};
706
+ //# sourceMappingURL=imaging-detection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imaging-detection.d.ts","sourceRoot":"","sources":["../../../src/medical/fhir/imaging-detection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,SAAS,EAIV,MAAM,oBAAoB,CAAC;AAM5B;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAerC;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+IH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA8BH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAyDH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAxU4C,MAAM;IACpD,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAMzD;AA8BD;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAUtF;AAyJD;;;GAGG;AACH,wBAAgB,yCAAyC,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAS3F;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAwEF,KAAK,eAAe,GAAG;IACrB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC3C,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC3C,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACtC,CAAC;AAqBF;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,gBAAgB,EACxB,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC7B,OAAO,EAAE,uBAAuB,EAChC,IAAI,CAAC,EAAE,eAAe,GACrB,OAAO,CAqET;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,iBAAiB,EAAE,gBAAgB,EAAE,EACrC,UAAU,EAAE,SAAS,EAAE,EACvB,OAAO,EAAE,uBAAuB,GAC/B;IAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;IAAC,aAAa,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAgB3E"}