ezmedicationinput 0.2.0 → 0.3.0-beta.1
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 +201 -10
- package/dist/adapters/canonical-course.d.ts +128 -0
- package/dist/adapters/r5-course.d.ts +24 -0
- package/dist/advice.d.ts +36 -5
- package/dist/body-site-lookup.d.ts +3 -0
- package/dist/body-site-spatial.d.ts +6 -2
- package/dist/body-site-target.d.ts +9 -3
- package/dist/canonical/compile.d.ts +79 -0
- package/dist/canonical/course.d.ts +352 -0
- package/dist/canonical/format-course.d.ts +36 -0
- package/dist/dosage-course.d.ts +294 -29
- package/dist/execution/calendar.d.ts +107 -0
- package/dist/execution/engine.d.ts +11 -0
- package/dist/fhir-quantity-operator.d.ts +53 -0
- package/dist/fhir-translations.d.ts +5 -6
- package/dist/fhir.d.ts +99 -14
- package/dist/format.d.ts +105 -3
- package/dist/hpsg/constructions.d.ts +11 -3
- package/dist/hpsg/defaults.d.ts +2 -0
- package/dist/hpsg/lexical-classes.d.ts +115 -4
- package/dist/hpsg/procedural-context.d.ts +3 -3
- package/dist/hpsg/projection.d.ts +28 -1
- package/dist/hpsg/rule-context.d.ts +104 -7
- package/dist/hpsg/rules/clinical-quantity-rules.d.ts +16 -7
- package/dist/hpsg/rules/condition-rules.d.ts +0 -1
- package/dist/hpsg/rules/core-rules.d.ts +3 -0
- package/dist/hpsg/rules/instruction-rules.d.ts +2 -0
- package/dist/hpsg/rules/prn-rules.d.ts +3 -1
- package/dist/hpsg/rules/timing-rules.d.ts +17 -1
- package/dist/hpsg/signature.d.ts +13 -3
- package/dist/hpsg/unification.d.ts +3 -1
- package/dist/i18n.d.ts +37 -1
- package/dist/index.cjs +63500 -46393
- package/dist/index.d.ts +21 -9
- package/dist/index.js +63491 -46393
- package/dist/instruction-action-locale-adapter.d.ts +31 -3
- package/dist/instruction-action-terminology.d.ts +23 -3
- package/dist/instruction-concept-terminology.d.ts +7 -0
- package/dist/instruction-graph-fhir.d.ts +8 -2
- package/dist/instruction-graph.d.ts +80 -38
- package/dist/ir.d.ts +1 -1
- package/dist/lexer/surface-segmenter.d.ts +1 -1
- package/dist/lexer/surface.d.ts +1 -0
- package/dist/locale-detection.d.ts +3 -0
- package/dist/locales/course/en.d.ts +15 -0
- package/dist/locales/course/th.d.ts +12 -0
- package/dist/localization.d.ts +73 -0
- package/dist/maps.d.ts +10 -2
- package/dist/medication-condition.d.ts +1 -1
- package/dist/parser-state.d.ts +2 -2
- package/dist/regimen/grammar.d.ts +11 -0
- package/dist/regimen/parallel-course.d.ts +8 -41
- package/dist/regimen/regimen.d.ts +6 -2
- package/dist/relation-terminology.d.ts +1 -0
- package/dist/schedule.d.ts +14 -10
- package/dist/timing-summary.d.ts +82 -1
- package/dist/types.d.ts +510 -56
- package/dist/unit-lexicon.d.ts +7 -0
- package/dist/utils/text.d.ts +3 -0
- package/dist/utils/units.d.ts +19 -0
- package/package.json +1 -1
package/dist/unit-lexicon.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FhirPeriodUnit } from "./types";
|
|
1
2
|
import type { DoseUnitApproximation, DoseUnitKind, DoseUnitSemantics, DoseUnitTerminologyEntry, MedicationContext, ParseOptions } from "./types";
|
|
2
3
|
export declare function normalizeUnit(token: string, options?: ParseOptions): string | undefined;
|
|
3
4
|
export declare function getDoseUnitKind(unit: string | undefined): DoseUnitKind | undefined;
|
|
@@ -6,3 +7,9 @@ export declare function getDoseUnitSemantics(unit: string | undefined, context?:
|
|
|
6
7
|
export declare function listDoseUnitTerminology(): DoseUnitTerminologyEntry[];
|
|
7
8
|
export declare function enforceHouseholdUnitPolicy(unit: string | undefined, options?: ParseOptions): string | undefined;
|
|
8
9
|
export declare function isDiscreteUnit(unit: string): boolean;
|
|
10
|
+
/** Interpret a quantity's time unit without changing its authored representation. */
|
|
11
|
+
export declare function getQuantityDurationUnit(quantity: {
|
|
12
|
+
code?: string;
|
|
13
|
+
unit?: string;
|
|
14
|
+
system?: string;
|
|
15
|
+
} | undefined): FhirPeriodUnit | undefined;
|
package/dist/utils/text.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export declare function isWhitespaceChar(char: string): boolean;
|
|
2
2
|
export declare function isLoosePhraseSeparatorChar(char: string): boolean;
|
|
3
3
|
export declare function normalizeLoosePhraseKey(value: string): string;
|
|
4
|
+
/** Single-pass list join with historical comma/conjunction placement.
|
|
5
|
+
* No slice() plus join() array allocation. */
|
|
6
|
+
export declare function joinLocalizedList(parts: readonly string[], conjunction: string): string;
|
package/dist/utils/units.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const MASS_UNITS: Record<string, number>;
|
|
2
2
|
export declare const VOLUME_UNITS: Record<string, number>;
|
|
3
3
|
export declare function getUnitCategory(unit?: string): "mass" | "volume" | "other";
|
|
4
|
+
/** Conversion groups retain the patient-weight denominator as a separate dimension. */
|
|
5
|
+
export declare function getUnitComparisonCategory(unit?: string): ReturnType<typeof getUnitCategory> | "mass-per-weight" | "volume-per-weight";
|
|
4
6
|
export declare function getBaseUnitFactor(unit?: string): number;
|
|
5
7
|
export declare function convertValue(value: number, fromUnit: string, toUnit: string, strength?: {
|
|
6
8
|
numerator: {
|
|
@@ -12,3 +14,20 @@ export declare function convertValue(value: number, fromUnit: string, toUnit: st
|
|
|
12
14
|
unit: string;
|
|
13
15
|
};
|
|
14
16
|
}): number | null;
|
|
17
|
+
type QuantityUnit = {
|
|
18
|
+
system?: string;
|
|
19
|
+
code?: string;
|
|
20
|
+
unit?: string;
|
|
21
|
+
};
|
|
22
|
+
/** Normalize equivalent count-unit labels before dimensional conversion. */
|
|
23
|
+
export declare function normalizeQuantityCapUnit(unit: string): string;
|
|
24
|
+
/** Coded identity ignores non-dimensional UCUM annotations, retaining annotation-only counts. */
|
|
25
|
+
export declare function quantityUnitIdentityCode(quantity: QuantityUnit): string | undefined;
|
|
26
|
+
/** Exact coding compares quantities without assigning an opaque code a dimension. */
|
|
27
|
+
export declare function sameCodedQuantityUnit(left: QuantityUnit | undefined, right: QuantityUnit | undefined): boolean;
|
|
28
|
+
/** The calculation unit shared by numeric comparison and compatible-unit indexing. */
|
|
29
|
+
export declare function getQuantityComparisonUnit(quantity: QuantityUnit | undefined): string;
|
|
30
|
+
/** Compare quantity identities before resolving their supported dimensional or
|
|
31
|
+
* plain-label units. Missing labels never make distinct coded quantities equal. */
|
|
32
|
+
export declare function convertQuantityValue(value: number, from: QuantityUnit | undefined, to: QuantityUnit | undefined, strength?: Parameters<typeof convertValue>[3]): number | null;
|
|
33
|
+
export {};
|
package/package.json
CHANGED