APIs

Show:

Methods

_hasItem

(
  • nodes
  • key
)
Object | Boolean private

Parameters:

  • nodes HTMLNode

    HTML Nodes

  • key String

    Section key

Returns:

Object | Boolean:

If has item

addField

(
  • field
)
Undefined

Parameters:

  • field Object

    Field

Returns:

Undefined:

addList

(
  • list
)
Undefined

Parameters:

  • list NodeList

    List of elements

Returns:

Undefined:

addListItem

(
  • item
)
Undefined

Parameters:

  • item Object

    List item

Returns:

Undefined:

addSection

(
  • section
)
Undefined

Parameters:

  • section Object

    Outline section

Returns:

Undefined:

attachActionsEventListeners

() Undefined

Sets up event listeners for the actions tool bar

Returns:

Undefined:

attachEventListeners

() Undefined

Attach all event listeners for the view.

Returns:

Undefined:

attachSidebarEventListeners

() Undefined

Sets up event listeners for the sidebar

Returns:

Undefined:

cancelFetch

() Undefined

Cancels the current fetch operation so that no additional requests are fired off

Returns:

Undefined:

undefined

cleanUp

(
  • $el
)
Undefined

Misc clean up operations.

Parameters:

  • $el Jquery.selector

    element to clean

Returns:

Undefined:

clinicalSummaryProvided

(
  • id
  • provided
)
Undefined

Updates the clinical summary provided flag for the chart at the given id.

Parameters:

  • id Integer

    chart id

  • provided Boolean

    is clinical summary provided

Returns:

Undefined:

undefined

didLoadCharts

() Undefined

Called when all of the charts have completed loading.

Returns:

Undefined:

disableEmptyFields

(
  • $el,
  • chart
  • hide
)
Undefined

Markes fields whose corresponding value is empty as disabled.

Parameters:

  • $el, JQuery
  • chart Object

    Chart data

  • hide Array

    array of properties to hide

Returns:

Undefined:

drawBackgroundImage

(
  • canvas
  • bkg_image
  • data
)
Undefined

Draws an image into a canvas element and adjusts the dimensions to match. After the background image is draw, it loops over the click data and recreates the drawing.

Parameters:

  • canvas HTMLCanvasElement

    Canvas element

  • bkg_image HTMLImageElement

    Background image element

  • data Object

    Draw data

Returns:

Undefined:

each

(
  • callback
)
Undefined

Iterates over the array of chart data.

Parameters:

  • callback Function

    function to be called back

Returns:

Undefined:

undefined

fetch

(
  • callback
)
Undefined

Loads the view data for each chart id. Each id generates a separate HTTP requests, rather than tyring to load them all with a single request that could potentially time out.

Parameters:

  • callback Function

    func to be called back

Returns:

Undefined:

undefined

getChart

(
  • index
)
Undefined

Gets the data packet by index, or null if it doesn't exist

Parameters:

  • index Integer

    chart index

Returns:

Undefined:

undefined

getChart

(
  • index
)
Undefined

Gets the chart data by index, or null if it doesn't exist

Parameters:

  • index Integer

    chart index

Returns:

Undefined:

undefined

getChartById

(
  • id
)
Object

Gets a chart's data by its id (encounter primary key)

Parameters:

  • id Integer

    chart id

Returns:

Object:

chart

getCount

() Integer

Return the number of charts loaded

Returns:

Integer:

number of charts

getObjectByKey

(
  • data
  • strObjName
)
Object | Undefined

Extracts the chart data from the data object based on a string path, e.g., "demog.gender" translates to chart.demog.gender. If the object is a list item (subjective.problem_history.1234), then it will return the list item with the corresponding id. In other words, problem_history is an array with an item that has an id = 1234.

Parameters:

  • data Object

    Chart data

  • strObjName String

    Property key

Returns:

Object | Undefined:

Chart data if available

getOutline

() Array

Returns:

Array:

Outline in array format

getPrintChartData

(
  • enc_id
  • version
)
jQuery.Deferred

Makes a call to the charts print API for the given Encounter Id and returns the Deferred (promise) object.

Parameters:

  • enc_id Integer

    The Encounter Id

  • version Integer

    The Encounter Current Version Num

Returns:

jQuery.Deferred:

Deferred (promise) object.

hasItem

(
  • key
)
Object | Boolean

Parameters:

  • key String

    Section key

Returns:

Object | Boolean:

If has item

initPopup

() Undefined

Initializes the popup view and renders it to the screen

Returns:

Undefined:

isLoading

() Boolean

Returns true if the model is in the process of loading chart data.

Returns:

Boolean:

chart data is loading

loadCharts

() Undefined

Recursively loads the chart data for printing for each encounter ID stored in this.ids. The this.current attribute must be set to zero before this is run. It will be incremented until all charts have been loaded. Chart data is loaded synchronously one at a time so that we do not run into potential time out issues were we to try and load all of the chart data for each chart in one request.

