I have a form (a really disfunctional form) and am in the midst of rebuilding it. In one of the sections a user is able to fill in information regarding crc screening results, pap, and mammo and input it into the flowsheet under the dates of service specified. I am at a lost of identifying the code that allows this function.
The form had a field that asks for "date of service", then a field for "results", then a button to commit the info to the flowsheet. The user fills this in and, for example, the clinical list changes are as follows
COLONOSCOPY Normal (06/10/2010)
Does anyone know what the function looks like?
I would like to build a form where the user can input data for several different types of care/dates of service.
Thanks in advance!!!
Best Regards
Richard
OBSNOW("obsterm", value, date)
Thanks Jerry!! I see it in the form now.
While this form is disfunctional for our practice, there is a really nice function that tells the user to use a standard date format of
mm/dd/yyyy
However, it does not require the user to do so.
I am posting the code below if anyone wants to take a look, use, or whatever.
I would love to know how to force the user to use a standard mm/dd/yyyy date format if anyone out there knows how.
All the best
-Richard
{
{IF mtch_dt( DOCUMENT.DATE_OF_RESU) == TRUE THEN OBSNOW("Colonoscopy", DOCUMENT.RESULTS, DOCUMENT.DATE_OF_RESU) ELSE USERYESNO("Please enter a valid date - mm/dd/yyyy. Click Yes to continue") ENDIF}
fn mtch_dt(date){
if match(date,3,"/")== 3 and match(date,6,"/")== 6 THEN
local dt = getfield(date,"/","")
local mt = dt[1]
local dy = dt[2]
local yr = dt[3]
local yrsz = size(yr)
local dysz = size(dy)
loacl mtsz = size(mt)
if yrsz <> 4 OR dysz <> 2 OR mtsz <> 2 THEN FALSE ELSE
local cn = remove(yr,3,2)
if match(cn,1,"19")>0 or match(cn,1,"20")>0 THEN
if mt == "02" and val(dy) > 0 AND val(dy)<= 29 then TRUE else
if mt == "09" or mt == "04" or mt == "06" or mt = "11" and
val(dy)> 0 AND val(dy) <= 30 then TRUE else
if mt == "01" or mt == "03" or mt == "05" or mt == "07" or mt == "08"
or mt == "10" or mt == "12" and
val(dy)> 0 AND val(dy) <= 31 then TRUE
else FALSE
endif
endif
endif
endif
endif
endif
}
}