ezmedicationinput 0.1.56 → 0.1.58
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/body-site-grammar.d.ts +18 -0
- package/dist/hpsg/signature.d.ts +3 -0
- package/dist/hpsg/timing-lexicon.d.ts +6 -0
- package/dist/index.cjs +678 -209
- package/dist/index.js +678 -209
- package/dist/instruction-graph.d.ts +2 -0
- package/dist/relation-terminology.d.ts +1 -0
- package/package.json +11 -11
|
@@ -2,23 +2,41 @@ import { BodySiteDefinition, BodySiteSpatialRelation, FhirCoding } from "./types
|
|
|
2
2
|
import type { BodySiteLocativeRelation } from "./relation-terminology";
|
|
3
3
|
export type BodySiteGrammarKind = "nominal" | "partitive" | "locative";
|
|
4
4
|
export type { BodySiteLocativeRelation };
|
|
5
|
+
export type BodySiteQualifierFeatures = {
|
|
6
|
+
kind: "symptom";
|
|
7
|
+
relation: string;
|
|
8
|
+
text: string;
|
|
9
|
+
canonical: string;
|
|
10
|
+
coding?: FhirCoding;
|
|
11
|
+
i18n?: Record<string, string>;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "site";
|
|
14
|
+
relation: string;
|
|
15
|
+
text: string;
|
|
16
|
+
targetText: string;
|
|
17
|
+
targetCoding?: FhirCoding;
|
|
18
|
+
};
|
|
5
19
|
export interface BodySiteNominalFeatures {
|
|
6
20
|
kind: "nominal";
|
|
7
21
|
text: string;
|
|
8
22
|
canonical: string;
|
|
9
23
|
coding?: FhirCoding;
|
|
10
24
|
article: "definite" | "bare";
|
|
25
|
+
qualifier?: BodySiteQualifierFeatures;
|
|
11
26
|
}
|
|
12
27
|
export interface BodySitePartitiveFeatures {
|
|
13
28
|
kind: "partitive";
|
|
14
29
|
part: string;
|
|
15
30
|
relationKey?: string;
|
|
16
31
|
whole: BodySiteNominalFeatures;
|
|
32
|
+
attributive?: boolean;
|
|
33
|
+
qualifier?: BodySiteQualifierFeatures;
|
|
17
34
|
}
|
|
18
35
|
export interface BodySiteLocativeFeatures {
|
|
19
36
|
kind: "locative";
|
|
20
37
|
relation: BodySiteLocativeRelation;
|
|
21
38
|
target: BodySiteNominalFeatures | BodySitePartitiveFeatures;
|
|
39
|
+
qualifier?: BodySiteQualifierFeatures;
|
|
22
40
|
}
|
|
23
41
|
export type BodySiteFeatureStructure = BodySiteNominalFeatures | BodySitePartitiveFeatures | BodySiteLocativeFeatures;
|
|
24
42
|
export interface ResolvedBodySitePhrase {
|
package/dist/hpsg/signature.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export type HpsgType = "sign" | "word-sign" | "phrase-sign" | "headed-phrase" |
|
|
|
5
5
|
export interface HpsgEvidence {
|
|
6
6
|
rule: string;
|
|
7
7
|
tokenIndices: number[];
|
|
8
|
+
/** Lexical evidence that a schedule field is an inferred, construction-local default. */
|
|
9
|
+
scheduleDefault?: "daily-frequency";
|
|
8
10
|
}
|
|
9
11
|
export type HpsgConstructionKind = "head-complement" | "head-adjunct" | "head-marker" | "procedure-sequence" | "conditional-instruction" | "coordination" | "administration-clause" | "generic";
|
|
10
12
|
export type HpsgConstructionOperation = "unify" | "scope";
|
|
@@ -166,4 +168,5 @@ export declare function lexicalSign(args: {
|
|
|
166
168
|
siteTokenIndices?: number[];
|
|
167
169
|
warnings?: string[];
|
|
168
170
|
score?: number;
|
|
171
|
+
scheduleDefault?: HpsgEvidence["scheduleDefault"];
|
|
169
172
|
}): HpsgSign;
|
|
@@ -17,6 +17,12 @@ export declare function normalizePeriodRange(low: number, high: number, unit: Fh
|
|
|
17
17
|
high: number;
|
|
18
18
|
unit: FhirPeriodUnit;
|
|
19
19
|
};
|
|
20
|
+
/** Normalize a range whose endpoints use different exact-duration units. */
|
|
21
|
+
export declare function normalizeMixedPeriodRange(low: number, lowUnit: FhirPeriodUnit, high: number, highUnit: FhirPeriodUnit): {
|
|
22
|
+
low: number;
|
|
23
|
+
high: number;
|
|
24
|
+
unit: FhirPeriodUnit;
|
|
25
|
+
} | undefined;
|
|
20
26
|
export declare function periodUnitSuffix(unit: FhirPeriodUnit): string | undefined;
|
|
21
27
|
export declare function applyPeriod(internal: ParserState, period: number, unit: FhirPeriodUnit): void;
|
|
22
28
|
export declare function buildPeriodScheduleFeature(period: number, unit: FhirPeriodUnit): HpsgScheduleFeature;
|