{"id":618,"date":"2013-09-19T14:13:57","date_gmt":"2013-09-19T18:13:57","guid":{"rendered":"http:\/\/blog.uvm.edu\/ctl-projects\/?p=618"},"modified":"2013-09-19T14:13:57","modified_gmt":"2013-09-19T18:13:57","slug":"med-college-policies-db","status":"publish","type":"post","link":"https:\/\/blog.uvm.edu\/waw\/2013\/09\/19\/med-college-policies-db\/","title":{"rendered":"Med College policies db"},"content":{"rendered":"<div>\n<div>\n<div>Entered on 09\/19\/2013 at 13:53:44 EDT (GMT-0400) by Melissa Long<\/div>\n<blockquote><p><em>I\u2019ve been working with my dean to begin reorganizing our College of Medicine Student Handbook content from one comprehensive (cumbersome) pdf document into a searchable website very similar to the Animal Science Majors Student Handbook (<a href=\"http:\/\/asci.uvm.edu\/current\/handbook\/\" target=\"_blank\">http:\/\/asci.uvm.edu\/current\/handbook\/<\/a>). We absolutely\u00a0LOVE\u00a0the way the main campus Compliance Office has organized the University\u2019s policy website (<a href=\"http:\/\/www.uvm.edu\/policies\/?Page=alphalist.php\" target=\"_blank\">http:\/\/www.uvm.edu\/policies\/?Page=alphalist.php<\/a>)and plan to link to it under the \u2018Policy Section\u2019 of our forthcoming \u201cdocument.\u201d However, COM also has some policies unique to our program that we\u2019d like to organize and present much like on the University\u2019s parent site.<\/em><\/p>\n<p><em>Erica Heffner suggested that I connect with you, as the guru who helped them organize the policies in an SQL database and assisted with programming the interface. I\u2019m pretty adept at databases, but have never created one specifically for a website. I was hoping you might be willing to give me a glimpse at how you went about this for the main UVM policy page, so that I don\u2019t struggle trying to re-invent a wheel.<\/em><\/p>\n<p><em>I\u2019m also curious about recommended practices around \u201cversioning\u201d and welcome your thoughts. Erica explained that her office doesn\u2019t use an elaborate database or system; but rather when they replace a policy, they create a new version number, keep the retired policy in an archived folder with the date the policy was replaced, and that the new version of the policy includes an effective date.<\/em><\/p>\n<p><em>Is there any chance you\u2019d be willing to share some insight\/advice with me as I prepare to embark on this undertaking? Or someone else you might refer me to, if not?<\/em><\/p><\/blockquote>\n<p>Entered on 09\/19\/2013 at 13:55:17 EDT (GMT-0400) by Wesley Wright:<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div>The Policies database is a php application on www.uvm.edu interfaced with a MySQL database living on webdb.uvm.edu<\/div>\n<div><\/div>\n<div>You can get an account on www.uvm.edu here:<\/div>\n<div><\/div>\n<div>http:\/\/www.uvm.edu\/it\/account\/?Page=apply-department.html<\/div>\n<div><\/div>\n<div>And you can get a mySQL database here:<\/div>\n<div><\/div>\n<div>https:\/\/webdb.uvm.edu\/<\/div>\n<div><\/div>\n<div>Polices db is pretty simple. Main table looks like this:<\/div>\n<div><\/div>\n<div>CREATE TABLE `policy_docs` (<br \/>\n`doc_id` varchar(100) NOT NULL DEFAULT &#8221;,<br \/>\n`filename` varchar(100) DEFAULT NULL,<br \/>\n`title2` varchar(200) DEFAULT NULL,<br \/>\n`category` varchar(255) DEFAULT NULL,<br \/>\n`official` varchar(255) DEFAULT NULL,<br \/>\n`review_year` char(10) DEFAULT NULL,<br \/>\n`status` char(2) DEFAULT NULL,<br \/>\n`board` char(2) DEFAULT NULL,<br \/>\nPRIMARY KEY (`doc_id`)<br \/>\n)<\/div>\n<div><\/div>\n<div>doc_id is compliance internal numbering scheme (http:\/\/www.uvm.edu\/policies\/?Page=numberingsystem.html&amp;SM=SubProcessMenu.html)<\/div>\n<div>filename is name\/location of PDF<\/div>\n<div>title2 is full document title<\/div>\n<div>category is comma delimited list of applicable category codes, related to\u00a0table categories<\/div>\n<div>official is code for responsible office\/officer, see table officials<\/div>\n<div>review_year is sort of a last reviewed\/next review date<\/div>\n<div>status is code letter, f for final, d for draft<\/div>\n<div>borad is\u00a0Governance code b\u00a0Board of Trustees\u00a0Institutional<\/div>\n<div><\/div>\n<div><\/div>\n<div>Other tables:<\/div>\n<div><\/div>\n<div># Dump of table categories<br \/>\n# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;CREATE TABLE `categories` (<br \/>\n`code` char(2) NOT NULL DEFAULT &#8221;,<br \/>\n`cat_name` varchar(255) DEFAULT NULL,<br \/>\nPRIMARY KEY (`code`)<br \/>\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;<\/p>\n<p># Dump of table community<br \/>\n# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>CREATE TABLE `community` (<br \/>\n`comm_id` int(10) unsigned NOT NULL AUTO_INCREMENT,<br \/>\n`doc_id` varchar(100) NOT NULL DEFAULT &#8221;,<br \/>\n`community` varchar(100) NOT NULL DEFAULT &#8221;,<br \/>\nPRIMARY KEY (`comm_id`)<br \/>\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 PACK_KEYS=1;<\/p>\n<p># Dump of table officials<br \/>\n# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>CREATE TABLE `officials` (<br \/>\n`code` char(4) NOT NULL DEFAULT &#8221;,<br \/>\n`official` varchar(255) DEFAULT NULL,<br \/>\nPRIMARY KEY (`code`)<br \/>\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;<\/p>\n<p>Typical SQL:<\/p>\n<\/div>\n<div><\/div>\n<div>SELECT policy_docs.doc_id, policy_docs.title2,policy_docs.filename, policy_docs.category, board from policy_docs where status=&#8217;f&#8217; order by title2<\/div>\n<div><\/div>\n<div>Don&#8217;t know much about versioning. You could come up with a version numbering scheme, put a code in status indicating &#8220;Most recent&#8221; and keep less recent in database for archival.<\/div>\n<\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Entered on 09\/19\/2013 at 13:53:44 EDT (GMT-0400) by Melissa Long I\u2019ve been working with my dean to begin reorganizing our College of Medicine Student Handbook content from one comprehensive (cumbersome) pdf document into a searchable website very similar to the &hellip; <a href=\"https:\/\/blog.uvm.edu\/waw\/2013\/09\/19\/med-college-policies-db\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41826],"tags":[42758,12386,647],"class_list":["post-618","post","type-post","status-publish","format-standard","hentry","category-wes","tag-boffins","tag-database","tag-php"],"_links":{"self":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts\/618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/comments?post=618"}],"version-history":[{"count":0,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts\/618\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/media?parent=618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/categories?post=618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/tags?post=618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}