INSTALLATION NOTES FOR LABORATORY VERSION 5.1 PATCH 5
===============================================================
PREFIX:  LR 
CURRENT VERSION:  5.1
===============================================================

****NOTE****NOTE****NOTE****NOTE****NOTE****NOTE****NOTE****NOTE
****************************************************************
READ THE ENTIRE NOTES FILE PRIOR TO ATTEMPTING ANY INSTALLATION!
****************************************************************
****NOTE****NOTE****NOTE****NOTE****NOTE****NOTE****NOTE****NOTE

1.	GENERAL INFORMATION

	a.)	Print all notes/readme files.

	b.)	It is recommended that the terminal output during 
		the installation be captured using an auxport 
		printer attached to the terminal at which you are
		performing the patch installation. This will 
		ensure a printed audit trail if any problems 
		arise.
	
2.	PATCH DESCRIPTION
 
	This patch is the preconversion process that must be
	completed before you attempt to install Version 5.2.  The 
	installation process of Version 5.2 will check to see that
	this patch is present by checking the global node set by 
	this patch prior to proceeding with installation of 
	Version 5.2.  Patch 5 includes 26 LR5X* routines.  It may
	be run at any time prior to installing Version 5.2.  All 
	users may remain on the system when this patch is
	installed.  The patch performs three functions:
     	1) LR5XOK* routines check several files of the Laboratory
         database for unusual entries (global deficiencies).
    	2) LR5XCNV* routines perform a mock conversion of the 
	   Laboratory database pointers from Files #3, #6, and #16
	   to File #200 to identify discrepancies so that they may
	   be fixed prior to installation of Version 5.2.
    	3) LR5XTIM* routines provide an estimate of the time 
	   required for the actual conversion of the Laboratory 
	   database pointers during the installation of Version
	   5.2.  This process will allow you to better schedule
	   your downtime for the installation of Version 5.2.

3.	CONTENTS OF DISTRIBUTION
	
	a)  lr__0510.05p - Routines
	b)  lr__0510.05n - This notes file.

4.	REQUIREMENTS

	a)  Laboratory Service V 5.1
	b)  Kernel V 8.0
	c)  Fileman V 21.0

5.	INSTALLATION INSTRUCTIONS
	
	The installation process queues multiple TaskMan jobs; 
	therefore, TaskMan must be up and running. Completion time
	for each step will depend upon the number of entries in 
	the Laboratory data files and the number of jobs that 
	TaskMan must handle.

	There is an Exception Report for each tasked job of this 
	patch. The Exception Report provides a hard copy of the 
	entries that could not be converted and ensures that each
	tasked job actually completed. After the installation is 
	completed, you should go back to the Exception Report and 
	correct any data that could not be converted.  If the 
	conversion routine set finds a record that cannot be
	converted properly, it will reset the original pointer 
	value in the database preceded by ERR (e.g., ERR12345),
	note the record on the Exception Report, and continue 
	processing. Since the LR52CNV* conversion routine set is
	run only once, there is no opportunity to observe the data
	for the record noted on the Exception Report or to make 
	modifications to the record data as necessary.
	
	a)  Do a routine restore from lr__0510.05p
	
	LR5XCNV  LR5XCNV0 LR5XCNV1 LR5XCNV3 LR5XCNV4 LR5XCNV5 
	LR5XCNV8 LR5XCNV9 LR5XCNVA LR5XCNVD LR5XCNVP LR5XCNVU
	LR5XCNVX LR5XOK	LR5XOK3 LR5XOK31 LR5XOK5  LR5XOK51 LR5XOK8
	LR5XOK81 LR5XOK9 LR5XOK91 LR5XOKA  LR5XOKA1 LR5XOKU 
	LR5XTIM2 LR5XTIME

	b)  Run the Pre conversion patch
	    		
			D ^LR5XCNV

	You have the following choices:

		1. Run all tasks at once. 

		2. Name a device to limit the number of tasks to 
		   be started.
             			 OR
		3. Up arrow out and call each file conversion by 
		   individual entry point.

	   The entry points are:

		D EN63^LR5XCNV
		D EN65^LR5XCNV
		D EN68^LR5XCNV
		D EN69^LR5XCNV
		D ENARCH^LR5XCNV
	  
	  NOTE: You must ensure that ALL ENTRY POINTS HAVE BEEN 
	  RUN!!
	  The Global ^XTMP("LR5X", will contain a record of those 
	  completed.

   	  If you choose - 1     All tasks at once
    	 
	You will see the following dialogue:

	I will produce a list of CAP codes from your file 
	LABORATORY TEST (#60) 
	Printer Name HOME// 64

    	Report Queued to BBB64

	PRINTER for EXCEPTION REPORT: 64
	Task # 10966
	with the description of 'LAB Conversion File 63 (LAB DATA) 
	global from ENTRY # 0 to ENTRY # 29999.' has been
	scheduled to run APR 14,1997@09:07:31.

	Task # 10967
	with the description of 'LAB Conversion File 65 (BLOOD
	INVENTORY)'has been scheduled to run APR 14,1997@09:07:31.

	Task # 10968
	with the description of 'LAB Conversion File 68 
	(ACCESSION)area # 1.'has been scheduled to run 
	APR 14,1997@09:07:31.

	Task # 10969
	with the description of 'LAB Conversion File 68
	(ACCESSION)area # 2.'has been scheduled to run 
	APR 14,1997@09:07:31.

	Task # 10970
	with the description of 'LAB Conversion File 68
	(ACCESSION)area # 3.'has been scheduled to run 
	APR 14,1997@09:07:31.

	Task # 10971
	with the description of 'LAB Conversion File 68
	(ACCESSION)area # 4.'has been scheduled to run
	APR 14,1997@09:07:31.

	Task # 10972
	with the description of 'LAB Conversion File 63.9999 
	(ARCHIVED LR DATA)'has been scheduled to run 
	APR 14,1997@09:07:31.

     	Completed tasking all conversion routines 

	c) Verify Completion of Pre-Conversion

			D ^LR5XTIME
 
	LR5XTIME provides an approximation of database conversion
	time and is to be run after the actual conversion routines
	have completed. A report will be generated which contains 
	the following information:

	1) Which of the tasks spawned to convert LAB DATA file
	   (#63) took the longest and how long it took to complete.

	2) What was the overall time for the conversion by finding
	   the difference between the earliest task start time and
	   the latest task end time.

	3) If any task should fail for any reason and be restarted
	   significantly later than the other tasks, this will 
	   naturally skew the overall time.

	Example:	Approximation database conversion time.

	DEVICE: HOME// [Enter your site's printer name]


