Options
All
  • Public
  • Public/Protected
  • All
Menu

Medicom Status Check class

Connects an external system to Medicom via an iframe

Allows Medicom to pass status messages to the external system

Hierarchy

  • DelegatedEventTarget
    • MedicomStatusCheck

Index

Constructors

constructor

  • Class Constructor

    example

    const medicomStatusCheck = new MedicomStatusCheck('92UcPxAUxbTcgTHSmmccZCgtED68M3e64VHxT2AsvbnXss');

    Parameters

    • accessCode: string

      access code generated by /generateaccesscodebasic

    • Optional origin: string

    Returns MedicomStatusCheck

Methods

addEventListener

  • addEventListener(type: string, listener: null | EventListener | EventListenerObject, options?: boolean | AddEventListenerOptions): void
  • Add an event listener

    Parameters

    • type: string

      A case-sensitive string representing the event type to listen for.

    • listener: null | EventListener | EventListenerObject

      The object that receives a notification (an object that implements the Event interface) when an event of the specified type occurs.

    • Optional options: boolean | AddEventListenerOptions

      An options object specifies characteristics about the event listener

    Returns void

checkSpace

  • checkSpace(): Promise<number>
  • Check available space in Medicom Browser FS

    example

    await medicomStatusCheck.checkSpace()

    throws

    Error if status checker is not ready

    Returns Promise<number>

    in bytes

checkStudyWithStudyUID

  • Check study exists in Medicom Browser FS

    example

    // returns study availability of study with study UID '1.2.826.0.1.3680043.9.698500000004' and study data await medicomStatusCheck.checkStudyWithStudyUID('1.2.826.0.1.3680043.9.698500000004')

    throws

    Error if status checker is not ready

    Parameters

    • studyUID: string

      study UID to check

    Returns Promise<CheckStudyReturnEventType>

    whether available and if available, then include study data

checkStudyWithoutStudyUID

  • Check study exists in Medicom Browser FS without a studyUID

    Assume that within different facilities the combination of accession number and patientId is unique

    example

    // returns study availability of study with patient ID 'MRN123' and accession number 'ACC123' and study data await medicomStatusCheck.checkStudyWithStudyUID('MRN123', 'ACC123')

    throws

    Error if status checker is not ready

    Parameters

    • patientId: string

      patient id to check

    • accessionNumber: string

      accession number to check

    Returns Promise<CheckStudyReturnEventType>

    whether available and if available, then include study data

init

  • init(): Promise<void>
  • Initializes the status check iframe with event listeners

    example

    await medicomStatusCheck.init()

    throws

    Error if initial message fails

    Returns Promise<void>

    resolves once the iframe is loaded and the initial message is successfully sent

removeAllStudies

  • removeAllStudies(): Promise<void>
  • Remove all cached studies in Medicom Browser FS

    example

    await medicomStatusCheck.removeAllStudies()

    throws

    Error if status checker is not ready

    Returns Promise<void>

    Does not return data

removeEventListener

  • removeEventListener(type: string, callback: null | EventListener | EventListenerObject, options?: boolean | EventListenerOptions): void
  • Remove an event listener

    Parameters

    • type: string

      A string which specifies the type of event for which to remove an event listener.

    • callback: null | EventListener | EventListenerObject

      The EventListener function of the event handler to remove from the event target

    • Optional options: boolean | EventListenerOptions

      An options object that specifies characteristics about the event listener.

    Returns void

Generated using TypeDoc