Need a little SMARTY advice

juggernautsei wrote on Monday, March 10, 2014:

I am in the near the end of building a soap not review modification. The billing department wants to know that the physician has reviewed the soap note written by the nurse. So, I am adding a block at the end of the SOAP note that says ‘Electronically Signed by Doctor’.

The problem I ran into is getting this to display.

I built this function in FormSOAP.class.php.

    function set_signed($sd){
        if(!empty($sd)){
            $this->signed = $sd;
        }
    }
    function get_signed(){
        if($this->sig === 1){
         return  $this->signed;
        }
    }

I attempted a call to the function

	<td align="left">{php} xl('Signature','e'); {/php}</td>
	<td width="90%" height='50'>
                 Signed by: {$data->get_signed()}
	</td>

I admit, I don’t know SMARTY rules. I tried taking a crash course but the basics are not helping.
The complete amended files are at http://omp.openmedpractice.com/pacs/general_new.zip.

I know we have some smarty experts in the group and I am asking for some assistance to finish this mod.

Thanks and Regards,

blankev wrote on Monday, March 10, 2014:

What SOAP form are you using?

  1. SOAP under Clinical

  2. SOAP under Layout Based (See WIKI pages)

Sub 2. it is easy to add an extra field.

But if you have a working system sub 1. you need to get advise from a more experienced person to change the Forms for input, view and print. (Can’t help you with this) Do a search on the WIKI pages and in the Forums where you might find solutions for your extra fields.

juggernautsei wrote on Monday, March 10, 2014:

I am working on the SOAP LBF. It is the older one that came native with the install just the three plain boxes.

yehster wrote on Monday, March 10, 2014:

You need to create an appropriate plugin in library/plugins for smarty to understand your new functionality.

juggernautsei wrote on Tuesday, March 11, 2014:

 {assign var="s" value=$data->get_sig()}

This line solved my issue. I was able to assign $s to the object. Then I was able to use

 {if $s eq 0}Electronically Signed By Doctor  
 {elseif $s eq 0}Note has not been reviewed {/if}

Do the simplest thing that works