Login    Sites MenuBlueStep

BlueStep Platform Support

RelateScript
Outline full outline 
Overview 
Data Types 
Operators 
Statements 
Functions 
Data Conversion 
String Functions 
HTML/CSS/JavaScript 
Array Functions 
Date/Time Functions 
Mathematical Functions 
Advanced Functions 
Alert Functions 
compileSASS(String Sass) 
createChart(...) 
doLookup(...)
B.lookup
 
drugAllergyByProductID(...)
B.Drug.allergyInteractionsWith
 
drugDrugByProductID(...)
B.Drug.drugInteractionsWith
 
drugFoodByProductID(...)
B.Drug.foodInteractions
 
getCurrentNav(...) 
getHTTPRequester(...)
B.fetch
 
getPageInfo()
B.pageInfo
 
getPDF(...)
B.pdf
 
getRecentRecords(...)
B.optRecentRecords,BaseRecord.optRecentRecords,User.recentRecords
 
getSecurityGroup(...)
B.findSecurityGroup
 
getUserData(...)
B.sessionData,User.userData
 
getZipOutput(...)
B.zip
 
isLayout() 
log(...) 
Medispan 
newEmail(...)
B.email
 
readZip(...)
B.zip
 
sendEmail(...)
B.email
 
sendIntramail(...) 
sendMessage(...)
B.sendMessage
 
sendRedirect(...)
B.response.sendRedirect
 
sleep(...) 
Restricted Functions 
Working with Relate Data 
How Formulas Work 
Related Topics 

The drugDrugByProductID(...) function is used to see if a drug will interact with another drug.  The result of drugDrugByProductID(...) is an array of type String[String] with three specific values:

drugInteraction = drugDrugByProductID( productID_1, productID_2);

drugInteraction["severity"]: Severity of the drug interaction
drugInteraction["description"]: A description of the interaction
drugInteraction["advice"]:  Advice if taken together.

Syntax:
drugDrugByProductID( productID_1, productID_2 )
productID_1.drugDrugByProductID( productID_2 ) 

Parameter Description
productID_1

ProductID 1 for a drug from the "medName" lookup

productID_2

ProductID 2 for a drug from the "medName" lookup

The drugInteraction["description"] contains two place holders for the actual drug names.  These place holders are called {CS1} and {CS2}.  Use the replace(...) function to insert the correct drug Name.  Example:

description = drugInteraction["description"].replace("{CS1}", drugName1)
                                            .replace("{CS2}", drugName2)