Common Widget sample

How-to Load the Common Widget

  • To load the common widget you will need to retrieve a VwToken from within your application. 
  • As a security best practice,  we do not recommend retrieving the token from within JavaScript as this would expose your credentials.

Sample script to load the VitalKnowledge widget in a Production environment:

<script language="javascript" src="{your_api_key}"></script> 
<script language="javascript">
    var cmnWidget = new commonWidget({
        container: 'string', //id of the container where you want the widget to load
        environment: 'string', //options: secure (production), rc (staging), build (development)
        module: 'string', //for vital coder this will be your module
        component: 'string', //component for vital coder
        resultFormat: 'json', //format you would like to send and receive data JSON
        vwToken: {token optained from your application} //call /authorize to get a vwToken you can send here

If successful, the end result will look like the result below.

  • To load data you will want to send the widget a load command with the data you want sent.

The following sample is for VitalKnowledge

    selectedCodeType: 'ICD-10 CM',
    includeExpiredCodes: '1',
    searchTerm: 'Diabetes'

Try it out!

Registered Mashery users with access to HTML controls can use the form below to initiate and query the app inline with our documentation. You can only access controls your API key and credentials give you access to.

Once the app is initialized, try passing a different JSON object to it using the 'load' method.  See the documentation pages for each service for an explanation of the load object for each control.

VitalCoder: {selectedCodeType:'ICD-10 CM', includeExpiredCodes:'1', searchTerm:'Diabetes' }

Code Referential Information: {codeType : 'ICD-10 CM', code : 'Z12.31' }

CodeValidate: {lcd:'true', icd10CMEnabled:'true', icdCodes:'b330,b20', cptCodes:'86355', state:'SC', providerType: '13', contractor : '11201' }


Supported Web Browsers