You may have more document types than you need
SELECT COUNT(*), `doctype` FROM `document` WHERE `public1`="0" group
by `doctype` order by count(*) desc;
71823 others
51655 Pharmacy
50634 Consult
26790 Lab
21790 Radiology
8136 Referral
6573 Appointment
6305 Pathology
4668 Insurance
3093 CCAC
2358 Discharge
1773 Operative Report
1121 Medication List
1100 Ambulatory BP
1014 Consent for Release of Information
864 old chart
814 Progress Note
754 photo
621 History/Physical
608 legal
If you have many more types you may want to consolidate poorly utilized types
FOR OSCAR 19 with the sort documents in folder option only
If you have the document types sorting you can arrange the sort order by altering the naming of the items, the following puts Consult at highest priority and Pharmacy at lowest
UPDATE `document` SET `doctype`= "a.Pharmacy" WHERE `doctype`="Pharmacy";
UPDATE `document` SET `doctype`= "z.Consult" WHERE `doctype`="Consult";
UPDATE `ctl_doctype` SET `doctype`= "a.Pharmacy" WHERE `doctype`="Pharmacy";
UPDATE `ctl_doctype` SET `doctype`= "z.Consult" WHERE `doctype`="Consult";
UPDATE `documentDescriptionTemplate` SET `doctype`= "a.Pharmacy" WHERE
`doctype`="Pharmacy";
UPDATE `documentDescriptionTemplate` SET `doctype`= "z.Consult" WHERE
`doctype`="Consult";