@aehrc/ecl-core 1.0.1 → 1.0.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.
Files changed (231) hide show
  1. package/dist/index.cjs +57088 -0
  2. package/dist/index.d.ts +900 -38
  3. package/dist/index.mjs +57088 -0
  4. package/package.json +17 -6
  5. package/dist/completion/context-detector.d.ts +0 -51
  6. package/dist/completion/context-detector.d.ts.map +0 -1
  7. package/dist/completion/context-detector.js +0 -286
  8. package/dist/completion/context-detector.js.map +0 -1
  9. package/dist/completion/context-items.d.ts +0 -50
  10. package/dist/completion/context-items.d.ts.map +0 -1
  11. package/dist/completion/context-items.js +0 -526
  12. package/dist/completion/context-items.js.map +0 -1
  13. package/dist/completion/filter-cache.d.ts +0 -14
  14. package/dist/completion/filter-cache.d.ts.map +0 -1
  15. package/dist/completion/filter-cache.js +0 -55
  16. package/dist/completion/filter-cache.js.map +0 -1
  17. package/dist/completion/provider.d.ts +0 -38
  18. package/dist/completion/provider.d.ts.map +0 -1
  19. package/dist/completion/provider.js +0 -273
  20. package/dist/completion/provider.js.map +0 -1
  21. package/dist/completion/snippets.d.ts +0 -11
  22. package/dist/completion/snippets.d.ts.map +0 -1
  23. package/dist/completion/snippets.js +0 -80
  24. package/dist/completion/snippets.js.map +0 -1
  25. package/dist/formatter/ast-printer.d.ts +0 -12
  26. package/dist/formatter/ast-printer.d.ts.map +0 -1
  27. package/dist/formatter/ast-printer.js +0 -251
  28. package/dist/formatter/ast-printer.js.map +0 -1
  29. package/dist/formatter/comments.d.ts +0 -14
  30. package/dist/formatter/comments.d.ts.map +0 -1
  31. package/dist/formatter/comments.js +0 -232
  32. package/dist/formatter/comments.js.map +0 -1
  33. package/dist/formatter/config.d.ts +0 -5
  34. package/dist/formatter/config.d.ts.map +0 -1
  35. package/dist/formatter/config.js +0 -45
  36. package/dist/formatter/config.js.map +0 -1
  37. package/dist/formatter/formatter.d.ts +0 -3
  38. package/dist/formatter/formatter.d.ts.map +0 -1
  39. package/dist/formatter/formatter.js +0 -368
  40. package/dist/formatter/formatter.js.map +0 -1
  41. package/dist/formatter/index.d.ts +0 -6
  42. package/dist/formatter/index.d.ts.map +0 -1
  43. package/dist/formatter/index.js +0 -19
  44. package/dist/formatter/index.js.map +0 -1
  45. package/dist/formatter/options.d.ts +0 -31
  46. package/dist/formatter/options.d.ts.map +0 -1
  47. package/dist/formatter/options.js +0 -17
  48. package/dist/formatter/options.js.map +0 -1
  49. package/dist/formatter/range.d.ts +0 -16
  50. package/dist/formatter/range.d.ts.map +0 -1
  51. package/dist/formatter/range.js +0 -129
  52. package/dist/formatter/range.js.map +0 -1
  53. package/dist/formatter/rules.d.ts +0 -8
  54. package/dist/formatter/rules.d.ts.map +0 -1
  55. package/dist/formatter/rules.js +0 -42
  56. package/dist/formatter/rules.js.map +0 -1
  57. package/dist/grammar/ECLLexer.d.ts +0 -122
  58. package/dist/grammar/ECLLexer.d.ts.map +0 -1
  59. package/dist/grammar/ECLLexer.js +0 -399
  60. package/dist/grammar/ECLLexer.js.map +0 -1
  61. package/dist/grammar/ECLParser.d.ts +0 -2905
  62. package/dist/grammar/ECLParser.d.ts.map +0 -1
  63. package/dist/grammar/ECLParser.js +0 -24911
  64. package/dist/grammar/ECLParser.js.map +0 -1
  65. package/dist/grammar/ECLVisitor.d.ts +0 -1208
  66. package/dist/grammar/ECLVisitor.d.ts.map +0 -1
  67. package/dist/grammar/ECLVisitor.js +0 -4
  68. package/dist/grammar/ECLVisitor.js.map +0 -1
  69. package/dist/index.d.ts.map +0 -1
  70. package/dist/index.js +0 -107
  71. package/dist/index.js.map +0 -1
  72. package/dist/knowledge/filters.d.ts +0 -6
  73. package/dist/knowledge/filters.d.ts.map +0 -1
  74. package/dist/knowledge/filters.js +0 -99
  75. package/dist/knowledge/filters.js.map +0 -1
  76. package/dist/knowledge/grammar.d.ts +0 -7
  77. package/dist/knowledge/grammar.d.ts.map +0 -1
  78. package/dist/knowledge/grammar.js +0 -217
  79. package/dist/knowledge/grammar.js.map +0 -1
  80. package/dist/knowledge/index.d.ts +0 -24
  81. package/dist/knowledge/index.d.ts.map +0 -1
  82. package/dist/knowledge/index.js +0 -101
  83. package/dist/knowledge/index.js.map +0 -1
  84. package/dist/knowledge/operators.d.ts +0 -10
  85. package/dist/knowledge/operators.d.ts.map +0 -1
  86. package/dist/knowledge/operators.js +0 -324
  87. package/dist/knowledge/operators.js.map +0 -1
  88. package/dist/knowledge/patterns.d.ts +0 -6
  89. package/dist/knowledge/patterns.d.ts.map +0 -1
  90. package/dist/knowledge/patterns.js +0 -172
  91. package/dist/knowledge/patterns.js.map +0 -1
  92. package/dist/knowledge/refinements.d.ts +0 -6
  93. package/dist/knowledge/refinements.d.ts.map +0 -1
  94. package/dist/knowledge/refinements.js +0 -134
  95. package/dist/knowledge/refinements.js.map +0 -1
  96. package/dist/knowledge/types.d.ts +0 -41
  97. package/dist/knowledge/types.d.ts.map +0 -1
  98. package/dist/knowledge/types.js +0 -5
  99. package/dist/knowledge/types.js.map +0 -1
  100. package/dist/parser/ast.d.ts +0 -111
  101. package/dist/parser/ast.d.ts.map +0 -1
  102. package/dist/parser/ast.js +0 -25
  103. package/dist/parser/ast.js.map +0 -1
  104. package/dist/parser/concept-extractor.d.ts +0 -21
  105. package/dist/parser/concept-extractor.d.ts.map +0 -1
  106. package/dist/parser/concept-extractor.js +0 -126
  107. package/dist/parser/concept-extractor.js.map +0 -1
  108. package/dist/parser/error-analysis.d.ts +0 -54
  109. package/dist/parser/error-analysis.d.ts.map +0 -1
  110. package/dist/parser/error-analysis.js +0 -260
  111. package/dist/parser/error-analysis.js.map +0 -1
  112. package/dist/parser/error-listener.d.ts +0 -14
  113. package/dist/parser/error-listener.d.ts.map +0 -1
  114. package/dist/parser/error-listener.js +0 -24
  115. package/dist/parser/error-listener.js.map +0 -1
  116. package/dist/parser/expression-grouper.d.ts +0 -20
  117. package/dist/parser/expression-grouper.d.ts.map +0 -1
  118. package/dist/parser/expression-grouper.js +0 -99
  119. package/dist/parser/expression-grouper.js.map +0 -1
  120. package/dist/parser/generated/grammar/ECLLexer.d.ts +0 -122
  121. package/dist/parser/generated/grammar/ECLLexer.d.ts.map +0 -1
  122. package/dist/parser/generated/grammar/ECLLexer.js +0 -399
  123. package/dist/parser/generated/grammar/ECLLexer.js.map +0 -1
  124. package/dist/parser/generated/grammar/ECLParser.d.ts +0 -2905
  125. package/dist/parser/generated/grammar/ECLParser.d.ts.map +0 -1
  126. package/dist/parser/generated/grammar/ECLParser.js +0 -24911
  127. package/dist/parser/generated/grammar/ECLParser.js.map +0 -1
  128. package/dist/parser/generated/grammar/ECLVisitor.d.ts +0 -1208
  129. package/dist/parser/generated/grammar/ECLVisitor.d.ts.map +0 -1
  130. package/dist/parser/generated/grammar/ECLVisitor.js +0 -4
  131. package/dist/parser/generated/grammar/ECLVisitor.js.map +0 -1
  132. package/dist/parser/index.d.ts +0 -26
  133. package/dist/parser/index.d.ts.map +0 -1
  134. package/dist/parser/index.js +0 -202
  135. package/dist/parser/index.js.map +0 -1
  136. package/dist/parser/position-detector.d.ts +0 -45
  137. package/dist/parser/position-detector.d.ts.map +0 -1
  138. package/dist/parser/position-detector.js +0 -149
  139. package/dist/parser/position-detector.js.map +0 -1
  140. package/dist/parser/refinement-check.d.ts +0 -22
  141. package/dist/parser/refinement-check.d.ts.map +0 -1
  142. package/dist/parser/refinement-check.js +0 -194
  143. package/dist/parser/refinement-check.js.map +0 -1
  144. package/dist/parser/visitor.d.ts +0 -40
  145. package/dist/parser/visitor.d.ts.map +0 -1
  146. package/dist/parser/visitor.js +0 -587
  147. package/dist/parser/visitor.js.map +0 -1
  148. package/dist/refactoring/add-description-filter.d.ts +0 -8
  149. package/dist/refactoring/add-description-filter.d.ts.map +0 -1
  150. package/dist/refactoring/add-description-filter.js +0 -73
  151. package/dist/refactoring/add-description-filter.js.map +0 -1
  152. package/dist/refactoring/add-display-terms.d.ts +0 -20
  153. package/dist/refactoring/add-display-terms.d.ts.map +0 -1
  154. package/dist/refactoring/add-display-terms.js +0 -104
  155. package/dist/refactoring/add-display-terms.js.map +0 -1
  156. package/dist/refactoring/add-history-supplement.d.ts +0 -13
  157. package/dist/refactoring/add-history-supplement.d.ts.map +0 -1
  158. package/dist/refactoring/add-history-supplement.js +0 -80
  159. package/dist/refactoring/add-history-supplement.js.map +0 -1
  160. package/dist/refactoring/add-parentheses.d.ts +0 -14
  161. package/dist/refactoring/add-parentheses.d.ts.map +0 -1
  162. package/dist/refactoring/add-parentheses.js +0 -341
  163. package/dist/refactoring/add-parentheses.js.map +0 -1
  164. package/dist/refactoring/index.d.ts +0 -27
  165. package/dist/refactoring/index.d.ts.map +0 -1
  166. package/dist/refactoring/index.js +0 -237
  167. package/dist/refactoring/index.js.map +0 -1
  168. package/dist/refactoring/remove-parentheses.d.ts +0 -8
  169. package/dist/refactoring/remove-parentheses.d.ts.map +0 -1
  170. package/dist/refactoring/remove-parentheses.js +0 -162
  171. package/dist/refactoring/remove-parentheses.js.map +0 -1
  172. package/dist/refactoring/simplify-expression.d.ts +0 -15
  173. package/dist/refactoring/simplify-expression.d.ts.map +0 -1
  174. package/dist/refactoring/simplify-expression.js +0 -435
  175. package/dist/refactoring/simplify-expression.js.map +0 -1
  176. package/dist/refactoring/strip-display-terms.d.ts +0 -8
  177. package/dist/refactoring/strip-display-terms.d.ts.map +0 -1
  178. package/dist/refactoring/strip-display-terms.js +0 -27
  179. package/dist/refactoring/strip-display-terms.js.map +0 -1
  180. package/dist/semantic/ecl-text.d.ts +0 -35
  181. package/dist/semantic/ecl-text.d.ts.map +0 -1
  182. package/dist/semantic/ecl-text.js +0 -54
  183. package/dist/semantic/ecl-text.js.map +0 -1
  184. package/dist/semantic/validator.d.ts +0 -14
  185. package/dist/semantic/validator.d.ts.map +0 -1
  186. package/dist/semantic/validator.js +0 -183
  187. package/dist/semantic/validator.js.map +0 -1
  188. package/dist/semantic-tokens.d.ts +0 -12
  189. package/dist/semantic-tokens.d.ts.map +0 -1
  190. package/dist/semantic-tokens.js +0 -362
  191. package/dist/semantic-tokens.js.map +0 -1
  192. package/dist/terminology/fetch-compat-browser.d.ts +0 -3
  193. package/dist/terminology/fetch-compat-browser.d.ts.map +0 -1
  194. package/dist/terminology/fetch-compat-browser.js +0 -7
  195. package/dist/terminology/fetch-compat-browser.js.map +0 -1
  196. package/dist/terminology/fetch-compat.d.ts +0 -4
  197. package/dist/terminology/fetch-compat.d.ts.map +0 -1
  198. package/dist/terminology/fetch-compat.js +0 -18
  199. package/dist/terminology/fetch-compat.js.map +0 -1
  200. package/dist/terminology/fhir-service.d.ts +0 -65
  201. package/dist/terminology/fhir-service.d.ts.map +0 -1
  202. package/dist/terminology/fhir-service.js +0 -456
  203. package/dist/terminology/fhir-service.js.map +0 -1
  204. package/dist/terminology/index.d.ts +0 -4
  205. package/dist/terminology/index.d.ts.map +0 -1
  206. package/dist/terminology/index.js +0 -22
  207. package/dist/terminology/index.js.map +0 -1
  208. package/dist/terminology/mock-service.d.ts +0 -11
  209. package/dist/terminology/mock-service.d.ts.map +0 -1
  210. package/dist/terminology/mock-service.js +0 -108
  211. package/dist/terminology/mock-service.js.map +0 -1
  212. package/dist/terminology/types.d.ts +0 -31
  213. package/dist/terminology/types.d.ts.map +0 -1
  214. package/dist/terminology/types.js +0 -5
  215. package/dist/terminology/types.js.map +0 -1
  216. package/dist/terminology/verhoeff.d.ts +0 -38
  217. package/dist/terminology/verhoeff.d.ts.map +0 -1
  218. package/dist/terminology/verhoeff.js +0 -118
  219. package/dist/terminology/verhoeff.js.map +0 -1
  220. package/dist/text-utils.d.ts +0 -17
  221. package/dist/text-utils.d.ts.map +0 -1
  222. package/dist/text-utils.js +0 -49
  223. package/dist/text-utils.js.map +0 -1
  224. package/dist/types.d.ts +0 -64
  225. package/dist/types.d.ts.map +0 -1
  226. package/dist/types.js +0 -15
  227. package/dist/types.js.map +0 -1
  228. package/dist/validation/error-refinement.d.ts +0 -31
  229. package/dist/validation/error-refinement.d.ts.map +0 -1
  230. package/dist/validation/error-refinement.js +0 -173
  231. package/dist/validation/error-refinement.js.map +0 -1
