ezmedicationinput 0.1.54 → 0.1.56
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 +111 -25
- package/dist/advice.d.ts +1 -0
- package/dist/body-site-grammar.d.ts +3 -1
- package/dist/event-timing-expression.d.ts +8 -0
- package/dist/fhir.d.ts +10 -1
- package/dist/hpsg/constructions.d.ts +6 -0
- package/dist/hpsg/defaults.d.ts +1 -0
- package/dist/hpsg/feature-structure.d.ts +5 -0
- package/dist/hpsg/lexical-classes.d.ts +70 -7
- package/dist/hpsg/method-lexicon.d.ts +14 -14
- package/dist/hpsg/procedural-context.d.ts +10 -0
- package/dist/hpsg/rules/condition-rules.d.ts +4 -0
- package/dist/hpsg/rules/core-rules.d.ts +2 -0
- package/dist/hpsg/rules/instruction-rules.d.ts +1 -0
- package/dist/hpsg/rules/prn-rules.d.ts +11 -0
- package/dist/hpsg/rules/timing-rules.d.ts +28 -0
- package/dist/hpsg/segmenter.d.ts +2 -1
- package/dist/hpsg/signature.d.ts +54 -2
- package/dist/hpsg/type-system.d.ts +48 -0
- package/dist/i18n.d.ts +2 -0
- package/dist/index.cjs +25759 -9747
- package/dist/index.d.ts +11 -0
- package/dist/index.js +25720 -9744
- package/dist/instruction-action-terminology.d.ts +29 -0
- package/dist/instruction-concept-terminology.d.ts +26 -0
- package/dist/instruction-graph-fhir.d.ts +4 -0
- package/dist/instruction-graph.d.ts +23 -0
- package/dist/instruction-semantic-resolver.d.ts +4 -0
- package/dist/ir.d.ts +1 -0
- package/dist/lexer/locale.d.ts +8 -0
- package/dist/lexer/token-types.d.ts +2 -0
- package/dist/localized-timing.d.ts +1 -0
- package/dist/maps.d.ts +2 -8
- package/dist/parser-state.d.ts +16 -0
- package/dist/prn.d.ts +1 -0
- package/dist/relation-terminology.d.ts +101 -0
- package/dist/stable-structure.d.ts +1 -0
- package/dist/symptom-terminology.d.ts +12 -0
- package/dist/timing-summary.d.ts +2 -0
- package/dist/types.d.ts +284 -4
- package/package.json +6 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FhirCoding, MedicationInstructionActionDefinition, ParseOptions } from "./types";
|
|
2
|
+
export declare const MEDICATION_INSTRUCTION_ACTION_SYSTEM: string;
|
|
3
|
+
export interface MedicationInstructionActionCodeSystem {
|
|
4
|
+
resourceType: "CodeSystem";
|
|
5
|
+
url: string;
|
|
6
|
+
name: string;
|
|
7
|
+
title: string;
|
|
8
|
+
status: "active";
|
|
9
|
+
experimental: boolean;
|
|
10
|
+
caseSensitive: boolean;
|
|
11
|
+
content: "complete";
|
|
12
|
+
concept: Array<{
|
|
13
|
+
code: string;
|
|
14
|
+
display: string;
|
|
15
|
+
designation?: Array<{
|
|
16
|
+
language: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}>;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
export declare function normalizeActionSurface(value: string): string;
|
|
22
|
+
export declare function resolveMedicationInstructionSeparableAction(lead: string, particle: string, options?: ParseOptions): MedicationInstructionActionDefinition | undefined;
|
|
23
|
+
export declare function medicationInstructionActionIsSafetyScopeTarget(surface: string, options?: ParseOptions): boolean;
|
|
24
|
+
export declare function resolveMedicationInstructionAction(surface: string, options?: ParseOptions): MedicationInstructionActionDefinition | undefined;
|
|
25
|
+
export declare function getMedicationInstructionAction(code: string): MedicationInstructionActionDefinition | undefined;
|
|
26
|
+
export declare function listMedicationInstructionActions(): MedicationInstructionActionDefinition[];
|
|
27
|
+
export declare function buildMedicationInstructionActionCodeSystem(): MedicationInstructionActionCodeSystem;
|
|
28
|
+
export declare function medicationInstructionActionCoding(definition: MedicationInstructionActionDefinition): FhirCoding;
|
|
29
|
+
export declare function medicationInstructionActionCodings(definition: MedicationInstructionActionDefinition): FhirCoding[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FhirCoding, MedicationInstructionConceptDefinition, ParseOptions } from "./types";
|
|
2
|
+
export declare const MEDICATION_INSTRUCTION_CONCEPT_SYSTEM: string;
|
|
3
|
+
export interface MedicationInstructionConceptCodeSystem {
|
|
4
|
+
resourceType: "CodeSystem";
|
|
5
|
+
url: string;
|
|
6
|
+
name: string;
|
|
7
|
+
title: string;
|
|
8
|
+
status: "active";
|
|
9
|
+
experimental: boolean;
|
|
10
|
+
caseSensitive: boolean;
|
|
11
|
+
content: "complete";
|
|
12
|
+
concept: Array<{
|
|
13
|
+
code: string;
|
|
14
|
+
display: string;
|
|
15
|
+
designation?: Array<{
|
|
16
|
+
language: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}>;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
export declare function normalizeConceptSurface(value: string): string;
|
|
22
|
+
export declare function resolveMedicationInstructionConcept(surface: string, options?: ParseOptions): MedicationInstructionConceptDefinition | undefined;
|
|
23
|
+
export declare function getMedicationInstructionConcept(code: string): MedicationInstructionConceptDefinition | undefined;
|
|
24
|
+
export declare function listMedicationInstructionConcepts(): MedicationInstructionConceptDefinition[];
|
|
25
|
+
export declare function buildMedicationInstructionConceptCodeSystem(): MedicationInstructionConceptCodeSystem;
|
|
26
|
+
export declare function medicationInstructionConceptCodings(definition: MedicationInstructionConceptDefinition): FhirCoding[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CanonicalInstructionGraph, FhirExtension } from "./types";
|
|
2
|
+
export declare const MEDICATION_INSTRUCTION_GRAPH_EXTENSION_URL = "https://solublelabs.com/fhir/StructureDefinition/medication-instruction-graph";
|
|
3
|
+
export declare function buildInstructionGraphExtension(graph: CanonicalInstructionGraph | undefined): FhirExtension | undefined;
|
|
4
|
+
export declare function parseInstructionGraphExtension(extensions: FhirExtension[] | undefined): CanonicalInstructionGraph | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AdviceFrame, AdviceModality, CanonicalInstructionGraph, CanonicalSigClause, ParseOptions } from "./types";
|
|
2
|
+
export declare function parseInstructionActions(sourceText: string, baseOffset?: number, options?: ParseOptions): AdviceFrame[];
|
|
3
|
+
export declare function refreshInstructionGraphDerivedState(graph: CanonicalInstructionGraph): void;
|
|
4
|
+
export declare function buildInstructionGraph(input: string, clause: CanonicalSigClause, options?: ParseOptions): CanonicalInstructionGraph | undefined;
|
|
5
|
+
export declare function realizeInstructionAction(frame: AdviceFrame, locale?: string): string;
|
|
6
|
+
export declare function instructionGraphRepresentsText(graph: CanonicalInstructionGraph, text: string): boolean;
|
|
7
|
+
export declare function instructionGraphSingleActionRepresentsText(graph: CanonicalInstructionGraph, text: string): boolean;
|
|
8
|
+
export declare function instructionGraphRichPrimaryAction(clause: CanonicalSigClause): AdviceFrame | undefined;
|
|
9
|
+
export declare function instructionGraphPrimaryAdministrationModality(clause: CanonicalSigClause): AdviceModality | undefined;
|
|
10
|
+
export declare function instructionGraphHasNovelNonWarningContent(graph: CanonicalInstructionGraph, representedTexts: readonly string[]): boolean;
|
|
11
|
+
export declare function realizeInstructionGraph(graph: CanonicalInstructionGraph, locale?: string, options?: {
|
|
12
|
+
includeWarnings?: boolean;
|
|
13
|
+
onlyWarnings?: boolean;
|
|
14
|
+
omitCanonicalAdministration?: CanonicalSigClause;
|
|
15
|
+
/** Prefer each understood action's exact source wording when source and target locales match. */
|
|
16
|
+
preferSourceText?: boolean;
|
|
17
|
+
/** Source phrases already rendered through another semantic channel. */
|
|
18
|
+
omitSourceTexts?: readonly string[];
|
|
19
|
+
/** Restrict realization around the canonical primary administration source span. */
|
|
20
|
+
position?: "all" | "pre" | "post";
|
|
21
|
+
/** Prefer deliberately unambiguous lexical labels when generating parse-safe text. */
|
|
22
|
+
roundtripSafe?: boolean;
|
|
23
|
+
}): string | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ParserState } from "./parser-state";
|
|
2
|
+
import { ParseOptions } from "./types";
|
|
3
|
+
export declare function applyInstructionSemanticResolvers(internal: ParserState, options?: ParseOptions): void;
|
|
4
|
+
export declare function applyInstructionSemanticResolversAsync(internal: ParserState, options?: ParseOptions): Promise<void>;
|
package/dist/ir.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ParserState } from "./parser-state";
|
|
2
2
|
import { CanonicalSigClause } from "./types";
|
|
3
|
+
export declare function canonicalClauseHasAdministrationSemantics(clause: CanonicalSigClause): boolean;
|
|
3
4
|
export declare function buildCanonicalSigClauses(internal: ParserState): CanonicalSigClause[];
|
|
4
5
|
export declare function shiftCanonicalSigClauses(clauses: CanonicalSigClause[], offset: number): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LexToken } from "./token-types";
|
|
2
|
+
export interface MedicationLocaleLexeme {
|
|
3
|
+
surface: string;
|
|
4
|
+
canonical: string;
|
|
5
|
+
}
|
|
6
|
+
/** Parser-owned locale lexemes for bounded autocomplete/discovery surfaces. */
|
|
7
|
+
export declare function listMedicationLocaleLexemes(locale: string): MedicationLocaleLexeme[];
|
|
8
|
+
export declare function applyLocaleLexicon(tokens: readonly LexToken[], input: string): LexToken[];
|
|
@@ -5,6 +5,7 @@ export interface LocalizedTimingGrammar {
|
|
|
5
5
|
readonly whenText: Partial<Record<EventTiming, string>>;
|
|
6
6
|
joinList(parts: string[]): string;
|
|
7
7
|
summarizeMealTimingGroup(group: MealTimingGroup): string;
|
|
8
|
+
formatEventOffset?(eventText: string, schedule: CanonicalScheduleExpr): string;
|
|
8
9
|
bedtimeJoinStyle?(dailyCount: number | undefined): BedtimeJoinStyle;
|
|
9
10
|
}
|
|
10
11
|
export declare function filterLocalizedWhenEvents(schedule: CanonicalScheduleExpr | undefined): EventTiming[];
|
package/dist/maps.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BodySiteDefinition, EventTiming, FhirDayOfWeek, FhirPeriodUnit, PrnReasonDefinition, RouteCode, SNOMEDCTRouteCodes } from "./types";
|
|
2
|
+
import { type SymptomDictionaryEntry } from "./symptom-terminology";
|
|
2
3
|
/**
|
|
3
4
|
* SNOMED CT codings aligned with every known RouteCode. Keeping the structure
|
|
4
5
|
* data-driven ensures any additions to the enumeration are surfaced
|
|
@@ -70,15 +71,8 @@ export declare const DEFAULT_UNIT_BY_NORMALIZED_FORM: Record<string, string>;
|
|
|
70
71
|
export declare const DEFAULT_UNIT_BY_ROUTE: Partial<Record<RouteCode, string>>;
|
|
71
72
|
export declare function normalizePrnReasonKey(value: string): string;
|
|
72
73
|
export declare function normalizeAdditionalInstructionKey(value: string): string;
|
|
73
|
-
export
|
|
74
|
-
canonical: string;
|
|
75
|
-
definition: PrnReasonDefinition;
|
|
76
|
-
terms: string[];
|
|
77
|
-
}
|
|
74
|
+
export type PrnReasonDictionaryEntry = SymptomDictionaryEntry;
|
|
78
75
|
export declare const DEFAULT_PRN_REASON_ENTRIES: PrnReasonDictionaryEntry[];
|
|
79
76
|
export declare const DEFAULT_PRN_REASON_DEFINITIONS: Record<string, PrnReasonDefinition>;
|
|
80
|
-
/**
|
|
81
|
-
* Finds a default PRN reason definition by its SNOMED coding.
|
|
82
|
-
*/
|
|
83
77
|
export declare function findPrnReasonDefinitionByCoding(system: string, code: string): PrnReasonDefinition | undefined;
|
|
84
78
|
export {};
|
package/dist/parser-state.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export declare class ParserState {
|
|
|
49
49
|
set methodCoding(value: LocalizedCoding | undefined);
|
|
50
50
|
get count(): number | undefined;
|
|
51
51
|
set count(value: number | undefined);
|
|
52
|
+
get countMax(): number | undefined;
|
|
53
|
+
set countMax(value: number | undefined);
|
|
52
54
|
get duration(): number | undefined;
|
|
53
55
|
set duration(value: number | undefined);
|
|
54
56
|
get durationMax(): number | undefined;
|
|
@@ -65,22 +67,36 @@ export declare class ParserState {
|
|
|
65
67
|
set periodMax(value: number | undefined);
|
|
66
68
|
get periodUnit(): FhirPeriodUnit | undefined;
|
|
67
69
|
set periodUnit(value: FhirPeriodUnit | undefined);
|
|
70
|
+
get offset(): number | undefined;
|
|
71
|
+
set offset(value: number | undefined);
|
|
72
|
+
get offsetMin(): number | undefined;
|
|
73
|
+
set offsetMin(value: number | undefined);
|
|
74
|
+
get offsetMax(): number | undefined;
|
|
75
|
+
set offsetMax(value: number | undefined);
|
|
68
76
|
get dayOfWeek(): FhirDayOfWeek[];
|
|
69
77
|
get when(): EventTiming[];
|
|
70
78
|
get timeOfDay(): string[] | undefined;
|
|
71
79
|
set timeOfDay(value: string[] | undefined);
|
|
80
|
+
get activityTiming(): import("./types").CanonicalActivityTimingExpr[] | undefined;
|
|
81
|
+
set activityTiming(value: import("./types").CanonicalActivityTimingExpr[] | undefined);
|
|
82
|
+
get occurrenceCap(): import("./types").CanonicalOccurrenceCapExpr | undefined;
|
|
83
|
+
set occurrenceCap(value: import("./types").CanonicalOccurrenceCapExpr | undefined);
|
|
72
84
|
get timingCode(): string | undefined;
|
|
73
85
|
set timingCode(value: string | undefined);
|
|
74
86
|
get asNeeded(): boolean | undefined;
|
|
75
87
|
set asNeeded(value: boolean | undefined);
|
|
76
88
|
get asNeededReason(): string | undefined;
|
|
77
89
|
set asNeededReason(value: string | undefined);
|
|
90
|
+
get asNeededReasonTriggerPhase(): "onset" | undefined;
|
|
91
|
+
set asNeededReasonTriggerPhase(value: "onset" | undefined);
|
|
78
92
|
get asNeededReasons(): CanonicalPrnReasonExpr[] | undefined;
|
|
79
93
|
set asNeededReasons(value: CanonicalPrnReasonExpr[] | undefined);
|
|
80
94
|
get asNeededReasonCoding(): LocalizedCoding | undefined;
|
|
81
95
|
set asNeededReasonCoding(value: LocalizedCoding | undefined);
|
|
82
96
|
get siteText(): string | undefined;
|
|
83
97
|
set siteText(value: string | undefined);
|
|
98
|
+
get siteI18n(): Record<string, string> | undefined;
|
|
99
|
+
set siteI18n(value: Record<string, string> | undefined);
|
|
84
100
|
get siteSource(): "abbreviation" | "text" | "selection" | "resolver" | undefined;
|
|
85
101
|
set siteSource(value: "abbreviation" | "text" | "selection" | "resolver" | undefined);
|
|
86
102
|
get siteCoding(): LocalizedCoding | undefined;
|
package/dist/prn.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ import { CanonicalPrnReasonExpr } from "./types";
|
|
|
2
2
|
export declare function getCanonicalPrnReasonText(reason: CanonicalPrnReasonExpr | undefined): string | undefined;
|
|
3
3
|
export declare function joinCanonicalPrnReasonTexts(reasons: CanonicalPrnReasonExpr[] | undefined, conjunction?: string): string | undefined;
|
|
4
4
|
export declare function getPreferredCanonicalPrnReasonText(reason: CanonicalPrnReasonExpr | undefined, reasons: CanonicalPrnReasonExpr[] | undefined, conjunction?: string): string | undefined;
|
|
5
|
+
export declare function getLocalizedCanonicalPrnReasonText(reason: CanonicalPrnReasonExpr | undefined, reasons: CanonicalPrnReasonExpr[] | undefined, locale: string, conjunction?: string): string | undefined;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { AdviceRelation, FhirCoding } from "./types";
|
|
2
|
+
type SupportedLocale = "en" | "th";
|
|
3
|
+
declare const BODY_SITE_LOCATIVE_RELATION_VALUES: readonly ["above", "around", "behind", "below", "beneath", "under", "inside", "near", "outside", "between", "along"];
|
|
4
|
+
export type BodySiteLocativeRelation = typeof BODY_SITE_LOCATIVE_RELATION_VALUES[number];
|
|
5
|
+
export type BodySiteRelationRenderStrategy = "prefix" | "partitive" | "suffix";
|
|
6
|
+
export interface RelationLocaleLexeme {
|
|
7
|
+
surface: string;
|
|
8
|
+
canonical: string;
|
|
9
|
+
splitPrefix?: boolean;
|
|
10
|
+
/** Preferred semantic relation when a locale surface is lexically ambiguous. */
|
|
11
|
+
defaultForAmbiguousSurface?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface AdviceRelationGrammarFeatures {
|
|
14
|
+
preposedAction?: boolean;
|
|
15
|
+
conditionScope?: boolean;
|
|
16
|
+
conditionalTail?: boolean;
|
|
17
|
+
detectInActionGap?: boolean;
|
|
18
|
+
timeComplement?: boolean;
|
|
19
|
+
rinseTimeComplement?: boolean;
|
|
20
|
+
durationComplement?: boolean;
|
|
21
|
+
activityFallback?: boolean;
|
|
22
|
+
includeDuration?: boolean;
|
|
23
|
+
negatedObjectAttachment?: boolean;
|
|
24
|
+
negatedRelationTarget?: boolean;
|
|
25
|
+
accompanimentComplement?: boolean;
|
|
26
|
+
directTimeRealization?: boolean;
|
|
27
|
+
timeRealizationProfile?: string;
|
|
28
|
+
symptomOnsetPrnLead?: boolean;
|
|
29
|
+
roundtripRichRelation?: boolean;
|
|
30
|
+
mealStateComplement?: boolean;
|
|
31
|
+
workflowStart?: boolean;
|
|
32
|
+
workflowActionLead?: boolean;
|
|
33
|
+
conditionalInstructionExclusive?: boolean;
|
|
34
|
+
durationLead?: boolean;
|
|
35
|
+
instructionStart?: boolean;
|
|
36
|
+
freeTextDirectiveStart?: boolean;
|
|
37
|
+
defaultSequenceRelation?: boolean;
|
|
38
|
+
defaultSiteRelation?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface AdviceRelationDefinition {
|
|
41
|
+
relation: AdviceRelation;
|
|
42
|
+
semanticClass: string;
|
|
43
|
+
grammar: AdviceRelationGrammarFeatures;
|
|
44
|
+
actionSurfaces: string[];
|
|
45
|
+
adviceSurfaces: string[];
|
|
46
|
+
sequenceMarkerSurfaces: string[];
|
|
47
|
+
sequenceRelationSurfaces: string[];
|
|
48
|
+
localeLexemes: Partial<Record<SupportedLocale, RelationLocaleLexeme[]>>;
|
|
49
|
+
realization: Record<SupportedLocale, string>;
|
|
50
|
+
realizationProfiles: Record<string, Partial<Record<SupportedLocale, string>>>;
|
|
51
|
+
}
|
|
52
|
+
export interface BodySiteRelationGrammarFeatures {
|
|
53
|
+
externalSiteLocativePrefix?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface BodySiteRelationRealization {
|
|
56
|
+
surface: string;
|
|
57
|
+
strategy: BodySiteRelationRenderStrategy;
|
|
58
|
+
article?: "the" | "none";
|
|
59
|
+
omitOuterSitePreposition?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface BodySiteRelationDefinition {
|
|
62
|
+
canonical: string;
|
|
63
|
+
aliases: string[];
|
|
64
|
+
locative: boolean;
|
|
65
|
+
grammar: BodySiteRelationGrammarFeatures;
|
|
66
|
+
localeLexemes: Partial<Record<SupportedLocale, RelationLocaleLexeme[]>>;
|
|
67
|
+
coding?: FhirCoding;
|
|
68
|
+
realization: Partial<Record<SupportedLocale, BodySiteRelationRealization>>;
|
|
69
|
+
}
|
|
70
|
+
export declare const ACTION_SEQUENCE_MARKERS: ReadonlySet<string>;
|
|
71
|
+
export declare const ACTION_SEQUENCE_RELATION_SURFACES: ReadonlySet<string>;
|
|
72
|
+
export declare function resolveActionRelationSurfaceCandidates(surface: string): readonly AdviceRelation[];
|
|
73
|
+
export declare function resolveActionRelationSurface(surface: string, preferredSemanticClasses?: readonly string[]): AdviceRelation | undefined;
|
|
74
|
+
export declare function resolveActionRelationSurfaceByGrammarFeature(surface: string, feature: keyof AdviceRelationGrammarFeatures): AdviceRelation | undefined;
|
|
75
|
+
export declare function resolveAdviceRelationSurface(surface: string): AdviceRelation | undefined;
|
|
76
|
+
export declare function getAdviceRelationDefinition(relation: AdviceRelation): AdviceRelationDefinition | undefined;
|
|
77
|
+
export declare function relationHasGrammarFeature(relation: AdviceRelation | undefined, feature: keyof AdviceRelationGrammarFeatures): boolean;
|
|
78
|
+
export declare function getUniqueAdviceRelationByGrammarFeature(feature: keyof AdviceRelationGrammarFeatures): AdviceRelation | undefined;
|
|
79
|
+
export declare function relationHasSemanticClass(relation: AdviceRelation | undefined, semanticClass: string): boolean;
|
|
80
|
+
export declare function getAdviceRelationSurfaceForms(relation: AdviceRelation): readonly string[];
|
|
81
|
+
export declare function localizeAdviceRelation(relation: AdviceRelation | undefined, locale: string, profile?: string): string | undefined;
|
|
82
|
+
export declare function listAdviceRelationDefinitions(): AdviceRelationDefinition[];
|
|
83
|
+
export declare function getAdviceRelationCanonicalSetByGrammarFeature(feature: keyof AdviceRelationGrammarFeatures): ReadonlySet<string>;
|
|
84
|
+
export declare const BODY_SITE_EXTERNAL_LOCATIVE_PREFIXES: ReadonlySet<string>;
|
|
85
|
+
export declare const BODY_SITE_LOCATIVE_RELATIONS: ReadonlySet<BodySiteLocativeRelation>;
|
|
86
|
+
export declare const BODY_SITE_LOCATIVE_RELATION_ALIASES: ReadonlyMap<string, string>;
|
|
87
|
+
export declare const BODY_SITE_LOCATIVE_RELATION_PHRASES: ReadonlyMap<string, string>;
|
|
88
|
+
export declare const BODY_SITE_SPATIAL_RELATION_CODINGS: ReadonlyMap<string, FhirCoding>;
|
|
89
|
+
export declare const BODY_SITE_LOCATIVE_LEAD_TOKENS: ReadonlySet<string>;
|
|
90
|
+
export declare function normalizeBodySiteRelation(value: string): string | undefined;
|
|
91
|
+
export declare function getBodySiteRelationDefinition(value: string): BodySiteRelationDefinition | undefined;
|
|
92
|
+
export declare function getBodySiteRelationRealization(value: string, locale: string): BodySiteRelationRealization | undefined;
|
|
93
|
+
export declare function listBodySiteRelationDefinitions(): BodySiteRelationDefinition[];
|
|
94
|
+
export declare function getRelationLocaleLexemeAliases(locale: string): Map<string, string>;
|
|
95
|
+
export declare function getRelationLocaleSuggestionLexemes(locale: string): RelationLocaleLexeme[];
|
|
96
|
+
export declare function getRelationLocalePhrases(locale: string): Array<{
|
|
97
|
+
parts: string[];
|
|
98
|
+
canonical: string;
|
|
99
|
+
}>;
|
|
100
|
+
export declare function getRelationSplitPrefixes(locale: string): string[];
|
|
101
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function stableStructureKey(value: unknown): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SymptomDefinition } from "./types";
|
|
2
|
+
export interface SymptomDictionaryEntry {
|
|
3
|
+
canonical: string;
|
|
4
|
+
definition: SymptomDefinition;
|
|
5
|
+
terms: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function normalizeSymptomKey(value: string): string;
|
|
8
|
+
export declare const DEFAULT_SYMPTOM_ENTRIES: SymptomDictionaryEntry[];
|
|
9
|
+
export declare const DEFAULT_SYMPTOM_DEFINITIONS: Record<string, SymptomDefinition>;
|
|
10
|
+
export declare function resolveSymptomDefinition(surface: string, ...customMaps: Array<Record<string, SymptomDefinition> | undefined>): SymptomDefinition | undefined;
|
|
11
|
+
export declare function findSymptomDefinitionByCoding(system: string, code: string): SymptomDefinition | undefined;
|
|
12
|
+
export declare function listSymptomDefinitions(): SymptomDefinition[];
|
package/dist/timing-summary.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { EventTiming, FhirDayOfWeek, FhirPeriodUnit } from "./types";
|
|
2
2
|
export interface TimingSummaryOptions {
|
|
3
|
+
realizationMode?: "normalized" | "roundtrip";
|
|
3
4
|
groupMealTimingsByRelation?: boolean;
|
|
4
5
|
includeTimesPerDaySummary?: boolean;
|
|
6
|
+
sitePlacement?: "natural" | "trailing";
|
|
5
7
|
}
|
|
6
8
|
export type MealRelation = "before" | "after" | "with";
|
|
7
9
|
export type MealName = "breakfast" | "lunch" | "dinner";
|