ezmedicationinput 0.1.43 → 0.1.44
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/README.md +4 -1
- package/dist/advice-rules.json +772 -0
- package/dist/advice-terminology.json +104 -0
- package/dist/advice.d.ts +16 -0
- package/dist/advice.js +1375 -0
- package/dist/event-trigger.d.ts +14 -0
- package/dist/event-trigger.js +501 -0
- package/dist/fhir-translations.d.ts +5 -0
- package/dist/fhir-translations.js +117 -0
- package/dist/fhir.d.ts +6 -4
- package/dist/fhir.js +566 -134
- package/dist/format.d.ts +4 -2
- package/dist/format.js +515 -218
- package/dist/i18n.d.ts +2 -2
- package/dist/i18n.js +641 -199
- package/dist/index.d.ts +0 -1
- package/dist/index.js +219 -168
- package/dist/internal-types.d.ts +5 -5
- package/dist/ir.d.ts +4 -0
- package/dist/ir.js +178 -0
- package/dist/lexer/lex.d.ts +2 -0
- package/dist/lexer/lex.js +401 -0
- package/dist/lexer/meaning.d.ts +71 -0
- package/dist/lexer/meaning.js +619 -0
- package/dist/lexer/surface.d.ts +2 -0
- package/dist/lexer/surface.js +62 -0
- package/dist/lexer/token-types.d.ts +36 -0
- package/dist/lexer/token-types.js +19 -0
- package/dist/maps.d.ts +6 -12
- package/dist/maps.js +793 -247
- package/dist/parser-state.d.ts +101 -0
- package/dist/parser-state.js +441 -0
- package/dist/parser.d.ts +7 -7
- package/dist/parser.js +3598 -1974
- package/dist/prn.d.ts +4 -0
- package/dist/prn.js +59 -0
- package/dist/schedule.js +230 -32
- package/dist/site-phrases.d.ts +35 -0
- package/dist/site-phrases.js +344 -0
- package/dist/timing-summary.d.ts +13 -3
- package/dist/timing-summary.js +7 -7
- package/dist/types.d.ts +237 -32
- package/dist/types.js +49 -1
- package/dist/utils/text.d.ts +3 -0
- package/dist/utils/text.js +48 -0
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare enum SurfaceTokenKind {
|
|
2
|
+
Text = "TEXT",
|
|
3
|
+
Separator = "SEPARATOR",
|
|
4
|
+
Punctuation = "PUNCTUATION"
|
|
5
|
+
}
|
|
6
|
+
export declare enum LexKind {
|
|
7
|
+
Word = "WORD",
|
|
8
|
+
Number = "NUMBER",
|
|
9
|
+
NumberRange = "NUMBER_RANGE",
|
|
10
|
+
Ordinal = "ORDINAL",
|
|
11
|
+
TimeLike = "TIME_LIKE",
|
|
12
|
+
Separator = "SEPARATOR",
|
|
13
|
+
Punctuation = "PUNCTUATION"
|
|
14
|
+
}
|
|
15
|
+
export interface SurfaceToken {
|
|
16
|
+
original: string;
|
|
17
|
+
lower: string;
|
|
18
|
+
index: number;
|
|
19
|
+
kind: SurfaceTokenKind;
|
|
20
|
+
start: number;
|
|
21
|
+
end: number;
|
|
22
|
+
}
|
|
23
|
+
export interface LexToken {
|
|
24
|
+
original: string;
|
|
25
|
+
lower: string;
|
|
26
|
+
index: number;
|
|
27
|
+
kind: LexKind;
|
|
28
|
+
value?: number;
|
|
29
|
+
low?: number;
|
|
30
|
+
high?: number;
|
|
31
|
+
sourceStart: number;
|
|
32
|
+
sourceEnd: number;
|
|
33
|
+
surfaceIndices: number[];
|
|
34
|
+
sourceText?: string;
|
|
35
|
+
derived?: true;
|
|
36
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LexKind = exports.SurfaceTokenKind = void 0;
|
|
4
|
+
var SurfaceTokenKind;
|
|
5
|
+
(function (SurfaceTokenKind) {
|
|
6
|
+
SurfaceTokenKind["Text"] = "TEXT";
|
|
7
|
+
SurfaceTokenKind["Separator"] = "SEPARATOR";
|
|
8
|
+
SurfaceTokenKind["Punctuation"] = "PUNCTUATION";
|
|
9
|
+
})(SurfaceTokenKind || (exports.SurfaceTokenKind = SurfaceTokenKind = {}));
|
|
10
|
+
var LexKind;
|
|
11
|
+
(function (LexKind) {
|
|
12
|
+
LexKind["Word"] = "WORD";
|
|
13
|
+
LexKind["Number"] = "NUMBER";
|
|
14
|
+
LexKind["NumberRange"] = "NUMBER_RANGE";
|
|
15
|
+
LexKind["Ordinal"] = "ORDINAL";
|
|
16
|
+
LexKind["TimeLike"] = "TIME_LIKE";
|
|
17
|
+
LexKind["Separator"] = "SEPARATOR";
|
|
18
|
+
LexKind["Punctuation"] = "PUNCTUATION";
|
|
19
|
+
})(LexKind || (exports.LexKind = LexKind = {}));
|
package/dist/maps.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BodySiteDefinition, EventTiming, FhirDayOfWeek, FhirPeriodUnit, PrnReasonDefinition, RouteCode, SNOMEDCTRouteCodes } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* SNOMED CT codings aligned with every known RouteCode. Keeping the structure
|
|
4
4
|
* data-driven ensures any additions to the enumeration are surfaced
|
|
@@ -30,8 +30,13 @@ export declare const DEFAULT_BODY_SITE_SNOMED_SOURCE: Array<{
|
|
|
30
30
|
definition: BodySiteDefinition;
|
|
31
31
|
}>;
|
|
32
32
|
export declare const DEFAULT_BODY_SITE_SNOMED: Record<string, BodySiteDefinition>;
|
|
33
|
+
export declare const DEFAULT_BODY_SITE_HINTS: Set<string>;
|
|
33
34
|
export declare const HOUSEHOLD_VOLUME_UNITS: readonly ["tsp", "tbsp"];
|
|
34
35
|
export declare const DEFAULT_UNIT_SYNONYMS: Record<string, string>;
|
|
36
|
+
export interface ProductFormHint {
|
|
37
|
+
routeHint?: RouteCode;
|
|
38
|
+
}
|
|
39
|
+
export declare const PRODUCT_FORM_HINTS: Record<string, ProductFormHint>;
|
|
35
40
|
export interface FrequencyDescriptor {
|
|
36
41
|
code?: string;
|
|
37
42
|
frequency?: number;
|
|
@@ -71,18 +76,7 @@ export interface PrnReasonDictionaryEntry {
|
|
|
71
76
|
}
|
|
72
77
|
export declare const DEFAULT_PRN_REASON_ENTRIES: PrnReasonDictionaryEntry[];
|
|
73
78
|
export declare const DEFAULT_PRN_REASON_DEFINITIONS: Record<string, PrnReasonDefinition>;
|
|
74
|
-
export interface AdditionalInstructionDictionaryEntry {
|
|
75
|
-
canonical: string;
|
|
76
|
-
definition: AdditionalInstructionDefinition;
|
|
77
|
-
terms: string[];
|
|
78
|
-
}
|
|
79
|
-
export declare const DEFAULT_ADDITIONAL_INSTRUCTION_ENTRIES: AdditionalInstructionDictionaryEntry[];
|
|
80
|
-
export declare const DEFAULT_ADDITIONAL_INSTRUCTION_DEFINITIONS: Record<string, AdditionalInstructionDefinition>;
|
|
81
79
|
/**
|
|
82
80
|
* Finds a default PRN reason definition by its SNOMED coding.
|
|
83
81
|
*/
|
|
84
82
|
export declare function findPrnReasonDefinitionByCoding(system: string, code: string): PrnReasonDefinition | undefined;
|
|
85
|
-
/**
|
|
86
|
-
* Finds a default additional instruction definition by its SNOMED coding.
|
|
87
|
-
*/
|
|
88
|
-
export declare function findAdditionalInstructionDefinitionByCoding(system: string, code: string): AdditionalInstructionDefinition | undefined;
|