ezmedicationinput 0.1.67 → 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 +222 -28
- package/dist/adapters/canonical-course.d.ts +128 -0
- package/dist/adapters/r5-course.d.ts +24 -0
- package/dist/advice.d.ts +52 -1
- package/dist/body-site-grammar.d.ts +34 -1
- 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/date-interpretation.d.ts +2 -0
- package/dist/dosage-course.d.ts +453 -0
- 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 +233 -13
- package/dist/format.d.ts +113 -3
- package/dist/hpsg/constructions.d.ts +113 -0
- package/dist/hpsg/defaults.d.ts +2 -0
- package/dist/hpsg/lexical-classes.d.ts +282 -2
- package/dist/hpsg/procedural-context.d.ts +18 -4
- package/dist/hpsg/projection.d.ts +38 -3
- package/dist/hpsg/rule-context.d.ts +117 -7
- package/dist/hpsg/rules/clinical-quantity-rules.d.ts +18 -0
- package/dist/hpsg/rules/condition-rules.d.ts +14 -0
- package/dist/hpsg/rules/core-rules.d.ts +32 -0
- package/dist/hpsg/rules/instruction-rules.d.ts +11 -1
- package/dist/hpsg/rules/prn-rules.d.ts +3 -1
- package/dist/hpsg/rules/timing-rules.d.ts +138 -8
- package/dist/hpsg/signature.d.ts +353 -5
- package/dist/hpsg/type-system.d.ts +16 -1
- package/dist/hpsg/unification.d.ts +4 -1
- package/dist/i18n.d.ts +39 -1
- package/dist/index.cjs +65539 -30893
- package/dist/index.d.ts +35 -7
- package/dist/index.js +65505 -30892
- package/dist/instruction-action-locale-adapter.d.ts +32 -3
- package/dist/instruction-action-terminology.d.ts +38 -3
- package/dist/instruction-concept-terminology.d.ts +8 -1
- package/dist/instruction-graph-fhir.d.ts +9 -3
- package/dist/instruction-graph.d.ts +85 -7
- package/dist/ir.d.ts +13 -2
- 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 +24 -1
- package/dist/medication-condition.d.ts +42 -0
- package/dist/parser-state.d.ts +6 -2
- package/dist/parser.d.ts +5 -2
- package/dist/regimen/coordination-scope.d.ts +53 -0
- package/dist/regimen/grammar.d.ts +79 -0
- package/dist/regimen/parallel-course.d.ts +52 -0
- package/dist/regimen/planner.d.ts +19 -0
- package/dist/regimen/regimen.d.ts +70 -0
- package/dist/relation-terminology.d.ts +1 -0
- package/dist/schedule.d.ts +12 -5
- package/dist/stable-structure.d.ts +23 -1
- package/dist/timing-summary.d.ts +82 -1
- package/dist/types.d.ts +899 -40
- package/dist/unit-lexicon.d.ts +7 -0
- package/dist/utils/strength.d.ts +16 -0
- package/dist/utils/text.d.ts +3 -0
- package/dist/utils/units.d.ts +19 -0
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { CanonicalCourse, CanonicalAdministration } from "./canonical/course";
|
|
2
|
+
/** Internal native import/projection helpers. Existing .fhir / .fhirNext fields retain
|
|
3
|
+
* their established versions; canonical is the internal source of meaning. */
|
|
4
|
+
export type { CanonicalCourse, CanonicalStage, CanonicalAdministration, CanonicalRecurrence, CanonicalTiming, CanonicalBoundary, CanonicalAmount, CanonicalDoseLimit, CanonicalMeasure, CanonicalRange, CanonicalRatio, CanonicalScheduleInput, CanonicalSupplyOptions } from "./canonical/course";
|
|
5
|
+
export { importCanonicalCourse } from "./adapters/canonical-course";
|
|
6
|
+
export { formatCanonicalCourse, formatCanonicalAdministration } from "./canonical/format-course";
|
|
7
|
+
export declare function projectCanonicalCourse(course: CanonicalCourse, options?: ParseOptions): {
|
|
8
|
+
fhir: FhirDosage[];
|
|
9
|
+
fhirNext: FhirR6DosageInstruction;
|
|
10
|
+
};
|
|
11
|
+
import { toFhirR5Dosages as toFhirR5DosagesInternal } from "./dosage-course";
|
|
12
|
+
import { FhirDosage, EzDosage, FhirR6DosageInstruction, FhirR6DosageInstructionInput, FormatBatchOptions, FormatOptions, LintBatchResult, ParseBatchResult, ParseOptions, ParseResult } from "./types";
|
|
13
|
+
export { TIMING_FREQUENCY_MIN_EXTENSION_URL, TIMING_OFFSET_MIN_EXTENSION_URL, TIMING_OFFSET_MAX_EXTENSION_URL, TIMING_OFFSET_EXACT_EXTENSION_URL, TIMING_ACTIVITY_WINDOW_EXTENSION_URL, TIMING_OCCURRENCE_CAP_EXTENSION_URL, TIMING_EVENT_CALENDAR_SOURCE_EXTENSION_URL, PRN_TRIGGER_PHASE_EXTENSION_URL, INFUSION_CARRIER_MATERIAL_EXTENSION_URL, buildInfusionCarrierMaterialStructureDefinition, getTimingOccurrenceCap } from "./fhir";
|
|
3
14
|
export { suggestSig } from "./suggest";
|
|
15
|
+
export { EMA_QUANTITY_COMPARATOR_EXTENSION_URL, EMA_QUANTITY_OPERATOR_SYSTEM, FHIR_QUANTITY_COMPARATOR_SYSTEM, getEmaQuantityComparator } from "./fhir-quantity-operator";
|
|
4
16
|
export { parseInstructionActions, realizeInstructionGraph } from "./instruction-graph";
|
|
5
17
|
export { getInstructionActionLocaleAdapter, registerInstructionActionLocaleAdapter } from "./instruction-action-locale-adapter";
|
|
6
18
|
export type { InstructionActionLocaleAdapter, InstructionActionRealizationInput } from "./instruction-action-locale-adapter";
|
|
@@ -14,7 +26,7 @@ export { listMedicationSurfaceSegmenters, registerIntlMedicationSurfaceSegmenter
|
|
|
14
26
|
export type { MedicationSurfaceSegment, MedicationSurfaceSegmenter } from "./lexer/surface-segmenter";
|
|
15
27
|
export { getSuggestLocaleAdapter, registerSuggestLocaleAdapter } from "./suggest-locale-adapter";
|
|
16
28
|
export type { SuggestLocaleAdapter, SuggestLocaleLexemeResolver, SuggestLocaleUnitRoutePair } from "./suggest-locale-adapter";
|
|
17
|
-
export { MEDICATION_INSTRUCTION_ACTION_SYSTEM, buildMedicationInstructionActionCodeSystem, getMedicationInstructionAction, listMedicationInstructionActions, resolveMedicationInstructionAction, resolveMedicationInstructionSequenceAction } from "./instruction-action-terminology";
|
|
29
|
+
export { MEDICATION_INSTRUCTION_ACTION_SYSTEM, buildMedicationInstructionActionCodeSystem, getMedicationInstructionAction, listMedicationInstructionActions, resolveMedicationInstructionActionWithCodeFallback as resolveMedicationInstructionAction, resolveMedicationInstructionSequenceAction } from "./instruction-action-terminology";
|
|
18
30
|
export type { MedicationInstructionActionCodeSystem } from "./instruction-action-terminology";
|
|
19
31
|
export { MEDICATION_INSTRUCTION_CONCEPT_SYSTEM, buildMedicationInstructionConceptCodeSystem, getMedicationInstructionConcept, listMedicationInstructionConcepts, resolveMedicationInstructionConcept } from "./instruction-concept-terminology";
|
|
20
32
|
export type { MedicationInstructionConceptCodeSystem } from "./instruction-concept-terminology";
|
|
@@ -24,8 +36,11 @@ export { getAdviceRelationDefinition, getBodySiteRelationDefinition, getBodySite
|
|
|
24
36
|
export type { AdviceRelationDefinition, AdviceRelationGrammarFeatures, BodySiteLocativeRelation, BodySiteRelationDefinition, BodySiteRelationGrammarFeatures, BodySiteRelationRealization, RelationLocaleLexeme } from "./relation-terminology";
|
|
25
37
|
export { MEDICATION_INSTRUCTION_GRAPH_EXTENSION_URL, buildInstructionGraphExtension, parseInstructionGraphExtension } from "./instruction-graph-fhir";
|
|
26
38
|
export * from "./types";
|
|
27
|
-
export { nextDueDoses, calculateTotalUnits } from "./schedule";
|
|
28
|
-
export {
|
|
39
|
+
export { nextDueDoses, calculateTotalUnits, MedicationQuantityCalculationError } from "./schedule";
|
|
40
|
+
export { toDosageDetails, toEzDosages, fromDosageDetails, projectEditableR5Course, getDosageCondition, setDosageCondition, getDosageExcludedDates, setDosageExcludedDates, getDosageExcludedWeekdays, setDosageExcludedWeekdays, DOSAGE_CONDITION_R5_URL, DOSAGE_EXCLUDED_DATES_R5_URL, DOSAGE_EXCLUDED_WEEKDAYS_R5_URL, DOSAGE_DETAILS_R5_URL, DOSAGE_ALTERNATIVE_CHOICE_URL, getDosageAlternativeChoice, setDosageAlternativeChoice, buildDosageAlternativeChoiceStructureDefinition } from "./dosage-course";
|
|
41
|
+
export type { DosageAlternativeChoice } from "./dosage-course";
|
|
42
|
+
export { evaluateMedicationCondition } from "./medication-condition";
|
|
43
|
+
export { parseStrength, parseStrengthIntoRatio, parseStrengthComponents } from "./utils/strength";
|
|
29
44
|
export { getDoseUnitApproximation, getDoseUnitKind, getDoseUnitSemantics, listDoseUnitTerminology } from "./unit-lexicon";
|
|
30
45
|
export { buildBodySiteTopographicalModifierCoding, getBodySiteCode, getBodySiteCodeAsync, getBodySiteText, getBodySiteTextAsync, listSupportedBodySiteGrammar, listSupportedBodySiteText, lookupBodySite, lookupBodySiteAsync, suggestBodySiteText, suggestBodySites } from "./body-site-lookup";
|
|
31
46
|
export type { BodySiteGrammarVocabulary, BodySiteLookupOptions, BodySiteLookupRequest, BodySiteLookupResult, BodySiteResolver, BodySiteTextLookupRequest, BodySiteTextOptions, BodySiteTextResolver, BodySiteVocabularyOptions } from "./body-site-lookup";
|
|
@@ -34,13 +49,26 @@ export { BODY_SITE_SPATIAL_RELATION_EXTENSION_URL, buildBodySiteSpatialRelationE
|
|
|
34
49
|
export { SNOMED_CT_FINDING_SITE_ATTRIBUTE_CODE, SNOMED_CT_FINDING_SITE_ATTRIBUTE_DISPLAY, SNOMED_CT_BILATERAL_QUALIFIER_CODE, SNOMED_CT_BILATERAL_QUALIFIER_DISPLAY, SNOMED_CT_LATERALITY_ATTRIBUTE_CODE, SNOMED_CT_LATERALITY_ATTRIBUTE_DISPLAY, SNOMED_CT_LEFT_QUALIFIER_CODE, SNOMED_CT_LEFT_QUALIFIER_DISPLAY, SNOMED_CT_RIGHT_QUALIFIER_CODE, SNOMED_CT_RIGHT_QUALIFIER_DISPLAY, SNOMED_CT_TOPOGRAPHICAL_MODIFIER_CODE, SNOMED_CT_TOPOGRAPHICAL_MODIFIER_DISPLAY, SNOMED_SYSTEM } from "./snomed";
|
|
35
50
|
export { buildSnomedBodySiteLateralityPostcoordinationCode, buildSnomedBodySiteTopographicalModifierPostcoordinationCode, buildSnomedFindingSiteCoding, buildSnomedFindingSitePostcoordinationCode, hasSnomedBodySiteLateralityPostcoordination, hasSnomedFindingSitePostcoordination, hasSnomedTopographicalModifierPostcoordination, parseSnomedBodySiteLateralityPostcoordinationCode, parseSnomedBodySiteTopographicalModifierPostcoordinationCode, parseSnomedFindingSitePostcoordinationCode } from "./snomed-postcoordination";
|
|
36
51
|
export { getRegisteredSigLocalizations, registerSigLocalization, resolveSigLocalization, resolveSigTranslation } from "./i18n";
|
|
37
|
-
export type { SigLocalization, SigLocalizationConfig, SigTranslation, SigTranslationConfig } from "./i18n";
|
|
52
|
+
export type { CourseLanguage, SigLocalization, SigLocalizationConfig, SigTranslation, SigTranslationConfig } from "./i18n";
|
|
38
53
|
export { findMedicationDateListSpans, listMedicationDateResolvers, parseMedicationDateListAt, registerMedicationDateResolver } from "./date-interpretation";
|
|
39
54
|
export { DEFAULT_BODY_SITE_SNOMED, DEFAULT_BODY_SITE_SNOMED_SOURCE, DEFAULT_ROUTE_SYNONYMS, DEFAULT_UNIT_BY_ROUTE, KNOWN_DOSAGE_FORMS_TO_DOSE } from './maps';
|
|
55
|
+
/** The public strict R5 converter must carry the same in-memory FHIR contract
|
|
56
|
+
* as parseSig().fhir; callers need not JSON-serialize before schema validation.
|
|
57
|
+
* @param input Structured R6 course or existing R5/Ez dosage rows.
|
|
58
|
+
* @param course Optional typed course metadata when inputs are flat rows.
|
|
59
|
+
*/
|
|
60
|
+
export declare function toFhirR5Dosages(input: Parameters<typeof toFhirR5DosagesInternal>[0], course?: Parameters<typeof toFhirR5DosagesInternal>[1]): FhirDosage[];
|
|
40
61
|
export declare function parseSig(input: string, options?: ParseOptions): ParseBatchResult;
|
|
41
62
|
export declare function lintSig(input: string, options?: ParseOptions): LintBatchResult;
|
|
42
63
|
export declare function parseSigAsync(input: string, options?: ParseOptions): Promise<ParseBatchResult>;
|
|
43
|
-
export declare function formatSig(
|
|
64
|
+
export declare function formatSig(input: FhirDosage | FhirR6DosageInstructionInput | readonly EzDosage[] | CanonicalCourse | CanonicalAdministration, style?: "short" | "long", options?: FormatOptions): string;
|
|
44
65
|
export declare function formatSigBatch(dosages: FhirDosage[], style?: "short" | "long", options?: FormatBatchOptions): string;
|
|
45
66
|
export declare function formatParseBatch(batch: ParseBatchResult, style?: "short" | "long", separator?: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Load the current R6 DosageInstruction without reparsing a generated text instruction.
|
|
69
|
+
* Native components are imported into the same clinical course the parser
|
|
70
|
+
* produces. R5 component rows are OUTPUT projections only, never interpreted
|
|
71
|
+
* or formatted back into native semantics.
|
|
72
|
+
*/
|
|
73
|
+
export declare function fromFhir(wire: FhirR6DosageInstructionInput, options?: FormatOptions): ParseBatchResult;
|
|
46
74
|
export declare function fromFhirDosage(dosage: FhirDosage, options?: FormatOptions): ParseResult;
|