Weno broken

@brady.miller
I was checking out the code from the OpenEMR dev and my dev. I spotted the differences. See in the image below. Line 144 was changed. It is not working.

Can you tell me why it was changed and what the change is supposed to do?
I was under the impression that this template was governed by SMARTY and as such the {php} tags had to be around any PHP statement within the template.

Thank you for your attention

Someone added a pipe to escape the value. Not a problem as for the interface side of it but this escape seem to add quotes to string. This could be blowing up your code to handle the string because those quotes will get passed along. You can see this in insurance address(using latest master version). Not sure when but I do know Brady and others have been going through code and adding escaping for security reasons.

Hi @juggernautsei and @sjpadgett ,

There are 2 separate issues here, which are both related to the future proofing of the Smarty code in OpenEMR:

First issue that @juggernautsei brought up is that we should not be using native php code in the templates (or else we will never be able to migrate to Smarty version 3 in the future). Using native php in templates is not supposed to be done and is not allowed by Smarty version 3. At the place you pointed out, I removed the native php code and instead used Smarty syntax to do the same thing. I did just confirm that this is working on the development demo (If I turn on the Administration->Globals->Connectors->‘Enable Weno eRx Service’, then the ‘Transmit Rx’ button does show up).

Second issue is escaping. This shouldn’t cause issues since it’s not really adding quotes(if it is, then let me know and I’ll look into it). It instead converts quotes and other html things like < and > to (i think the UTF8 equivalent), so it’s then not seen as being ‘html’ code.

thanks,
-brady

btw, here’s the development demo I just tested this on:
http://www.open-emr.org/wiki/index.php/Development_Demo#Without_demo_data

Quotes are being added somewhere causing the phone and address line to display together. Noticed in Practice->Insurance as well. I’m looking at from a previously populate table. I’ll look on demo you mentioned. Btw: I never had a prob seeing Transmit button only transmit not working which we are closing in on…

Well that’s just weird. Restarted my apache and no more quotes. I did reset smarty cache previously but who knows…sorry :disappointed_relieved:

1 Like

@brady.miller I can’t put my finger on it but, there is an issue between Linux and windows with latest version of master. I’m hesitate to report anything anymore because these types of quirks are not obvious, so no one takes them serious. This case is the user edit dialog won’t save because of a javascript error on load (SyntaxError: illegal character) causing the submit button not to be registered with DOM (only on windows and i’ll run it down) Brady, you can’t do it all. When I try to start a dialog to fix this kind of stuff, I wind up just posting to myself, looking like an idiot or have the forum software nag at me for posting too much.
@juggernautsei please, if we are engaged in working on a problem don’t leave me hanging when I find something or ask a question. Either tell me that’s not it, i’m busy now, stupid question, don’t need your help or shut up but, don’t leave me posting to myself…

1 Like

hi @sjpadgett ,

Just disregard the automated forum nagging (for many of my posts it lets me know I have already done a similar post; just click the x and post).

And while we may appear to be idiots whom talk to ourselves on the forums, people are listening (or I at least pretend people are listening) and it does benefit OpenEMR.

For example, regarding the windows issues, this is definitely one of OpenEMR’s weaknesses. Luckily, we have @arnabnaha whom is usually running his instance of OpenEMR from the development tip on Windows (he is the one person whom I recommend not to use linux for OpenEMR) and will test out code for us when he has time. It is not uncommon that bugs creep up on the windows side.
And your post makes me realize that we should have a daily development demo that runs on windows and I just placed this issue on the demo farm repo:


(I honestly have no clue how I am going to do this yet, but this would be extremely helpful for the project)

So, keep posting :smile:
-brady

Thanks, @brady.miller. Once I got into the code. I can see what it is doing and figure out what you were saying is true. Mysterious things happen with code and display. Then life goes on.

@juggernautsei I fixed the qualifier and clinic/provider id in transmit json but now need to track down why drug NDC is not being saved in prescriptions.

Found reason drug import not working and why drug NDC not populating so i’m going to fix if you already haven’t…

Go for it! I have not fixed it yet. Please post PR.

Here’s PR:

1 Like

@sjpadgett everything looks good on the script that makes it to the proxy server. The problem is that you cannot use Test Pharmacy on the production system. You have to use a real pharmacy address. The system is programmed to ignore Test Pharmacy. So, at this point, send a real prescription and it will work.

Here is the update to the connected pharmacy list.

@juggernautsei
Just tried again, still no response from weno! Now i’m using local pharmacy and not from weno list but my understanding is that weno will fax anyway soooo whatever the case, weno should give some indication of transaction status otherwise user just sees same screen!

What error message are you getting returned to you?

In the message that was received at 5:33 AM today, It still has

<StoreName>Test Pharmacy</StoreName>
    -<Patient>
          -<Name>
               <LastName>Test</LastName>
               <FirstName>Test</FirstName>

Patient can’t be test test.
Patient address can’t be

   -<Address>
         <AddressLine1>ABC Happy Lane</AddressLine1>
         <City>Land Of Nodd</City>
         <State>TX</State>

I get nothing except the transmitted json in console. Looking at code it appears it is response from weno. What does weno return when it accepts a transaction? Does it echo back the transaction? If I knew what to expect from weno it would be easier for me to trouble shoot my end… User interface does nothing after xmit. Maybe need a timer here if weno isn’t going to provide some handshake…

I sent one later. Maybe 8:30-9am. It was a patient script to Public for lisinpril…

It seems as though it is not making it past the gatekeeper. There are no messages in my management console.

Please send a complete real script with a complete real patient information, including full address with a street number.

I’ll private message the actual json I sent