Skip to main content

default

Index

Properties

config

config: Required<Params>

Methods

changeDateTimeFormatOptions

  • changeDateTimeFormatOptions(opts: DateTimeFormatOptions): void
  • Set date time format options


    Parameters

    • opts: DateTimeFormatOptions

    Returns void

changeDisplayOrder

  • changeDisplayOrder(order: (method | doseQuantity | doseRange | rateRatio | rateQuantity | rateRange | durationDurationMax | frequencyFrequencyMax | periodPeriodMax | frequencyFrequencyMaxPeriodPeriodMax | offsetWhen | dayOfWeek | timeOfDay | route | site | asNeeded | boundsDuration | boundsPeriod | boundsRange | countCountMax | event | code | maxDosePerPeriod | maxDosePerAdministration | maxDosePerLifetime | additionalInstruction | patientInstruction | text | extension)[]): void
  • To change display order


    Parameters

    • order: (method | doseQuantity | doseRange | rateRatio | rateQuantity | rateRange | durationDurationMax | frequencyFrequencyMax | periodPeriodMax | frequencyFrequencyMaxPeriodPeriodMax | offsetWhen | dayOfWeek | timeOfDay | route | site | asNeeded | boundsDuration | boundsPeriod | boundsRange | countCountMax | event | code | maxDosePerPeriod | maxDosePerAdministration | maxDosePerLifetime | additionalInstruction | patientInstruction | text | extension)[]

    Returns void

changeDisplaySeparator

  • changeDisplaySeparator(sep: string): void
  • Set display separator


    Parameters

    • sep: string

    Returns void

changeLanguage

  • changeLanguage(lng: en | fr | nl | de): Promise<TFunction<common, undefined>>
  • To change language


    Parameters

    • lng: en | fr | nl | de

    Returns Promise<TFunction<common, undefined>>

containsOnlySequentialInstructions

  • containsOnlySequentialInstructions(dosages: Dosage[]): boolean
  • Does this array of Dosage objects contains only "sequential" instructions ?


    Parameters

    • dosages: Dosage[]

    Returns boolean

fromDosageToText

  • fromDosageToText(dos: Dosage): string
  • Turn a FHIR Dosage object into text


    Parameters

    • dos: Dosage

    Returns string

fromMultipleDosageToText

  • fromMultipleDosageToText(dosages: Dosage[]): string
  • Turn multiple FHIR Dosage objects into text


    Parameters

    • dosages: Dosage[]

    Returns string

getDateTimeFormatOptions

  • getDateTimeFormatOptions(): DateTimeFormatOptions
  • Get date time format options


    Returns DateTimeFormatOptions

getDisplayOrder

  • getDisplayOrder(): (method | doseQuantity | doseRange | rateRatio | rateQuantity | rateRange | durationDurationMax | frequencyFrequencyMax | periodPeriodMax | frequencyFrequencyMaxPeriodPeriodMax | offsetWhen | dayOfWeek | timeOfDay | route | site | asNeeded | boundsDuration | boundsPeriod | boundsRange | countCountMax | event | code | maxDosePerPeriod | maxDosePerAdministration | maxDosePerLifetime | additionalInstruction | patientInstruction | text | extension)[]
  • Get display order


    Returns (method | doseQuantity | doseRange | rateRatio | rateQuantity | rateRange | durationDurationMax | frequencyFrequencyMax | periodPeriodMax | frequencyFrequencyMaxPeriodPeriodMax | offsetWhen | dayOfWeek | timeOfDay | route | site | asNeeded | boundsDuration | boundsPeriod | boundsRange | countCountMax | event | code | maxDosePerPeriod | maxDosePerAdministration | maxDosePerLifetime | additionalInstruction | patientInstruction | text | extension)[]

getDisplaySeparator

  • getDisplaySeparator(): string
  • Get display separator


    Returns string

getFields

  • getFields(dos: Dosage, ...order: (method | doseQuantity | doseRange | rateRatio | rateQuantity | rateRange | durationDurationMax | frequencyFrequencyMax | periodPeriodMax | frequencyFrequencyMaxPeriodPeriodMax | offsetWhen | dayOfWeek | timeOfDay | route | site | asNeeded | boundsDuration | boundsPeriod | boundsRange | countCountMax | event | code | maxDosePerPeriod | maxDosePerAdministration | maxDosePerLifetime | additionalInstruction | patientInstruction | text | extension)[]): string
  • From a single dosage, extract specific field(s) requested by user. Some use cases could request to split part of the object for given needs (quantity and timing separately)


    Parameters

    • dos: Dosage
    • rest...order: (method | doseQuantity | doseRange | rateRatio | rateQuantity | rateRange | durationDurationMax | frequencyFrequencyMax | periodPeriodMax | frequencyFrequencyMaxPeriodPeriodMax | offsetWhen | dayOfWeek | timeOfDay | route | site | asNeeded | boundsDuration | boundsPeriod | boundsRange | countCountMax | event | code | maxDosePerPeriod | maxDosePerAdministration | maxDosePerLifetime | additionalInstruction | patientInstruction | text | extension)[]

    Returns string

getLanguage

  • getLanguage(): en | fr | nl | de
  • Get current language


    Returns en | fr | nl | de

groupBySequence

  • groupBySequence(dosages: Dosage[]): Dosage[][]
  • Turn this array of Dosage objects into a data structure useful to handle "sequential" and "concurrent" instructions (cf. "sequence" property).


    Parameters

    • dosages: Dosage[]

    Returns Dosage[][]

    • A two-dimensional array where each inner array contains Dosage objects belonging to the same sequence numberr.

staticbuild

  • Factory to create a fine-tuned instance of the utility class


    Parameters

    Returns Promise<FhirDosageUtils>