- Create html, js, and optionally css files and define in the CRC
cell_config_data.json
- In the js file create an object named i2b2.CRC.view[<ENTER_CUSTOM_DATATYPE_NAME>]
- Implement the following 3 required functions:
parseMetadataXml(valueMetadataXml)
- Returns a parsed version of the value metadata xml that will be provided as input to the showDialog and updateDisplayValue functions
showDialog(sdxData, valueMetadata, queryPanelController, queryGroupId, eventId)
- Should display a dialog for the given concept and value metadata- queryPanelController provides actions that can be performed on the concept
redrawConcept(sdxData, groupIdx, eventIdx)
- This will re-render the concept in the query panel- sdxData.renderData(iconImg, title) can be modified to change the icon and text displayed in the UI
- sdxData.dateRange can be modified to apply date ranges
- On close of showDialog sdxData.LabValues object should be updated with values for the following available properties set
- ValueFlag
- Value
- ValueLow
- ValueHigh
- ValueString
- ValueOperator
- isEnum
- isString
- queryPanelController provides actions that can be performed on the concept
updateDisplayValue(sdxData, valueMetadata)
- This function should update the sdxData.renderData.title based on the LabValues
- The following optional function can also be implemented:
getGeneralDataType()
- Returns the general data type to use to handle a given data type. This is useful if a data type has several subtypes.- The subtype would only need to define this function. The other functions for the general type will be called.
reportHtml(sdxData)
- This function should return either text or a html snippet that will be rendered in the query report pdf
This documentation and example code can be found in the Webclient Github.