The following utilities can be run from the command line or automatically at different times via the Automation Manager:
vet -p program "options"For example, the validation program would be run as:
vet -p valid
Some of the utilities allow you to specify options like client range, send output to a specific file, etc. In this case the options MUST be enclosed in quotes (") e.g. to sort the clinical records for clients 10 to 20 the command line would be:
vet -p sort "-S 10 -E 20"e.g. Start at record 10, End at record 20
To run the validation for the same clients and include DD discrepancies the command would be:
vet -p valid "-S 10 -E 20 -o dead"
Note: For the utilities that allow you to specify a range, if you miss off the starting/finishing options then ALL clients will be used. Missing of just the finish option then the system will default to the last animal on file. Normally there will be no screen output so rather than tie up a screen you can run the utility in the background. The report is started and the screen is freed for other uses. You do this by ending the command line with an ampersand (&) e.g.:
vet -p free &
Note: Some of these utilities will lock the vet system (e.g. valid) and some will update files. You should ensure that the timing of these utilities do not conflict with your nightly backup. If you want to ensure that no other users use the system while the utility is running you can include the -L option on the command line e.g.
vet -L -p freeThis will ensure that nobody can access the system for the duration of the command. Additionally, you can configure edge to check for this lock and abort the backup if present. (See Edge manual re. /etc/edge.start).
If you find you are running the same report at the same time every month you may want to consider getting the machine to run it automatically itself. You can do this by using the Automation Manager which is a front end to the Unix cron utility.
This is located:
When first selected you will have two options, List and Quit, you should select the list option to enable the add/edit routines.
The List option has two formats:
Once the jobs have been listed the menu will have two additional options:
Select the required option.
There are two 'modes' for editing, basic and advanced. The default is the basic - this allows you to set the day and time you want the job to run - the advanced option will be explained in the next section.
Enter the required time (in 24 hour format) when you want this job to run. You then have the option:
Once you have entered the details you will have a prompt:
Note: There are two additional options, when you select the 'Report Generator' you will be prompted to enter the name of the script you want to run. With 'Special' you have to specify the full command you wish to run.
Multiple Jobs
Some of the options (Report Generator, S_Send and X_Check) can be specified multiple times whereas the other reports can only be added once.
The last three option above are optional, if you leave them out the job will run every day.
With the Advanced option you have additional granularity over the times e.g.:
Note that the specification of days may be made by two fields (day of the
month and day of the week). If both are specified as a list of elements,
both are adhered to. For example,
Specifing 1,15 for 'Day' and 1 for 'Weekday' would run a command on the
first and fifteenth of each month, as well as on every Monday. To specify
days by only one field, the other field should be set to ``*''.
Set the options as required and when finished you will be taken to the Confirm prompt as explained above, except you have one additional option Delete, this will remove the job.
Validation
Locking : WILL lock the vet system for the duration
By default the validation program will include all animals, all
problems will be fixed, the output will be sent to the
print spooler
and detection of possible dead animals will be disabled.
Valid options are:
-S Start at record
-E End at record
-o Additional options
-o dead Include dead animal check
-o nomail Suppress mail summary
Running the validation routine by this command includes:
Note: By default a copy of the summary will be sent via e-mail to us in
Edinburgh. You can over-ride this in two ways, use the -o nomail
option or set the environment variable
MAILTO to point to a local
user.
Free List
This option by default will send to the
print spooler
the complete
free list. The free list is the list of all clinical records that
do not actually belong to anyone.
Valid options are:
-C Client number to find
-o Additional options
-o screen Output to screen not spooler
-o merge Generate a merge file
-o init Wipe list
Duplicate Checking
The dups utility will scan the full database and check for possible duplicate records based on the Animal name and Address. This should catch the clients that have registered the same animal under different names. It will ignore deleted records and records reserved for cross updating sites. The system will also ignore any related settings so you can check to see if someone has related the same animal (possibly) multiple times.
The system WILL NOT delete or alter in anyway any of the records, it is up to you to check and edit as required.
By default, the output will be sent to the screen, you can re-direct
this to the printer with
vet -p dups | lp or to send it to a file
for later examination use vet -p dups > filename
The format will be similar to:
Record 8115:Jones, Miss M :Sage :59 Newmans Lane Match 8116:Smith, Mr Tom :Sage :59 Newmans Lane Record 8116:Smith, Mr Tom :Sage :59 Newmans Lane Match 8117:Jones, Miss M :Sage :59 Newmans Lane Record 8117:Jones, Miss M :Sage :59 Newmans Lane Match 8118:Jones, Miss M :Sage :59 Newmans Lane
Sort into order
-S Start at record -E End at recordThis utility will read all the clinical records for the specified clients and sort them into date order.
Note: You MUST reset the vatbook prior to running this option.
Check Related Records
This utility will check that all animals are related correctly, fix any incorrect ones. A report will be sent to the print spooler every time it is run.
Payment Report
Scans the clinical records and produces a report based on work done by Users that has been paid for. The system will assume the oldest work is being paid off first.
You can tell the payment report to ignore specific analysis codes. These codes will be paid off before any other user and will be included under their own user category. You tell the system to ignore the codes by adding a line similar to:
PAY-IGNORE 123 22 44to the
param.txt file in the vet subdirectory.
The system will also ignore the Premvet play card, the Shop card and the bad Debt card.
Cross Updating Check
Will generate (and send to the master machine) a list of all clients with their current balances and addresses. Used with the compare options in xmenu to check out the financial figures and addresses between sites.
Report Generator
Will run any of the client, Stock, AP, Purchase and Herd Fertility reports. See the report generator section for details.
End of Year
Will reset Stock, Automatic Pricing and Financial End of Year. All stock branches will be reset, if there is any data held in the Stock History files these will be printed to the spooler automatically. This option will NOT affect work in the current vatbook. It is advisable to reset the end of period prior to resetting the EOY.
Assuming your end of year is the 30th April then these lines in vet's crontab file will run a vatbook then reset the end of year. If this option is run before 6am on the 1st of a month it will assume the last day of the previous month.
# Reset the vatbook period at 0:01 on 1st of May 1 0 1 5 * /usr/local/bin/vet -p vatbook # Now run End Of Year at 0:30 on 1st May 30 0 1 5 * /usr/local/bin/vet -p eoy
If you have any reports in the Report Generator you need to run these can be combined, see unattended reports for details.
vatbook
The vatbook can be run automatically by the system via an entry in cron (or at/batch).
Add into cron an entry similar to:
58 23 * * * /usr/local/bin/vet -p vatbook
The vatbook will be run at 23:58 every night, the period will
be reset and the results sent to the spooler. All reports will
be selected along with all Vets and client types.
The Itemised work done will be stored in a separate spooler file to the rest of the report.
To ensure the report is formatted for the correct printer add an entry into master.dev via:
Gen apps -> Params -> Hardware -> Terminal
for the device 'back' e.g.
back 4 3 EBA 1 2 Cron Job <--------
/dev/tty000 5 11 EBA 1 2 PortPC/Off
The system will only look at the printer settings. If this line
is not present the system will default to printer 'A'. The
environment variable BDSPRT will override the printer settings.
Note: If the vatbook is reset on the 1st of the month BEFORE 3am it will assume it is being run the previous day e.g. for the previous month. Using cron to work out the last day of a month is not that simple, however, the 1st of a month is straight forward. Monthly vatbook reset should be schedualed on the 1st.
Control Debtor
The control debtor report can take a while to run, you can schedule the report to run automatically over night.
Add into cron an entry similar to:
30 0 1 * * /usr/local/bin/vet -p debtors
This will run the report at 0:30 am on the 1st of every month and
send the results to the print spooler.
The report will default to the end of the PREVIOUS month so run
this report at the beginning of the next month e.g. the 1st or 2nd.
If you want to run it for different periods, if you set the
environment variable MONTH=mm.yy, (where mm.yy relates
to the 1st month after the end of the year required) then the
report will be for that period. e.g.
MONTH=12.00 vet -p debtorsThis will run a debtors list ending 31.11.2000.
You can also run this report via at or batch (see Unix documentation for more details.) The printer used for the reports is as per the vatbook.
Price List
This utility is NOT run with thevet -p routine, rather it is run
with the command pvprice. You will be prompted to enter
what you want the price for and a box will pop-up with all the Stock
and AP items that match. Note: The match can appear ANYWHERE in the
description line. If you have any dispencing fees added to stock items
e.g. ~d or ~i, these will be included in the price.
When checking the supplier prices this assumes the current wholesaller Price Update disk has been loaded.
We suggest you add this to one of the Function Keys.
Log diary 'No-Shows'
-D number Diary number to scan e.g. -D 2 for diary 2This utility is the same as the menu option Log No-Shows in the diary. If you miss off the -D option then all diaries will be scaned. A report will be sent to the print spooler of the number of missed appointments and whom. If the report is run between midnight and 3am then the previous day will be assumed.
Stock Valuation
This option is the same as Stock Valuation Report.
The system will default to branch 1, if you are wanting to run it for a different branch you should set the enviroment variable BRANCH=<branch number> before running the script.
The results will be sent to the print spooler.
Export/Import
| Started with: | vet -p export what what what ... |
| vet -p import what |
These two options allow you to extract the details for the lookup tables (Breeds, Species, Sex, Colours, Stock, Labels etc.) to a text file, edit the file and re-import.
You should specify from the table below the option(s) you wish to export. By default, the output file(s) (see table below) will be created in the text sub-directory.
To read a file back in, use the import option, to dump a file out use the export option.
The system will check for the enviroment variable PVINOUT, if this is set to a directory (e.g. it ends with a /) the system will assume the files will be created/read from that directory. If PVINOUT is a file then this file will be created/read from.
For example:
| To export the sex and species tables |
vet -p export sex species
|
| To export all the files to the directory /tmp/dump then |
PVINOUT="/tmp/dump/" vet -p export all
|
| To export just the anlaysis codes to a file /tmp/ana.txt then |
PVINOUT="/tmp/ana.txt" vet -p export analysis
|
| To import all the recalls for the default location |
vet -p import recalls
|
| Name | Filename | What |
|---|---|---|
| ALL | everything | |
| STATUS | xstatus.csv | Status Codes |
| RECALLS | xrecalls.csv | Recalls in use |
| SPECIES | xspecies.csv | Species |
| CABREED | xcabreed.csv | Canine Breeds |
| FEBREED | xfebreed.csv | Feline Breeds |
| AVBREED | xavbreed.csv | Avian Breeds |
| OTBREED | xotbreed.csv | Other Breeds |
| EQBREED | xeqbreed.csv | Equine Breeds |
| CACOLOUR | xcacol.csv | Canine Colours |
| FECOLOUR | xfecol.csv | Feline Colours |
| OTCOLOUR | xotcol.csv | Other Colours |
| EQCOLOUR | xeqcol.csv | Equine Colours |
| SEX | xsex.csv | Sex Codes |
| ANALYSIS | xana.csv | Analysis Codes |
| STOCKPC | xstkpc.csv | Stock Product Codes |
| STOCKSC | xstksc.csv | Stock Supplier Codes |
| STOCKSL | xstksl.csv | Supplier Telephone and modem number along with Purchase ledger ref and type. |
| STOCKMC | xstkmc.csv | Stock Manufacturer Codes |
| STOCKWA | xstkwarn.csv | Stock Warnings |
| STOCKDO | xstkdose.csv | Stock Dosages |
| LABEL | xlabel.csv | Label Abreviations |
| INSURED | xins.csv | Insured Options |
| ADDRESS | xaddress.csv | Address Lines |
| REFERRED | xrefer.csv | Referred by Options |
| USERS | xusers.csv | Premvet Users |
| PURCHASE | xpl.csv | Purchase ledger suppliers |
| IBILL | xibill.csv | Itemised billing settings |
| UPERMS | xperms.csv | User Group permissions |
| UPERMF | xupermf.csv | As above (upermf) except these will take effect straight away. All exisiting users will be updated. |
Note: You can specify the name of the file instead of the option e.g. sex and xsex.csv are the same.
When you are added/editing/sorting any of the export files, if you are planning to import them then you must ensure that any header row and the correct number of columns are preserved.
The cross updating utility (x_check), will check for any of the above files and if found will process them automatically. You should send the files as per:
uucp -C filename site!~/extra/`uuname -l`/
See the FAQ: Sending Breeds to Remote sites for more information and examples of this.
Tip: You can use the 'users' option to create your Unix users as well as premvet users. Create the file xusers.csv and import into the vet system and then run a script similar to:
IFS="," ; while read line ; do set -- $line Login=`echo $2 | tr '[A-Z]' '[a-z]' | tr -d '"'` /etc/useradd -c $3 -d /u/$Login -g 50 -m -s /bin/sh $Login done < xusers.csv
| Top | Classic | New-Style | Chapters | Sections | Index | Search |