@medplum/core 2.0.22 → 2.0.23

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.
@@ -1,10 +1,10 @@
1
- import { Atom, InfixOperatorAtom, PrefixOperatorAtom } from '../fhirlexer';
1
+ import { Atom, AtomContext, InfixOperatorAtom, PrefixOperatorAtom } from '../fhirlexer';
2
2
  import { TypedValue } from '../types';
3
3
  export declare class FhirPathAtom implements Atom {
4
4
  readonly original: string;
5
5
  readonly child: Atom;
6
6
  constructor(original: string, child: Atom);
7
- eval(context: TypedValue[]): TypedValue[];
7
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
8
8
  toString(): string;
9
9
  }
10
10
  export declare class LiteralAtom implements Atom {
@@ -16,7 +16,7 @@ export declare class LiteralAtom implements Atom {
16
16
  export declare class SymbolAtom implements Atom {
17
17
  readonly name: string;
18
18
  constructor(name: string);
19
- eval(context: TypedValue[]): TypedValue[];
19
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
20
20
  private evalValue;
21
21
  toString(): string;
22
22
  }
@@ -27,58 +27,58 @@ export declare class EmptySetAtom implements Atom {
27
27
  export declare class UnaryOperatorAtom extends PrefixOperatorAtom {
28
28
  readonly impl: (x: TypedValue[]) => TypedValue[];
29
29
  constructor(operator: string, child: Atom, impl: (x: TypedValue[]) => TypedValue[]);
30
- eval(context: TypedValue[]): TypedValue[];
30
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
31
31
  toString(): string;
32
32
  }
33
33
  export declare class AsAtom extends InfixOperatorAtom {
34
34
  constructor(left: Atom, right: Atom);
35
- eval(context: TypedValue[]): TypedValue[];
35
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
36
36
  }
37
37
  export declare class ArithemticOperatorAtom extends InfixOperatorAtom {
38
38
  readonly impl: (x: number, y: number) => number | boolean;
39
39
  constructor(operator: string, left: Atom, right: Atom, impl: (x: number, y: number) => number | boolean);
40
- eval(context: TypedValue[]): TypedValue[];
40
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
41
41
  }
42
42
  export declare class ConcatAtom extends InfixOperatorAtom {
43
43
  constructor(left: Atom, right: Atom);
44
- eval(context: TypedValue[]): TypedValue[];
44
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
45
45
  }
46
46
  export declare class ContainsAtom extends InfixOperatorAtom {
47
47
  constructor(left: Atom, right: Atom);
48
- eval(context: TypedValue[]): TypedValue[];
48
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
49
49
  }
50
50
  export declare class InAtom extends InfixOperatorAtom {
51
51
  constructor(left: Atom, right: Atom);
52
- eval(context: TypedValue[]): TypedValue[];
52
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
53
53
  }
54
54
  export declare class DotAtom extends InfixOperatorAtom {
55
55
  constructor(left: Atom, right: Atom);
56
- eval(context: TypedValue[]): TypedValue[];
56
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
57
57
  toString(): string;
58
58
  }
59
59
  export declare class UnionAtom extends InfixOperatorAtom {
60
60
  constructor(left: Atom, right: Atom);
61
- eval(context: TypedValue[]): TypedValue[];
61
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
62
62
  }
63
63
  export declare class EqualsAtom extends InfixOperatorAtom {
64
64
  constructor(left: Atom, right: Atom);
65
- eval(context: TypedValue[]): TypedValue[];
65
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
66
66
  }
67
67
  export declare class NotEqualsAtom extends InfixOperatorAtom {
68
68
  constructor(left: Atom, right: Atom);
69
- eval(context: TypedValue[]): TypedValue[];
69
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
70
70
  }
71
71
  export declare class EquivalentAtom extends InfixOperatorAtom {
72
72
  constructor(left: Atom, right: Atom);
73
- eval(context: TypedValue[]): TypedValue[];
73
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
74
74
  }
75
75
  export declare class NotEquivalentAtom extends InfixOperatorAtom {
76
76
  constructor(left: Atom, right: Atom);
77
- eval(context: TypedValue[]): TypedValue[];
77
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
78
78
  }
79
79
  export declare class IsAtom extends InfixOperatorAtom {
80
80
  constructor(left: Atom, right: Atom);
81
- eval(context: TypedValue[]): TypedValue[];
81
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
82
82
  }
83
83
  /**
84
84
  * 6.5.1. and
@@ -88,11 +88,11 @@ export declare class IsAtom extends InfixOperatorAtom {
88
88
  */
89
89
  export declare class AndAtom extends InfixOperatorAtom {
90
90
  constructor(left: Atom, right: Atom);
91
- eval(context: TypedValue[]): TypedValue[];
91
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
92
92
  }
93
93
  export declare class OrAtom extends InfixOperatorAtom {
94
94
  constructor(left: Atom, right: Atom);
95
- eval(context: TypedValue[]): TypedValue[];
95
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
96
96
  }
97
97
  /**
98
98
  * 6.5.4. xor
@@ -102,19 +102,19 @@ export declare class OrAtom extends InfixOperatorAtom {
102
102
  */
103
103
  export declare class XorAtom extends InfixOperatorAtom {
104
104
  constructor(left: Atom, right: Atom);
105
- eval(context: TypedValue[]): TypedValue[];
105
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
106
106
  }
107
107
  export declare class FunctionAtom implements Atom {
108
108
  readonly name: string;
109
109
  readonly args: Atom[];
110
110
  constructor(name: string, args: Atom[]);
111
- eval(context: TypedValue[]): TypedValue[];
111
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
112
112
  toString(): string;
113
113
  }
114
114
  export declare class IndexerAtom implements Atom {
115
115
  readonly left: Atom;
116
116
  readonly expr: Atom;
117
117
  constructor(left: Atom, expr: Atom);
118
- eval(context: TypedValue[]): TypedValue[];
118
+ eval(context: AtomContext, input: TypedValue[]): TypedValue[];
119
119
  toString(): string;
120
120
  }
@@ -1,6 +1,6 @@
1
- import { Atom } from '../fhirlexer';
1
+ import { Atom, AtomContext } from '../fhirlexer';
2
2
  import { TypedValue } from '../types';
3
3
  export interface FhirPathFunction {
4
- (input: TypedValue[], ...args: Atom[]): TypedValue[];
4
+ (context: AtomContext, input: TypedValue[], ...args: Atom[]): TypedValue[];
5
5
  }
6
6
  export declare const functions: Record<string, FhirPathFunction>;
@@ -59,6 +59,7 @@ export declare function evalFhirPath(expression: string, input: unknown): unknow
59
59
  * Evaluates a FHIRPath expression against a resource or other object.
60
60
  * @param expression The FHIRPath expression to parse.
61
61
  * @param input The resource or object to evaluate the expression against.
62
+ * @param variables A map of variables for eval input.
62
63
  * @returns The result of the FHIRPath expression against the resource or object.
63
64
  */
64
- export declare function evalFhirPathTyped(expression: string, input: TypedValue[]): TypedValue[];
65
+ export declare function evalFhirPathTyped(expression: string, input: TypedValue[], variables?: Record<string, TypedValue>): TypedValue[];
@@ -1,4 +1,4 @@
1
- import { OperationOutcome } from '@medplum/fhirtypes';
1
+ import { OperationOutcome, OperationOutcomeIssue } from '@medplum/fhirtypes';
2
2
  export declare const allOk: OperationOutcome;
3
3
  export declare const created: OperationOutcome;
4
4
  export declare const notModified: OperationOutcome;
@@ -43,3 +43,9 @@ export declare function normalizeErrorString(error: unknown): string;
43
43
  * @returns The string representation of the operation outcome.
44
44
  */
45
45
  export declare function operationOutcomeToString(outcome: OperationOutcome): string;
46
+ /**
47
+ * Returns a string represenation of the operation outcome issue.
48
+ * @param issue The operation outcome issue.
49
+ * @returns The string representation of the operation outcome issue.
50
+ */
51
+ export declare function operationOutcomeIssueToString(issue: OperationOutcomeIssue): string;
@@ -1,15 +1,8 @@
1
- import { CodeableConcept, Extension, ObservationDefinition, ObservationDefinitionQualifiedInterval, Patient, Practitioner, ProjectMembership, QuestionnaireResponse, QuestionnaireResponseItemAnswer, Range, Reference, RelatedPerson, Resource } from '@medplum/fhirtypes';
1
+ import { CodeableConcept, Extension, ObservationDefinition, ObservationDefinitionQualifiedInterval, Patient, Practitioner, QuestionnaireResponse, QuestionnaireResponseItemAnswer, Range, Reference, RelatedPerson, Resource } from '@medplum/fhirtypes';
2
2
  /**
3
3
  * @internal
4
4
  */
5
5
  export type ProfileResource = Patient | Practitioner | RelatedPerson;
6
- /**
7
- * @internal
8
- */
9
- export interface InviteResult {
10
- profile: ProfileResource;
11
- membership: ProjectMembership;
12
- }
13
6
  interface Code {
14
7
  code?: CodeableConcept;
15
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/core",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "description": "Medplum TS/JS Library",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",