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/index.d.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
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
|
+
};
|
|
1
11
|
import { toFhirR5Dosages as toFhirR5DosagesInternal } from "./dosage-course";
|
|
2
|
-
import { FhirDosage, EzDosage,
|
|
12
|
+
import { FhirDosage, EzDosage, FhirR6DosageInstruction, FhirR6DosageInstructionInput, FormatBatchOptions, FormatOptions, LintBatchResult, ParseBatchResult, ParseOptions, ParseResult } from "./types";
|
|
3
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";
|
|
4
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";
|
|
5
16
|
export { parseInstructionActions, realizeInstructionGraph } from "./instruction-graph";
|
|
6
17
|
export { getInstructionActionLocaleAdapter, registerInstructionActionLocaleAdapter } from "./instruction-action-locale-adapter";
|
|
7
18
|
export type { InstructionActionLocaleAdapter, InstructionActionRealizationInput } from "./instruction-action-locale-adapter";
|
|
@@ -15,7 +26,7 @@ export { listMedicationSurfaceSegmenters, registerIntlMedicationSurfaceSegmenter
|
|
|
15
26
|
export type { MedicationSurfaceSegment, MedicationSurfaceSegmenter } from "./lexer/surface-segmenter";
|
|
16
27
|
export { getSuggestLocaleAdapter, registerSuggestLocaleAdapter } from "./suggest-locale-adapter";
|
|
17
28
|
export type { SuggestLocaleAdapter, SuggestLocaleLexemeResolver, SuggestLocaleUnitRoutePair } from "./suggest-locale-adapter";
|
|
18
|
-
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";
|
|
19
30
|
export type { MedicationInstructionActionCodeSystem } from "./instruction-action-terminology";
|
|
20
31
|
export { MEDICATION_INSTRUCTION_CONCEPT_SYSTEM, buildMedicationInstructionConceptCodeSystem, getMedicationInstructionConcept, listMedicationInstructionConcepts, resolveMedicationInstructionConcept } from "./instruction-concept-terminology";
|
|
21
32
|
export type { MedicationInstructionConceptCodeSystem } from "./instruction-concept-terminology";
|
|
@@ -26,7 +37,7 @@ export type { AdviceRelationDefinition, AdviceRelationGrammarFeatures, BodySiteL
|
|
|
26
37
|
export { MEDICATION_INSTRUCTION_GRAPH_EXTENSION_URL, buildInstructionGraphExtension, parseInstructionGraphExtension } from "./instruction-graph-fhir";
|
|
27
38
|
export * from "./types";
|
|
28
39
|
export { nextDueDoses, calculateTotalUnits, MedicationQuantityCalculationError } from "./schedule";
|
|
29
|
-
export { toDosageDetails, toEzDosages, fromDosageDetails, 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";
|
|
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";
|
|
30
41
|
export type { DosageAlternativeChoice } from "./dosage-course";
|
|
31
42
|
export { evaluateMedicationCondition } from "./medication-condition";
|
|
32
43
|
export { parseStrength, parseStrengthIntoRatio, parseStrengthComponents } from "./utils/strength";
|
|
@@ -38,7 +49,7 @@ export { BODY_SITE_SPATIAL_RELATION_EXTENSION_URL, buildBodySiteSpatialRelationE
|
|
|
38
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";
|
|
39
50
|
export { buildSnomedBodySiteLateralityPostcoordinationCode, buildSnomedBodySiteTopographicalModifierPostcoordinationCode, buildSnomedFindingSiteCoding, buildSnomedFindingSitePostcoordinationCode, hasSnomedBodySiteLateralityPostcoordination, hasSnomedFindingSitePostcoordination, hasSnomedTopographicalModifierPostcoordination, parseSnomedBodySiteLateralityPostcoordinationCode, parseSnomedBodySiteTopographicalModifierPostcoordinationCode, parseSnomedFindingSitePostcoordinationCode } from "./snomed-postcoordination";
|
|
40
51
|
export { getRegisteredSigLocalizations, registerSigLocalization, resolveSigLocalization, resolveSigTranslation } from "./i18n";
|
|
41
|
-
export type { SigLocalization, SigLocalizationConfig, SigTranslation, SigTranslationConfig } from "./i18n";
|
|
52
|
+
export type { CourseLanguage, SigLocalization, SigLocalizationConfig, SigTranslation, SigTranslationConfig } from "./i18n";
|
|
42
53
|
export { findMedicationDateListSpans, listMedicationDateResolvers, parseMedicationDateListAt, registerMedicationDateResolver } from "./date-interpretation";
|
|
43
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';
|
|
44
55
|
/** The public strict R5 converter must carry the same in-memory FHIR contract
|
|
@@ -50,13 +61,14 @@ export declare function toFhirR5Dosages(input: Parameters<typeof toFhirR5Dosages
|
|
|
50
61
|
export declare function parseSig(input: string, options?: ParseOptions): ParseBatchResult;
|
|
51
62
|
export declare function lintSig(input: string, options?: ParseOptions): LintBatchResult;
|
|
52
63
|
export declare function parseSigAsync(input: string, options?: ParseOptions): Promise<ParseBatchResult>;
|
|
53
|
-
export declare function formatSig(input: FhirDosage |
|
|
64
|
+
export declare function formatSig(input: FhirDosage | FhirR6DosageInstructionInput | readonly EzDosage[] | CanonicalCourse | CanonicalAdministration, style?: "short" | "long", options?: FormatOptions): string;
|
|
54
65
|
export declare function formatSigBatch(dosages: FhirDosage[], style?: "short" | "long", options?: FormatBatchOptions): string;
|
|
55
66
|
export declare function formatParseBatch(batch: ParseBatchResult, style?: "short" | "long", separator?: string): string;
|
|
56
67
|
/**
|
|
57
|
-
* Load
|
|
58
|
-
*
|
|
59
|
-
*
|
|
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.
|
|
60
72
|
*/
|
|
61
|
-
export declare function fromFhir(
|
|
73
|
+
export declare function fromFhir(wire: FhirR6DosageInstructionInput, options?: FormatOptions): ParseBatchResult;
|
|
62
74
|
export declare function fromFhirDosage(dosage: FhirDosage, options?: FormatOptions): ParseResult;
|