@medplum/core 2.0.21 → 2.0.22
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 +380 -288
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.min.cjs +1 -1
- package/dist/esm/client.mjs +132 -102
- package/dist/esm/client.mjs.map +1 -1
- package/dist/esm/crypto.mjs +3 -1
- package/dist/esm/crypto.mjs.map +1 -1
- package/dist/esm/fhirpath/functions.mjs +179 -129
- package/dist/esm/fhirpath/functions.mjs.map +1 -1
- package/dist/esm/format.mjs +6 -4
- package/dist/esm/format.mjs.map +1 -1
- package/dist/esm/hl7.mjs +1 -1
- package/dist/esm/hl7.mjs.map +1 -1
- package/dist/esm/index.min.mjs +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/jwt.mjs +4 -2
- package/dist/esm/jwt.mjs.map +1 -1
- package/dist/esm/schema.mjs +4 -10
- package/dist/esm/schema.mjs.map +1 -1
- package/dist/esm/search/details.mjs +0 -1
- package/dist/esm/search/details.mjs.map +1 -1
- package/dist/esm/search/match.mjs +1 -0
- package/dist/esm/search/match.mjs.map +1 -1
- package/dist/esm/search/search.mjs +1 -1
- package/dist/esm/search/search.mjs.map +1 -1
- package/dist/esm/storage.mjs +8 -0
- package/dist/esm/storage.mjs.map +1 -1
- package/dist/esm/types.mjs +1 -0
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/utils.mjs +8 -7
- package/dist/esm/utils.mjs.map +1 -1
- package/dist/types/client.d.ts +74 -64
- package/dist/types/crypto.d.ts +3 -1
- package/dist/types/hl7.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/jwt.d.ts +2 -1
- package/dist/types/schema.d.ts +4 -10
- package/dist/types/search/details.d.ts +0 -1
- package/dist/types/search/search.d.ts +1 -1
- package/dist/types/storage.d.ts +8 -0
- package/dist/types/typeschema/types.d.ts +0 -1
- package/dist/types/utils.d.ts +4 -4
- package/package.json +1 -1
package/dist/types/storage.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare class MemoryStorage implements Storage {
|
|
|
22
22
|
constructor();
|
|
23
23
|
/**
|
|
24
24
|
* Returns the number of key/value pairs.
|
|
25
|
+
* @returns The number of key/value pairs.
|
|
25
26
|
*/
|
|
26
27
|
get length(): number;
|
|
27
28
|
/**
|
|
@@ -30,18 +31,25 @@ export declare class MemoryStorage implements Storage {
|
|
|
30
31
|
clear(): void;
|
|
31
32
|
/**
|
|
32
33
|
* Returns the current value associated with the given key, or null if the given key does not exist.
|
|
34
|
+
* @param key The specified storage key.
|
|
35
|
+
* @returns The current value associated with the given key, or null if the given key does not exist.
|
|
33
36
|
*/
|
|
34
37
|
getItem(key: string): string | null;
|
|
35
38
|
/**
|
|
36
39
|
* Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
|
|
40
|
+
* @param key The storage key.
|
|
41
|
+
* @param value The new value.
|
|
37
42
|
*/
|
|
38
43
|
setItem(key: string, value: string | null): void;
|
|
39
44
|
/**
|
|
40
45
|
* Removes the key/value pair with the given key, if a key/value pair with the given key exists.
|
|
46
|
+
* @param key The storage key.
|
|
41
47
|
*/
|
|
42
48
|
removeItem(key: string): void;
|
|
43
49
|
/**
|
|
44
50
|
* Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs.
|
|
51
|
+
* @param index The numeric index.
|
|
52
|
+
* @returns The nth key.
|
|
45
53
|
*/
|
|
46
54
|
key(index: number): string | null;
|
|
47
55
|
}
|
|
@@ -48,7 +48,6 @@ export interface SliceDiscriminator {
|
|
|
48
48
|
/**
|
|
49
49
|
* Parses a StructureDefinition resource into an internal schema better suited for
|
|
50
50
|
* programmatic validation and usage in internal systems
|
|
51
|
-
*
|
|
52
51
|
* @param sd The StructureDefinition resource to parse
|
|
53
52
|
* @returns The parsed schema for the given resource type
|
|
54
53
|
* @experimental
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export declare function isProfileResource(resource: Resource): resource is Profi
|
|
|
44
44
|
/**
|
|
45
45
|
* Returns a display string for the resource.
|
|
46
46
|
* @param resource The input resource.
|
|
47
|
-
* @
|
|
47
|
+
* @returns Human friendly display string.
|
|
48
48
|
*/
|
|
49
49
|
export declare function getDisplayString(resource: Resource): string;
|
|
50
50
|
/**
|
|
@@ -94,7 +94,6 @@ export declare function getQuestionnaireAnswers(response: QuestionnaireResponse)
|
|
|
94
94
|
* If multiple identifiers exist with the same system, the first one is returned.
|
|
95
95
|
*
|
|
96
96
|
* If the system is not found, then returns undefined.
|
|
97
|
-
*
|
|
98
97
|
* @param resource The resource to check.
|
|
99
98
|
* @param system The identifier system.
|
|
100
99
|
* @returns The identifier value if found; otherwise undefined.
|
|
@@ -135,6 +134,7 @@ export declare function isEmpty(v: any): boolean;
|
|
|
135
134
|
* Ignores meta.versionId and meta.lastUpdated.
|
|
136
135
|
* @param object1 The first object.
|
|
137
136
|
* @param object2 The second object.
|
|
137
|
+
* @param path Optional path string.
|
|
138
138
|
* @returns True if the objects are equal.
|
|
139
139
|
*/
|
|
140
140
|
export declare function deepEquals(object1: unknown, object2: unknown, path?: string): boolean;
|
|
@@ -148,7 +148,6 @@ export declare function deepEquals(object1: unknown, object2: unknown, path?: st
|
|
|
148
148
|
*
|
|
149
149
|
* See: https://web.dev/structured-clone/
|
|
150
150
|
* See: https://stackoverflow.com/questions/40488190/how-is-structured-clone-algorithm-different-from-deep-copy
|
|
151
|
-
*
|
|
152
151
|
* @param input The input to clone.
|
|
153
152
|
* @returns A deep clone of the input.
|
|
154
153
|
*/
|
|
@@ -161,7 +160,7 @@ export declare function deepClone<T>(input: T): T;
|
|
|
161
160
|
export declare function isUUID(input: string): boolean;
|
|
162
161
|
/**
|
|
163
162
|
* Returns true if the input is an object.
|
|
164
|
-
* @param
|
|
163
|
+
* @param obj The candidate object.
|
|
165
164
|
* @returns True if the input is a non-null non-undefined object.
|
|
166
165
|
*/
|
|
167
166
|
export declare function isObject(obj: unknown): obj is Record<string, unknown>;
|
|
@@ -205,6 +204,7 @@ export declare function setCodeBySystem(concept: CodeableConcept, system: string
|
|
|
205
204
|
* @param definition The observation definition.
|
|
206
205
|
* @param patient The patient.
|
|
207
206
|
* @param value The observation value.
|
|
207
|
+
* @param category Optional interval category restriction.
|
|
208
208
|
* @returns The observation interval if found; otherwise undefined.
|
|
209
209
|
*/
|
|
210
210
|
export declare function findObservationInterval(definition: ObservationDefinition, patient: Patient, value: number, category?: 'reference' | 'critical' | 'absolute'): ObservationDefinitionQualifiedInterval | undefined;
|