{"id":5113,"date":"2018-03-14T19:54:00","date_gmt":"2018-03-14T19:54:00","guid":{"rendered":"http:\/\/www.haydnwilliams.com\/blog\/?p=5113"},"modified":"2022-04-11T16:39:13","modified_gmt":"2022-04-11T15:39:13","slug":"splitting-a-datix-system","status":"publish","type":"post","link":"https:\/\/www.haydnwilliams.com\/blog\/splitting-a-datix-system\/","title":{"rendered":"Splitting a Datix system"},"content":{"rendered":"<p>Sometimes it&#8217;s necessary to split a Datix system. In my case we were splitting a single existing system into two, to match a corresponding corporate re-arrangement whereby one company was dividing into two (with separate branding and domain names, <em>etc<\/em>). While there are some obvious steps, and some which will depend on the exact nature of your split, I thought it might be helpful to jot down the not-so-obvious issues I ran into. All of this relates to v14 of DatixWeb.<\/p>\n<p>The basic premise here is that we are going to take the existing system, A, which currently contains <strong>all<\/strong> data, and copy it to create a new system, B. We will then delete half of the data from A and half from B, so that each retains only the information relevant to its new area of operation. System A continues to operate as it always has done, so you only need to fiddle with connection settings and the like in System B. Your new database and new Rich Client \/ DatixWeb environments may well be on the existing server(s), or on an entirely different one; either is fine.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6133\" src=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-18-at-12.43.02.png\" alt=\"Creating a new system from an existing one.\" width=\"1257\" height=\"420\" srcset=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-18-at-12.43.02.png 1257w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-18-at-12.43.02-800x267.png 800w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-18-at-12.43.02-1200x401.png 1200w\" sizes=\"auto, (max-width: 1257px) 100vw, 1257px\" \/><\/p>\n<p>I don&#8217;t want to go into all of the gory details here, and I would strongly suggest enlisting the help of Datix to do this (we did), rather than trying to sort it out yourself. However, the main steps are:<\/p>\n<ol>\n<li><strong>BACK EVERYTHING UP!<\/strong> That includes the database, the DatixWeb environment(s) including any test ones, and the network document store.<\/li>\n<li>Don&#8217;t blame me if it all goes wrong. \ud83d\ude09<\/li>\n<li>Back up database A. Restore it as a new database, X.<\/li>\n<li>Copy DatixWeb environment B. Paste it as a new DatixWeb environment, Y.<\/li>\n<li>Copy the Datix network document store, C. Paste it as a new folder, Z.<\/li>\n<li>Update the <code>DatixConfig.php<\/code> file in environment Y so that it points to database X. If you don&#8217;t, <strong>both<\/strong> environments will still be amending the original database, A!<\/li>\n<li>Set up a new Datix Rich Client shortcut so that it points to database X. Don&#8217;t forget that you&#8217;ll need to create a new ODBC source to point at the new database, X, and will also then need to update the Global Parameters to point to the right locations for Documents, reports,\u00a0<em>etc.<\/em>, Z.<\/li>\n<li>In the <strong>new system:<\/strong>\n<ul>\n<li>update the outgoing email (SMTP) server details to ensure that the new system is trying to send emails through the correct server;<\/li>\n<li>update the Datix Admin email address:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6142\" src=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/pic3.jpg\" alt=\"\" width=\"1082\" height=\"78\" srcset=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/pic3.jpg 1082w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/pic3-800x58.jpg 800w\" sizes=\"auto, (max-width: 1082px) 100vw, 1082px\" \/><\/li>\n<\/ul>\n<\/li>\n<li>In <strong>both systems<\/strong> as required:\n<ol>\n<li>Add\/remove domain(s) from the &#8220;<em>permitted domains<\/em>&#8221; list in DatixWeb configuration. <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6141\" src=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/pic2.jpg\" alt=\"\" width=\"1227\" height=\"79\" srcset=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/pic2.jpg 1227w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/pic2-800x52.jpg 800w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/pic2-1200x77.jpg 1200w\" sizes=\"auto, (max-width: 1227px) 100vw, 1227px\" \/><\/li>\n<li>Deactive and\/or hide un-needed data using &#8216;<em>Batch update<\/em>&#8216; &#8211; we&#8217;ll delete it later, once we&#8217;re sure nothing awful has happened:\n<ul>\n<li>Deactivate un-needed codes by setting the &#8216;<em>Active<\/em>&#8216; column to &#8216;<em>N<\/em>&#8216;. Easier in the Rich Client than DatixWeb because you can just whiz down the editing table very quickly.<\/li>\n<li>Disable un-needed user accounts by setting the &#8216;<em>Closed date<\/em>&#8216; to today&#8217;s date.<\/li>\n<li>Search for open incidents, complaints, <em>etc.<\/em> no longer required in each system, and use a batch update\u00a0to set the &#8220;<em>Approval Status<\/em>&#8221; to &#8220;<em>Rejected<\/em>&#8221; for them all. This is particularly important because if you send reminder emails using the &#8220;<em>Overdue email notification<\/em>&#8221; function while the records are open, Datix <u>will<\/u> still send emails to the closed user accounts, resulting in all kinds of confusion.<\/li>\n<\/ul>\n<\/li>\n<li>If you have any URLs in customised DatixWeb email templates, update them. This might include hard-coded links to Datix records, or links to policies\/procedures.<\/li>\n<li>Similarly, update form designs (DIF1, <em>etc<\/em>.) to account for any new URLs that apply.<\/li>\n<li>Once you&#8217;re comfortable that the system is working effectively with lots of the old data closed\/disabled then you can eventually delete it:\n<ul>\n<li>Delete un-needed user accou nts.<\/li>\n<li>Delete un-needed documents from the file share. <strong>HOW?<\/strong><\/li>\n<li>Delete un-needed data from every module. Don&#8217;t forget that this includes the support modules like Contacts, Equipment and Actions, as well as all of the &#8216;main&#8217; modules.<br \/>\nNote that you can remove records by doing a search and using the &#8220;<em>Batch Delete<\/em>&#8221; function &#8211; this is the method recommended by Datix. While those of you who have been around a while may remember when this was a bit flaky, it&#8217;s now (v14) quite robust. I deleted our incidents in batches of 10,000 because doing any more takes <em>ages<\/em> and I started to worry that something had broken each time! <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6140\" src=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2018\/03\/pic1.jpg\" alt=\"\" width=\"256\" height=\"84\" \/><\/li>\n<li>Delete un-needed codes. <strong>DO NOT<\/strong> delete them before you&#8217;ve searched for all of the module data you need to delete as described above &#8211; if you delete the codes, then you won&#8217;t be able to easily search using them (obviously you could just type them in manually, but who has <em>all<\/em> of their codes memorised?!).<\/li>\n<li>Delete user security Profiles and Groups which are no longer needed.<\/li>\n<li>Delete user-generated reports which are no longer needed.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes it&#8217;s necessary to split a Datix system. In my&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":6133,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1179,768,1180],"class_list":["post-5113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-it","tag-datix","tag-patient-safety","tag-risk-management"],"_links":{"self":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts\/5113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/comments?post=5113"}],"version-history":[{"count":0,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts\/5113\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/media\/6133"}],"wp:attachment":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/media?parent=5113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/categories?post=5113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/tags?post=5113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}