Session variable for current encounter date?

anonymous wrote on Sunday, November 13, 2011:

Is there a session variable for current encounter date?  I am making a way for full screen SOAP notes.   Also, can appointments be deleted, edited,cut, copied, pasted?

markleeds wrote on Sunday, November 13, 2011:

There are session variables for the current encounter and pid (patient id).  If both are set, meaning that you are in an encounter, you can get the date like this:

SELECT onset_date as date from form_encounter where encounter=$encounter and pid=$pid;

$encounter and $pid were copied from $_SESSION and $_SESSION

Search through some other forms that already do this to see exactly what the code looks like.

anonymous wrote on Sunday, November 13, 2011:

thanks that works…. in form_encounter is date the “date of service” and injury/illness date the “onset_date”?  I didn’t put that very clear but do you know what I mean?

markleeds wrote on Sunday, November 13, 2011:

Usually, in any of these tables, if there is a field named ‘date’, it is the date of the entry.  In form_encounter, onset_date will correspond to the date of the encounter and the date field will be the date the encounter was entered.  Usually, these will be the same, but some practitioners will enter their encounters on a date later then the encounter date.

There are two date fields when you start to enter an encounter, Date of service and Onset/hosp. date.  I personally have not had a need to set these differently.  I believe that there are fields for both of these dates in addition to the ‘date’ field as described above in the form_encounter table.  I think Date of Service is onset_date.

Sorry about the ‘onset_date as date’ part of the query.  This was copied from a line of code and may confuse the issue.

anonymous wrote on Monday, November 14, 2011:

Thanks…