Unable to save new fields in SOAP note

There is some work on the SOAP Note that I have been doing that called for adding columns to the SOAP note table. I only added two-columns interpretationused and languageused. Simple enough. I added the magic to the FormSOAPclass.php

function get_interpretationused()
{
	return $this->interpretationused;
}
function set_interpretationused($data)
{
	if (!empty($data)) {
		$this->interpretationused = $data; 
	}
}
function get_languageused()
{
	return $this->languageused;
}
function set_languageused($data)
{
	if (!empty($data)) {
		$this->languageused = $data;
	}
}

There is not a problem with retrieving data from the database. I manually entered data into the new fields and it comes back from the database and populates the form. Not so easy and not so peasy. But got that working. Now, the persist is not doing its job. This is where I am stuck. I followed the data flow from the post into the C_FormSOAP.class.php file and could see where the populate_object marries the data coming into the function from the post. The next lines saves the data. However, my new data will not save.

    $this->form = new FormSOAP($_POST['id']);
    parent::populate_object($this->form);
    $this->form->persist();

I am trying to talk this out (this form needs an upgrade to twig!). Followed the system over into the ORDataObject where the sqlListFields is supposed to get the columns from the database. And use that in the persist() function. I think I am getting burnt on the is_callable() function. Line 35 in the ORDataObject is were the query should be built to store data. But again, not for my new fields.

Can somebody toss me a bone?

I want to assume you have added new properties to the class!

@sjpadgett - I thought I did. Which class are you referring to? I added them in the FormSOAPclass.php like this:

/**
  * static
 */
var $id;
var $date;
var $pid;
var $user;
var $groupname;
var $authorized;
var $activity;
var $subjective;
var $objective;
var $assessment;
var $plan;
var $interpretationused;
var $languageused;

Is there somewhere else you are thinking about?

Nope not right off. Seems i’ve seen this before but my mind is not currently very agile lately. I’ll think about and get back to you.

1 Like

Can’t you go ahead and set a breakpoint at that function and trace back from there?

@sjpadgett I will try that today and see what I can figure out. I will duplicate my work on another server so I can figure out if it server OS related or DB related. On the build server we are using Centos7 & Mariadb.

That standard form needs to become a standard layout.

@mdsupport I agree with you.

Well figured it out!!!

Drum roll please. Always place form information that is to be saved inside the form tag.
Please remove human insert new error free =^)8

I designed one that is pretty nice. I’ll see if I can get it in.

Hint: I like to use browser view source. It’ll tell ya all tags that’s not closed in nice red lettering.
Saves much time. Glad ya got it.