1. Home
  2. Scotland Orphan Documents Tooling

Scotland Orphan Documents Tooling

Docman 7 Orphan Tooling

This document explains the basis for the development of additional tooling for Docman 7 to be used prior to migration to Docman 10.

Rationale

Due to the age of the Docman 7 software and technical limitations of the system it is occasionally possible for Orphan Documents to appear. These are files on disk that have no corresponding record in the Docman database. Existing tooling in Docman 7 can detect these orphans and deal with them. However, prior to 2012 there was a defect in Docman 7 that led to orphan documents being created when a patient was Exported, e.g. to transfer to another practice. At this time when an export occurred the document was correctly exported and deleted from the Docman database but the file itself was left on disk. This means that the existing Document Check tool identifies false positives when it runs: documents that appear to be Orphans but have actually been exported.

This tool is designed to fix the previous issue by identifying which of the orphan documents have genuinely been exported and removing them from the Docman document store. The tool then handles genuine orphans by creating records in the docman database so that the files can be handled by the practice.

Tooling workflow

1. Create a list of all documents on disk in the Docman document store.

2. Compare that list with the list of documents in the Docman database. Mark any matches as Known documents.

3. Go through the logs of previously exported Patients. Each log file contains a copy of every exported document. Compare these documents with the unknown documents on disk. Mark any matches as Exported.

4. What is left are documents that have not been exported and that are not in the Docman database. Treat these as genuine orphan documents:

1. Create a document record in the Docman database

2. Create a document audit record in the Docman database noting why the document was added.

3. assign the document to a virtual Filing Folder ready for inspection/processing by the practice.

5. Move all documents found to have been ‘Exported’ to an ExportedDocuments folder on disk so that they can be inspected if necessary.

Installation

Installation The tool can be located at https://apps.docman.com and downloaded as a .msi file. Once downloaded, the tool is installed using Windows Installer. Either: * Double click the installer * Use msiexec:

msiexec /i dm7.orphan.rehomer.msi

Removal

If you need to remove the tool either use the Add/Remove Programs dialogue or use msiexec:

msiexec /x dm7.orphan.rehomer.msi

Usage

This is a command line tool. The run-time parameters are as follows:

–odsCode The Ods Code of the site that this instance of the agent will synchronise.

–host Database server host name.

–password Database server password.

–port Database server port number.

–user Database server user name.

–path The path to the Docman document share. Can be a UNC path or drive based path.

–batchSize The number of documents to send in a batch. Batch results are reported into Snow.

–orphanFilingFolder (Default: Orphan Documents) The name of the filing folder that orphan documents will be put into.

–whatIf (Default: false) Run the tool in non-invasive mode.

–non-interactive (Default: false) Run the tool in non-interactive mode.

–additionalSearchFolder The full path to any additional folders containing candidate orphans. This path must be quoted if it contains spaces, e.g. “N:\PCTI\Orphaned Documents”

–help Display this help screen.

–version Display version information.

Show Help

dm7-orphan-rehomer.exe –help

What-If mode

WhatIf mode allows the tool to run without making any changes to the site. Use this to show what the tool would do if it ran in regular mode.

dm7-orphan-rehomer.exe –odsCode A12345 –whatIf

When the tool runs it creates a table in the database called store_inventory. WhatIf mode cannot run if this table already exists, so in the unlikely event that you choose to run whatIf mode after running a full execution you will need to manually remove the table first. WhatIf mode also creates and uses the store_inventory table but it exports it to CSV and drops it before it terminates.

DM7 installation with a single site

For a single site with regular database setup and configuration just run the executable (none of the above parameters are required):

dm7-orphan-rehomer.exe

DM7 installation with multiple sites

For a multi-site installation you must provide the OdsCode so that the tool knows which site to target. Use the odsCode parameter to target a specific site on multi-site installations. The tool will produce an error on a multi-site installation if the OdsCode parameter is not provided:

dm7-orphan-rehomer.exe –odsCode A12345

Updated on September 12, 2024

Was this article helpful?