Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Formatting Text

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 28th, 2019, 12:38 PM
abdisner abdisner is offline
Forum n00b
 
Join Date: Sep 2017
Posts: 1
Default Complex if Then Statement Text Formatting

Hello,

First time caller long time listener. So I have 2 complex if then statement where I need one word or a series of words to be bold and everything else to be in a regular type face. Please see below for the first rule:





if (Field("Application any criteria") == "Yes")
{
var show = '<p style="(no style)" br="false" override="true" quad="L" leading="130" findent="0" lindent="0" rindent="0" leadbefore="0" leadafter="200" keeplines="true" widows="1" kerning="false" hyphenate="false" skipifempty="false" skipifemptyvar="false" noparabreakoncopyfit="false">'+
'<tracking newsize="0">'+
'<f Name="MHC Din Regular">'+
'<z newsize="10.0">'+
'<color Name="PMS 361 CMYK">';
show += 'Apply Mepilex Border Heel if patient meets any of the following criteria:';
show += '<p style="(no style)" quad="L" leading="130" findent="0" lindent="0" rindent="0" leadbefore="0" leadafter="200" keeplines="true" widows="1" kerning="false" hyphenate="false" skipifempty="false" skipifemptyvar="false" noparabreakoncopyfit="false">'+
'<tracking newsize="0">'+
'<f Name="MHC Din Light">'+
'<z newsize="10.0">'+
'<color Name="Black">';
if(Field("Show Braden Score") == "Yes") show += "<&bull;> Braden Score below "+ Field("Braden Below") +"<br>";
if(Field("Show Cardiovascular") == "Yes") show += "<&bull;> Cardiovascular or peripheral vscular disease<br>";
if(Field("Show Vasopressor Medications") == "Yes") show += "<&bull;> Vasopressor Medications for <f name=Arial><&gt;></f> 48 hrs<br>";
if(Field("Show SHOCK") == "Yes") show += "<&bull;> Shock (septic, hypovolemic, cardiogenic)<br>";
if(Field("Show Heel Pressure") == "Yes") show += "<&bull;> Past history of heel pressure ulcer(s)<br>";
if(Field("Show Redness") == "Yes") show += "<&bull;> Current redness in heel area<br>";
if(Field("Show OpProcedures") == "Yes") show += "<&bull;> Anticipated operative procedure lasting <f name=Arial><&gt;></f> 4 hours<br>";
if(Field("Show Quad_Para_Hemi") == "Yes") show += "<&bull;> Quadriplegic, paraplegic or hemiplegic<br>";
if(Field("Show CVA") == "Yes") show += "<&bull;> Cerebral Vascular Accident (CVA)<br>";
if(Field("Show Traction") == "Yes") show += "<&bull;> Traction<br>";
if(Field("Show Reposition") == "Yes") show += "<&bull;> Inability to reposition oneself (due to pain, injury or nerve block)<br>";
if(Field("Show Orthopedic") == "Yes") show += "<&bull;> Orthopedic hardware on the lower extremity<br>";
if(Field("Show Nerve") == "Yes") show += "<&bull;> Nerve block to the lower extremity<br>";
if(Field("Show Capillary") == "Yes") show += "<&bull;> Capillary refill to toes <f name=Arial><&gt;></f> 3 seconds<br>";
if(Field("Show Agitation") == "Yes") show += "<&bull;> Agitation causing movement of the legs and friction to the heel<br>";
if(Field("Show Offloading") == "Yes") show += "<&bull;> Inability to tolerate heel offloading boots<br>";
if(Field("Show EF") == "Yes") show += "<&bull;> Ejection Fraction (EF) <f name=Arial><&gt;></f> 25%<br>";
return show;
}
else return "";


So, the line in red is the line where I need "any" to be bolded and the rest to be regular





The next rule is a bit more complex:

if (Field("Application 3 or More") == "Yes")
{
var show = '<p style="(no style)" br="false" override="true" quad="L" leading="130" findent="0" lindent="0" rindent="0" leadbefore="0" leadafter="200" keeplines="true" widows="1" kerning="false" hyphenate="false" skipifempty="false" skipifemptyvar="false" noparabreakoncopyfit="false">'+
'<tracking newsize="0">'+
'<f Name="MHC Din Regular">'+
'<z newsize="10.0">'+
'<color Name="PMS 361 CMYK">';
show += Rule("3orMore_Rule");
show += '<p style="(no style)" quad="L" leading="130" findent="0" lindent="0" rindent="0" leadbefore="0" leadafter="200" keeplines="true" widows="1" kerning="false" hyphenate="false" skipifempty="false" skipifemptyvar="false" noparabreakoncopyfit="false">'+
'<tracking newsize="0">'+
'<f Name="MHC Din Light">'+
'<z newsize="10.0">'+
'<color Name="Black">';
if(Field("Show Edema")=="Yes") show += '<&bull;> Edema to the lower extremities<br>';
if(Field("Show Knee")=="Yes") show += '<&bull;> Knee or hip surgery<br>';
if(Field("Show Age")=="Yes") show += '<&bull;> Age '+Field("Age Above")+' or above<br>';
if(Field("Show Diabetic")=="Yes") show += '<&bull;> Diabetic neuropathy <br>';
if(Field("Show Liver")=="Yes") show += '<&bull;> Liver failure<br>';
if(Field("Show Renal")=="Yes") show += '<&bull;> Renal failure<br>';
if(Field("Show Malnutrition")=="Yes") show += '<&bull;> Malnutrition (albumin at or below 2.5)<br>';
if(Field("Show BedRest")=="Yes") show += '<&bull;> Prolonged bed rest of 4 hours AND patient unable to reposition oneself (due to pain,<br>&nbsp;&nbsp;&nbsp;injury or nerve block)<br>';
if(Field("Show Obesity")=="Yes") show += '<&bull;> Morbid obesity<br>';
if(Field("Show Claudication")=="Yes") show += '<&bull;> Intermittent claudication<br>';
return show;
}
else return "";

So, the line in red is the line where I need just part of the Rule to return in Bold

Please see below for the "3orMore_Rule":


if (Field("Application 3 or More") == "Yes")
{
if (Field("3orMore_DropDown") == "3 or more of the following")
return "Apply Mepilex Border Sacrum if patient meets 3 or more of the following criteria:<br>";
else
if (Field("3orMore_DropDown") == "2 or more of the following")
return "Apply Mepilex Border Sacrum if patient meets 2 or more of the following criteria:<br>";
else
if (Field("3orMore_DropDown") == "1 or more of the following")
return "Apply Mepilex Border Sacrum if patient meets 1 or more of the following criteria:<br>";
else
if (Field("3orMore_DropDown") == "the following")
return Resource("following_headline");
else
return "";
}
else
{
if (Field("Application 3 or More") == "No")
return "";
else

return "";
}


The phrase in red are what to return in a Bold typeface.
Any help would be greatly appreciated.



Thanks So Much!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:26 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.