http://starfrontiers.org/khvcode/openemr/pmm.zip
The above is a Psychiatric med management form. Looks pretty nice and all, but has an issue.
There is one section of check boxes that will not stinkin’ stay set.
The form does not suffer from a paucity of code, as being lazy I simply ran with the full-on New/View/Report/Save/Table/Info format. Bear with my indiscretion.
[CODE REMOVED DUE TO SHITTY FORUM TRYING TO RENDER IT, guess you have to look at the files! Tildes do not work!]
There are three sets of radio buttons, psycho1, psycho2, and psycho3.
I save the form, everything is fine. I edit it, sometimes it shows up ok, sometimes some of the values are not set in the DOM. Sometimes this happens in the report, sometimes in the view. It is inconsistent all over the place. I have set all the values (and the fields) to straight integers, I have tried alpha strings, used === comparators, changed the form field names, removed the UL and li tags, removed code on either side of the stuff…checked it against multiple IDE’s, you name it.
It is true that I may well have no idea what I am doing in general, but I had been convinced over the last couple of decades that I could code radio buttons. Maybe I am nuts. I have spent about 6 hours just trying to get these things to work consistently. It seems like they work, then “poof”.
One side note: I seem to remember back in my days of using LBF forms that radio buttons were screwing up, and I had to change them out for list boxes.
I am running the older xampp package (still).
Any ideas?
Radio buttons, if chosen as Data Type in the layout, will be missing in the actual form. I noticed this when constructing the Eye form for non-typists.
The problem has been reproduced in the regular Demo just now.
Per Pimm, Rod Roark built the LBV form, therefore it would be good to have some insight from him.
I just tried Demo versions of Open-EMR, but did not find anything under Forms nor Layout Based Visit form.
Where can I see and experiment with the Psyche1, 2 and 3 FORMS, if it is the Zip File I can’t help you since I can not include it in the Database for Demo Version latest or Developers version.
If the original form that you used as example for your Psyche1,2,3, works by including it in your Open-EMR version, there is a slight typo or an experimental field that is giving you the problems.
OK, the zip file is a custom form. I referenced the issue of the LBF forms, as it MAY be related. I am a developer, as much as many here are…though web scripts are not actually my bag, being a C++ and Delphi guy. That is irrelevant. I can code some php and html. This is not a complex deal. I am indeed asking a developer for advice in any case, as this is the developer form.
In the form I have posted, it is an issue with the FIELDS “NAME=psycho1”, “psycho2”, and “psycho3”. Netbeans sees no issue with my syntax. I have tried many variations in the code, even pure straw grasping like removing form tags and such. The issue does not go away. They save, you view the report and they are all there, you use view to edit, one might disappear, you save it, another might disappear…then again them might all work. Looking at the database values, they all seem to save properly each and every time. They simply do not get populated into the DOM data dependably, which makes me very very curious. I HAVE REPLICATED this with an LBF form today. I find that this also happens with the standard Review of Systems form, but I can only get it do it with the field for Arrhythmia.
I just checked at the Demo Version and it might have to do with the php file instructions. If you take a look at the Demo version for production there is the eye form under layout based forms.
AM and PM can not be clicked. Possible these have to be check boxes and these are only one character wide. Y or N, 1 or 0 etc for the Database. The radio button makes a choice of the two it is AM or PM it can’t be both. But has nothing to do with time or date.
Could it be the date is gathered and is related to the Encounter date? This is the only date that really makes a change. Or could have to do with EU-VS dates configurations.
3-8-2013 is third of August or eighth of March…
For me using European as favorite, it had been an issue in the past. But was solved as far as I remember. But with older forms it still could be a problem.
In case of more questions, pls ask a professional.
I am a professional dude. I just try to adopt a self-depreciating tone to hide my enormous ego. These are the developer forums, not the idiot help desk, which is why I posted here. I have some passing familiarity with OpenEMR, as I have been working with it for about 5 years as a customizing developer and am on the OEMR board of directors. Please refrain from continuing to indicate I should cease posting on this subject and seek out a “professional”. I know all the professionals involved with OpenEMR. LBF is not the primary concern anyway, it is the behavior of radio buttons in the forms API that I am concerned with.
My demo install is at dev.arsponline.org. I’ll put the form up on there, along with other examples that display the same behavior.
Must be your radio button. Don’t press the radio button, it could make you older or younger, or worse you might be the same age. Now I do worry about your comment. Please find a solution, it is terrible if you are grumpy even if it is a little.
YOU ARE FORGIVEN, but I really don’t know for what ;-))
in the demo stable version I just changed your time and AM and PM into radio button behavior as I understand radio buttons should be used, I kept them optional as in the original, but that is not what it should be, it would make everybody confused.
For this I had to make a new list, the am-pm list with the options: am order 1 and pm order 2
Next include radio button and choose am-pm -list for the radio button
I wanted to get it just behind the time but that I can not accomplish. Should be easy if you know how.
On a quick look, appears psycho2 is probably the worst. First, some sanity testing could be to just see what happens after you grab the object with below debug statements that will go to your log:
error_log(“DEBUG_psycho1:”.$obj{“psycho1”},0);
error_log(“DEBUG_psycho2:”.$obj{“psycho2”},0);
error_log(“DEBUG_psycho2:”.$obj{“psycho3”},0);
(BTW, php error_log() and javascript alert() are my favorite debugging tools)
The Eye form was imported (Configure Export/Import from Globals->Features, then Backup->Import Configuration). Tony McCormick asked me to export the lbv.sql file so that the collection of the Eye forms can be made “share-able”. If one can export, surely one can import.
I am beginning to get my toes wet in Database. No disasters thus far. And thanks to you, Cverk & Kevin, if catastrophe strikes, the backup pulls the bacon out of the fire.
OK, seems I have to work with import and export in Demo Version ok for production implementation.
In Dev Demo Database etc does not accept import of SQL files.
So if one can: export in Demo Version Dev. one can NOT always import. Needs some fine tuning. Tony McCormick could make the changes in PHPAdmin for Dev Demo?
PHPAdminI understand the CSV file, but what can I do to learn the SQL import? Or how to go fromCSV to SQL? Can you explain?