------------------------------------------------------------------
LAB TIMES FOR ^XTMP("LR5XTIME") NODES            06/29/94 PAGE  1

 TIME DIFF
 DAYS.HHMM NODE NAME              STARTED    STOPPED
-------------------------------------------------------------------
0.0000 ^XTMP("LR5XTIME","LAR-63.9999",1)06/23/94 @1533 06/23/94 @1534

0.0103 ^XTMP("LR5XTIME","LR-63",1)   01/15/93 @0812 01/15/93 @0915

0.0003 ^XTMP("LR5XTIME","LR-63",2)   01/15/93 @0812 01/15/93 @0816

0.0000 ^XTMP("LR5XTIME","LR-63",3)   01/15/93 @0816 01/15/93 @0816

0.0040 ^XTMP("LR5XTIME","LRD-65")    01/15/93 @0327 01/15/93 @0407

0.0021 ^XTMP("LR5XTIME","LRO-68",10)  01/15/93 @0327 01/15/93 @0348

0.0029 ^XTMP("LR5XTIME","LRO-68",11)  01/15/93 @0327 01/15/93 @0357

0.0035 ^XTMP("LR5XTIME","LRO-68",12)  01/15/93 @0327 01/15/93 @0403

0.0007 ^XTMP("LR5XTIME","LRO-68",15)  01/15/93 @0327 01/15/93 @0335

0.0000 ^XTMP("LR5XTIME","LRO-69",2850000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2860000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2870000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2880000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2890000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2900000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2910000)01/15/93 @0427 01/15/93 @0427

0.0018 ^XTMP("LR5XTIME","LRO-69",2920000)01/15/93 @0427 01/15/93 @0446

