charts.PrintChartOutline Class
/var/www/azaleahealth.com/branches/docs/source_repo/awa/resources/apps/js/charts/PrintChartPreviewView.js:14
Item Index
Methods
- _hasItem
- addField
- addList
- addListItem
- addSection
- attachActionsEventListeners
- attachEventListeners
- attachSidebarEventListeners
- cancelFetch
- cleanUp
- clinicalSummaryProvided
- didLoadCharts
- disableEmptyFields
- drawBackgroundImage
- each
- fetch
- getChart
- getChart
- getChartById
- getCount
- getObjectByKey
- getOutline
- getPrintChartData
- hasItem
- initPopup
- isLoading
- loadCharts
- onAction
- onAttachClinicalDocs
- onCancel
- onCancel
- onClinicalSummaryProvided
- onClinicalSummaryProvided
- onDownloadChartAsPDF
- onDownloadChartAsWord
- onExportCCDA
- onPreviousChart
- onPreviousChart
- onPrint
- onRadioChanged
- onRemoveFromPortal
- onSelectAll
- onSelectAll
- onSelectChart
- onSendCCDA
- onSendToPortal
- render
- render
- renderActions
- renderChartPreview
- renderChartSelect
- renderChartSelect
- renderImageFields
- renderSidebar
- resize
- selectChart
- selectChart
- showHideActions
- showHidePrintChartActions
- updateProgressText
Methods
_hasItem
-
nodes -
key
Parameters:
-
nodesHTMLNodeHTML Nodes
-
keyStringSection key
Returns:
If has item
addField
-
field
Parameters:
-
fieldObjectField
Returns:
addList
-
list
Parameters:
-
listNodeListList of elements
Returns:
addListItem
-
item
Parameters:
-
itemObjectList item
Returns:
addSection
-
section
Parameters:
-
sectionObjectOutline section
Returns:
attachActionsEventListeners
()
Undefined
Sets up event listeners for the actions tool bar
Returns:
attachEventListeners
()
Undefined
Attach all event listeners for the view.
Returns:
attachSidebarEventListeners
()
Undefined
Sets up event listeners for the sidebar
Returns:
cancelFetch
()
Undefined
Cancels the current fetch operation so that no additional requests are fired off
Returns:
undefined
cleanUp
-
$el
Misc clean up operations.
Parameters:
-
$elJquery.selectorelement to clean
Returns:
clinicalSummaryProvided
-
id -
provided
Updates the clinical summary provided flag for the chart at the given id.
Parameters:
-
idIntegerchart id
-
providedBooleanis clinical summary provided
Returns:
undefined
didLoadCharts
()
Undefined
Called when all of the charts have completed loading.
Returns:
disableEmptyFields
-
$el, -
chart -
hide
Markes fields whose corresponding value is empty as disabled.
Parameters:
-
$el,JQuery -
chartObjectChart data
-
hideArrayarray of properties to hide
Returns:
drawBackgroundImage
-
canvas -
bkg_image -
data
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:
-
canvasHTMLCanvasElementCanvas element
-
bkg_imageHTMLImageElementBackground image element
-
dataObjectDraw data
Returns:
each
-
callback
Iterates over the array of chart data.
Parameters:
-
callbackFunctionfunction to be called back
Returns:
undefined
fetch
-
callback
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:
-
callbackFunctionfunc to be called back
Returns:
undefined
getChart
-
index
Gets the data packet by index, or null if it doesn't exist
Parameters:
-
indexIntegerchart index
Returns:
undefined
getChart
-
index
Gets the chart data by index, or null if it doesn't exist
Parameters:
-
indexIntegerchart index
Returns:
undefined
getChartById
-
id
Gets a chart's data by its id (encounter primary key)
Parameters:
-
idIntegerchart id
Returns:
chart
getCount
()
Integer
Return the number of charts loaded
Returns:
number of charts
getObjectByKey
-
data -
strObjName
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:
-
dataObjectChart data
-
strObjNameStringProperty key
Returns:
Chart data if available
getOutline
()
Array
Returns:
Outline in array format
getPrintChartData
-
enc_id -
version
Makes a call to the charts print API for the given Encounter Id and returns the Deferred (promise) object.
Parameters:
-
enc_idIntegerThe Encounter Id
-
versionIntegerThe Encounter Current Version Num
Returns:
Deferred (promise) object.
hasItem
-
key
Parameters:
-
keyStringSection key
Returns:
If has item
initPopup
()
Undefined
Initializes the popup view and renders it to the screen
Returns:
isLoading
()
Boolean
Returns true if the model is in the process of loading chart data.
Returns:
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:
onAction
-
action
Called when the user clicks on an action item
Parameters:
-
actionStringAction
Returns:
onAttachClinicalDocs
()
Undefined
Called when the user clicks the Attach to Clinical Docs button
Returns:
onCancel
()
Undefined
Called when the Cancel button is clicked
Returns:
onCancel
()
Undefined
Called when the Generate CCDA button is clicked
Returns:
onClinicalSummaryProvided
-
provided
Called when the clinical summary provided status has changed
Parameters:
-
providedBooleanIf its provided
Returns:
onClinicalSummaryProvided
-
evt
Called when the Clinical Summary Provided checkbox is clicked
Parameters:
-
evtEventEvent
Returns:
onDownloadChartAsPDF
()
Undefined
Downloads the currently selected chart as a pdf document
Returns:
onDownloadChartAsWord
()
Undefined
Downloads the currently selected chart as a word document
Returns:
onExportCCDA
-
chart -
filepath
Called by onGenerateCCDA to export the newly generated CCDA file.
Parameters:
-
chartObjectChart object
-
filepathStringFile path
Returns:
onPreviousChart
()
Undefined
Called when the previous chart button is clicked
Returns:
onPreviousChart
()
Undefined
Called when the previous chart button is clicked
Returns:
onPrint
()
Undefined
Called when the Print button is clicked
Returns:
onRadioChanged
-
evt
Called when a radio selection changes in the sidebar
Parameters:
-
evtObjectContains the key and isChecked values
Returns:
onRemoveFromPortal
()
Undefined
Removes the selected chart from the patient portal for viewing
Returns:
onSelectAll
()
Undefined
Called when the user clicks the All button
Returns:
onSelectAll
()
Undefined
Called when the user clicks the None button
Returns:
onSelectChart
-
evt
Called when the user selects a chart from the drop down select list
Parameters:
-
evtEventEvent
Returns:
onSendCCDA
-
chart -
file -
style
Called by onGenerateCCDA to send the newly generated CCDA file via a message.
Parameters:
-
chartObjectChart object
-
fileObjectFile information
-
styleObjectStyle information
Returns:
onSendToPortal
()
Undefined
Sends the selected chart to the patient portal for viewing
Returns:
render
-
ids
render the print chart popup
Parameters:
-
idsArrayArray of encounter IDs to print
Returns:
render
-
options
Parameters:
-
optionsObject- $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
- $el The root element
renderActions
()
Undefined
Render the popup's actions
Returns:
renderChartPreview
()
Undefined
Render the chart preview given the json payload
Returns:
renderChartSelect
-
model
Builds the chart select drop down with an option for each chart retrieved
Parameters:
-
modelPrintChartModelModel
Returns:
renderChartSelect
()
Undefined
Builds the chart select drop down with an option for each chart retrieved
Returns:
renderImageFields
-
$el -
chart -
async
Renders all chart image fields and annotations.
Parameters:
-
$elJQueryencompassing chart element
-
chartObjectChart data
-
asyncBoolean???
Returns:
renderSidebar
()
Undefined
Render the popup's sidebar
Returns:
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:
selectChart
-
selected
Selects a particular chart, or all, to be viewed in the print preview pane.
Parameters:
-
selectedInteger | StringSelected
Returns:
selectChart
-
id
Programmatically change the drop down selection.
Parameters:
-
idIntegerID
Returns:
showHideActions
-
model -
selected
Shows or hides the action controls based on the value of the selected chart (all or a single chart)
Parameters:
-
modelPrintChartModelModel
-
selectedIntegerSelected
Returns:
showHidePrintChartActions
()
Undefined
Shows or hides the print chart action controls based on the value of the selected chart (all or a single chart)
Returns:
updateProgressText
-
count
Updates the progress text based on the count (number completed) and total number of ids passed in
Parameters:
-
countIntegerCount