@medplum/core 5.1.36 → 5.1.38
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 +6 -6
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +60 -0
- package/dist/esm/index.d.ts +60 -0
- package/dist/esm/index.mjs +7 -7
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +5 -5
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1003,6 +1003,7 @@ export declare const ContentType: {
|
|
|
1003
1003
|
readonly JSON: "application/json";
|
|
1004
1004
|
readonly JSON_PATCH: "application/json-patch+json";
|
|
1005
1005
|
readonly JWT: "application/jwt";
|
|
1006
|
+
readonly LINKSET_JSON: "application/linkset+json";
|
|
1006
1007
|
readonly MULTIPART_FORM_DATA: "multipart/form-data";
|
|
1007
1008
|
readonly PNG: "image/png";
|
|
1008
1009
|
readonly SCIM_JSON: "application/scim+json";
|
|
@@ -1363,6 +1364,20 @@ export declare const DEFAULT_MAX_SEARCH_COUNT = 1000;
|
|
|
1363
1364
|
|
|
1364
1365
|
export declare const DEFAULT_SEARCH_COUNT = 20;
|
|
1365
1366
|
|
|
1367
|
+
/**
|
|
1368
|
+
* Given a type `Reference<X>`, extracts `X`
|
|
1369
|
+
*
|
|
1370
|
+
* The input is constrained to references, so passing anything else is a compile error
|
|
1371
|
+
* rather than a silently unhelpful type. `null` and `undefined` are allowed and pass
|
|
1372
|
+
* through, so an optional reference field dereferences to an optional resource.
|
|
1373
|
+
*
|
|
1374
|
+
* The check is structural, though: this accepts anything assignable to `Reference`, an
|
|
1375
|
+
* interface whose fields are all optional. Object types that are not true references are
|
|
1376
|
+
* therefore accepted, and with no `resource` property to infer from, resolve to
|
|
1377
|
+
* `Resource`, the default type argument of `Reference`.
|
|
1378
|
+
*/
|
|
1379
|
+
export declare type Dereference<T extends Reference | null | undefined> = T extends Reference<infer R> ? R : T;
|
|
1380
|
+
|
|
1366
1381
|
/**
|
|
1367
1382
|
* Derives an "identifier" search parameter from a reference search parameter.
|
|
1368
1383
|
*
|
|
@@ -2706,6 +2721,14 @@ export declare function getResourceTypes(): ResourceType[];
|
|
|
2706
2721
|
*/
|
|
2707
2722
|
export declare function getScheduleParameters(schedule: Schedule, service: WithId<HealthcareService>, url: string): Extension[];
|
|
2708
2723
|
|
|
2724
|
+
/**
|
|
2725
|
+
* Returns what a visit type must be given before it can be booked, from its
|
|
2726
|
+
* `HealthcareService.eligibility` codes.
|
|
2727
|
+
* @param service - The visit type being booked, if one has been chosen yet.
|
|
2728
|
+
* @returns The requirements it names, empty until a visit type is chosen or when it names none.
|
|
2729
|
+
*/
|
|
2730
|
+
export declare function getSchedulingRequirements(service: HealthcareService | undefined): Set<SchedulingRequirement>;
|
|
2731
|
+
|
|
2709
2732
|
/**
|
|
2710
2733
|
* Resolves the timezone used by scheduling in server priority order: the Schedule's parameters for the
|
|
2711
2734
|
* service, then the service's own parameters, then the actor's standard FHIR timezone extension.
|
|
@@ -3764,6 +3787,13 @@ export declare function isResourceTypeSchema(typeSchema: InternalTypeSchema): bo
|
|
|
3764
3787
|
|
|
3765
3788
|
export declare function isResourceWithId<T extends Resource>(resource: unknown, resourceType?: T['resourceType']): resource is WithId<T>;
|
|
3766
3789
|
|
|
3790
|
+
/**
|
|
3791
|
+
* Returns whether a code names a scheduling requirement.
|
|
3792
|
+
* @param value - The `Coding.code` to test, which a resource need not carry.
|
|
3793
|
+
* @returns True when it is one of the requirements a booking honours.
|
|
3794
|
+
*/
|
|
3795
|
+
export declare function isSchedulingRequirement(value: string | undefined): value is SchedulingRequirement;
|
|
3796
|
+
|
|
3767
3797
|
export declare function isSliceDefinitionWithTypes(slice: SliceDefinition): slice is SliceDefinitionWithTypes;
|
|
3768
3798
|
|
|
3769
3799
|
/**
|
|
@@ -8238,6 +8268,15 @@ export declare class ParserBuilder {
|
|
|
8238
8268
|
expandProfile?: boolean;
|
|
8239
8269
|
}
|
|
8240
8270
|
|
|
8271
|
+
/** The eligibility code marking a visit type that cannot be booked without diagnosis codes. */
|
|
8272
|
+
export declare const REQUIRES_DIAGNOSIS_CODE = "requires-diagnosis";
|
|
8273
|
+
|
|
8274
|
+
/** The eligibility code marking a visit type that cannot be booked without confirming medical necessity. */
|
|
8275
|
+
export declare const REQUIRES_MEDICAL_NECESSITY_CODE = "requires-medical-necessity";
|
|
8276
|
+
|
|
8277
|
+
/** The eligibility code marking a visit type that cannot be booked without procedure codes. */
|
|
8278
|
+
export declare const REQUIRES_PROCEDURE_CODE = "requires-procedure";
|
|
8279
|
+
|
|
8241
8280
|
/**
|
|
8242
8281
|
* Returns the ID portion of a reference.
|
|
8243
8282
|
* @param input - A FHIR reference or resource.
|
|
@@ -8318,6 +8357,12 @@ export declare class ParserBuilder {
|
|
|
8318
8357
|
*/
|
|
8319
8358
|
export declare function satisfiedAccessPolicy(resource: Resource, interaction: AccessPolicyInteraction, accessPolicy: AccessPolicy | undefined): AccessPolicyResource | undefined;
|
|
8320
8359
|
|
|
8360
|
+
/** Code system for scheduling requirements, recorded on `HealthcareService.eligibility.code`. */
|
|
8361
|
+
export declare const SCHEDULING_ELIGIBILITY_SYSTEM = "https://medplum.com/fhir/CodeSystem/scheduling-eligibility";
|
|
8362
|
+
|
|
8363
|
+
/** Every eligibility code naming something a booking must carry. */
|
|
8364
|
+
export declare const SCHEDULING_REQUIREMENT_CODES: readonly ["requires-procedure", "requires-diagnosis", "requires-medical-necessity"];
|
|
8365
|
+
|
|
8321
8366
|
/**
|
|
8322
8367
|
* Converts a SchedulingParameters duration to minutes.
|
|
8323
8368
|
*
|
|
@@ -8329,12 +8374,27 @@ export declare class ParserBuilder {
|
|
|
8329
8374
|
|
|
8330
8375
|
export declare const SchedulingEncounterCodingURI = "https://medplum.com/fhir/StructureDefinition/SchedulingEncounterCoding";
|
|
8331
8376
|
|
|
8377
|
+
/** Extension on an Appointment recording that medical necessity was confirmed when it was booked. */
|
|
8378
|
+
export declare const SchedulingMedicalNecessityURI = "https://medplum.com/fhir/StructureDefinition/SchedulingMedicalNecessity";
|
|
8379
|
+
|
|
8332
8380
|
export declare const SchedulingParametersURI = "https://medplum.com/fhir/StructureDefinition/SchedulingParameters";
|
|
8333
8381
|
|
|
8334
8382
|
export declare const SchedulingPlanDefinitionURI = "https://medplum.com/fhir/StructureDefinition/SchedulingPlanDefinition";
|
|
8335
8383
|
|
|
8384
|
+
export declare type SchedulingRequirement = (typeof SCHEDULING_REQUIREMENT_CODES)[number];
|
|
8385
|
+
|
|
8336
8386
|
export declare const SchedulingScheduleColorURI = "https://medplum.com/fhir/StructureDefinition/SchedulingColor";
|
|
8337
8387
|
|
|
8388
|
+
/**
|
|
8389
|
+
* This extension is set on `Slot` resources created through scheduling APIs.
|
|
8390
|
+
* Its value is a positive integer recording the slotCapacity for the service
|
|
8391
|
+
* and schedule at the time the booking was created. Omitted when the
|
|
8392
|
+
* slotCapacity is `1`.
|
|
8393
|
+
*
|
|
8394
|
+
* @see https://www.medplum.com/docs/scheduling/defining-availability#overbooking
|
|
8395
|
+
*/
|
|
8396
|
+
export declare const SchedulingSlotCapacityURI = "https://medplum.com/fhir/StructureDefinition/SchedulingSlotCapacity";
|
|
8397
|
+
|
|
8338
8398
|
export declare interface SearchableToken {
|
|
8339
8399
|
readonly system: string | undefined;
|
|
8340
8400
|
readonly value: string | undefined;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1003,6 +1003,7 @@ export declare const ContentType: {
|
|
|
1003
1003
|
readonly JSON: "application/json";
|
|
1004
1004
|
readonly JSON_PATCH: "application/json-patch+json";
|
|
1005
1005
|
readonly JWT: "application/jwt";
|
|
1006
|
+
readonly LINKSET_JSON: "application/linkset+json";
|
|
1006
1007
|
readonly MULTIPART_FORM_DATA: "multipart/form-data";
|
|
1007
1008
|
readonly PNG: "image/png";
|
|
1008
1009
|
readonly SCIM_JSON: "application/scim+json";
|
|
@@ -1363,6 +1364,20 @@ export declare const DEFAULT_MAX_SEARCH_COUNT = 1000;
|
|
|
1363
1364
|
|
|
1364
1365
|
export declare const DEFAULT_SEARCH_COUNT = 20;
|
|
1365
1366
|
|
|
1367
|
+
/**
|
|
1368
|
+
* Given a type `Reference<X>`, extracts `X`
|
|
1369
|
+
*
|
|
1370
|
+
* The input is constrained to references, so passing anything else is a compile error
|
|
1371
|
+
* rather than a silently unhelpful type. `null` and `undefined` are allowed and pass
|
|
1372
|
+
* through, so an optional reference field dereferences to an optional resource.
|
|
1373
|
+
*
|
|
1374
|
+
* The check is structural, though: this accepts anything assignable to `Reference`, an
|
|
1375
|
+
* interface whose fields are all optional. Object types that are not true references are
|
|
1376
|
+
* therefore accepted, and with no `resource` property to infer from, resolve to
|
|
1377
|
+
* `Resource`, the default type argument of `Reference`.
|
|
1378
|
+
*/
|
|
1379
|
+
export declare type Dereference<T extends Reference | null | undefined> = T extends Reference<infer R> ? R : T;
|
|
1380
|
+
|
|
1366
1381
|
/**
|
|
1367
1382
|
* Derives an "identifier" search parameter from a reference search parameter.
|
|
1368
1383
|
*
|
|
@@ -2706,6 +2721,14 @@ export declare function getResourceTypes(): ResourceType[];
|
|
|
2706
2721
|
*/
|
|
2707
2722
|
export declare function getScheduleParameters(schedule: Schedule, service: WithId<HealthcareService>, url: string): Extension[];
|
|
2708
2723
|
|
|
2724
|
+
/**
|
|
2725
|
+
* Returns what a visit type must be given before it can be booked, from its
|
|
2726
|
+
* `HealthcareService.eligibility` codes.
|
|
2727
|
+
* @param service - The visit type being booked, if one has been chosen yet.
|
|
2728
|
+
* @returns The requirements it names, empty until a visit type is chosen or when it names none.
|
|
2729
|
+
*/
|
|
2730
|
+
export declare function getSchedulingRequirements(service: HealthcareService | undefined): Set<SchedulingRequirement>;
|
|
2731
|
+
|
|
2709
2732
|
/**
|
|
2710
2733
|
* Resolves the timezone used by scheduling in server priority order: the Schedule's parameters for the
|
|
2711
2734
|
* service, then the service's own parameters, then the actor's standard FHIR timezone extension.
|
|
@@ -3764,6 +3787,13 @@ export declare function isResourceTypeSchema(typeSchema: InternalTypeSchema): bo
|
|
|
3764
3787
|
|
|
3765
3788
|
export declare function isResourceWithId<T extends Resource>(resource: unknown, resourceType?: T['resourceType']): resource is WithId<T>;
|
|
3766
3789
|
|
|
3790
|
+
/**
|
|
3791
|
+
* Returns whether a code names a scheduling requirement.
|
|
3792
|
+
* @param value - The `Coding.code` to test, which a resource need not carry.
|
|
3793
|
+
* @returns True when it is one of the requirements a booking honours.
|
|
3794
|
+
*/
|
|
3795
|
+
export declare function isSchedulingRequirement(value: string | undefined): value is SchedulingRequirement;
|
|
3796
|
+
|
|
3767
3797
|
export declare function isSliceDefinitionWithTypes(slice: SliceDefinition): slice is SliceDefinitionWithTypes;
|
|
3768
3798
|
|
|
3769
3799
|
/**
|
|
@@ -8238,6 +8268,15 @@ export declare class ParserBuilder {
|
|
|
8238
8268
|
expandProfile?: boolean;
|
|
8239
8269
|
}
|
|
8240
8270
|
|
|
8271
|
+
/** The eligibility code marking a visit type that cannot be booked without diagnosis codes. */
|
|
8272
|
+
export declare const REQUIRES_DIAGNOSIS_CODE = "requires-diagnosis";
|
|
8273
|
+
|
|
8274
|
+
/** The eligibility code marking a visit type that cannot be booked without confirming medical necessity. */
|
|
8275
|
+
export declare const REQUIRES_MEDICAL_NECESSITY_CODE = "requires-medical-necessity";
|
|
8276
|
+
|
|
8277
|
+
/** The eligibility code marking a visit type that cannot be booked without procedure codes. */
|
|
8278
|
+
export declare const REQUIRES_PROCEDURE_CODE = "requires-procedure";
|
|
8279
|
+
|
|
8241
8280
|
/**
|
|
8242
8281
|
* Returns the ID portion of a reference.
|
|
8243
8282
|
* @param input - A FHIR reference or resource.
|
|
@@ -8318,6 +8357,12 @@ export declare class ParserBuilder {
|
|
|
8318
8357
|
*/
|
|
8319
8358
|
export declare function satisfiedAccessPolicy(resource: Resource, interaction: AccessPolicyInteraction, accessPolicy: AccessPolicy | undefined): AccessPolicyResource | undefined;
|
|
8320
8359
|
|
|
8360
|
+
/** Code system for scheduling requirements, recorded on `HealthcareService.eligibility.code`. */
|
|
8361
|
+
export declare const SCHEDULING_ELIGIBILITY_SYSTEM = "https://medplum.com/fhir/CodeSystem/scheduling-eligibility";
|
|
8362
|
+
|
|
8363
|
+
/** Every eligibility code naming something a booking must carry. */
|
|
8364
|
+
export declare const SCHEDULING_REQUIREMENT_CODES: readonly ["requires-procedure", "requires-diagnosis", "requires-medical-necessity"];
|
|
8365
|
+
|
|
8321
8366
|
/**
|
|
8322
8367
|
* Converts a SchedulingParameters duration to minutes.
|
|
8323
8368
|
*
|
|
@@ -8329,12 +8374,27 @@ export declare class ParserBuilder {
|
|
|
8329
8374
|
|
|
8330
8375
|
export declare const SchedulingEncounterCodingURI = "https://medplum.com/fhir/StructureDefinition/SchedulingEncounterCoding";
|
|
8331
8376
|
|
|
8377
|
+
/** Extension on an Appointment recording that medical necessity was confirmed when it was booked. */
|
|
8378
|
+
export declare const SchedulingMedicalNecessityURI = "https://medplum.com/fhir/StructureDefinition/SchedulingMedicalNecessity";
|
|
8379
|
+
|
|
8332
8380
|
export declare const SchedulingParametersURI = "https://medplum.com/fhir/StructureDefinition/SchedulingParameters";
|
|
8333
8381
|
|
|
8334
8382
|
export declare const SchedulingPlanDefinitionURI = "https://medplum.com/fhir/StructureDefinition/SchedulingPlanDefinition";
|
|
8335
8383
|
|
|
8384
|
+
export declare type SchedulingRequirement = (typeof SCHEDULING_REQUIREMENT_CODES)[number];
|
|
8385
|
+
|
|
8336
8386
|
export declare const SchedulingScheduleColorURI = "https://medplum.com/fhir/StructureDefinition/SchedulingColor";
|
|
8337
8387
|
|
|
8388
|
+
/**
|
|
8389
|
+
* This extension is set on `Slot` resources created through scheduling APIs.
|
|
8390
|
+
* Its value is a positive integer recording the slotCapacity for the service
|
|
8391
|
+
* and schedule at the time the booking was created. Omitted when the
|
|
8392
|
+
* slotCapacity is `1`.
|
|
8393
|
+
*
|
|
8394
|
+
* @see https://www.medplum.com/docs/scheduling/defining-availability#overbooking
|
|
8395
|
+
*/
|
|
8396
|
+
export declare const SchedulingSlotCapacityURI = "https://medplum.com/fhir/StructureDefinition/SchedulingSlotCapacity";
|
|
8397
|
+
|
|
8338
8398
|
export declare interface SearchableToken {
|
|
8339
8399
|
readonly system: string | undefined;
|
|
8340
8400
|
readonly value: string | undefined;
|