0.0012 ^XTMP("LR5XTIME",:LRO-69",2930000)01/15/93 @0427 01/15/97 @0440

0.0000 ^XTMP("LR5XTIME","LAR-63.9999",1)06/23/94 @1533 06/23/94 @1534

0.0103 ^XTMP("LR5XTIME","LR-63",1)   01/15/93 @0812 01/15/93 @0915

0.0003 ^XTMP("LR5XTIME","LR-63",2)   01/15/93 @0812 01/15/93 @0816

0.0000 ^XTMP("LR5XTIME","LR-63",3)   01/15/93 @0816 01/15/93 @0816

0.0040 ^XTMP("LR5XTIME","LRD-65")    01/15/93 @0327 01/15/93 @0407

0.0021 ^XTMP("LR5XTIME","LRO-68",10)  01/15/93 @0327 01/15/93 @0348

0.0029 ^XTMP("LR5xTIME","LRO-68",11)  01/15/93 @0327 01/15/93 @0357

0.0035 ^XTMP("LR5XTIME","LRO-68",12)  01/15/93 @0327 01/15/93 @0403

0.0007 ^XTMP("LR5XTIME","LRO-68",15)  01/15/93 @0327 01/15/93 @0335

0.0000 ^XTMP("LR5XTIME","LRO-69",2850000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2860000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2870000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2880000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2890000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2900000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2910000)01/15/93 @0427 01/15/93 @0427

0.0018 ^XTMP("LR5XTIME","LRO-69",2920000)01/15/93 @0427 01/15/93 @0446

0.0012 ^XTMP("LR5XTIME","LRO-69",2930000)01/15/93 @0427 01/15/93 @0440

0.0000 ^XTMP("LR5XTIME","LAR-63.9999",1)06/23/94 @1533 06/23/94 @1534

0.0103 ^XTMP("LR5XTIME","LR-63",1)   01/15/93 @0812 01/15/93 @0915

0.0003 ^XTMP("LR5XTIME","LR-63",2)   01/15/93 @0812 01/15/93 @0816

0.0000 ^XTMP("LR5XTIME","LR-63",3)   01/15/93 @0816 01/15/93 @0816

0.0040 ^XTMP("LR5XTIME","LRD-65")    01/15/93 @0327 01/15/93 @0407

0.0021 ^XTMP("LR5XTIME","LRO-68",10)  01/15/93 @0327 01/15/93 @0348

0.0029 ^XTMP("LR5XTIME","LRO-68",11)  01/15/93 @0327 01/15/93 @0357

0.0035 ^XTMP("LR5XTIME","LRO-68",12)  01/15/93 @0327 01/15/93 @0403

0.0007 ^XTMP("LR5XTIME","LRO-68",15)  01/15/93 @0327 01/15/93 @0335

0.0000 ^XTMP("LR5XTIME","LRO-69",2850000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2860000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2870000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2880000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2890000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2900000)01/15/93 @0427 01/15/93 @0427

0.0000 ^XTMP("LR5XTIME","LRO-69",2910000)01/15/93 @0427 01/15/93 @0427

0.0018 ^XTMP("LR5XTIME","LRO-69",2920000)01/15/93 @0427 01/15/93 @0446

0.0012 ^XTMP("LR5XTIME","LRO-69",2930000)01/15/93 @0427 01/15/93 @0440


LR5XTIME - TOTAL TIME: 524.1207


LR5XTIME -- 'LR-63' greatest time difference:
---------------------------------------------
0.0103 ^XTMP("LR5XTIME","LR-63",1)   01/15/93 @0812 01/15/93 @0915


LR5XTIME -- 'other' greatest time difference:
---------------------------------------------
0.0040 ^XTMP("LR5XTIME","LRD-65")    01/15/93 @0327 01/15/93 @0407


LR5XTIME - TOTAL TIME: 524.1207


            *** END OF REPORT ***

	d)  If all of the Exception Reports print with no data 
	    then your data is clean and the actual conversion to 
	    5.2 should run without difficulty.  If data does 
	    appear on the exception report you will need to 
	    correct the data prior to the actual conversion to 
	    assure that the conversion will run to completion. 
	    If necessary, you should contact your area office or 
	    the national program to resolve ALL problems 
	    identified by the patch. Listed below is an example 
	    of how the data would be corrected prior to 
	    performing the actual upgrade to version 5.2.

	Example: To Reprint Exception Report For LR5X* Routines 


	If the printer failed to produce an Exception Report(s)
	due to a malfunction of the printer (e.g., paper jam/tear,
	printer failure,etc.), the report(s) may be selectively
	reprinted through the use Of the LR5XCNVP routine. Before 
	invoking this routine, you will need to refer to the "task
	spawn list" to obtain the File number, Task number,
	Accession Area number, or any other data as appropriate.
	You will be prompted for appropriate data.

			D ^LR5XCNVP
   	Select one of the following:
    	1     63
    	2     63.9999
     	3     65
     	4     68
     	5     69

	FILE: 1 63

	Enter the TASK # off of the task spawn list:
	(0-99999999): 18662
	Enter the 'from' entry # off of the task spawn list: 
	(0-18000000): 0

	DEVICE: HOME// <RETURN> LAN

          Exception report for file 63: LAB DATA.
                Task # 18662
             For entries from 0 to 29999

	The value (749) "Non-existent",
	in field REQUESTING PERSON, could not be repointed.
	This occurred in: 
	The CHEM, HEM, TOX, RIA, SER, etc.: subfile of "CH" entry:
	7119174.92
	The LABORATORY DATA FILE:            entry: 606


	The value (749) "Non-existent",
	in field REPORT ROUTING (PROVIDER),could not be repointed.
	This occurred in:
	The LABORATORY DATA FILE:            entry: 1044

	The value (155) "Non-existent",
	in field PHYSICIAN, could not be repointed.
	This occurred in:
	The MICROBIOLOGY: subfile of         entry: 2921002.112539
	The LABORATORY DATA FILE:            entry: 1212

	Example:  Restart Exception Report

	If a task listed on the "task spawn list" does not have a 
	corresponding Exception Report generated, and a printer 
	problem has been eliminated, the tasked job may have
	aborted prior to completion. You must restart the
	Exception Report process by doing the following:

		>D CRASH^LR52CNV

	Analysis of Task #18662

	The following analysis of Task #18662 may be helpful in
	determining the reason why the entries on this Exception
	Report were unable to be converted.

	63	= File #
	749	= Internal Entry Number (IEN) of the pointer value
		  stored from File #6/#16 which was invalid in 
		  File 200
	606	= IEN (LRDFN) of entry in File # 63
	REQUESTING PERSON = sub-field name under field name of 
	                    File # 63
	CHEM, HEM, TOX, RIA, SER, etc. = field name of File # 63
	7119174.92 = IEN of multiple entry under LRDFN

	
	In the case above, the problem is precipitated by the fact
	that at one time an IEN of 749 existed in File #6 and File
	#16. For some reason, the IEN in File #6 still exists, 
	although with minimal data; however, the IEN is no longer 
	existent in File #16. The facility may choose one of the 
	following actions:

	1. Repair the entries in File #6 and in File #16 if enough
	   data is present. In the above case, enough data does
	   not appear in the file to reconstruct the entry.

	2. Use FileMan as shown below to edit the IEN to point to 
	   a valid entry in File #16 (and File #200). This could
	   be a catch all entry such as UNKNOWN, UNKNOWN. 
	   Remember, the entry in File #16 must be pointed to by
	   a valid entry in File #200 in order to convert properly.

	3. If you choose not to alter the data, the actual 
	   conversion process will transpose the data in an error
	   condition; the value at the global location will become
	   749ERR. Use of FileMan to examine the data entry will
	   show the value as it existed prior to conversion.