Returns:

Undefined:

onAction

(
  • action
)
Undefined

Called when the user clicks on an action item

Parameters:

  • action String

    Action

Returns:

Undefined:

onAttachClinicalDocs

() Undefined

Called when the user clicks the Attach to Clinical Docs button

Returns:

Undefined:

onCancel

() Undefined

Called when the Cancel button is clicked

Returns:

Undefined:

onCancel

() Undefined

Called when the Generate CCDA button is clicked

Returns:

Undefined:

onClinicalSummaryProvided

(
  • provided
)
Undefined

Called when the clinical summary provided status has changed

Parameters:

  • provided Boolean

    If its provided

Returns:

Undefined:

onClinicalSummaryProvided

(
  • evt
)
Undefined

Called when the Clinical Summary Provided checkbox is clicked

Parameters:

  • evt Event

    Event

Returns:

Undefined:

onDownloadChartAsPDF

() Undefined

Downloads the currently selected chart as a pdf document

Returns:

Undefined:

onDownloadChartAsWord

() Undefined

Downloads the currently selected chart as a word document

Returns:

Undefined:

onExportCCDA

(
  • chart
  • filepath
)
Undefined

Called by onGenerateCCDA to export the newly generated CCDA file.

Parameters:

  • chart Object

    Chart object

  • filepath String

    File path

Returns:

Undefined:

onPreviousChart

() Undefined

Called when the previous chart button is clicked

Returns:

Undefined:

onPreviousChart

() Undefined

Called when the previous chart button is clicked

Returns:

Undefined:

onPrint

() Undefined

Called when the Print button is clicked

Returns:

Undefined:

onRadioChanged

(
  • evt
)
Undefined

Called when a radio selection changes in the sidebar

Parameters:

  • evt Object

    Contains the key and isChecked values

Returns:

Undefined:

onRemoveFromPortal

() Undefined

Removes the selected chart from the patient portal for viewing

Returns:

Undefined:

onSelectAll

() Undefined

Called when the user clicks the All button

Returns:

Undefined:

onSelectAll

() Undefined

Called when the user clicks the None button

Returns:

Undefined:

onSelectChart

(
  • evt
)
Undefined

Called when the user selects a chart from the drop down select list

Parameters:

  • evt Event

    Event

Returns:

Undefined:

onSendCCDA

(
  • chart
  • file
  • style
)
Undefined

Called by onGenerateCCDA to send the newly generated CCDA file via a message.

Parameters:

  • chart Object

    Chart object

  • file Object

    File information

  • style Object

    Style information

Returns:

Undefined:

onSendToPortal

() Undefined

Sends the selected chart to the patient portal for viewing

Returns:

Undefined:

render

(
  • ids
)
Undefined

render the print chart popup

Parameters:

  • ids Array

    Array of encounter IDs to print

Returns:

Undefined:

render

(
  • options
)

Parameters:

  • options Object
    • $el The root element
      • tpl The underscore template
      • data The chart data object
      • async Whether or not ajax request should be asyncronous
      • hide Array of data-keys to hide

renderActions

() Undefined

Render the popup's actions

Returns:

Undefined:

renderChartPreview

() Undefined

Render the chart preview given the json payload

Returns:

Undefined:

renderChartSelect

(
  • model
)
Undefined

Builds the chart select drop down with an option for each chart retrieved

Parameters:

  • model PrintChartModel

    Model

Returns:

Undefined:

renderChartSelect

() Undefined

Builds the chart select drop down with an option for each chart retrieved

Returns:

Undefined:

renderImageFields

(
  • $el
  • chart
  • async
)
Undefined

Renders all chart image fields and annotations.

Parameters:

  • $el JQuery

    encompassing chart element

  • chart Object

    Chart data

  • async Boolean

    ???

Returns:

Undefined:

renderSidebar

() Undefined

Render the popup's sidebar

Returns:

Undefined:

resize

() Undefined

Resizes the popup on the screen so that the width is 90% of the viewport and the height is 90% of the viewport.

Returns:

Undefined:

selectChart

(
  • selected
)
Undefined

Selects a particular chart, or all, to be viewed in the print preview pane.

Parameters:

  • selected Integer | String

    Selected

Returns:

Undefined:

selectChart

(
  • id
)
Undefined

Programmatically change the drop down selection.

Parameters:

  • id Integer

    ID

Returns:

Undefined:

showHideActions

(
  • model
  • selected
)
Undefined

Shows or hides the action controls based on the value of the selected chart (all or a single chart)

Parameters:

  • model PrintChartModel

    Model

  • selected Integer

    Selected

Returns:

Undefined:

showHidePrintChartActions

() Undefined

Shows or hides the print chart action controls based on the value of the selected chart (all or a single chart)

Returns:

Undefined:

updateProgressText

(
  • count
)
Undefined

Updates the progress text based on the count (number completed) and total number of ids passed in

Parameters:

  • count Integer

    Count

Returns:

Undefined: