UPDATE #Request.prefix_db_agency#.Assessment_New SET Surgical_ICD_485 = '#form.hdnCode#', M0063_Pattern = '#form.careplan#', M0063_Pattern ='Use ONLY SmartDX database', Surgical_ICD_Date_485=#CreateODBCDate(form.hdnDate)#,Surgical_ICD_Date_485= null, Surgical_ICD_485_Description = '#form.hdnDescription#', Psy_Nursing_M0630 = '#form.hdnAdmitted#', Grooming_M0640 = '#form.hdncardio#', Grooming_M0640p=#CreateODBCDate(form.hdtM640)#,Grooming_M0640p= null, Dress_Upper_M0650 = '#form.hdnf2100#', Dress_Upper_M0650p=#CreateODBCDate(form.hdtM650)#,Dress_Upper_M0650p= null, Dress_Lower_M0660 = '#form.hdnf2200#', Dress_Lower_M0660p=#CreateODBCDate(form.hdtM660)#,Dress_Lower_M0660p= null, Bathing_M0670 = '#form.hdnf3000#', Bathing_M0670p=#CreateODBCDate(form.hdtM670)#,Bathing_M0670p= null, Toileting_M0680 = '#form.hdnI0100#', Toileting_M0680p = '#form.hdnj0900#', Transferring_M0690=#CreateODBCDate(form.hdtM690)#,Transferring_M0690= null, Transferring_M0690p = '#form.hdnj0900c#', Ambulation_M0700 = '#form.hdnj0900d#', Breathing_M0490 = '#form.hdnrdnj0905#', Ambulation_M0700p = '#form.hdnj0910a#', Eating_M0710=#CreateODBCDate(form.hdtM710)#,Eating_M0710= null, Eating_M0710p = '#form.hdnComprehen#', Meal_Prep_M0720 = '#form.hdnj2030#', Meal_Prep_M0720p=#CreateODBCDate(form.hdtM720)#,Meal_Prep_M0720p= null, Transport_M0730 = '#form.hdnj2030c#', Transport_M0730p = '#form.hdnj2040#', Laundry_M0740=#CreateODBCDate(form.hdtM740)#,Laundry_M0740= null, Laundry_M0740p = '#form.hdn2040c#', Housekeeping_M0750 = '#form.hdnn0500#', Housekeeping_M0750p=#CreateODBCDate(form.hdtM750)#,Housekeeping_M0750p= null, Shopping_M0760 = '#form.hdnn0510a#', Shopping_M0760p = '#form.hdnn0520a#', Use_Phone_M0770=#CreateODBCDate(form.hdtM770)#,Use_Phone_M0770= null, Oral_Meds_M0780=#CreateODBCDate(form.hdtM780)#,Oral_Meds_M0780= null, Hospice_Assess = '#form.hdnKarnofsky#', Home_Safety_Assess= '#form.hdnComprehensive#', Therapies_Home_M0250 = '#form.hdnTherapies#', M0250_Assess = '#form.txtNutri#', Endocrine_Assess = '#form.txtEndocrine_Assess#', M0420_Assess = '#form.hdnPain#', pain1 = '#form.hdnThrobbing#', pain2 = '#form.hdnThreshold#', pain3 = '#form.hdnRate#', pain4 = '#form.hdnLong#', pain5 = '#form.hdnact#', M0440_Assess = '#form.txtSkin#', M0490_Assess = '#form.txtCardio_Assess#', AssessmentType_New = 1, Admission_Status='Complete', M0520_Assess = '#form.txtGeni#', M0540_Assess = '#form.txtGastro#', M0550_Assess = '#form.txtOstomy#', M0650_Assess = '#form.txtMusculo#', M0610_Assess = '#form.txt_Neuro#', Urinary_INcont_M0520 = '#form.txtchkPoor#', Patient_Behav_freq_M0620 = '#form.txtchkMental#', Urinary_INcont_when_M0530 = '#form.txtchkFinanical#', Bowel_Incont_M0540 = '#form.txtchkpatdep#', Ostomy_for_Bowel_M0550 = '#form.txtchkSpiritual#', Cog_Function_M0560 = '#form.txtchkHome#' WHERE Assessment_ID= #form.txtAssId# UPDATE IGNORE #Request.prefix_db_agency#.Diagnosis SET Severity='#severity#',Primary_Diagnosis='#primary#',Secondary_Diagnosis='#secondary#', Dx_Order = '#dxorder#' where Diagnosis.Assessment_ID=#session.cs.AssessmentId# and Diagnosis_ID=#Id#