@medplum/core 5.1.38 → 5.1.40
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.
- package/dist/cjs/index.cjs +8 -8
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +237 -23
- package/dist/esm/index.d.ts +237 -23
- package/dist/esm/index.mjs +8 -8
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +4 -4
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AccessPolicy } from '@medplum/fhirtypes';
|
|
|
2
2
|
import type { AccessPolicyResource } from '@medplum/fhirtypes';
|
|
3
3
|
import type { Address } from '@medplum/fhirtypes';
|
|
4
4
|
import type { Agent } from '@medplum/fhirtypes';
|
|
5
|
+
import type { Appointment } from '@medplum/fhirtypes';
|
|
5
6
|
import type { Attachment } from '@medplum/fhirtypes';
|
|
6
7
|
import type { Binary } from '@medplum/fhirtypes';
|
|
7
8
|
import type { Bot } from '@medplum/fhirtypes';
|
|
@@ -27,6 +28,7 @@ import type { HealthcareService } from '@medplum/fhirtypes';
|
|
|
27
28
|
import type { HumanName } from '@medplum/fhirtypes';
|
|
28
29
|
import type { Identifier } from '@medplum/fhirtypes';
|
|
29
30
|
import type { ImagingStudy } from '@medplum/fhirtypes';
|
|
31
|
+
import type { Location as Location_2 } from '@medplum/fhirtypes';
|
|
30
32
|
import type { Media } from '@medplum/fhirtypes';
|
|
31
33
|
import type { Medication } from '@medplum/fhirtypes';
|
|
32
34
|
import type { MedicationRequest } from '@medplum/fhirtypes';
|
|
@@ -827,22 +829,40 @@ export declare function checkForNull(value: unknown, path: string, issues: Opera
|
|
|
827
829
|
*/
|
|
828
830
|
export declare function checkIfValidMedplumVersion(appName: string, version: string): Promise<boolean>;
|
|
829
831
|
|
|
832
|
+
/**
|
|
833
|
+
* Immutably clears one scheduling parameter a HealthcareService sets for itself, dropping it back to
|
|
834
|
+
* whatever scheduling defaults that parameter to.
|
|
835
|
+
* @param service - HealthcareService to update
|
|
836
|
+
* @param url - Url of the SchedulingParameters sub-extension to remove, for example `duration`
|
|
837
|
+
* @returns A cloned HealthcareService without the matching parameter
|
|
838
|
+
*/
|
|
839
|
+
export declare function clearHealthcareServiceSchedulingParameter<T extends HealthcareService>(service: T, url: HealthcareServiceSchedulingParameterUrl): T;
|
|
840
|
+
|
|
830
841
|
/**
|
|
831
842
|
* Clears the locally-cached `ReleaseManifest`s for all versions.
|
|
832
843
|
*/
|
|
833
844
|
export declare function clearReleaseCache(): void;
|
|
834
845
|
|
|
835
846
|
/**
|
|
836
|
-
* Immutably clears one scheduling parameter a Schedule
|
|
837
|
-
* calendar back to the service-level parameter of the same name. Pairs with `setScheduleParameter`
|
|
838
|
-
* and `getScheduleParameters`.
|
|
847
|
+
* Immutably clears one scheduling parameter a Schedule overrides for a HealthcareService.
|
|
839
848
|
* @param schedule - Schedule to update
|
|
840
|
-
* @param service - HealthcareService
|
|
849
|
+
* @param service - HealthcareService the parameters are scoped to
|
|
841
850
|
* @param url - Url of the SchedulingParameters sub-extension to remove, for example `availability`
|
|
842
851
|
* @returns A cloned Schedule without the matching parameter
|
|
852
|
+
* @deprecated Use clearScheduleSchedulingParameter() instead.
|
|
843
853
|
*/
|
|
844
854
|
export declare function clearScheduleParameter(schedule: Schedule, service: WithId<HealthcareService>, url: string): Schedule;
|
|
845
855
|
|
|
856
|
+
/**
|
|
857
|
+
* Immutably clears one scheduling parameter a Schedule overrides for a HealthcareService, dropping that
|
|
858
|
+
* calendar back to the service-level parameter of the same name.
|
|
859
|
+
* @param schedule - Schedule to update
|
|
860
|
+
* @param service - HealthcareService the parameters are scoped to
|
|
861
|
+
* @param url - Url of the SchedulingParameters sub-extension to remove, for example `availability`
|
|
862
|
+
* @returns A cloned Schedule without the matching parameter
|
|
863
|
+
*/
|
|
864
|
+
export declare function clearScheduleSchedulingParameter<T extends Schedule>(schedule: T, service: WithId<HealthcareService>, url: SchedulingParameterUrl): T;
|
|
865
|
+
|
|
846
866
|
/**
|
|
847
867
|
* Log level for MedplumClient requests and responses.
|
|
848
868
|
* - 'none': No logging
|
|
@@ -1712,7 +1732,9 @@ export declare function extractAccountReferences(meta: Meta | undefined): Refere
|
|
|
1712
1732
|
* @param serviceType - CodeableConcept values to inspect
|
|
1713
1733
|
* @returns HealthcareService references embedded in the concepts
|
|
1714
1734
|
*/
|
|
1715
|
-
export declare function extractServiceTypeReferences(serviceType: CodeableConcept[] | undefined): Reference<HealthcareService>
|
|
1735
|
+
export declare function extractServiceTypeReferences(serviceType: CodeableConcept[] | undefined): (Reference<HealthcareService> & {
|
|
1736
|
+
reference: string;
|
|
1737
|
+
})[];
|
|
1716
1738
|
|
|
1717
1739
|
/**
|
|
1718
1740
|
* Fetches the version strings for all published Medplum releases.
|
|
@@ -2456,6 +2478,16 @@ export declare function getAllDataTypes(): DataTypesMap;
|
|
|
2456
2478
|
*/
|
|
2457
2479
|
export declare function getAllQuestionnaireAnswers(response: QuestionnaireResponse): Record<string, QuestionnaireResponseItemAnswer[]>;
|
|
2458
2480
|
|
|
2481
|
+
/**
|
|
2482
|
+
* Reads the site an appointment is held at.
|
|
2483
|
+
*
|
|
2484
|
+
* Finds the entry {@link toAppointmentSiteReference} stamped.
|
|
2485
|
+
*
|
|
2486
|
+
* @param appointment - The appointment to read.
|
|
2487
|
+
* @returns The site, or undefined for an appointment holding none.
|
|
2488
|
+
*/
|
|
2489
|
+
export declare function getAppointmentSite(appointment: Appointment): Reference<Location_2> | undefined;
|
|
2490
|
+
|
|
2459
2491
|
/**
|
|
2460
2492
|
* Returns the global Buffer constructor if available.
|
|
2461
2493
|
* @returns The Buffer constructor or undefined.
|
|
@@ -2548,6 +2580,17 @@ export declare function getExtensions(extensible: Extensible | undefined, urlOrU
|
|
|
2548
2580
|
*/
|
|
2549
2581
|
export declare function getExtensionValue(resource: any, ...urls: string[]): ExtensionValue | undefined;
|
|
2550
2582
|
|
|
2583
|
+
/**
|
|
2584
|
+
* Reads one scheduling parameter a HealthcareService sets for itself.
|
|
2585
|
+
*
|
|
2586
|
+
* This is the raw sub-extension as stored. The server resolves what the service actually schedules by,
|
|
2587
|
+
* applying defaults, in its own `getHealthcareServiceSchedulingParameters`.
|
|
2588
|
+
* @param service - HealthcareService to inspect
|
|
2589
|
+
* @param url - Url of the SchedulingParameters sub-extension to read, for example `duration`
|
|
2590
|
+
* @returns Every matching sub-extension, in document order
|
|
2591
|
+
*/
|
|
2592
|
+
export declare function getHealthcareServiceSchedulingParameters(service: HealthcareService, url: HealthcareServiceSchedulingParameterUrl): Extension[];
|
|
2593
|
+
|
|
2551
2594
|
/**
|
|
2552
2595
|
* Returns the resource identifier for the given system.
|
|
2553
2596
|
*
|
|
@@ -2709,18 +2752,28 @@ export declare function getReferenceString(input: Reference | Resource): string
|
|
|
2709
2752
|
export declare function getResourceTypes(): ResourceType[];
|
|
2710
2753
|
|
|
2711
2754
|
/**
|
|
2712
|
-
* Reads one scheduling parameter a Schedule sets for a HealthcareService
|
|
2713
|
-
* service-level parameter of the same name. Pairs with `setScheduleParameter` and `clearScheduleParameter`.
|
|
2714
|
-
*
|
|
2715
|
-
* The result is a list rather than a single extension because a Schedule may carry more than one
|
|
2716
|
-
* SchedulingParameters extension matching the service, and because a parameter may legitimately repeat.
|
|
2755
|
+
* Reads one scheduling parameter a Schedule sets for a HealthcareService.
|
|
2717
2756
|
* @param schedule - Schedule to inspect
|
|
2718
|
-
* @param service - HealthcareService
|
|
2757
|
+
* @param service - HealthcareService the parameters are scoped to
|
|
2719
2758
|
* @param url - Url of the SchedulingParameters sub-extension to read, for example `availability`
|
|
2720
2759
|
* @returns Every matching sub-extension, in document order
|
|
2760
|
+
* @deprecated Use getScheduleSchedulingParameters() instead.
|
|
2721
2761
|
*/
|
|
2722
2762
|
export declare function getScheduleParameters(schedule: Schedule, service: WithId<HealthcareService>, url: string): Extension[];
|
|
2723
2763
|
|
|
2764
|
+
/**
|
|
2765
|
+
* Reads one scheduling parameter a Schedule sets for a HealthcareService, which overrides the
|
|
2766
|
+
* service-level parameter of the same name.
|
|
2767
|
+
*
|
|
2768
|
+
* This is the raw sub-extension as stored. The server resolves what a calendar actually schedules by,
|
|
2769
|
+
* applying defaults and service-level inheritance, in its own `getScheduleSchedulingParameters`.
|
|
2770
|
+
* @param schedule - Schedule to inspect
|
|
2771
|
+
* @param service - HealthcareService the parameters are scoped to
|
|
2772
|
+
* @param url - Url of the SchedulingParameters sub-extension to read, for example `availability`
|
|
2773
|
+
* @returns Every matching sub-extension, in document order
|
|
2774
|
+
*/
|
|
2775
|
+
export declare function getScheduleSchedulingParameters(schedule: Schedule, service: WithId<HealthcareService>, url: SchedulingParameterUrl): Extension[];
|
|
2776
|
+
|
|
2724
2777
|
/**
|
|
2725
2778
|
* Returns what a visit type must be given before it can be booked, from its
|
|
2726
2779
|
* `HealthcareService.eligibility` codes.
|
|
@@ -2853,13 +2906,25 @@ export declare interface GoogleLoginRequest extends BaseLoginRequest {
|
|
|
2853
2906
|
/**
|
|
2854
2907
|
* Returns whether a Schedule or HealthcareService has a SchedulingParameters extension.
|
|
2855
2908
|
*
|
|
2856
|
-
*
|
|
2857
|
-
*
|
|
2909
|
+
* On a Schedule the extension repeats once per service, so this reports only that some service is
|
|
2910
|
+
* configured; ask `getScheduleSchedulingParameters` about a particular one.
|
|
2858
2911
|
* @param resource - Schedule or HealthcareService to inspect
|
|
2859
2912
|
* @returns True if the resource has a SchedulingParameters extension
|
|
2860
2913
|
*/
|
|
2861
2914
|
export declare function hasSchedulingParameters(resource: Schedule | HealthcareService): boolean;
|
|
2862
2915
|
|
|
2916
|
+
/** A `SchedulingParameters` sub-extension a HealthcareService may carry. */
|
|
2917
|
+
export declare type HealthcareServiceSchedulingParameterExtension = Extension & {
|
|
2918
|
+
url: HealthcareServiceSchedulingParameterUrl;
|
|
2919
|
+
};
|
|
2920
|
+
|
|
2921
|
+
/**
|
|
2922
|
+
* The sub-extension urls a HealthcareService's own `SchedulingParameters` may carry. `availability` is
|
|
2923
|
+
* excluded because scheduling reads a service's hours from `HealthcareService.availableTime` and rejects
|
|
2924
|
+
* the sub-extension outright.
|
|
2925
|
+
*/
|
|
2926
|
+
export declare type HealthcareServiceSchedulingParameterUrl = Exclude<SchedulingParameterUrl, 'availability'>;
|
|
2927
|
+
|
|
2863
2928
|
export declare const HL7_V2_0203 = "http://terminology.hl7.org/CodeSystem/v2-0203";
|
|
2864
2929
|
|
|
2865
2930
|
export declare interface Hl7AckOptions {
|
|
@@ -3423,6 +3488,12 @@ export declare function intersection(objects: ArrayLike<{
|
|
|
3423
3488
|
[index: string]: any;
|
|
3424
3489
|
}>): string[];
|
|
3425
3490
|
|
|
3491
|
+
/**
|
|
3492
|
+
* Stable error when a cart-read bot response does not match
|
|
3493
|
+
* {@link MedicationCartContentsResponse}.
|
|
3494
|
+
*/
|
|
3495
|
+
export declare const INVALID_MEDICATION_CART_CONTENTS_RESPONSE = "Invalid response from get-cart bot";
|
|
3496
|
+
|
|
3426
3497
|
/**
|
|
3427
3498
|
* Stable error when a cart-management bot response does not match
|
|
3428
3499
|
* {@link MedicationCartManageResponse}.
|
|
@@ -3640,6 +3711,13 @@ export declare function isLowerCase(c: string): boolean;
|
|
|
3640
3711
|
*/
|
|
3641
3712
|
export declare function isMedicationArray(value: unknown): value is Medication[];
|
|
3642
3713
|
|
|
3714
|
+
/**
|
|
3715
|
+
* Type guard: validates a cart-read bot response.
|
|
3716
|
+
* @param value - Unknown bot JSON payload.
|
|
3717
|
+
* @returns True when the value matches {@link MedicationCartContentsResponse}.
|
|
3718
|
+
*/
|
|
3719
|
+
export declare function isMedicationCartContentsResponse(value: unknown): value is MedicationCartContentsResponse;
|
|
3720
|
+
|
|
3643
3721
|
/**
|
|
3644
3722
|
* Type guard: validates a cart-management bot response.
|
|
3645
3723
|
* @param value - Unknown bot JSON payload.
|
|
@@ -4256,6 +4334,40 @@ export declare interface MedicationCartClearRequest {
|
|
|
4256
4334
|
*/
|
|
4257
4335
|
export declare function medicationCartClearRequestToParameters(req: MedicationCartClearRequest): Parameters_2;
|
|
4258
4336
|
|
|
4337
|
+
/** Vendor-neutral input to read the patient's vendor cart (`$get-cart`). */
|
|
4338
|
+
export declare interface MedicationCartContentsRequest {
|
|
4339
|
+
readonly patientId: string;
|
|
4340
|
+
}
|
|
4341
|
+
|
|
4342
|
+
/**
|
|
4343
|
+
* Encodes a {@link MedicationCartContentsRequest} as a FHIR `Parameters` body
|
|
4344
|
+
* for the `$get-cart` custom operation. No `action` discriminator: unlike
|
|
4345
|
+
* remove/clear, this operation has its own read-only bot.
|
|
4346
|
+
*
|
|
4347
|
+
* @param req - Cart-contents request (vendor-neutral).
|
|
4348
|
+
* @returns A `Parameters` resource ready to POST.
|
|
4349
|
+
*/
|
|
4350
|
+
export declare function medicationCartContentsRequestToParameters(req: MedicationCartContentsRequest): Parameters_2;
|
|
4351
|
+
|
|
4352
|
+
/**
|
|
4353
|
+
* Vendor-neutral view of the patient's cart as the vendor holds it, reconciled
|
|
4354
|
+
* against local drafts.
|
|
4355
|
+
*
|
|
4356
|
+
* `vendorTotal` is what the prescriber will see in the approval widget;
|
|
4357
|
+
* `draftCount` is what the local record says. They diverge whenever `items`
|
|
4358
|
+
* contains a line that is not `in-sync` or `not-staged` — the drift a
|
|
4359
|
+
* draft-derived cart badge cannot detect on its own.
|
|
4360
|
+
*/
|
|
4361
|
+
export declare interface MedicationCartContentsResponse {
|
|
4362
|
+
/** Vendor-side patient id (numeric in ScriptSure today). */
|
|
4363
|
+
readonly vendorPatientId: number;
|
|
4364
|
+
readonly vendorTotal: number;
|
|
4365
|
+
readonly draftCount: number;
|
|
4366
|
+
/** True when the vendor reports the cart locked; a write may conflict. */
|
|
4367
|
+
readonly locked: boolean;
|
|
4368
|
+
readonly items: MedicationCartLine[];
|
|
4369
|
+
}
|
|
4370
|
+
|
|
4259
4371
|
/**
|
|
4260
4372
|
* Per-item outcome from a cart remove/clear. `removed` = the vendor cart item
|
|
4261
4373
|
* was deleted; `not-in-cart` = the draft was not staged (nothing to remove);
|
|
@@ -4269,6 +4381,40 @@ export declare interface MedicationCartItemResult {
|
|
|
4269
4381
|
readonly error?: string;
|
|
4270
4382
|
}
|
|
4271
4383
|
|
|
4384
|
+
/** One reconciled line in a {@link MedicationCartContentsResponse}. */
|
|
4385
|
+
export declare interface MedicationCartLine {
|
|
4386
|
+
readonly status: MedicationCartLineStatus;
|
|
4387
|
+
/** Local draft id; absent for `vendor-only` lines. */
|
|
4388
|
+
readonly medicationRequestId?: string;
|
|
4389
|
+
/** Vendor cart-item reference; absent for `not-staged` drafts. */
|
|
4390
|
+
readonly vendorLineId?: string;
|
|
4391
|
+
/** Display fields off the vendor line; absent for `not-staged` drafts (render those from the draft). */
|
|
4392
|
+
readonly drugName?: string;
|
|
4393
|
+
readonly ndc?: string;
|
|
4394
|
+
readonly rxnorm?: string;
|
|
4395
|
+
readonly quantity?: number;
|
|
4396
|
+
/** Vendor readiness hint (e.g. `Ready`, `Incomplete`); not a guarantee the line will send. */
|
|
4397
|
+
readonly validationState?: string;
|
|
4398
|
+
/** Who staged the line, per the vendor. Identifies the source of an unexpected line. */
|
|
4399
|
+
readonly createdBy?: string;
|
|
4400
|
+
readonly createdAt?: string;
|
|
4401
|
+
}
|
|
4402
|
+
|
|
4403
|
+
/**
|
|
4404
|
+
* Reconciliation verdict for one cart line, comparing what the vendor holds
|
|
4405
|
+
* against the local draft `MedicationRequest`s:
|
|
4406
|
+
*
|
|
4407
|
+
* - `in-sync`: the vendor line matches a draft. The normal case.
|
|
4408
|
+
* - `vendor-only`: the vendor holds a line with no local draft — staged through
|
|
4409
|
+
* another UI or by a session whose draft is gone. The prescriber will still
|
|
4410
|
+
* see it in the approval widget, so a draft-derived cart count under-reports.
|
|
4411
|
+
* - `not-staged`: a draft that has not been checked out yet, so the vendor
|
|
4412
|
+
* legitimately does not hold it. Benign, not drift.
|
|
4413
|
+
* - `missing-from-vendor`: a draft the vendor no longer holds. Resolves the
|
|
4414
|
+
* ambiguity left by a failed `removeFromCart`: the line really is gone.
|
|
4415
|
+
*/
|
|
4416
|
+
export declare type MedicationCartLineStatus = 'in-sync' | 'vendor-only' | 'not-staged' | 'missing-from-vendor';
|
|
4417
|
+
|
|
4272
4418
|
/**
|
|
4273
4419
|
* Vendor-neutral output from a cart remove/clear: the vendor patient id, the
|
|
4274
4420
|
* number of cart items actually removed, and the per-line outcomes (one for a
|
|
@@ -7101,6 +7247,13 @@ export declare class MemoryStorage implements Storage {
|
|
|
7101
7247
|
|
|
7102
7248
|
export declare type Message = string | ArrayBuffer | Blob | ArrayBufferView;
|
|
7103
7249
|
|
|
7250
|
+
/**
|
|
7251
|
+
* Converts minutes to a SchedulingParameters duration, the inverse of `schedulingDurationToMinutes`.
|
|
7252
|
+
* @param minutes - The length in minutes.
|
|
7253
|
+
* @returns A duration scheduling accepts.
|
|
7254
|
+
*/
|
|
7255
|
+
export declare function minutesToSchedulingDuration(minutes: number): Duration;
|
|
7256
|
+
|
|
7104
7257
|
export declare class MissingError extends Error {
|
|
7105
7258
|
path: string;
|
|
7106
7259
|
constructor(path: string);
|
|
@@ -7469,6 +7622,17 @@ export declare interface OrderSetSyncSequenceResult {
|
|
|
7469
7622
|
*/
|
|
7470
7623
|
export declare type OutputRow = Record<string, any>;
|
|
7471
7624
|
|
|
7625
|
+
/**
|
|
7626
|
+
* Decodes the `Parameters` response from the `$get-cart` custom operation into
|
|
7627
|
+
* a typed {@link MedicationCartContentsResponse}. Throws
|
|
7628
|
+
* {@link INVALID_MEDICATION_CART_CONTENTS_RESPONSE} when required top-level
|
|
7629
|
+
* fields are missing.
|
|
7630
|
+
*
|
|
7631
|
+
* @param params - The `Parameters` resource returned by the operation.
|
|
7632
|
+
* @returns A vendor-neutral {@link MedicationCartContentsResponse}.
|
|
7633
|
+
*/
|
|
7634
|
+
export declare function parametersToMedicationCartContentsResponse(params: Parameters_2): MedicationCartContentsResponse;
|
|
7635
|
+
|
|
7472
7636
|
/**
|
|
7473
7637
|
* Decodes the `Parameters` response from the `$remove-cart-medication` /
|
|
7474
7638
|
* `$clear-cart` custom operations into a typed {@link MedicationCartManageResponse}.
|
|
@@ -8377,14 +8541,28 @@ export declare class ParserBuilder {
|
|
|
8377
8541
|
/** Extension on an Appointment recording that medical necessity was confirmed when it was booked. */
|
|
8378
8542
|
export declare const SchedulingMedicalNecessityURI = "https://medplum.com/fhir/StructureDefinition/SchedulingMedicalNecessity";
|
|
8379
8543
|
|
|
8544
|
+
/** A `SchedulingParameters` sub-extension a Schedule may carry. */
|
|
8545
|
+
export declare type SchedulingParameterExtension = Extension & {
|
|
8546
|
+
url: SchedulingParameterUrl;
|
|
8547
|
+
};
|
|
8548
|
+
|
|
8380
8549
|
export declare const SchedulingParametersURI = "https://medplum.com/fhir/StructureDefinition/SchedulingParameters";
|
|
8381
8550
|
|
|
8551
|
+
/**
|
|
8552
|
+
* The sub-extension urls a `SchedulingParameters` extension may carry, apart from the `service` pointer a
|
|
8553
|
+
* Schedule's parameters are matched by, which these helpers maintain rather than expose.
|
|
8554
|
+
*/
|
|
8555
|
+
export declare type SchedulingParameterUrl = 'availability' | 'duration' | 'bufferBefore' | 'bufferAfter' | 'alignmentInterval' | 'alignmentOffset' | 'alignmentTimezone' | 'timezone' | 'slotCapacity';
|
|
8556
|
+
|
|
8382
8557
|
export declare const SchedulingPlanDefinitionURI = "https://medplum.com/fhir/StructureDefinition/SchedulingPlanDefinition";
|
|
8383
8558
|
|
|
8384
8559
|
export declare type SchedulingRequirement = (typeof SCHEDULING_REQUIREMENT_CODES)[number];
|
|
8385
8560
|
|
|
8386
8561
|
export declare const SchedulingScheduleColorURI = "https://medplum.com/fhir/StructureDefinition/SchedulingColor";
|
|
8387
8562
|
|
|
8563
|
+
/** Extension URI marking which `Appointment.supportingInformation` entry is the site. */
|
|
8564
|
+
export declare const SchedulingSiteURI = "https://medplum.com/fhir/StructureDefinition/SchedulingSite";
|
|
8565
|
+
|
|
8388
8566
|
/**
|
|
8389
8567
|
* This extension is set on `Slot` resources created through scheduling APIs.
|
|
8390
8568
|
* Its value is a positive integer recording the slotCapacity for the service
|
|
@@ -8395,6 +8573,16 @@ export declare class ParserBuilder {
|
|
|
8395
8573
|
*/
|
|
8396
8574
|
export declare const SchedulingSlotCapacityURI = "https://medplum.com/fhir/StructureDefinition/SchedulingSlotCapacity";
|
|
8397
8575
|
|
|
8576
|
+
/**
|
|
8577
|
+
* This extension marks an `Appointment` created without the scheduling rules being
|
|
8578
|
+
* applied: the time may be occupied or blocked, past the configured capacity, off the
|
|
8579
|
+
* configured start interval, or any length at all.
|
|
8580
|
+
*
|
|
8581
|
+
* Such an appointment is written through the FHIR CRUD API rather than `$book`, so
|
|
8582
|
+
* nothing else about it says that it was never checked. This records only that.
|
|
8583
|
+
*/
|
|
8584
|
+
export declare const SchedulingUnvalidatedBookingURI = "https://medplum.com/fhir/StructureDefinition/SchedulingUnvalidatedBooking";
|
|
8585
|
+
|
|
8398
8586
|
export declare interface SearchableToken {
|
|
8399
8587
|
readonly system: string | undefined;
|
|
8400
8588
|
readonly value: string | undefined;
|
|
@@ -8521,6 +8709,15 @@ export declare class ParserBuilder {
|
|
|
8521
8709
|
*/
|
|
8522
8710
|
export declare function setCodeBySystem(concept: CodeableConcept, system: string, code: string): void;
|
|
8523
8711
|
|
|
8712
|
+
/**
|
|
8713
|
+
* Immutably sets one scheduling parameter on a HealthcareService, replacing whatever it already holds at
|
|
8714
|
+
* the sub-extension's url.
|
|
8715
|
+
* @param service - HealthcareService to update
|
|
8716
|
+
* @param subextension - SchedulingParameters sub-extension to set
|
|
8717
|
+
* @returns A cloned HealthcareService containing the parameter
|
|
8718
|
+
*/
|
|
8719
|
+
export declare function setHealthcareServiceSchedulingParameter<T extends HealthcareService>(service: T, subextension: HealthcareServiceSchedulingParameterExtension): T;
|
|
8720
|
+
|
|
8524
8721
|
/**
|
|
8525
8722
|
* Sets a resource identifier for the given system.
|
|
8526
8723
|
*
|
|
@@ -8554,22 +8751,25 @@ export declare class ParserBuilder {
|
|
|
8554
8751
|
export declare function setRateLimitReset(outcome: OperationOutcome, msBeforeNext: number): void;
|
|
8555
8752
|
|
|
8556
8753
|
/**
|
|
8557
|
-
* Immutably sets one scheduling parameter
|
|
8558
|
-
* it in place of the service-level parameter of the same name. Whatever the Schedule already holds at the
|
|
8559
|
-
* sub-extension's url is replaced, and the SchedulingParameters extension is created if the Schedule has
|
|
8560
|
-
* none for the service yet.
|
|
8561
|
-
*
|
|
8562
|
-
* Untyped by design, taking any sub-extension of the shape the parameter calls for, for example
|
|
8563
|
-
* `{ url: 'bufferBefore', valueDuration: { value: 10, unit: 'min' } }`. A parameter whose value is a nested
|
|
8564
|
-
* structure rather than a single `value[x]` is worth a typed wrapper over this; `availability` has one in
|
|
8565
|
-
* `@medplum/react-scheduling`. Pairs with `clearScheduleParameter` and `getScheduleParameters`.
|
|
8754
|
+
* Immutably sets one scheduling parameter a Schedule overrides for a HealthcareService.
|
|
8566
8755
|
* @param schedule - Schedule to update
|
|
8567
|
-
* @param service - HealthcareService
|
|
8756
|
+
* @param service - HealthcareService the parameters are scoped to
|
|
8568
8757
|
* @param subextension - SchedulingParameters sub-extension to set
|
|
8569
8758
|
* @returns A cloned Schedule containing the parameter
|
|
8759
|
+
* @deprecated Use setScheduleSchedulingParameter() instead.
|
|
8570
8760
|
*/
|
|
8571
8761
|
export declare function setScheduleParameter(schedule: Schedule, service: WithId<HealthcareService>, subextension: Extension): Schedule;
|
|
8572
8762
|
|
|
8763
|
+
/**
|
|
8764
|
+
* Immutably sets one scheduling parameter a Schedule overrides for a HealthcareService, replacing whatever
|
|
8765
|
+
* that calendar already holds at the sub-extension's url.
|
|
8766
|
+
* @param schedule - Schedule to update
|
|
8767
|
+
* @param service - HealthcareService the parameters are scoped to
|
|
8768
|
+
* @param subextension - SchedulingParameters sub-extension to set
|
|
8769
|
+
* @returns A cloned Schedule containing the parameter
|
|
8770
|
+
*/
|
|
8771
|
+
export declare function setScheduleSchedulingParameter<T extends Schedule>(schedule: T, service: WithId<HealthcareService>, subextension: SchedulingParameterExtension): T;
|
|
8772
|
+
|
|
8573
8773
|
export declare function singleton(collection: TypedValue[], type?: string): TypedValue | undefined;
|
|
8574
8774
|
|
|
8575
8775
|
export declare function singularize<T>(value: T | T[] | undefined): T | undefined;
|
|
@@ -8930,6 +9130,20 @@ export declare class ParserBuilder {
|
|
|
8930
9130
|
|
|
8931
9131
|
export declare const TimezoneExtensionURI = "http://hl7.org/fhir/StructureDefinition/timezone";
|
|
8932
9132
|
|
|
9133
|
+
/**
|
|
9134
|
+
* Builds the `supportingInformation` entry recording the site an appointment is held at.
|
|
9135
|
+
*
|
|
9136
|
+
* A site and a room are both `Location`, so the site is recorded here rather than as a
|
|
9137
|
+
* participant: `Appointment.location` answers the room, and {@link getAppointmentSite}
|
|
9138
|
+
* the site. Anything writing an appointment outside the booking form should record the
|
|
9139
|
+
* site through this, so that it is identifiable among the other `supportingInformation`
|
|
9140
|
+
* entries.
|
|
9141
|
+
*
|
|
9142
|
+
* @param site - The site the appointment is held at.
|
|
9143
|
+
* @returns The reference, stamped with {@link SchedulingSiteURI}.
|
|
9144
|
+
*/
|
|
9145
|
+
export declare function toAppointmentSiteReference(site: WithId<Location_2>): Reference<Location_2>;
|
|
9146
|
+
|
|
8933
9147
|
/**
|
|
8934
9148
|
* Converts unknown object into a JavaScript boolean.
|
|
8935
9149
|
* Note that this is different than the FHIRPath "toBoolean",
|