ezmedicationinput 0.1.49 → 0.1.52

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.
@@ -0,0 +1,18 @@
1
+ import { BodySiteCode, BodySiteDefinition, CanonicalSiteExpr, FhirCodeableConcept, FhirExtension } from "./types";
2
+ export declare const BODY_SITE_ADMINISTRATION_TARGET_COUNT_EXTENSION_URL = "urn:ezmedicationinput:body-site-administration-target-count";
3
+ type SiteLike = CanonicalSiteExpr | {
4
+ text?: string;
5
+ coding?: BodySiteCode;
6
+ administrationTargetCount?: number;
7
+ extension?: FhirExtension[];
8
+ };
9
+ interface BodySiteTargetCountOptions {
10
+ siteCodeMap?: Record<string, BodySiteDefinition>;
11
+ bodySiteContext?: string;
12
+ }
13
+ export declare function buildBodySiteAdministrationTargetCountExtension(targetCount: number | undefined): FhirExtension | undefined;
14
+ export declare function parseBodySiteAdministrationTargetCountExtension(concept: FhirCodeableConcept | {
15
+ extension?: FhirExtension[];
16
+ } | undefined): number | undefined;
17
+ export declare function getBodySiteAdministrationTargetCount(site: string | SiteLike | FhirCodeableConcept | undefined, options?: BodySiteTargetCountOptions): number | undefined;
18
+ export {};
@@ -1,8 +1,11 @@
1
1
  import { FhirExtension, FhirPrimitiveElement } from "./types";
2
2
  export declare const FHIR_TRANSLATION_EXTENSION_URL = "http://hl7.org/fhir/StructureDefinition/translation";
3
3
  export declare function cloneI18nRecord(i18n: Record<string, string> | undefined): Record<string, string> | undefined;
4
+ export declare function mergeI18nRecords(...records: Array<Record<string, string> | undefined>): Record<string, string> | undefined;
4
5
  export declare function cloneExtension(extension: FhirExtension): FhirExtension;
5
6
  export declare function cloneExtensions(extensions: FhirExtension[] | undefined): FhirExtension[] | undefined;
6
7
  export declare function clonePrimitiveElement(element: FhirPrimitiveElement | undefined): FhirPrimitiveElement | undefined;
7
8
  export declare function buildTranslationPrimitiveElement(translations: Record<string, string> | undefined, base?: FhirPrimitiveElement): FhirPrimitiveElement | undefined;
9
+ export declare function mergeTranslationPrimitiveElement(base: FhirPrimitiveElement | undefined, translations: Record<string, string> | undefined): FhirPrimitiveElement | undefined;
8
10
  export declare function getPrimitiveTranslation(element: FhirPrimitiveElement | undefined, locale: string | undefined): string | undefined;
11
+ export declare function getPrimitiveTranslations(element: FhirPrimitiveElement | undefined): Record<string, string> | undefined;
package/dist/fhir.d.ts CHANGED
@@ -7,6 +7,11 @@ export interface FhirProjectionOptions {
7
7
  * Dosage.site.coding while preserving the spatial-relation extension.
8
8
  */
9
9
  bodySitePostcoordination?: boolean;
10
+ /**
11
+ * Emits FHIR primitive translation extensions on coded concepts when
12
+ * translation metadata is available.
13
+ */
14
+ includeTranslationExtensions?: boolean;
10
15
  }
11
16
  export declare function canonicalToFhir(clause: CanonicalSigClause, textOverride?: string, options?: FhirProjectionOptions): FhirDosage;
12
17
  export declare function toFhir(state: ParserState): FhirDosage;
@@ -27,6 +27,7 @@ export declare const BODY_SITE_FEATURE_SCORE_BONUS: Map<BodySiteFeatureKind, num
27
27
  export declare const CONNECTORS: Set<string>;
28
28
  export declare const ROUTE_SITE_PREPOSITIONS: Set<string>;
29
29
  export declare const SITE_DISPLAY_FILLERS: Set<string>;
30
+ export declare const SITE_MULTIPLICITY_WORDS: Set<string>;
30
31
  export declare const NON_SITE_ANCHORED_PHRASES: Set<string>;
31
32
  export declare const EXTERNAL_SITE_LOCATIVE_PREFIXES: Set<string>;
32
33
  export declare const ROUTE_BLOCKED_BY_FOLLOWING_PARTITIVE_HEADS: Set<string>;
@@ -17,6 +17,7 @@ export interface HpsgRouteFeature {
17
17
  }
18
18
  export interface HpsgSiteFeature {
19
19
  text?: string;
20
+ i18n?: Record<string, string>;
20
21
  source?: "abbreviation" | "text" | "selection" | "resolver";
21
22
  coding?: FhirCoding;
22
23
  spatialRelation?: BodySiteSpatialRelation;