@@ -1,101 +0,0 @@
1
- "use strict";
2
- // Copyright 2026 Commonwealth Scientific and Industrial Research Organisation (CSIRO)
3
- // ABN 41 687 119 230. SPDX-License-Identifier: Apache-2.0
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.knowledgeGuides = exports.operatorHoverDocs = exports.allArticles = void 0;
6
- exports.getArticle = getArticle;
7
- exports.getArticlesByCategory = getArticlesByCategory;
8
- exports.getOperatorHoverDoc = getOperatorHoverDoc;
9
- exports.getGuide = getGuide;
10
- const operators_1 = require("./operators");
11
- const refinements_1 = require("./refinements");
12
- const filters_1 = require("./filters");
13
- const patterns_1 = require("./patterns");
14
- const grammar_1 = require("./grammar");
15
- // ── All articles ─────────────────────────────────────────────────────────
16
- /** All knowledge articles across all categories */
17
- exports.allArticles = [
18
- ...operators_1.operatorArticles,
19
- ...refinements_1.refinementArticles,
20
- ...filters_1.filterArticles,
21
- ...patterns_1.patternArticles,
22
- ...grammar_1.grammarArticles,
23
- ...grammar_1.historyArticles,
24
- ];
25
- // ── Article lookups ──────────────────────────────────────────────────────
26
- /** Look up an article by its ID */
27
- function getArticle(id) {
28
- return exports.allArticles.find((a) => a.id === id);
29
- }
30
- /** Get all articles in a category */
31
- function getArticlesByCategory(category) {
32
- return exports.allArticles.filter((a) => a.category === category);
33
- }
34
- // ── Hover docs ───────────────────────────────────────────────────────────
35
- /** All operator hover docs (for IDE tooltips) */
36
- var operators_2 = require("./operators");
37
- Object.defineProperty(exports, "operatorHoverDocs", { enumerable: true, get: function () { return operators_2.operatorHoverDocs; } });
38
- const hoverDocMap = new Map();
39
- for (const doc of operators_1.operatorHoverDocs) {
40
- hoverDocMap.set(doc.operator, doc.markdown);
41
- // Also index uppercase keyword operators by lowercase
42
- if (doc.operator === doc.operator.toUpperCase() && doc.operator.length > 1) {
43
- hoverDocMap.set(doc.operator.toLowerCase(), doc.markdown);
44
- }
45
- }
46
- /** Get hover markdown for an operator symbol or keyword (case-insensitive for keywords) */
47
- function getOperatorHoverDoc(operator) {
48
- return hoverDocMap.get(operator) ?? hoverDocMap.get(operator.toUpperCase());
49
- }
50
- // ── Knowledge guides ─────────────────────────────────────────────────────
51
- function buildGuideContent(title, articles) {
52
- const sections = articles.map((a) => {
53
- const header = `## ${a.name}`;
54
- return `${header}\n${a.content}`;
55
- });
56
- return `# ${title}\n\n${sections.join('\n\n')}`;
57
- }
58
- /** Pre-built knowledge guides, keyed by URI */
59
- exports.knowledgeGuides = [
60
- {
61
- uri: 'ecl://guide/operators',
62
- name: 'ECL Operators Guide',
63
- description: 'All ECL constraint operators with meanings, syntax, and examples',
64
- content: buildGuideContent('ECL Constraint Operators', operators_1.operatorArticles),
65
- },
66
- {
67
- uri: 'ecl://guide/refinements',
68
- name: 'ECL Refinements Guide',
69
- description: 'Attribute refinement syntax, groups, cardinality, and common attributes',
70
- content: buildGuideContent('ECL Refinements', refinements_1.refinementArticles),
71
- },
72
- {
73
- uri: 'ecl://guide/filters',
74
- name: 'ECL Filters Guide',
75
- description: 'Description, concept, and member filters in ECL 2.2',
76
- content: buildGuideContent('ECL Filters', filters_1.filterArticles),
77
- },
78
- {
79
- uri: 'ecl://guide/patterns',
80
- name: 'ECL Patterns Guide',
81
- description: 'Common ECL patterns for typical clinical terminology tasks',
82
- content: buildGuideContent('Common ECL Patterns', patterns_1.patternArticles),
83
- },
84
- {
85
- uri: 'ecl://reference/grammar',
86
- name: 'ECL Grammar Reference',
87
- description: 'ECL 2.2 grammar summary',
88
- content: buildGuideContent('ECL 2.2 Grammar Summary', grammar_1.grammarArticles),
89
- },
90
- {
91
- uri: 'ecl://guide/history-supplements',
92
- name: 'ECL History Supplements Guide',
93
- description: 'History supplement profiles and usage for tracking concept changes',
94
- content: buildGuideContent('ECL History Supplements', grammar_1.historyArticles),
95
- },
96
- ];
97
- /** Look up a knowledge guide by URI */
98
- function getGuide(uri) {
99
- return exports.knowledgeGuides.find((g) => g.uri === uri);
100
- }
101
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/knowledge/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;AACtF,0DAA0D;;;AAkC1D,gCAEC;AAGD,sDAEC;AAiBD,kDAEC;AAqDD,4BAEC;AAtGD,2CAAkE;AAClE,+CAAmD;AACnD,uCAA2C;AAC3C,yCAA6C;AAC7C,uCAA6D;AAE7D,4EAA4E;AAE5E,mDAAmD;AACtC,QAAA,WAAW,GAAgC;IACtD,GAAG,4BAAgB;IACnB,GAAG,gCAAkB;IACrB,GAAG,wBAAc;IACjB,GAAG,0BAAe;IAClB,GAAG,yBAAe;IAClB,GAAG,yBAAe;CACnB,CAAC;AAEF,4EAA4E;AAE5E,mCAAmC;AACnC,SAAgB,UAAU,CAAC,EAAU;IACnC,OAAO,mBAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,qCAAqC;AACrC,SAAgB,qBAAqB,CAAC,QAAgB;IACpD,OAAO,mBAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;AAC5D,CAAC;AAED,4EAA4E;AAE5E,iDAAiD;AACjD,yCAAgD;AAAvC,8GAAA,iBAAiB,OAAA;AAE1B,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC9C,KAAK,MAAM,GAAG,IAAI,6BAAiB,EAAE,CAAC;IACpC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5C,sDAAsD;IACtD,IAAI,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,GAAG,CAA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,EAAE,oBAAoB;QAC1B,WAAW,EAAE,4DAA4D;QACzE,OAAO,EAAE,iBAAiB,CAAC,qBAAqB,EAAE,0BAAe,CAAC;KACnE;IACD;QACE,GAAG,EAAE,yBAAyB;QAC9B,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,yBAAe,CAAC;KACvE;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,IAAI,EAAE,+BAA+B;QACrC,WAAW,EAAE,oEAAoE;QACjF,OAAO,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,yBAAe,CAAC;KACvE;CACF,CAAC;AAEF,uCAAuC;AACvC,SAAgB,QAAQ,CAAC,GAAW;IAClC,OAAO,uBAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AACpD,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { KnowledgeArticle, OperatorHoverDoc } from './types';
2
- /**
3
- * All 15+ ECL operators with meanings, syntax, and examples.
4
- */
5
- export declare const operatorArticles: KnowledgeArticle[];
6
- /**
7
- * Hover documentation for all operators — concise markdown for IDE tooltips.
8
- */
9
- export declare const operatorHoverDocs: OperatorHoverDoc[];
10
- //# sourceMappingURL=operators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operators.d.ts","sourceRoot":"","sources":["../../src/knowledge/operators.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAAgB,EAyP9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,EA0E/C,CAAC"}
@@ -1,324 +0,0 @@
1
- "use strict";
2
- // Copyright 2026 Commonwealth Scientific and Industrial Research Organisation (CSIRO)
3
- // ABN 41 687 119 230. SPDX-License-Identifier: Apache-2.0
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.operatorHoverDocs = exports.operatorArticles = void 0;
6
- /**
7
- * All 15+ ECL operators with meanings, syntax, and examples.
8
- */
9
- exports.operatorArticles = [
10
- {
11
- id: 'op:selfOf',
12
- category: 'operator',
13
- name: 'Self (Concept Reference)',
14
- summary: 'Matches the exact concept only',
15
- content: `A bare concept reference (no constraint operator) matches only the concept itself.
16
-
17
- \`\`\`ecl
18
- 404684003 |Clinical finding|
19
- \`\`\`
20
-
21
- This is the most specific constraint — it returns exactly one concept.`,
22
- examples: ['404684003 |Clinical finding|', '73211009 |Diabetes mellitus|'],
23
- related: ['op:descendantOrSelfOf'],
24
- },
25
- {
26
- id: 'op:descendantOf',
27
- category: 'operator',
28
- name: 'Descendant Of (<)',
29
- summary: 'All descendants, excluding the concept itself',
30
- content: `The \`<\` operator matches all descendants (children, grandchildren, etc.) of the specified concept, **excluding** the concept itself.
31
-
32
- \`\`\`ecl
33
- < 404684003 |Clinical finding|
34
- \`\`\`
35
-
36
- This returns all clinical findings in SNOMED CT but NOT the root "Clinical finding" concept.`,
37
- examples: ['< 404684003 |Clinical finding|', '< 19829001 |Disorder of lung|'],
38
- related: ['op:descendantOrSelfOf', 'op:childOf', 'op:ancestorOf'],
39
- },
40
- {
41
- id: 'op:descendantOrSelfOf',
42
- category: 'operator',
43
- name: 'Descendant Or Self Of (<<)',
44
- summary: 'All descendants including the concept itself',
45
- content: `The \`<<\` operator matches all descendants of the specified concept **including** the concept itself.
46
-
47
- \`\`\`ecl
48
- << 404684003 |Clinical finding|
49
- \`\`\`
50
-
51
- This is the most commonly used operator. Use it when you want "this concept and all its subtypes".`,
52
- examples: ['<< 73211009 |Diabetes mellitus|', '<< 19829001 |Disorder of lung|'],
53
- related: ['op:descendantOf', 'op:childOrSelfOf'],
54
- },
55
- {
56
- id: 'op:childOf',
57
- category: 'operator',
58
- name: 'Child Of (<!)',
59
- summary: 'Immediate children only (one level down)',
60
- content: `The \`<!\` operator matches only the **direct children** (one level below) of the specified concept.
61
-
62
- \`\`\`ecl
63
- <! 404684003 |Clinical finding|
64
- \`\`\`
65
-
66
- Unlike \`<\`, this does not recurse into grandchildren and deeper descendants.`,
67
- examples: ['<! 404684003 |Clinical finding|'],
68
- related: ['op:descendantOf', 'op:childOrSelfOf', 'op:parentOf'],
69
- },
70
- {
71
- id: 'op:childOrSelfOf',
72
- category: 'operator',
73
- name: 'Child Or Self Of (<<!)',
74
- summary: 'Direct children plus the concept itself',
75
- content: `The \`<<!\` operator matches the **direct children** plus the concept itself.
76
-
77
- \`\`\`ecl
78
- <<! 404684003 |Clinical finding|
79
- \`\`\``,
80
- examples: ['<<! 404684003 |Clinical finding|'],
81
- related: ['op:childOf', 'op:descendantOrSelfOf'],
82
- },
83
- {
84
- id: 'op:ancestorOf',
85
- category: 'operator',
86
- name: 'Ancestor Of (>)',
87
- summary: 'All ancestors, excluding the concept itself',
88
- content: `The \`>\` operator matches all ancestors (parents, grandparents, etc.) of the specified concept, **excluding** the concept itself.
89
-
90
- \`\`\`ecl
91
- > 404684003 |Clinical finding|
92
- \`\`\`
93
-
94
- This navigates up the hierarchy to find broader concepts.`,
95
- examples: ['> 404684003 |Clinical finding|', '> 19829001 |Disorder of lung|'],
96
- related: ['op:ancestorOrSelfOf', 'op:parentOf', 'op:descendantOf'],
97
- },
98
- {
99
- id: 'op:ancestorOrSelfOf',
100
- category: 'operator',
101
- name: 'Ancestor Or Self Of (>>)',
102
- summary: 'All ancestors including the concept itself',
103
- content: `The \`>>\` operator matches all ancestors of the specified concept **including** the concept itself.
104
-
105
- \`\`\`ecl
106
- >> 19829001 |Disorder of lung|
107
- \`\`\``,
108
- examples: ['>> 19829001 |Disorder of lung|'],
109
- related: ['op:ancestorOf', 'op:parentOrSelfOf'],
110
- },
111
- {
112
- id: 'op:parentOf',
113
- category: 'operator',
114
- name: 'Parent Of (>!)',
115
- summary: 'Immediate parents only (one level up)',
116
- content: `The \`>!\` operator matches only the **direct parents** (one level above) of the specified concept.
117
-
118
- \`\`\`ecl
119
- >! 19829001 |Disorder of lung|
120
- \`\`\`
121
-
122
- Unlike \`>\`, this does not recurse into grandparents and higher ancestors.`,
123
- examples: ['>! 19829001 |Disorder of lung|'],
124
- related: ['op:ancestorOf', 'op:parentOrSelfOf', 'op:childOf'],
125
- },
126
- {
127
- id: 'op:parentOrSelfOf',
128
- category: 'operator',
129
- name: 'Parent Or Self Of (>>!)',
130
- summary: 'Direct parents plus the concept itself',
131
- content: `The \`>>!\` operator matches the **direct parents** plus the concept itself.
132
-
133
- \`\`\`ecl
134
- >>! 19829001 |Disorder of lung|
135
- \`\`\``,
136
- examples: ['>>! 19829001 |Disorder of lung|'],
137
- related: ['op:parentOf', 'op:ancestorOrSelfOf'],
138
- },
139
- {
140
- id: 'op:memberOf',
141
- category: 'operator',
142
- name: 'Member Of (^)',
143
- summary: 'All concepts in a reference set',
144
- content: `The \`^\` operator matches all members of the specified reference set.
145
-
146
- \`\`\`ecl
147
- ^ 816080008 |International Patient Summary|
148
- \`\`\`
149
-
150
- Reference sets are curated lists of concepts used for specific purposes (e.g., value sets, maps, clinical subsets).`,
151
- examples: ['^ 816080008 |International Patient Summary|', '^ 900000000000497000 |CTV3 simple map|'],
152
- related: ['op:wildcard'],
153
- },
154
- {
155
- id: 'op:wildcard',
156
- category: 'operator',
157
- name: 'Any Concept (*)',
158
- summary: 'Matches any active concept',
159
- content: `The wildcard \`*\` matches any active concept in the code system.
160
-
161
- \`\`\`ecl
162
- *
163
- \`\`\`
164
-
165
- Useful in refinements to match any attribute value:
166
- \`\`\`ecl
167
- << 404684003 : 363698007 = *
168
- \`\`\``,
169
- examples: ['*', '<< 404684003 : 363698007 = *'],
170
- related: ['op:descendantOrSelfOf'],
171
- },
172
- {
173
- id: 'op:top',
174
- category: 'operator',
175
- name: 'Top (!!>)',
176
- summary: 'The root concept (SNOMED CT Concept)',
177
- content: `The \`!!>\` operator matches the root concept (SNOMED CT Concept 138875005).
178
-
179
- \`\`\`ecl
180
- !!>
181
- \`\`\``,
182
- examples: ['!!>'],
183
- related: ['op:bottom'],
184
- },
185
- {
186
- id: 'op:bottom',
187
- category: 'operator',
188
- name: 'Bottom (!!<)',
189
- summary: 'Leaf concepts (no children)',
190
- content: `The \`!!<\` operator matches leaf concepts — concepts that have no children.
191
-
192
- \`\`\`ecl
193
- !!<
194
- \`\`\``,
195
- examples: ['!!<'],
196
- related: ['op:top'],
197
- },
198
- {
199
- id: 'op:and',
200
- category: 'operator',
201
- name: 'AND (Conjunction)',
202
- summary: 'Both conditions must be satisfied',
203
- content: `The \`AND\` operator computes the **intersection** of two concept sets.
204
-
205
- \`\`\`ecl
206
- < 404684003 |Clinical finding| AND < 19829001 |Disorder|
207
- \`\`\`
208
-
209
- Case-insensitive: \`AND\`, \`and\`, \`And\` are all equivalent.`,
210
- examples: ['< 404684003 AND < 19829001', '<< 73211009 AND << 46635009'],
211
- related: ['op:or', 'op:minus'],
212
- },
213
- {
214
- id: 'op:or',
215
- category: 'operator',
216
- name: 'OR (Disjunction)',
217
- summary: 'Either condition may be satisfied',
218
- content: `The \`OR\` operator computes the **union** of two concept sets.
219
-
220
- \`\`\`ecl
221
- < 19829001 |Disorder of lung| OR < 301867009 |Edema|
222
- \`\`\`
223
-
224
- Case-insensitive: \`OR\`, \`or\`, \`Or\` are all equivalent.`,
225
- examples: ['< 19829001 OR < 73211009', '(<< 404684003) OR (<< 71388002)'],
226
- related: ['op:and', 'op:minus'],
227
- },
228
- {
229
- id: 'op:minus',
230
- category: 'operator',
231
- name: 'MINUS (Exclusion)',
232
- summary: 'First set excluding the second set',
233
- content: `The \`MINUS\` operator computes the **set difference** — concepts in the first set that are NOT in the second.
234
-
235
- \`\`\`ecl
236
- < 404684003 |Clinical finding| MINUS < 19829001 |Disorder|
237
- \`\`\`
238
-
239
- Case-insensitive: \`MINUS\`, \`minus\`, \`Minus\` are all equivalent.`,
240
- examples: ['<< 73211009 MINUS << 46635009', '< 404684003 |Clinical finding| MINUS < 19829001 |Disorder|'],
241
- related: ['op:and', 'op:or'],
242
- },
243
- {
244
- id: 'op:refinement',
245
- category: 'operator',
246
- name: 'Refinement (:)',
247
- summary: 'Constrain by attribute-value relationships',
248
- content: `The colon \`:\` separates the focus concept from attribute constraints (refinements).
249
-
250
- \`\`\`ecl
251
- < 404684003 : 363698007 |Finding site| = < 39057004
252
- \`\`\`
253
-
254
- Refinements allow filtering concepts by their defining relationships.`,
255
- examples: ['<< 404684003 : 363698007 = << 39057004', '<< 71388002 : 363704007 = << 80891009'],
256
- related: ['op:and', 'op:or'],
257
- },
258
- ];
259
- /**
260
- * Hover documentation for all operators — concise markdown for IDE tooltips.
261
- */
262
- exports.operatorHoverDocs = [
263
- {
264
- operator: '<',
265
- markdown: '**Descendant Of**\n\nMatches all descendants (children, grandchildren, etc.) of the specified concept, excluding the concept itself.\n\n**Example:**\n```ecl\n< 404684003 |Clinical finding|\n```',
266
- },
267
- {
268
- operator: '<<',
269
- markdown: '**Descendant Or Self Of**\n\nMatches all descendants of the specified concept, including the concept itself.\n\n**Example:**\n```ecl\n<< 19829001 |Disorder of lung|\n```',
270
- },
271
- {
272
- operator: '<!',
273
- markdown: '**Child Of**\n\nMatches immediate children only (one level below the specified concept).\n\n**Example:**\n```ecl\n<! 404684003 |Clinical finding|\n```',
274
- },
275
- {
276
- operator: '<<!',
277
- markdown: '**Child Or Self Of**\n\nMatches immediate children plus the concept itself.\n\n**Example:**\n```ecl\n<<! 404684003 |Clinical finding|\n```',
278
- },
279
- {
280
- operator: '>',
281
- markdown: '**Ancestor Of**\n\nMatches all ancestors (parents, grandparents, etc.) of the specified concept, excluding the concept itself.\n\n**Example:**\n```ecl\n> 404684003 |Clinical finding|\n```',
282
- },
283
- {
284
- operator: '>>',
285
- markdown: '**Ancestor Or Self Of**\n\nMatches all ancestors of the specified concept, including the concept itself.\n\n**Example:**\n```ecl\n>> 19829001 |Disorder of lung|\n```',
286
- },
287
- {
288
- operator: '>!',
289
- markdown: '**Parent Of**\n\nMatches immediate parents only (one level above the specified concept).\n\n**Example:**\n```ecl\n>! 19829001 |Disorder of lung|\n```',
290
- },
291
- {
292
- operator: '>>!',
293
- markdown: '**Parent Or Self Of**\n\nMatches immediate parents plus the concept itself.\n\n**Example:**\n```ecl\n>>! 19829001 |Disorder of lung|\n```',
294
- },
295
- {
296
- operator: '^',
297
- markdown: '**Member Of**\n\nMatches members of the specified reference set.\n\n**Example:**\n```ecl\n^ 900000000000497000 |CTV3 simple map|\n```',
298
- },
299
- {
300
- operator: '!!>',
301
- markdown: '**Top**\n\nMatches the root concept (SNOMED CT Concept 138875005).\n\n**Example:**\n```ecl\n!!>\n```',
302
- },
303
- {
304
- operator: '!!<',
305
- markdown: '**Bottom**\n\nMatches leaf concepts (concepts with no children).\n\n**Example:**\n```ecl\n!!<\n```',
306
- },
307
- {
308
- operator: 'AND',
309
- markdown: '**Logical AND**\n\nCombines two constraints - both must be satisfied.\n\n**Example:**\n```ecl\n< 404684003 |Clinical finding| AND < 19829001 |Disorder|\n```',
310
- },
311
- {
312
- operator: 'OR',
313
- markdown: '**Logical OR**\n\nCombines two constraints - at least one must be satisfied.\n\n**Example:**\n```ecl\n< 19829001 |Disorder of lung| OR < 301867009 |Edema|\n```',
314
- },
315
- {
316
- operator: 'MINUS',
317
- markdown: '**Exclusion (MINUS)**\n\nExcludes concepts that match the right operand from the left operand.\n\n**Example:**\n```ecl\n< 404684003 |Clinical finding| MINUS < 19829001 |Disorder|\n```',
318
- },
319
- {
320
- operator: ':',
321
- markdown: '**Refinement**\n\nRefines a concept by specifying attribute-value pairs.\n\n**Example:**\n```ecl\n< 404684003 : 363698007 |Finding site| = < 39057004\n```',
322
- },
323
- ];
324
- //# sourceMappingURL=operators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operators.js","sourceRoot":"","sources":["../../src/knowledge/operators.ts"],"names":[],"mappings":";AAAA,sFAAsF;AACtF,0DAA0D;;;AAI1D;;GAEG;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;QACE,QAAQ,EAAE,IAAI;QACd,QAAQ,EACN,iKAAiK;KACpK;IACD;QACE,QAAQ,EAAE,OAAO;QACjB,QAAQ,EACN,yLAAyL;KAC5L;IACD;QACE,QAAQ,EAAE,GAAG;QACb,QAAQ,EACN,4JAA4J;KAC/J;CACF,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { KnowledgeArticle } from './types';
2
- /**
3
- * Common ECL patterns for typical clinical terminology tasks.
4
- */
5
- export declare const patternArticles: KnowledgeArticle[];
6
- //# sourceMappingURL=patterns.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../src/knowledge/patterns.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,gBAAgB,EAkK7C,CAAC"}
@@ -1,172 +0,0 @@
1
- "use strict";
2
- // Copyright 2026 Commonwealth Scientific and Industrial Research Organisation (CSIRO)
3
- // ABN 41 687 119 230. SPDX-License-Identifier: Apache-2.0
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.patternArticles = void 0;
6
- /**
7
- * Common ECL patterns for typical clinical terminology tasks.
8
- */
9
- exports.patternArticles = [
10
- {
11
- id: 'pattern:disorders-by-site',
12
- category: 'pattern',
13
- name: 'Disorders by Body Site',
14
- summary: 'Find all disorders affecting a specific body site',
15
- content: `Find disorders by their anatomical finding site:
16
-
17
- \`\`\`ecl
18
- << 404684003 |Clinical finding| :
19
- 363698007 |Finding site| = << 80891009 |Heart structure|
20
- \`\`\``,
21
- examples: [
22
- '<< 404684003 : 363698007 = << 80891009 |Heart structure|',
23
- '<< 404684003 : 363698007 = << 39057004 |Pulmonary structure|',
24
- ],
25
- related: ['pattern:medications', 'pattern:procedures'],
26
- },
27
- {
28
- id: 'pattern:medications',
29
- category: 'pattern',
30
- name: 'Medications by Ingredient',
31
- summary: 'Find medications containing a specific active ingredient',
32
- content: `Find medicinal products by their active ingredient:
33
-
34
- \`\`\`ecl
35
- << 763158003 |Medicinal product| :
36
- 127489000 |Has active ingredient| = << 387517004 |Paracetamol|
37
- \`\`\``,
38
- examples: [
39
- '<< 763158003 : 127489000 = << 387517004 |Paracetamol|',
40
- '<< 763158003 : 127489000 = << 372687004 |Amoxicillin|',
41
- ],
42
- related: ['pattern:disorders-by-site', 'pattern:procedures'],
43
- },
44
- {
45
- id: 'pattern:procedures',
46
- category: 'pattern',
47
- name: 'Procedures by Site',
48
- summary: 'Find procedures performed on a specific body site',
49
- content: `Find procedures by their procedure site:
50
-
51
- \`\`\`ecl
52
- << 71388002 |Procedure| :
53
- 363704007 |Procedure site| = << 80891009 |Heart structure|
54
- \`\`\``,
55
- examples: [
56
- '<< 71388002 : 363704007 = << 80891009 |Heart structure|',
57
- '<< 71388002 : 363704007 = << 39057004 |Pulmonary structure|',
58
- ],
59
- related: ['pattern:disorders-by-site', 'pattern:medications'],
60
- },
61
- {
62
- id: 'pattern:combine-conditions',
63
- category: 'pattern',
64
- name: 'Combine Conditions',
65
- summary: 'Unite multiple concept sets with OR',
66
- content: `Combine conditions affecting different body sites:
67
-
68
- \`\`\`ecl
69
- (<< 404684003 : 363698007 = << 39057004 |Pulmonary structure|)
70
- OR
71
- (<< 404684003 : 363698007 = << 80891009 |Heart structure|)
72
- \`\`\``,
73
- examples: ['(<< 404684003 : 363698007 = << 39057004) OR (<< 404684003 : 363698007 = << 80891009)'],
74
- related: ['pattern:exclude-subset'],
75
- },
76
- {
77
- id: 'pattern:exclude-subset',
78
- category: 'pattern',
79
- name: 'Exclude a Subset',
80
- summary: 'Remove specific concepts from a broader set with MINUS',
81
- content: `Exclude a subset from a broader concept set:
82
-
83
- \`\`\`ecl
84
- << 73211009 |Diabetes mellitus|
85
- MINUS
86
- << 46635009 |Type 1 diabetes|
87
- \`\`\``,
88
- examples: ['<< 73211009 MINUS << 46635009'],
89
- related: ['pattern:combine-conditions'],
90
- },
91
- {
92
- id: 'pattern:reference-sets',
93
- category: 'pattern',
94
- name: 'Reference Set Members',
95
- summary: 'Find all concepts in a reference set',
96
- content: `Get all members of a reference set:
97
-
98
- \`\`\`ecl
99
- ^ 816080008 |International Patient Summary|
100
- \`\`\``,
101
- examples: ['^ 816080008 |International Patient Summary|'],
102
- related: ['pattern:text-search'],
103
- },
104
- {
105
- id: 'pattern:text-search',
106
- category: 'pattern',
107
- name: 'Search by Description Text',
108
- summary: 'Find concepts by matching description text',
109
- content: `Search descriptions for matching text:
110
-
111
- \`\`\`ecl
112
- < 404684003 {{ D term = match:"chest pain" }}
113
- \`\`\`
114
-
115
- Three matching modes:
116
- - Exact: \`term = "chest pain"\`
117
- - Match (tokenized): \`term = match:"chest pain"\`
118
- - Wildcard: \`term = wild:"*chest*"\``,
119
- examples: ['< 404684003 {{ D term = match:"chest pain" }}', '<< 73211009 {{ D term = wild:"*diabet*" }}'],
120
- related: ['pattern:active-only'],
121
- },
122
- {
123
- id: 'pattern:active-only',
124
- category: 'pattern',
125
- name: 'Active Concepts Only',
126
- summary: 'Filter to include only active concepts',
127
- content: `Restrict results to active concepts:
128
-
129
- \`\`\`ecl
130
- << 73211009 {{ C active = true }}
131
- \`\`\``,
132
- examples: ['<< 73211009 {{ C active = true }}'],
133
- related: ['pattern:text-search'],
134
- },
135
- {
136
- id: 'pattern:complex-grouped',
137
- category: 'pattern',
138
- name: 'Complex Grouped Refinement',
139
- summary: 'Find concepts with grouped attribute combinations',
140
- content: `Infectious diseases caused by bacteria affecting lungs — attributes grouped to ensure co-occurrence:
141
-
142
- \`\`\`ecl
143
- << 40733004 |Infectious disease| :
144
- {
145
- 246075003 |Causative agent| = << 409822003 |Domain Bacteria|,
146
- 363698007 |Finding site| = << 39057004 |Pulmonary structure|
147
- }
148
- \`\`\``,
149
- examples: ['<< 40733004 : { 246075003 = << 409822003, 363698007 = << 39057004 }'],
150
- related: ['pattern:disorders-by-site'],
151
- },
152
- {
153
- id: 'pattern:history-supplement',
154
- category: 'pattern',
155
- name: 'Include Historical Associations',
156
- summary: 'Extend queries to include historical concept mappings',
157
- content: `Use history supplements to catch data coded with inactivated concepts:
158
-
159
- \`\`\`ecl
160
- << 73211009 {{ + HISTORY-MIN }}
161
- \`\`\`
162
-
163
- Profiles:
164
- - **HISTORY-MIN** — SAME AS associations only
165
- - **HISTORY-MOD** — + POSSIBLY/PROBABLY EQUIVALENT TO
166
- - **HISTORY-MAX** — All association types
167
- - **HISTORY** — All, with optional subset filter`,
168
- examples: ['<< 73211009 {{ + HISTORY-MIN }}', '<< 73211009 {{ + HISTORY-MOD }}'],
169
- related: [],
170
- },
171
- ];
172
- //# sourceMappingURL=patterns.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../src/knowledge/patterns.ts"],"names":[],"mappings":";AAAA,sFAAsF;AACtF,0DAA0D;;;AAI1D;;GAEG;AACU,QAAA,eAAe,GAAuB;IACjD;QACE,EAAE,EAAE,2BAA2B;QAC/B,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,wBAAwB;QAC9B,OAAO,EAAE,mDAAmD;QAC5D,OAAO,EAAE;;;;;OAKN;QACH,QAAQ,EAAE;YACR,0DAA0D;YAC1D,8DAA8D;SAC/D;QACD,OAAO,EAAE,CAAC,qBAAqB,EAAE,oBAAoB,CAAC;KACvD;IACD;QACE,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,2BAA2B;QACjC,OAAO,EAAE,0DAA0D;QACnE,OAAO,EAAE;;;;;OAKN;QACH,QAAQ,EAAE;YACR,uDAAuD;YACvD,uDAAuD;SACxD;QACD,OAAO,EAAE,CAAC,2BAA2B,EAAE,oBAAoB,CAAC;KAC7D;IACD;QACE,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,mDAAmD;QAC5D,OAAO,EAAE;;;;;OAKN;QACH,Q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;KACjC;IACD;QACE,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,mDAAmD;QAC5D,OAAO,EAAE;;;;;;;;OAQN;QACH,QAAQ,EAAE,CAAC,qEAAqE,CAAC;QACjF,OAAO,EAAE,CAAC,2BAA2B,CAAC;KACvC;IACD;QACE,EAAE,EAAE,4BAA4B;QAChC,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE,uDAAuD;QAChE,OAAO,EAAE;;;;;;;;;;iDAUoC;QAC7C,QAAQ,EAAE,CAAC,iCAAiC,EAAE,iCAAiC,CAAC;QAChF,OAAO,EAAE,EAAE;KACZ;CACF,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { KnowledgeArticle } from './types';
2
- /**
3
- * Refinement documentation — attributes, groups, cardinality, reverse, common attributes.
4
- */
5
- export declare const refinementArticles: KnowledgeArticle[];
6
- //# sourceMappingURL=refinements.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"refinements.d.ts","sourceRoot":"","sources":["../../src/knowledge/refinements.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EA4HhD,CAAC"}