ezmedicationinput 0.1.67 → 0.2.0
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 +25 -22
- package/dist/advice.d.ts +20 -0
- package/dist/body-site-grammar.d.ts +34 -1
- package/dist/date-interpretation.d.ts +2 -0
- package/dist/dosage-course.d.ts +188 -0
- package/dist/fhir.d.ts +144 -9
- package/dist/format.d.ts +9 -1
- package/dist/hpsg/constructions.d.ts +105 -0
- package/dist/hpsg/lexical-classes.d.ts +170 -1
- package/dist/hpsg/procedural-context.d.ts +15 -1
- package/dist/hpsg/projection.d.ts +10 -2
- package/dist/hpsg/rule-context.d.ts +13 -0
- package/dist/hpsg/rules/clinical-quantity-rules.d.ts +9 -0
- package/dist/hpsg/rules/condition-rules.d.ts +15 -0
- package/dist/hpsg/rules/core-rules.d.ts +29 -0
- package/dist/hpsg/rules/instruction-rules.d.ts +9 -1
- package/dist/hpsg/rules/timing-rules.d.ts +121 -7
- package/dist/hpsg/signature.d.ts +342 -4
- package/dist/hpsg/type-system.d.ts +16 -1
- package/dist/hpsg/unification.d.ts +1 -0
- package/dist/i18n.d.ts +2 -0
- package/dist/index.cjs +48961 -31422
- package/dist/index.d.ts +21 -5
- package/dist/index.js +48936 -31421
- package/dist/instruction-action-locale-adapter.d.ts +1 -0
- package/dist/instruction-action-terminology.d.ts +16 -1
- package/dist/instruction-concept-terminology.d.ts +1 -1
- package/dist/instruction-graph-fhir.d.ts +1 -1
- package/dist/instruction-graph.d.ts +38 -2
- package/dist/ir.d.ts +12 -1
- package/dist/maps.d.ts +15 -0
- package/dist/medication-condition.d.ts +42 -0
- package/dist/parser-state.d.ts +5 -1
- package/dist/parser.d.ts +5 -2
- package/dist/regimen/coordination-scope.d.ts +53 -0
- package/dist/regimen/grammar.d.ts +68 -0
- package/dist/regimen/parallel-course.d.ts +85 -0
- package/dist/regimen/planner.d.ts +19 -0
- package/dist/regimen/regimen.d.ts +66 -0
- package/dist/schedule.d.ts +9 -6
- package/dist/stable-structure.d.ts +23 -1
- package/dist/types.d.ts +433 -28
- package/dist/utils/strength.d.ts +16 -0
- package/package.json +3 -2
package/dist/utils/strength.d.ts
CHANGED
|
@@ -5,7 +5,23 @@ import { FhirRatio, FhirQuantity, MedicationContext } from "../types";
|
|
|
5
5
|
export declare function parseStrength(strength: string, context?: MedicationContext): {
|
|
6
6
|
strengthQuantity?: FhirQuantity;
|
|
7
7
|
strengthRatio?: FhirRatio;
|
|
8
|
+
strengthComponents?: Array<{
|
|
9
|
+
strengthQuantity?: FhirQuantity;
|
|
10
|
+
strengthRatio?: FhirRatio;
|
|
11
|
+
}>;
|
|
8
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Retain each ingredient's strength separately. The names of the ingredients
|
|
15
|
+
* must come from the medication/product record, not from unnamed SIG numbers.
|
|
16
|
+
*
|
|
17
|
+
* Use this when parsing combination products: summing 875 mg + 125 mg as one
|
|
18
|
+
* active-ingredient strength would be clinically misleading.
|
|
19
|
+
* Returns null if any component cannot be parsed, not a partial ingredient set.
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseStrengthComponents(strength: string, context?: MedicationContext): Array<{
|
|
22
|
+
strengthQuantity?: FhirQuantity;
|
|
23
|
+
strengthRatio?: FhirRatio;
|
|
24
|
+
}> | null;
|
|
9
25
|
/**
|
|
10
26
|
* Internal helper to parse a strength string into a FHIR Ratio.
|
|
11
27
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ezmedicationinput",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Parse
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Parse clinician SIGs into extended R5-style dosages with strict R5 and R6 projections",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"build": "tsup && tsc -p tsconfig.types.json",
|
|
20
20
|
"test": "vitest run --dir test",
|
|
21
21
|
"bench:torture": "npm run build && node bench/real-world-torture.mjs",
|
|
22
|
+
"bench:r6-regression": "npm run build && node bench/compare-r6.mjs",
|
|
22
23
|
"bench:adversarial": "npm run build && node bench/adversarial.mjs",
|
|
23
24
|
"bench:roundtrip": "npm run build && node bench/roundtrip.mjs",
|
|
24
25
|
"bench:suggest": "npm run build && node --expose-gc bench/suggest.mjs",
|