pm = CreateObject("Component", "Menu");
myArgument = 'uploadlist';
pm.MenuFunction(myArgument,#getP.Patient_Id#,'','','','');
SELECT * FROM #Request.prefix_db_lookup#.pPhysicians
WHERE Status = 0 AND Loc_ID = '#session.agencyid#' AND Phys_Fax IS NOT NULL
DELETE FROM #table_files#
WHERE id = '#url.df#'
AND AgencyId = '#session.AgencyId#'
AND PatientId = '#GetP.Patient_Id#'
DELETE FROM #Request.prefix_db_agency#.pg_files
WHERE id = '#url.dpgf#'
AND Agency_Id = '#session.AgencyId#'
AND Patient_Id = '#GetP.Patient_Id#'
INSERT IGNORE INTO #table_files# (
AgencyId, PatientId, Title, FileName, FileType,Dup_file_name, CreatedBy
,DOC_ID,Assessment
) VALUES (
'#session.AgencyId#'
,'#GetP.Patient_Id#'
,'#Form.ufTitle#'
,'#File.ServerFile#'
,'#File.ContentType#/#File.ContentSubType#'
,'#Duplicate_file_name#'
,'#session.EmployeeId#'
,'#form.document_name#','#form.Assessment#'
)
SELECT id, Title, DocumentDesc.Description AS Docdescription,FileName,Created,PatientId,CreatedBy,#table_files#.placeholder,
#table_files#.Notes,#table_files#.faxsend_to,#table_files#.faxsent_time,
Assessment,#table_files#.DOC_ID,#table_files#.Expires
FROM #table_files#
LEFT OUTER JOIN #Request.prefix_db_agency#.DocumentDesc ON #table_files#.DOC_ID = DocumentDesc.DOC_ID
WHERE AgencyId = '#session.AgencyId#'
AND PatientId = '#GetP.Patient_Id#'
AND CreatedBy = '#Session.EmployeeID#'
GROUP BY #table_files#.id
ORDER BY id
SELECT pg_files.id,pg_files.DOC_ID, pg_files.Title,pg_files.FileName,pg_files.Created,pg_files.Patient_Id,pg_files.CreatedBy,
pg_files.Notes,pg_files.faxsend_to,pg_files.faxsent_time,
DocumentDesc.Description AS Docdescription,
pEmployee.Emp_Last, pEmployee.Emp_First , pSchedules.*
FROM #Request.prefix_db_agency#.pg_files
LEFT OUTER JOIN #Request.prefix_db_agency#.pSchedules ON pg_files.Schedule_ID = pSchedules.Schedule_ID AND pSchedules.Status= 0
LEFT OUTER JOIN #Request.prefix_db_lookup#.pEmployee ON pg_files.CreatedBy = pEmployee.Emp_ID
LEFT OUTER JOIN #Request.prefix_db_agency#.DocumentDesc ON pg_files.DOC_ID = DocumentDesc.DOC_ID
WHERE pg_files.Agency_Id = '#session.AgencyId#'
AND pg_files.Patient_Id = '#GetP.Patient_Id#'
AND Title != 'Wounds_assessments'
GROUP BY pg_files.id
ORDER BY pg_files.id
SELECT pg_files.id,pg_files.DOC_ID, pg_files.Title,pg_files.FileName,pg_files.Created,pg_files.Patient_Id,pg_files.CreatedBy,
pg_files.Notes,pg_files.faxsend_to,pg_files.faxsent_time,
DocumentDesc.Description AS Docdescription,
pEmployee.Emp_Last, pEmployee.Emp_First , pAssessments.*
FROM #Request.prefix_db_agency#.pg_files
LEFT OUTER JOIN #Request.prefix_db_agency#.pAssessments ON pg_files.Schedule_ID = pAssessments.Assmt_ID AND pAssessments.Status = 0
LEFT OUTER JOIN #Request.prefix_db_lookup#.pEmployee ON pg_files.CreatedBy = pEmployee.Emp_ID
LEFT OUTER JOIN #Request.prefix_db_agency#.DocumentDesc ON pg_files.DOC_ID = DocumentDesc.DOC_ID
WHERE pg_files.Agency_Id = '#session.AgencyId#'
AND pg_files.Patient_Id = '#GetP.Patient_Id#'
AND Title = 'Wounds_assessments'
GROUP BY pg_files.id
ORDER BY pg_files.id
SELECT * FROM #Request.prefix_db_agency#.DocumentDesc
WHERE DocumentType like '%Patient%'
AND Required = 1
ORDER BY DOC_ID
SELECT * FROM #Request.prefix_db_agency#.DocumentDesc
WHERE DocumentType like '%Assessment%'
AND Required = 1
ORDER BY DOC_ID
The file you uploaded exceeded the 5MB file size limit.
Please reduce the size of the file and try uploading again.
SELECT * FROM #Request.prefix_db_agency#.pAssessments
WHERE Patient_ID = '#session.cs.patientid#'
AND Status = 0
SELECT * FROM get_assessment
WHERE Assmt_ID = '#getFiles.Assessment#'