@atomic-ehr/fhirpath 0.1.3-canary.20260323161230.d550073 → 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.
@@ -1,5 +1,5 @@
1
- import { F as FHIRModelProviderBase, R as Resource } from './model-provider.common-CN5LGOT5.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-CN5LGOT5.js';
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>;
@@ -15465,7 +15465,7 @@ async function analyze(expression, options = {}) {
15465
15465
  return analysisResult;
15466
15466
  }
15467
15467
  function getVersion() {
15468
- return "0.1.3-canary.20260323161230.d550073";
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
  }
@@ -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
  };