ezmedicationinput 0.1.62 → 0.1.63
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/dist/hpsg/lexical-classes.d.ts +2 -0
- package/dist/hpsg/rules/timing-rules.d.ts +1 -0
- package/dist/hpsg/segmenter.d.ts +2 -0
- package/dist/index.cjs +1673 -1357
- package/dist/index.js +1673 -1357
- package/dist/types.d.ts +16 -0
- package/package.json +11 -11
package/dist/types.d.ts
CHANGED
|
@@ -313,6 +313,10 @@ export interface FhirTimingRepeat extends FhirElement {
|
|
|
313
313
|
boundsRange?: FhirRange;
|
|
314
314
|
frequency?: number;
|
|
315
315
|
frequencyMax?: number;
|
|
316
|
+
/** Duration of each administration occurrence. */
|
|
317
|
+
duration?: number;
|
|
318
|
+
durationMax?: number;
|
|
319
|
+
durationUnit?: FhirPeriodUnit;
|
|
316
320
|
period?: number;
|
|
317
321
|
periodMax?: number;
|
|
318
322
|
periodUnit?: FhirPeriodUnit;
|
|
@@ -706,6 +710,12 @@ export interface MedicationInstructionActionLocaleRealizerConfig {
|
|
|
706
710
|
suppressSiteConcepts?: string[];
|
|
707
711
|
implicitMedicationObject?: boolean;
|
|
708
712
|
directSiteObject?: boolean;
|
|
713
|
+
/** Realize the dose as a direct amount instead of adding a locale-default per-dose prefix. */
|
|
714
|
+
directDose?: boolean;
|
|
715
|
+
/** Route-specific phrase overrides keyed by canonical RouteCode value. */
|
|
716
|
+
routePhrases?: Record<string, string>;
|
|
717
|
+
/** Prefix for the duration of each administration occurrence. */
|
|
718
|
+
administrationDurationPrefix?: string;
|
|
709
719
|
}
|
|
710
720
|
export interface MedicationInstructionActionRealizerConfig {
|
|
711
721
|
/** Locale-specific realization behavior keyed by BCP-47-ish language tag. */
|
|
@@ -751,6 +761,8 @@ export interface MedicationInstructionActionDefinition {
|
|
|
751
761
|
nextConcepts?: string[];
|
|
752
762
|
}>;
|
|
753
763
|
continuationAfterRelations?: string[];
|
|
764
|
+
/** Surface introducers that make a parsed duration describe each administration occurrence. */
|
|
765
|
+
administrationDurationIntroducers?: string[];
|
|
754
766
|
/** Preferred relation semantic classes used to resolve lexically ambiguous relation surfaces. */
|
|
755
767
|
preferredRelationSemanticClasses?: string[];
|
|
756
768
|
/** Exact coding for FHIR Dosage.method when this action can head administration. */
|
|
@@ -1024,6 +1036,10 @@ export interface CanonicalScheduleExpr {
|
|
|
1024
1036
|
duration?: number;
|
|
1025
1037
|
durationMax?: number;
|
|
1026
1038
|
durationUnit?: FhirPeriodUnit;
|
|
1039
|
+
/** Duration of each administration occurrence, distinct from regimen bounds duration. */
|
|
1040
|
+
administrationDuration?: number;
|
|
1041
|
+
administrationDurationMax?: number;
|
|
1042
|
+
administrationDurationUnit?: FhirPeriodUnit;
|
|
1027
1043
|
frequency?: number;
|
|
1028
1044
|
frequencyMax?: number;
|
|
1029
1045
|
period?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ezmedicationinput",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"description": "Parse concise medication sigs into FHIR R5 Dosage JSON",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -14,6 +14,15 @@
|
|
|
14
14
|
"default": "./dist/index.js"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test:dist": "npm run build && vitest run test-dist",
|
|
19
|
+
"build": "tsup && tsc -p tsconfig.types.json",
|
|
20
|
+
"test": "vitest run --dir test",
|
|
21
|
+
"bench:torture": "npm run build && node bench/real-world-torture.mjs",
|
|
22
|
+
"bench:adversarial": "npm run build && node bench/adversarial.mjs",
|
|
23
|
+
"bench:roundtrip": "npm run build && node bench/roundtrip.mjs",
|
|
24
|
+
"bench:suggest": "npm run build && node --expose-gc bench/suggest.mjs"
|
|
25
|
+
},
|
|
17
26
|
"files": [
|
|
18
27
|
"dist"
|
|
19
28
|
],
|
|
@@ -34,14 +43,5 @@
|
|
|
34
43
|
"tsup": "^8.5.1",
|
|
35
44
|
"typescript": "^5.4.0",
|
|
36
45
|
"vitest": "^1.5.0"
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"test:dist": "npm run build && vitest run test-dist",
|
|
40
|
-
"build": "tsup && tsc -p tsconfig.types.json",
|
|
41
|
-
"test": "vitest run --dir test",
|
|
42
|
-
"bench:torture": "npm run build && node bench/real-world-torture.mjs",
|
|
43
|
-
"bench:adversarial": "npm run build && node bench/adversarial.mjs",
|
|
44
|
-
"bench:roundtrip": "npm run build && node bench/roundtrip.mjs",
|
|
45
|
-
"bench:suggest": "npm run build && node --expose-gc bench/suggest.mjs"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|