@atomic-ehr/fhirpath 0.1.3-canary.20260323161955.f622637 → 0.1.3
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/index.browser.d.ts +2 -2
- package/dist/index.browser.js +26 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.node.d.ts +2 -2
- package/dist/index.node.js +26 -3
- package/dist/index.node.js.map +1 -1
- package/dist/{model-provider.common-CN5LGOT5.d.ts → model-provider.common-CLcGjAiO.d.ts} +1 -0
- package/package.json +2 -2
- package/src/model-provider.common.ts +28 -4
package/dist/index.browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FHIRModelProviderBase, R as Resource } from './model-provider.common-
|
|
2
|
-
export { q as ASTMetadata, i as ASTNode, h as AnalysisResult, A as Analyzer, N as AnyCursorNode, w as CompletionItem, C as CompletionKind, x as CompletionOptions, J as CursorArgumentNode, y as CursorContext, H as CursorIdentifierNode, K as CursorIndexNode, B as CursorNode, G as CursorOperatorNode, L as CursorTypeNode, f as Diagnostic, D as DiagnosticSeverity, u as ErrorCodes, t as Errors, E as EvaluateOptions, l as EvaluationResult, a as FHIRModelContext, s as FHIRPathError, k as FunctionDefinition, n as InspectOptions, o as InspectResult, I as Interpreter, M as ModelTypeProvider, O as OperatorDefinition, d as ParseResult, P as Parser, c as Registry, T as TypeInfo, j as TypeName, b as analyze, e as evaluate, g as getVersion, m as inspect, z as isCursorNode, p as parse, v as provideCompletions, r as registry } from './model-provider.common-
|
|
1
|
+
import { F as FHIRModelProviderBase, R as Resource } from './model-provider.common-CLcGjAiO.js';
|
|
2
|
+
export { q as ASTMetadata, i as ASTNode, h as AnalysisResult, A as Analyzer, N as AnyCursorNode, w as CompletionItem, C as CompletionKind, x as CompletionOptions, J as CursorArgumentNode, y as CursorContext, H as CursorIdentifierNode, K as CursorIndexNode, B as CursorNode, G as CursorOperatorNode, L as CursorTypeNode, f as Diagnostic, D as DiagnosticSeverity, u as ErrorCodes, t as Errors, E as EvaluateOptions, l as EvaluationResult, a as FHIRModelContext, s as FHIRPathError, k as FunctionDefinition, n as InspectOptions, o as InspectResult, I as Interpreter, M as ModelTypeProvider, O as OperatorDefinition, d as ParseResult, P as Parser, c as Registry, T as TypeInfo, j as TypeName, b as analyze, e as evaluate, g as getVersion, m as inspect, z as isCursorNode, p as parse, v as provideCompletions, r as registry } from './model-provider.common-CLcGjAiO.js';
|
|
3
3
|
import '@atomic-ehr/fhirschema';
|
|
4
4
|
|
|
5
5
|
type Resolver = (typeName: string) => Promise<Resource | null>;
|
package/dist/index.browser.js
CHANGED
|
@@ -15465,7 +15465,7 @@ async function analyze(expression, options = {}) {
|
|
|
15465
15465
|
return analysisResult;
|
|
15466
15466
|
}
|
|
15467
15467
|
function getVersion() {
|
|
15468
|
-
return "0.1.3
|
|
15468
|
+
return "0.1.3";
|
|
15469
15469
|
}
|
|
15470
15470
|
var FHIRModelProviderBase = class _FHIRModelProviderBase {
|
|
15471
15471
|
constructor() {
|
|
@@ -15503,6 +15503,29 @@ var FHIRModelProviderBase = class _FHIRModelProviderBase {
|
|
|
15503
15503
|
"Distance": "Quantity",
|
|
15504
15504
|
"Count": "Quantity"
|
|
15505
15505
|
};
|
|
15506
|
+
// Map FHIR primitive names to FHIRPath type names
|
|
15507
|
+
this.primitiveTypeMapping = {
|
|
15508
|
+
"boolean": "Boolean",
|
|
15509
|
+
"string": "String",
|
|
15510
|
+
"integer": "Integer",
|
|
15511
|
+
"decimal": "Decimal",
|
|
15512
|
+
"date": "Date",
|
|
15513
|
+
"dateTime": "DateTime",
|
|
15514
|
+
"time": "Time",
|
|
15515
|
+
"instant": "Instant",
|
|
15516
|
+
"base64Binary": "Base64Binary",
|
|
15517
|
+
"uri": "Uri",
|
|
15518
|
+
"url": "Url",
|
|
15519
|
+
"canonical": "Canonical",
|
|
15520
|
+
"code": "Code",
|
|
15521
|
+
"oid": "Oid",
|
|
15522
|
+
"id": "Id",
|
|
15523
|
+
"markdown": "Markdown",
|
|
15524
|
+
"unsignedInt": "UnsignedInt",
|
|
15525
|
+
"positiveInt": "PositiveInt",
|
|
15526
|
+
"uuid": "Uuid",
|
|
15527
|
+
"xhtml": "Xhtml"
|
|
15528
|
+
};
|
|
15506
15529
|
if (this.constructor === _FHIRModelProviderBase) {
|
|
15507
15530
|
throw new Error("FHIRModelProviderBase can't be instantiated directly.");
|
|
15508
15531
|
}
|
|
@@ -15879,7 +15902,7 @@ var FHIRModelProviderBase = class _FHIRModelProviderBase {
|
|
|
15879
15902
|
const resources = await this.search({
|
|
15880
15903
|
kind: "resource"
|
|
15881
15904
|
});
|
|
15882
|
-
this.resourceTypesCache = resources.filter((r) => r.resourceType === "StructureDefinition").map((r) => r
|
|
15905
|
+
this.resourceTypesCache = resources.filter((r) => r.resourceType === "StructureDefinition").map((r) => r.name).filter((name) => !!name).sort();
|
|
15883
15906
|
return this.resourceTypesCache || [];
|
|
15884
15907
|
}
|
|
15885
15908
|
async getComplexTypes() {
|
|
@@ -15903,7 +15926,7 @@ var FHIRModelProviderBase = class _FHIRModelProviderBase {
|
|
|
15903
15926
|
kind: "primitive-type"
|
|
15904
15927
|
});
|
|
15905
15928
|
const fhirPrimitives = resources.filter((r) => r.resourceType === "StructureDefinition").map((r) => r.name).filter((name) => !!name);
|
|
15906
|
-
this.primitiveTypesCache = fhirPrimitives.sort();
|
|
15929
|
+
this.primitiveTypesCache = fhirPrimitives.map((name) => this.primitiveTypeMapping[name] || name).sort();
|
|
15907
15930
|
return this.primitiveTypesCache || [];
|
|
15908
15931
|
}
|
|
15909
15932
|
};
|