gdc-common-utils-ts 2.0.7 → 2.0.8

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.
@@ -7,6 +7,20 @@ export declare const BundleEditableResourceTypes: Readonly<{
7
7
  readonly consent: "Consent";
8
8
  readonly observation: "Observation";
9
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";
10
24
  }>;
11
25
  export type AllowedResourceType = string;
12
26
  export type BuiltBundleEntry = {
@@ -134,6 +148,34 @@ export declare class BundleEntryEditor {
134
148
  asVitalSign(): VitalSignEntryEditor;
135
149
  /** Opens the current entry as one general Observation editor. */
136
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;
137
179
  /** Reads one claim from this entry. */
138
180
  getClaim(key: string): unknown;
139
181
  /** Checks whether this entry contains one claim key. */
@@ -157,6 +199,27 @@ export declare class BundleEntryEditor {
157
199
  protected getMutableEntry(): BuiltBundleEntry;
158
200
  protected getClaims(): EmployeeClaims;
159
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
+ }
160
223
  /**
161
224
  * Reduced Observation component-style editor surface.
162
225
  *
@@ -229,6 +292,382 @@ export declare class ObservationEntryEditor extends VitalSignEntryEditor {
229
292
  getPerformer(): string | undefined;
230
293
  setHasMember(reference: string): this;
231
294
  getHasMember(): string | undefined;
295
+ setHasMemberList(references: readonly string[]): this;
296
+ getHasMemberList(): string[];
297
+ }
298
+ /** Claims-first editor for one staged AllergyIntolerance entry. */
299
+ export declare class AllergyIntoleranceEntryEditor extends ClinicalResourceEntryEditor {
300
+ setIdentifier(identifier?: string | null): this;
301
+ getIdentifier(): string | undefined;
302
+ ensureIdentifier(): string;
303
+ setSubject(subject?: string | null): this;
304
+ getSubject(): string | undefined;
305
+ setCode(code?: string | null): this;
306
+ getCode(): string | undefined;
307
+ setClinicalStatus(status?: string | null): this;
308
+ getClinicalStatus(): string | undefined;
309
+ setVerificationStatus(status?: string | null): this;
310
+ getVerificationStatus(): string | undefined;
311
+ setCategory(category?: string | null): this;
312
+ getCategory(): string | undefined;
313
+ setCriticality(criticality?: string | null): this;
314
+ getCriticality(): string | undefined;
315
+ setOnsetDateTime(value?: string | null): this;
316
+ getOnsetDateTime(): string | undefined;
317
+ setRecorder(reference?: string | null): this;
318
+ getRecorder(): string | undefined;
319
+ setContainedDocumentIdentifierList(identifiers: readonly string[]): this;
320
+ getContainedDocumentIdentifierList(): string[];
321
+ }
322
+ /** Claims-first editor for one staged Condition entry. */
323
+ export declare class ConditionEntryEditor extends ClinicalResourceEntryEditor {
324
+ setIdentifier(identifier?: string | null): this;
325
+ getIdentifier(): string | undefined;
326
+ ensureIdentifier(): string;
327
+ setSubject(subject?: string | null): this;
328
+ getSubject(): string | undefined;
329
+ setCode(code?: string | null): this;
330
+ getCode(): string | undefined;
331
+ setClinicalStatus(status?: string | null): this;
332
+ getClinicalStatus(): string | undefined;
333
+ setVerificationStatus(status?: string | null): this;
334
+ getVerificationStatus(): string | undefined;
335
+ setCategory(category?: string | null): this;
336
+ getCategory(): string | undefined;
337
+ setSeverity(severity?: string | null): this;
338
+ getSeverity(): string | undefined;
339
+ setOnsetDateTime(value?: string | null): this;
340
+ getOnsetDateTime(): string | undefined;
341
+ setRecorder(reference?: string | null): this;
342
+ getRecorder(): string | undefined;
343
+ setContainedDocumentIdentifierList(identifiers: readonly string[]): this;
344
+ getContainedDocumentIdentifierList(): string[];
345
+ }
346
+ /** Claims-first editor for one staged MedicationStatement entry. */
347
+ export declare class MedicationStatementEntryEditor extends ClinicalResourceEntryEditor {
348
+ setIdentifier(identifier?: string | null): this;
349
+ getIdentifier(): string | undefined;
350
+ ensureIdentifier(): string;
351
+ setSubject(subject?: string | null): this;
352
+ getSubject(): string | undefined;
353
+ setStatus(status?: string | null): this;
354
+ getStatus(): string | undefined;
355
+ setEffective(value?: string | null): this;
356
+ getEffective(): string | undefined;
357
+ setCode(code?: string | null): this;
358
+ getCode(): string | undefined;
359
+ setMedicationText(text?: string | null): this;
360
+ getMedicationText(): string | undefined;
361
+ setNote(note?: string | null): this;
362
+ getNote(): string | undefined;
363
+ setDosageInstruction(value?: string | null): this;
364
+ getDosageInstruction(): string | undefined;
365
+ setCategoryList(values: readonly string[]): this;
366
+ getCategoryList(): string[];
367
+ setDoseQuantityValue(value?: number | null): this;
368
+ getDoseQuantityValue(): number | undefined;
369
+ setDoseQuantityUnit(value?: string | null): this;
370
+ getDoseQuantityUnit(): string | undefined;
371
+ setTimingFrequency(value?: number | null): this;
372
+ getTimingFrequency(): number | undefined;
373
+ setTimingPeriod(value?: number | null): this;
374
+ getTimingPeriod(): number | undefined;
375
+ setTimingPeriodUnit(value?: string | null): this;
376
+ getTimingPeriodUnit(): string | undefined;
377
+ setDosageAsNeeded(value?: boolean | null): this;
378
+ getDosageAsNeeded(): boolean | undefined;
379
+ }
380
+ /** Claims-first editor for one staged DocumentReference entry. */
381
+ export declare class DocumentReferenceEntryEditor extends ClinicalResourceEntryEditor {
382
+ setIdentifier(identifier?: string | null): this;
383
+ getIdentifier(): string | undefined;
384
+ ensureIdentifier(): string;
385
+ setSubject(subject?: string | null): this;
386
+ getSubject(): string | undefined;
387
+ setType(value?: string | null): this;
388
+ getType(): string | undefined;
389
+ setCategory(value?: string | null): this;
390
+ getCategory(): string | undefined;
391
+ setContentType(value?: string | null): this;
392
+ getContentType(): string | undefined;
393
+ setContentData(value?: string | null): this;
394
+ getContentData(): string | undefined;
395
+ setContentHash(value?: string | null): this;
396
+ getContentHash(): string | undefined;
397
+ setLocation(value?: string | null): this;
398
+ getLocation(): string | undefined;
399
+ setDescription(value?: string | null): this;
400
+ getDescription(): string | undefined;
401
+ setDate(value?: string | null): this;
402
+ getDate(): string | undefined;
403
+ setAuthor(value?: string | null): this;
404
+ getAuthor(): string | undefined;
405
+ }
406
+ /** Claims-first editor for one staged CarePlan entry. */
407
+ export declare class CarePlanEntryEditor extends ClinicalResourceEntryEditor {
408
+ setIdentifier(identifier?: string | null): this;
409
+ getIdentifier(): string | undefined;
410
+ ensureIdentifier(): string;
411
+ setSubject(subject?: string | null): this;
412
+ getSubject(): string | undefined;
413
+ setStatus(value?: string | null): this;
414
+ getStatus(): string | undefined;
415
+ setIntent(value?: string | null): this;
416
+ getIntent(): string | undefined;
417
+ setCategory(value?: string | null): this;
418
+ getCategory(): string | undefined;
419
+ setEncounter(value?: string | null): this;
420
+ getEncounter(): string | undefined;
421
+ setDate(value?: string | null): this;
422
+ getDate(): string | undefined;
423
+ setNote(value?: string | null): this;
424
+ getNote(): string | undefined;
425
+ }
426
+ /** Claims-first editor for one staged Flag entry. */
427
+ export declare class FlagEntryEditor extends ClinicalResourceEntryEditor {
428
+ setIdentifier(identifier?: string | null): this;
429
+ getIdentifier(): string | undefined;
430
+ ensureIdentifier(): string;
431
+ setSubject(subject?: string | null): this;
432
+ getSubject(): string | undefined;
433
+ setStatus(value?: string | null): this;
434
+ getStatus(): string | undefined;
435
+ setCategory(value?: string | null): this;
436
+ getCategory(): string | undefined;
437
+ setCode(value?: string | null): this;
438
+ getCode(): string | undefined;
439
+ setDate(value?: string | null): this;
440
+ getDate(): string | undefined;
441
+ setEncounter(value?: string | null): this;
442
+ getEncounter(): string | undefined;
443
+ setPeriodStart(value?: string | null): this;
444
+ getPeriodStart(): string | undefined;
445
+ setPeriodEnd(value?: string | null): this;
446
+ getPeriodEnd(): string | undefined;
447
+ }
448
+ /** Claims-first editor for one staged ClinicalImpression entry. */
449
+ export declare class ClinicalImpressionEntryEditor extends ClinicalResourceEntryEditor {
450
+ setIdentifier(identifier?: string | null): this;
451
+ getIdentifier(): string | undefined;
452
+ ensureIdentifier(): string;
453
+ setSubject(subject?: string | null): this;
454
+ getSubject(): string | undefined;
455
+ setStatus(value?: string | null): this;
456
+ getStatus(): string | undefined;
457
+ setDescription(value?: string | null): this;
458
+ getDescription(): string | undefined;
459
+ setEncounter(value?: string | null): this;
460
+ getEncounter(): string | undefined;
461
+ setEffectiveDateTime(value?: string | null): this;
462
+ getEffectiveDateTime(): string | undefined;
463
+ setAssessor(value?: string | null): this;
464
+ getAssessor(): string | undefined;
465
+ setSummary(value?: string | null): this;
466
+ getSummary(): string | undefined;
467
+ }
468
+ /** Claims-first editor for one staged Device entry. */
469
+ export declare class DeviceEntryEditor extends ClinicalResourceEntryEditor {
470
+ setIdentifier(identifier?: string | null): this;
471
+ getIdentifier(): string | undefined;
472
+ ensureIdentifier(): string;
473
+ setPatient(value?: string | null): this;
474
+ getPatient(): string | undefined;
475
+ setStatus(value?: string | null): this;
476
+ getStatus(): string | undefined;
477
+ setType(value?: string | null): this;
478
+ getType(): string | undefined;
479
+ setManufacturer(value?: string | null): this;
480
+ getManufacturer(): string | undefined;
481
+ setModel(value?: string | null): this;
482
+ getModel(): string | undefined;
483
+ setDeviceName(value?: string | null): this;
484
+ getDeviceName(): string | undefined;
485
+ setSerialNumber(value?: string | null): this;
486
+ getSerialNumber(): string | undefined;
487
+ setOrganization(value?: string | null): this;
488
+ getOrganization(): string | undefined;
489
+ setLocation(value?: string | null): this;
490
+ getLocation(): string | undefined;
491
+ setUrl(value?: string | null): this;
492
+ getUrl(): string | undefined;
493
+ setNote(value?: string | null): this;
494
+ getNote(): string | undefined;
495
+ }
496
+ /** Claims-first editor for one staged DeviceUseStatement entry. */
497
+ export declare class DeviceUseStatementEntryEditor extends ClinicalResourceEntryEditor {
498
+ setIdentifier(identifier?: string | null): this;
499
+ getIdentifier(): string | undefined;
500
+ ensureIdentifier(): string;
501
+ setSubject(subject?: string | null): this;
502
+ getSubject(): string | undefined;
503
+ setStatus(value?: string | null): this;
504
+ getStatus(): string | undefined;
505
+ setDevice(value?: string | null): this;
506
+ getDevice(): string | undefined;
507
+ setRecordedOn(value?: string | null): this;
508
+ getRecordedOn(): string | undefined;
509
+ setTimingDateTime(value?: string | null): this;
510
+ getTimingDateTime(): string | undefined;
511
+ setReasonCode(value?: string | null): this;
512
+ getReasonCode(): string | undefined;
513
+ setSource(value?: string | null): this;
514
+ getSource(): string | undefined;
515
+ }
516
+ /** Claims-first editor for one staged Encounter entry. */
517
+ export declare class EncounterEntryEditor extends ClinicalResourceEntryEditor {
518
+ setIdentifier(identifier?: string | null): this;
519
+ getIdentifier(): string | undefined;
520
+ ensureIdentifier(): string;
521
+ setSubject(subject?: string | null): this;
522
+ getSubject(): string | undefined;
523
+ setStatus(value?: string | null): this;
524
+ getStatus(): string | undefined;
525
+ setClass(value?: string | null): this;
526
+ getClass(): string | undefined;
527
+ setType(value?: string | null): this;
528
+ getType(): string | undefined;
529
+ setParticipantList(values: readonly string[]): this;
530
+ getParticipantList(): string[];
531
+ setServiceProvider(value?: string | null): this;
532
+ getServiceProvider(): string | undefined;
533
+ setPeriodStart(value?: string | null): this;
534
+ getPeriodStart(): string | undefined;
535
+ setPeriodEnd(value?: string | null): this;
536
+ getPeriodEnd(): string | undefined;
537
+ setReasonCode(value?: string | null): this;
538
+ getReasonCode(): string | undefined;
539
+ }
540
+ /** Claims-first editor for one staged Coverage entry. */
541
+ export declare class CoverageEntryEditor extends ClinicalResourceEntryEditor {
542
+ setIdentifier(identifier?: string | null): this;
543
+ getIdentifier(): string | undefined;
544
+ ensureIdentifier(): string;
545
+ setStatus(value?: string | null): this;
546
+ getStatus(): string | undefined;
547
+ setType(value?: string | null): this;
548
+ getType(): string | undefined;
549
+ setPolicyHolder(value?: string | null): this;
550
+ getPolicyHolder(): string | undefined;
551
+ setSubscriber(value?: string | null): this;
552
+ getSubscriber(): string | undefined;
553
+ setBeneficiary(value?: string | null): this;
554
+ getBeneficiary(): string | undefined;
555
+ setRelationship(value?: string | null): this;
556
+ getRelationship(): string | undefined;
557
+ setPeriodStart(value?: string | null): this;
558
+ getPeriodStart(): string | undefined;
559
+ setPeriodEnd(value?: string | null): this;
560
+ getPeriodEnd(): string | undefined;
561
+ setPayorList(values: readonly string[]): this;
562
+ getPayorList(): string[];
563
+ }
564
+ /** Claims-first editor for one staged Immunization entry. */
565
+ export declare class ImmunizationEntryEditor extends ClinicalResourceEntryEditor {
566
+ setIdentifier(identifier?: string | null): this;
567
+ getIdentifier(): string | undefined;
568
+ ensureIdentifier(): string;
569
+ setSubject(subject?: string | null): this;
570
+ getSubject(): string | undefined;
571
+ setStatus(status?: string | null): this;
572
+ getStatus(): string | undefined;
573
+ setDate(date?: string | null): this;
574
+ getDate(): string | undefined;
575
+ setVaccineCode(code?: string | null): this;
576
+ getVaccineCode(): string | undefined;
577
+ setVaccineCodeTextLocal(text?: string | null): this;
578
+ getVaccineCodeTextLocal(): string | undefined;
579
+ setVaccineCodeDisplay(display?: string | null): this;
580
+ getVaccineCodeDisplay(): string | undefined;
581
+ setLocation(reference?: string | null): this;
582
+ getLocation(): string | undefined;
583
+ setManufacturer(reference?: string | null): this;
584
+ getManufacturer(): string | undefined;
585
+ setLotNumber(lotNumber?: string | null): this;
586
+ getLotNumber(): string | undefined;
587
+ setPerformerList(references: readonly string[]): this;
588
+ getPerformerList(): string[];
589
+ setReasonCode(code?: string | null): this;
590
+ getReasonCode(): string | undefined;
591
+ setStatusReason(reason?: string | null): this;
592
+ getStatusReason(): string | undefined;
593
+ setTargetDisease(code?: string | null): this;
594
+ getTargetDisease(): string | undefined;
595
+ setDoseSequence(sequence?: string | null): this;
596
+ getDoseSequence(): string | undefined;
597
+ setSeries(series?: string | null): this;
598
+ getSeries(): string | undefined;
599
+ setReactionDate(date?: string | null): this;
600
+ getReactionDate(): string | undefined;
601
+ setNote(note?: string | null): this;
602
+ getNote(): string | undefined;
603
+ setClinicalNote(note?: string | null): this;
604
+ getClinicalNote(): string | undefined;
605
+ }
606
+ /** Claims-first editor for one staged Procedure entry. */
607
+ export declare class ProcedureEntryEditor extends ClinicalResourceEntryEditor {
608
+ setIdentifier(identifier?: string | null): this;
609
+ getIdentifier(): string | undefined;
610
+ ensureIdentifier(): string;
611
+ setSubject(subject?: string | null): this;
612
+ getSubject(): string | undefined;
613
+ setStatus(status?: string | null): this;
614
+ getStatus(): string | undefined;
615
+ setDate(date?: string | null): this;
616
+ getDate(): string | undefined;
617
+ setCode(code?: string | null): this;
618
+ getCode(): string | undefined;
619
+ setCodeTextLocal(text?: string | null): this;
620
+ getCodeTextLocal(): string | undefined;
621
+ setCodeDisplay(display?: string | null): this;
622
+ getCodeDisplay(): string | undefined;
623
+ setEncounter(reference?: string | null): this;
624
+ getEncounter(): string | undefined;
625
+ setLocation(reference?: string | null): this;
626
+ getLocation(): string | undefined;
627
+ setReasonCode(code?: string | null): this;
628
+ getReasonCode(): string | undefined;
629
+ setNote(note?: string | null): this;
630
+ getNote(): string | undefined;
631
+ setClinicalNote(note?: string | null): this;
632
+ getClinicalNote(): string | undefined;
633
+ setPerformerList(references: readonly string[]): this;
634
+ getPerformerList(): string[];
635
+ setBasedOnList(references: readonly string[]): this;
636
+ getBasedOnList(): string[];
637
+ setReasonReferenceList(references: readonly string[]): this;
638
+ getReasonReferenceList(): string[];
639
+ }
640
+ /** Claims-first editor for one staged DiagnosticReport entry. */
641
+ export declare class DiagnosticReportEntryEditor extends ClinicalResourceEntryEditor {
642
+ setIdentifier(identifier?: string | null): this;
643
+ getIdentifier(): string | undefined;
644
+ ensureIdentifier(): string;
645
+ setSubject(subject?: string | null): this;
646
+ getSubject(): string | undefined;
647
+ setStatus(status?: string | null): this;
648
+ getStatus(): string | undefined;
649
+ setDate(date?: string | null): this;
650
+ getDate(): string | undefined;
651
+ setCategory(category?: string | null): this;
652
+ getCategory(): string | undefined;
653
+ setCode(code?: string | null): this;
654
+ getCode(): string | undefined;
655
+ setEncounter(reference?: string | null): this;
656
+ getEncounter(): string | undefined;
657
+ setPerformerList(references: readonly string[]): this;
658
+ getPerformerList(): string[];
659
+ setResultList(references: readonly string[]): this;
660
+ getResultList(): string[];
661
+ setSpecimenList(references: readonly string[]): this;
662
+ getSpecimenList(): string[];
663
+ setContainedDocumentIdentifierList(identifiers: readonly string[]): this;
664
+ getContainedDocumentIdentifierList(): string[];
665
+ setPresentedFormContentType(contentType?: string | null): this;
666
+ getPresentedFormContentType(): string | undefined;
667
+ setPresentedFormData(data?: string | null): this;
668
+ getPresentedFormData(): string | undefined;
669
+ setPresentedFormUrl(url?: string | null): this;
670
+ getPresentedFormUrl(): string | undefined;
232
671
  }
233
672
  /**
234
673
  * Employee-specific editor for one staged bundle entry.
@@ -265,3 +704,4 @@ export declare class EmployeeEntryEditor extends BundleEntryEditor {
265
704
  /** Writes the canonical employee organization tax id claim on this entry. */
266
705
  setMemberOfOrgTaxId(taxId: string): this;
267
706
  }
707
+ export {};