SELECT Patient_ID, First_Name_M0040, Last_Name_M0040, Middle_Initial_M0040 FROM #Request.prefix_db_agency#.patient WHERE Agency_ID = #Session.AgencyID# AND Status = 'active' ORDER BY Last_Name_M0040 SELECT patient.Patient_ID, patient.First_Name_M0040, patient.Last_Name_M0040, patient.Middle_Initial_M0040, patient.HI_Claim_Number, Physician.Physician_ID, Physician.LastName, Physician.FirstName, Agency.Agency_Name, Agency.Agency_Medicare_ID FROM #Request.prefix_db_agency#.patient, #Request.prefix_db_lookup#.Agency, #Request.prefix_db_lookup#.Physician WHERE Patient_ID = #Form.Patient_ID# AND patient.Agency_ID = Agency.Agency_ID AND patient.Primary_ReferringPhys_ID_M0072 = Physician.Physician_ID SELECT Assessment_ID, Assessment_Number, Start_of_Care_M0030, Admission_Status, Assessment_Reason_M0100, Assessment_Completed_M0090, Assessment_Tracker_ID, Certification_Start, Certification_End FROM #Request.prefix_db_agency#.Assessment_New WHERE Patient_ID = #Form.Patient_ID# AND Certification_Start <> '0000-00-00' AND Certification_End <> '0000-00-00' AND Admission_Status = 'Complete' AND Deleted <> 1 ORDER BY Assessment_Completed_M0090 Desc SELECT Assessment_ID, Assessment_Tracker_ID, Start_of_Care_M0030, Admission_Status, Assessment_Reason_M0100, Assessment_Completed_M0090, Certification_Start, Certification_End FROM #Request.prefix_db_agency#.Assessment_New WHERE Assessment_Tracker_ID = #URL.ATID# ORDER BY Assessment_Completed_M0090 Desc INSERT INTO #Request.prefix_db_agency#.Assessment_Forms (Patient_ID, Agency_ID, Form_Type, Form_Status, Name_Item_6, Record_Creation_Date, Record_Mod_Date, Cert_Start_Item_3a, Cert_End_Item_3b, Assessment_Tracker_ID, Assessment_Number, Record_Num, SOC_Item_2, Addendum_Details_21, Record_Modified_By, Nurse_Digital_Signature, HI_Claim_Item_1, Provider_Num_Item_5, Provider_name_Item_7, Physician_ID, Physician_Item_24, Record_Created_By,Contact_id ) VALUES (#Form.Patient_ID#, '#Session.AgencyLogin#', 'Form 487', 'Not Signed', '#Session.Patient.First#' ' ' '#Session.Patient.Last#', #now()#, #now()#, #CreateODBCDate(Session.Cert.Certification_Start)#, #CreateODBCDate(Session.Cert.Certification_End)#, #Form.Assessment_Tracker_ID#, #Session.Assessment_ID#, '54321', #CreateODBCDate(Session.Cert.Start_of_Care_M0030)#, '#Form.Addendum_Details_21#', #Session.EmployeeID#, 'SIGNATURE VALID Digitally signed by #Session.Display#', '#Session.HI_Claim_Number#', '#Session.Agency_Medicare_ID#', '#Session.Agency_Name#', #Session.Physician_ID#, '#Session.FirstName#' ' ' '#Session.LastName#', #Session.EmployeeID#,#form.contact_id#)

Add an Order - Step 1

Select a Patient from the list below.

Patient:

Add an Order - Step 2

Patient Selected: #Last_Name_M0040#, #First_Name_M0040# #Middle_Initial_M0040#

Select an Assessment from the list below.

Start of Care Cert Start Cert End Assessment Type
#DateFormat(Start_of_Care_M0030,"mm/dd/yyyy")# #DateFormat(Certification_Start,"mm/dd/yyyy")# #DateFormat(Certification_End,"mm/dd/yyyy")# #Assessment_Reason_M0100#

Add an Order - Step 3

Select * from #Request.prefix_db_agency#.PatientContact where patient_id = #session.cs.patientid# and contactstatus=0 order by contactname Select Last_Name, First_Name, p.Physician_id from #Request.prefix_db_lookup#.Physician p left outer join #Request.prefix_db_lookup#.Employee e on p.employee_id = e.employee_id where p.agency_id = #session.agencyid# and e.status='active' order by Last_Name,First_Name
Patient: #Session.Patient.Last#, #Session.Patient.First# #Session.Patient.Middle#
Orders:
Physician:
OR
Contact:
Digitally-sign?  Yes
Bold fields required.