/*******************************************************************************
 * Copyright 2014 Centre for Development of Advanced Computing(C-DAC), Pune
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
var jsonData;

var enumLANGREFSETDisb={
		'900000000000508004': "UK",
		'900000000000509007': "US",
	};

var enumACCEPTABILITYDisb = {
		'900000000000548007' : "Preferred",		
		'900000000000013009' : "Synonym",
		'900000000000003001' : "Fully Specified Name",
		'900000000000549004' : "Acceptable"
	};

//using
var enumSemantic={
	SUBSTANCE: "substance",
    MEDICINE: "medicine",
    GENERIC: "generic",
};

$(document).ready(function() {
	resetDISBControls();
});

function resetDISBControls() {
	document.getElementById("conceptIdDISB").value = "";
    document.getElementById("category").value="SUBSTANCE";
    document.getElementById('disbResult').value = "";
    $("#blankConceptIdDISB").hide();
    $("#wrongConceptIdDISB").hide();	    
}

function disbByConcept(conceptId,category,targetSpanId) {
    var disbUrl="http://localhost:8080/csnoserv/api/disb/"; //change url here
	var dataValue = document.getElementById(conceptId).value;
    var category= enumSemantic[document.getElementById(category).value];    
    disbUrl=disbUrl+category+"info";	
		$("#disbdetails").remove();		
		$("#blankConceptIdDISB").hide();
        $("#wrongConceptIdDISB").hide();	    

	if (dataValue.trim() == '') {
        $("#disbdetails").remove();
        $("#blankConceptIdDISB").show();
		$("#wrongConceptIdDISB").hide();	    		
		var txtBox = document.getElementById(conceptId);
		txtBox.focus();
		return;
	}

	if (!(dataValue.match(/^[0-9]+$/))) {
		$("#disbdetails").remove();
        $("#blankConceptIdDISB").hide();
		$("#wrongConceptIdDISB").show();		
		var txtBox = document.getElementById(conceptId);
		txtBox.focus();
		return;
	}	
	// Call ur webservice here
	$
			.ajax({
				type : "GET",
				url :disbUrl, // replace
				// with
				// ur
				// service
				// call
				//dataType : "text/jsonp",
				crossDomain : true,
				data : {
					"id" : dataValue
				},
				success : function(data, textStatus, jqXHR) {					
					var htmlData = '';
					var jsonData = data;
					if (jsonData != "{}" ) {
						if(category=="substance"){							
							if(jQuery.isEmptyObject(data)){
								$("#wrongConceptIdDISB").show();	
								return;
							}
							htmlData = '<table id="disbdetails">';
							if(jsonData[0].molecularWeight!=null)
								htmlData += '<tr class="conId1"><th class="conTh">Molecular Weight: </th><td class="conDtls">'+jsonData[0].molecularWeight+'</td></tr>';
							else
								htmlData += '<tr class="conId1"><th class="conTh">Molecular Weight: </th><td class="conDtls"></td></tr>';
							if(jsonData[0].substanceInfo!=null)
								htmlData += '<tr class="conId1"><th class="conTh">Substance Information: </th><td class="conDtls">'+jsonData[0].substanceInfo+'</td></tr>';
							else
								htmlData += '<tr class="conId1"><th class="conTh">Substance Information: </th><td class="conDtls"></td></tr>';
							if(jsonData[0].toxicity!=null)
								htmlData += '<tr class="conId1"><th class="conTh">Toxicity: </th><td class="conDtls">'+jsonData[0].toxicity+'</td></tr>';
							else 
								htmlData += '<tr class="conId1"><th class="conTh">Toxicity: </th><td class="conDtls"></td></tr>';
							
							htmlData += '<tr class="conId1"><th class="conTh">Chemical Representations: </th><td class="conDtls">';
							for(var i=0;i<jsonData[0].chemicalRepresentations.length;i++){
								if(jsonData[0].chemicalRepresentations[i].value!=null){
									htmlData += '<ul><li>Value: '+jsonData[0].chemicalRepresentations[i].value+'</li>';
									htmlData += '<li>Chemical Representation System: '+jsonData[0].chemicalRepresentations[i].chemRepresentationSystem+'</li>';
								}
							}
							+'</td></tr>';
							htmlData += '<tr class="conId1"><th class="conTh">Sustance Representations: </th><td class="conDtls">';
							for(var i=0;i<jsonData[0].substanceDescriptions.length;i++){
								if(jsonData[0].substanceDescriptions[i].substanceName!=null){
								htmlData += '<ul><li>Substance Name: '+jsonData[0].substanceDescriptions[i].substanceName+'</li>';
								htmlData += '<li>Lang Dialect: '+enumLANGREFSETDisb[jsonData[0].substanceDescriptions[i].langDialect]+'</li>';							
								htmlData += '<li>Acceptability: '+enumACCEPTABILITYDisb[jsonData[0].substanceDescriptions[i].acceptability]+'</li></ul>';
								}
							}
							+'</td></tr>';
							htmlData += '<tr class="conId1"><th class="conTh">Substance Identifiers: </th><td class="conDtls">';
							for(var i=0;i<jsonData[0].substanceIdentifiers.length;i++){
								if(jsonData[0].substanceIdentifiers[i].value!=null){
								htmlData += '<ul><li>Value: '+jsonData[0].substanceIdentifiers[i].value+',		Coding System: '+jsonData[0].substanceIdentifiers[i].codingSystemName+'</li>';
								//htmlData += '<li>Coding System: '+jsonData[0].substanceIdentifiers[i].codingSystemName+'</li>';
								}
							}
							+'</td></tr>';
							htmlData += '</table>';
							targetSpanId = '#' + targetSpanId;
							$(targetSpanId).html(htmlData);
						}else if(category=="medicine"){     
							if(jQuery.isEmptyObject(data)){
								$("#wrongConceptIdDISB").show();	
								return;
							}
                            htmlData = '<table id="disbdetails">';
                            if(jsonData[0].medicineName!=null){
                            	htmlData += '<tr class="conId1"><th class="conTh">Medicine Name: </th><td class="conDtls">'+jsonData[0].medicineName+'</td></tr>';
                            }else
                            	htmlData += '<tr class="conId1"><th class="conTh">Medicine Name: </th><td class="conDtls"></td></tr>';
                            if(jsonData[0].medicineSctid!=null){
                            	htmlData += '<tr class="conId1"><th class="conTh">SCT_ID: </th><td class="conDtls">'+jsonData[0].medicineSctid+'</td></tr>';
                            }else
                            	htmlData += '<tr class="conId1"><th class="conTh">SCT_ID: </th><td class="conDtls">'+jsonData[0].medicineSctid+'</td></tr>';
                            if(jsonData[0].brandName!=null){
                            	htmlData += '<tr class="conId1"><th class="conTh">Brand Name: </th><td class="conDtls">'+jsonData[0].brandName+'</td></tr>';	
                            }else 
                            	htmlData += '<tr class="conId1"><th class="conTh">Brand Name: </th><td class="conDtls"></td></tr>';
                            if(jsonData[0].manufacturer.country!=null){
                            	htmlData += '<tr class="conId1"><th class="conTh">Manufacturer Country: </th><td class="conDtls">'+jsonData[0].manufacturer.country+'</td></tr>';
                            }else
                            	htmlData += '<tr class="conId1"><th class="conTh">Manufacturer Country: </th><td class="conDtls"></td></tr>';
                            if(jsonData[0].manufacturer.manufacturerName!=null){
                            	htmlData += '<tr class="conId1"><th class="conTh">Manufacturer Name: </th><td class="conDtls">'+jsonData[0].manufacturer.manufacturerName+'</td></tr>';
                            }else
                            	htmlData += '<tr class="conId1"><th class="conTh">Manufacturer Name: </th><td class="conDtls"></td></tr>';
                            if(jsonData[0].excipient!=null){
                            	htmlData += '<tr class="conId1"><th class="conTh">Excepient: </th><td class="conDtls">'+jsonData[0].excipient+'</td></tr>';
                            }else
                            	htmlData += '<tr class="conId1"><th class="conTh">Excepient: </th><td class="conDtls"></td></tr>';
                            if(jsonData[0].excipient!=null){
                            	htmlData += '<tr class="conId1"><th class="conTh">License Number: </th><td class="conDtls">'+jsonData[0].licenseNumber+'</td></tr>';
                            }else
                            	htmlData += '<tr class="conId1"><th class="conTh">License Status: </th><td class="conDtls"></td></tr>';
                            if(jsonData[0].packaging!=null){
                            	htmlData += '<tr class="conId1"><th class="conTh">Packaging: </th><td class="conDtls">'+jsonData[0].packaging+'</td></tr>';
                            }else
                            	htmlData += '<tr class="conId1"><th class="conTh">Packaging: </th><td class="conDtls"></td></tr>';
                            for(var i=0;i<jsonData[0].genericNames.length;i++){
                            				if(jsonData[0].genericNames[i]!=null)
                            					htmlData += '<tr class="conId1"><th class="conTh">Generic Name: </th><td class="conDtls">'+jsonData[0].genericNames[i]+'</td></tr>';                            				
                            					}
                            htmlData += '</table>';
                            targetSpanId = '#' + targetSpanId;
							$(targetSpanId).html(htmlData);
                        }else if(category=="generic"){
                        	if(jQuery.isEmptyObject(data)){
								$("#wrongConceptIdDISB").show();	
								return;
							}
                        	  htmlData = '<table id="disbdetails">';
                        	  if(jsonData[0].contraIndications!=null)
                        		  htmlData += '<tr class="conId1"><th class="conTh">ContraIndications: </th><td class="conDtls">'+jsonData[0].contraIndications+'</td></tr>';
                        	  else
                        		  htmlData += '<tr class="conId1"><th class="conTh">ContraIndications: </th><td class="conDtls"></td></tr>';
                        	  if(jsonData[0].doseForm!=null)
                        		  htmlData += '<tr class="conId1"><th class="conTh">Dose Form: </th><td class="conDtls">'+jsonData[0].doseForm+'</td></tr>';
                        	  else
                        		  htmlData += '<tr class="conId1"><th class="conTh">Dose Form: </th><td class="conDtls"></td></tr>';
                              if(jsonData[0].genericSctid!=null)
                            	  htmlData += '<tr class="conId1"><th class="conTh">Generic Sctid: </th><td class="conDtls">'+jsonData[0].genericSctid+'</td></tr>';
                              else
                            	  htmlData += '<tr class="conId1"><th class="conTh">Generic Sctid: </th><td class="conDtls"></td></tr>';
                              if(jsonData[0].indications!=null)
                            	  htmlData += '<tr class="conId1"><th class="conTh">Indications: </th><td class="conDtls">'+jsonData[0].indications+'</td></tr>';
                              else
                            	  htmlData += '<tr class="conId1"><th class="conTh">Indications: </th><td class="conDtls"></td></tr>';
                              if(jsonData[0].routeOfAdministration!=null)
                            	  htmlData += '<tr class="conId1"><th class="conTh">Route Of Administration: </th><td class="conDtls">'+jsonData[0].routeOfAdministration+'</td></tr>';
                              else
                            	  htmlData += '<tr class="conId1"><th class="conTh">Route Of Administration: </th><td class="conDtls"></td></tr>';
                             
                              htmlData += '<tr class="conId1"><th class="conTh">Composition: </th><td class="conDtls">';
  									for(var i=0;i<jsonData[0].composition.length;i++){
  											if(jsonData[0].composition[i].substanceName!=null){
  												htmlData += '<ul><li>Substance Name: '+jsonData[0].composition[i].substanceName+'</li>';
  												htmlData += '<li>Unit: '+jsonData[0].composition[i].unit+',		Strength: '+jsonData[0].composition[i].strength+'</li></ul>';
  												}
  										}
  							  htmlData += '</td></tr>';
  							  
	  						  htmlData += '<tr class="conId1"><th class="conTh">Drug Types: </th><td class="conDtls">';
									for(var i=0;i<jsonData[0].drugTypes.length;i++){
											if(jsonData[0].drugTypes[i].sctid!=null){
												htmlData += '<ul><li>SCTID: '+jsonData[0].drugTypes[i].sctid+',		Type Name: '+jsonData[0].drugTypes[i].typeName+'</li></ul>';
												}
										}
							  htmlData += '</td></tr>';
							  
							  htmlData += '<tr class="conId1"><th class="conTh">Generic Descriptions: </th><td class="conDtls">';
								for(var i=0;i<jsonData[0].genericDescriptions.length;i++){
										if(jsonData[0].genericDescriptions[i].genericName!=null){
												htmlData += '<ul><li>Generic Name: '+jsonData[0].genericDescriptions[i].genericName+'</li>';
												htmlData += '<li>LangDialect: '+enumLANGREFSETDisb[jsonData[0].genericDescriptions[i].langDialect]+',		Acceptability: '+enumACCEPTABILITYDisb[jsonData[0].genericDescriptions[i].acceptability]+'</li></ul>';
										}
									}
						  htmlData += '</td></tr>';
							  
                              htmlData += '</table>';
                              targetSpanId = '#' + targetSpanId;
  							$(targetSpanId).html(htmlData);
                        }

					} else {
						$("#wrongConceptIdDISB").show();
					}
				},
				error : function(jqXHR, textStatus, errorThrown) {
					$("#wrongConceptIdDISB").show();
					console.log(textStatus);
				}
			});
}


function infoDialog(dialogCode) {
	var infoDialogHTML = '';
	
	if (dialogCode == 'searchCtrl') {		
		infoDialogHTML = infoDialogHTML
				+ '<ol><li style="margin-left: 20px">Add following javascripts in your web page : <ul><li style="margin-left: 40px">jquery.js</li><li style="margin-left: 40px">jquery-ui.custom.min.js</li><li style="margin-left: 40px">jquery.autocomplete.js</li></ul></li>'
				+ '<li style="margin-left: 20px">Add following CSNOCtrl scripts in your web page : <ul><li style="margin-left: 40px">searchtool.js</li><li style="margin-left: 40px">searchtool.css</li></ul></li>'
				+ '<li style="margin-left: 20px;">Call <i>selectSNOMEDCT(state_IN,semantictag_IN,acceptability_IN,returnlimit_IN,refsetid_IN,parentid_IN,callback)</i> function to view CSNOCtrl dialog box.'
				+ '<ul><li  style="margin-left: 20px;">Parameter Description</li></ul>'
				+ '<ol><li  style="margin-left: 40px;"><b>state_IN</b>-	Defines the state of concept. Refer enumSTATE in searchtool.js to pass values for the state_IN parameter. Possible values for state_IN parameter are as follows-<ul><b>ACTIVE</b> - It will return only active components.</ul><ul><b>INACTIVE</b> - It will return only inactive components.</ul><ul><b>BOTH</b> -It will return active and inactive components.</ul></li>'
				+ '<li style="margin-left: 40px;"><b>semantictag_IN</b>-	Defines semantic tag of the concept. Refer enumSEMANTICTAG in searchtool.js to pass values for the semantictag_IN parameter.Possible values for semantictag_IN parameter are as follows-<ul><b>ALL</b> - It will search for SNOMED CT terms in all semantic tags</ul><ul>Other possible values are- PROCEDURE,DISORDER,BODY_STRUCTURE,etc.</ul></li>'
				+ '<li style="margin-left: 40px;"><b>acceptability_IN</b>-	Refer enumACCEPTABILITY in searchtool.js to pass values for the acceptability_IN parameter. Possible values for acceptability_IN parameter are as follows-<ul><b>PREFERRED</b> - If acceptability_IN is PREFERRED, only FSN and Preferred Terms for a given term shall be fetched.</ul><ul><b>PREFERRED_EXCLUDING_FSN</b> - Only Preferred Terms excluding FSN for given term shall be fetched.</ul><ul><b>SYNONYMS</b> - Only synonyms for the given term shall be fetched.</ul><ul><b>ACCEPTABLE</b> - Only Acceptable Terms for given term shall be fetched. </ul><ul><b>ALL</b> - It will fetch for all SNOMED CT terms related to the search term, irrespective of their acceptability value.</ul></li>'
				+ '<li style="margin-left: 40px;"><b>refsetid_IN</b>-	Defines Refset Identifier. For Search through whole SNOMED CT terminology refsetid is null. For Search through specific Refset refsetid should be a numeric value.</li>'
				+ '<li style="margin-left: 40px;"><b>parentid_IN</b>-	Defines Concept Identifier. For Search through whole SNOMED CT terminology parentid is null. For Search through all descendants of a Specific Concept, parentid should be a numeric value.Coma seprated mutiple values can also be provide.</li>'
				+ '<li style="margin-left: 40px;"><b>returnlimit_IN</b>-	Defines the maximum number of matching terms to be fetched from the SNOMED CT repository.For displaying all results, returnlimit should be -1.</li>'
				+ '<li style="margin-left: 40px;"><b>fullconcept</b>-	Defines whether you want full details regarding concept.For displaying full results, fullconcept value should be true.</li>'
				+ '<li style="margin-left: 40px;"><b>callback</b>-	It will contain the definition of the callback function'
				+ ' used to retrieve return value/result from the <i>selectSNOMEDCT</i> function.<br>The result includes Concept ID,Description ID'
				+ ' and Description of the selected concept from SNOMED CT repository.<br>Callback function has to be defined for '
				+ ' user defined HTML page.<br/><div class="code">var callback =function(selectedSNOMEDTerm){setValue'
				+ ' (selectedSNOMEDTerm);};<br/>function setValue(selectedSNOMEDTerm)<br>{<p style="color:green;text-align:justify;">'
				+ '&nbsp;/* Parameter selectedSNOMEDTerm contains Concept ID,Description ID and Description.User can manipulate the string or edit the '
				+ 'function definition as per his requirement*/</p>&nbsp;document.getElementById(HTMLcontrolid).html=selectedSNOMEDTerm;<br>}'
				+ '<br></div>The function shall contain only 1 parameter <i>selectedSNOMEDTerm</i> that refers to the result including'
				+ ' Concept ID,Description ID and Description.<br>User will have to define a function like <i>setValue</i> in the callback function' 
				+ ' to set the return value <i>selectedSNOMEDTerm</i> in some HTML control of the web page.<br>For different HTML controls' 
				+ ', user will have to define different callback functions.</li>'
				+ '</ol>';
	}
	if (dialogCode == 'conceptLookup') {
		infoDialogHTML = infoDialogHTML
				
		+ '<ol><li style="margin-left: 20px">Add following javascripts in your web page : <ul><li style="margin-left: 40px">jquery.js</li><li style="margin-left: 40px">jquery-ui.custom.min.js</li></ul></li>'
		+ '<li style="margin-left: 20px">Add following CSNOCtrl scripts in your web page : <ul><li style="margin-left: 40px">demo.js</li></ul></li>'
		+ '<li style="margin-left: 20px;">Call <i>lookupByConcept(conceptId,langRefset,targetSpanId)</i> function to get concept details.'
		+ '<ul><li  style="margin-left: 20px;">Parameter Description</li></ul>'
		+ '<ol><li  style="margin-left: 40px;"><b>conceptId</b>-	Defines the SNOMED CT Concept Identifier.</ul></li>'
		+ '<li style="margin-left: 40px;"><b>langRefset</b>-	Defines language refset. Refer enumLANGREFSET in demo.js to pass values for the langRefset parameter. Possible values for langRefset parameter are as follows-<ul><b>US</b> - It will provide concept details in us english</ul><ul><b>UK</b> - It will provide concept details in uk english.</ul><ul><b>HI</b> - It will provide concept details in Hindi.</ul><ul></li>'+ '<li style="margin-left: 40px;"><b>targetSpanId</b>-	Defines the span id where to display concept details.'		
		+ ' used to retrieve return value/result from the <i>lookupByConcept</i> function.<br>The result includes Concept ID,Fully Specified Name,'
		+ ' Status and Synonyms of the concept from SNOMED CT repository.'
		+ '</li>'
		+ '</ol>';
		}

	if (dialogCode == 'conceptRelationLookup') {
		infoDialogHTML = infoDialogHTML
		+ '<ol><li style="margin-left: 20px">Add following javascripts in your web page : <ul><li style="margin-left: 40px">jquery.js</li><li style="margin-left: 40px">jquery-ui.custom.min.js</li></ul></li>'
		+ '<li style="margin-left: 20px">Add following CSNOCtrl scripts in your web page : <ul><li style="margin-left: 40px">demo.js</li></ul></li>'
		+ '<li style="margin-left: 20px;">Call <i>lookupByConceptRelation(conceptControlID,relationControlID,directionControlID,targetSpanConrolID)</i>  function for displaying the Ids of the related SNOMED CT concepts.'
		+ '<ul><li  style="margin-left: 20px;">Parameter Description</li></ul>'
		+ '<ol><li  style="margin-left: 40px;"><b>conceptControlID</b>-	Defines the SNOMED CT Concept Identifier.</ul></li>'
		+ '<li style="margin-left: 40px;"><b>relationControlID</b>-	Defines type of relation.</ul></li>'
		+ '<li style="margin-left: 40px;"><b>directionControlID</b>-	Defines direction of relation.'
		+ '<li style="margin-left: 40px;"><b>targetSpanConrolID</b>-	Defines the span id where to display concept details.'
		+ ' used to retrieve return value/result from the <i>lookupByConceptRelation</i> function.<br>The result includes Concept ID,Fully Specified Name,'
		+ ' of the concept from SNOMED CT repository.'
		+ '</li>'
		+ '</ol>';
	}

	
	if (dialogCode == 'conceptDISB') {
		infoDialogHTML = infoDialogHTML				
		+ '<ol><li style="margin-left: 20px">Add following javascripts in your web page : <ul><li style="margin-left: 40px">jquery.js</li><li style="margin-left: 40px">jquery-ui.custom.min.js</li></ul></li>'
		+ '<li style="margin-left: 20px">Add following CSNOCtrl css in your web page : <ul><li style="margin-left: 40px">demo.css</li></ul></li>'
		+ '<li style="margin-left: 20px">Add following CSNOCtrl scripts in your web page : <ul><li style="margin-left: 40px">disb.js</li></ul></li>'
		+ '<li style="margin-left: 20px;">Call <i>disbByConcept(conceptId,category,targetSpanId)</i> function to get concept(Substance, Medicine, Generic) details.'
		+ '<ul><li  style="margin-left: 20px;">Parameter Description</li></ul>'
		+ '<ol><li  style="margin-left: 40px;"><b>conceptId</b>-	Defines the SNOMED CT Concept Identifier.</ul></li>'
		+ '<li style="margin-left: 40px;"><b>Category</b>-	Defines category. Refer enumSemantic in disb.js to pass values for the category parameter. Possible values for category parameter are as follows-<ul><b>substance</b> - It will provide concept details of substance </ul><ul><b>medicine</b> - It will provide concept details from real clinical drug.</ul><ul><b>generic</b> - It will provide concept details from clinical drug.</ul></li>'
		+ '<li style="margin-left: 40px;"><b>targetSpanId</b>-	Defines the span id where to display concept details.'		
		+ ' used to retrieve return value/result from the <i>disbByConcept</i> function.<br>The result includes details from DISB,'
		+ '</li>'
		+ '</ol>';
		}

	infoDialogHTML = infoDialogHTML
			+ '<span width style="font-size:x-small;margin-left: 10px">Note:- CSNOCtrl js and css are available with CSNOCtrl downloadable package</span>';
	$("#dialog-howto").html(infoDialogHTML);
	$("#dialog-howto").dialog({
		modal : true,
		width : 550,
		height : 330,
		close: function( event, ui ) {
			$(".ui-dialog").remove();
		}
	});
	// Adding this if else again because any option cannot be added before above
	// dialog call which initializes the dialog.
	if (dialogCode == 'searchCtrl') {
		$("#dialog-howto").dialog("option", "width", 550);
		$("#dialog-howto").dialog("option", "height", 600);
		$('#dialog-howto').dialog('option', 'title',
				'How To Use CSNOCtrl: Search');

	} else if (dialogCode == 'conceptLookup') {
		$("#dialog-howto").dialog("option", "width", 550);
		$("#dialog-howto").dialog("option", "height", 300);
		$('#dialog-howto').dialog('option', 'title',
				'How To Use CSNOCtrl: LookUp');
	} else if (dialogCode == 'conceptRelationLookup') {
		$("#dialog-howto").dialog("option", "width", 550);
		$("#dialog-howto").dialog("option", "height", 300);
		$('#dialog-howto').dialog('option', 'title',
				'How To Use CSNOCtrl: Getting Concept Relationships');
	}else if (dialogCode == 'conceptDISB') {
		$("#dialog-howto").dialog("option", "width", 550);
		$("#dialog-howto").dialog("option", "height", 300);
		$('#dialog-howto').dialog('option', 'title',
				'How To Use CSNOCtrl: Getting Concept(Substance, Medicine, Genric) information from DISB');
	}


	$("#dialog-howto").dialog('option', 'position', 'center');
}