>D P^DI

		VA FileMan 19.0
Select OPTION: ENTER OR EDIT FILE ENTRIES 
INPUT TO WHAT FILE: LAB DATA// 63 LAB DATA  (11604 entries) 
EDIT WHICH FIELD: ALL// 4 CHEM, HEM, TOX, RIA, SER, etc. (multiple 
EDIT WHICH CHEM, HEM, TOX, RIA, SER, etc. SUB-FIELD: ALL// REQ 
   		1  REQUESTING LOCATION  
   		2  REQUESTING PERSON  
	CHOOSE 1-2: 2 
THEN EDIT CHEM, HEM, TOX, RIA, SER, etc. SUB-FIELD: <RETURN>
THEN EDIT FIELD: <RETURN>

Select LAB DATA LRDFN: 606  606
Select DATE/TIME SPECIMEN TAKEN: SEP 12,1991@10:00// <RETURN>
7119174.92 2-6-1989@15:30:00
	 REQUESTING PERSON: 749// <RETURN>

	Select DATE/TIME SPECIMEN TAKEN: <RETURN>

	Select LAB DATA LRDFN: <RETURN>

	Select OPTION: INQUIRE TO FILE ENTRIES 

OUTPUT FROM WHAT FILE: LAB DATA// 6 PROVIDER  (553 entries) 
	Select PROVIDER NAME: 749 UNKNOWN 
	ANOTHER ONE: <RETURN>
	STANDARD CAPTIONED OUTPUT? YES// <RETURN> (YES)
	DISPLAY COMPUTED FIELDS? NO// Y (YES) 
	NAME: UNKNOWN

	Select OPTION: INQUIRE TO FILE ENTRIES 

OUTPUT FROM WHAT FILE: PROVIDER// 16 PERSON  (1438 entries) 
	Select PERSON NAME: 749 ?? 
	Select PERSON NAME: <RETURN>
	Select OPTION: <RETURN>

>D ^%GL

Global ^DIC(16,748:750,0)
DIC(16,748:750,0)
^DIC(16,748,0) = XXXX,G.^^^^^^^^111111811
^DIC(16,750,0) = YYYY,A.^F^2580207^E^2^3^CLINICAL PHARMACIST^25
^11111^812^2910115
Global ^DIC(6,749,0)
DIC(6,749,0)
^DIC(6,749,0) = UNKNOWN
Global ^

>D P^DI

	VA FileMan 19.0
	Select OPTION: ENTER OR EDIT FILE ENTRIES 

	INPUT TO WHAT FILE: PERSON// 63 LAB DATA  (11604 entries)
	EDIT WHICH FIELD: ALL// REPORT 
   	1  REPORT ROUTING (LOCATION)  
   	2  REPORT ROUTING (PROVIDER)  
	CHOOSE 1-2: 2 
	THEN EDIT FIELD: <RETURN>
	Select LAB DATA LRDFN: 606 606 
	REPORT ROUTING (PROVIDER): 749// <RETURN>

	
6.  	POINT OF CONTACT
		FJ EVANS
		DIVISON OF INFORMATION RESOURCES
		TUCSON, AZ
		(520)295-2526