| 1 | OREORV ; SLC/GDU - Orderable Items File Record Validation [10/15/04 09:16]
 | 
|---|
| 2 |  ;;3.0;ORDER ENTRY/RESULTS REPORTING;**217**;Dec 17, 1997
 | 
|---|
| 3 |  ;OREORV - Orderable Item Record Validation
 | 
|---|
| 4 |  ;
 | 
|---|
| 5 |  ;FIX FOR NOIS CASES:
 | 
|---|
| 6 |  ;DAN-0204-42157, ALB-1001-51034, SBY-0803-30443, NJH-0402-20607
 | 
|---|
| 7 |  ;
 | 
|---|
| 8 |  ;Presents the user with an explanation of the purpose of this program.
 | 
|---|
| 9 |  ;It will ask the user if they wish to run the OI record validation.
 | 
|---|
| 10 |  ;Allows the user to select where the output of the report is sent to.
 | 
|---|
| 11 |  ;Also allows the user to queue the program run to TASKMAN.
 | 
|---|
| 12 |  ;
 | 
|---|
| 13 |  ;External Variables
 | 
|---|
| 14 |  ;  IO  - Selected IO device
 | 
|---|
| 15 |  ;  IOF - IO device Form Feed
 | 
|---|
| 16 |  ;  ION - IO device logical name
 | 
|---|
| 17 |  ;
 | 
|---|
| 18 |  ;External References
 | 
|---|
| 19 |  ;  ^%ZIS    - DBIA 10086
 | 
|---|
| 20 |  ;  ^%ZISC   - DBIA 10089
 | 
|---|
| 21 |  ;  ^%ZTLOAD - DBIA 10063
 | 
|---|
| 22 |  ;  ^DIR     - DBIA 10026
 | 
|---|
| 23 |  ;  ^OREORV1 - Second routine of this utility
 | 
|---|
| 24 |  ;  ^OREORV2 - Third routine of this utility
 | 
|---|
| 25 |  ;
 | 
|---|
| 26 | MAIN ;Main entry point for this program
 | 
|---|
| 27 |  ;Local Variables
 | 
|---|
| 28 |  ;  %ZIS   - Input specification variable, ^%ZIS
 | 
|---|
| 29 |  ;  DIR    - Input array variable for ^DIR
 | 
|---|
| 30 |  ;  DLI    - Description Line Index
 | 
|---|
| 31 |  ;  DL     - Description Line, indirect variable
 | 
|---|
| 32 |  ;  DTOUT  - Time out indicator, output variable ^DIR
 | 
|---|
| 33 |  ;  DUOUT  - Up arrow out indicator, output variable ^DIR
 | 
|---|
| 34 |  ;  PLI    - Prompt Line Index
 | 
|---|
| 35 |  ;  PL     - Prompt Line, indirect variable
 | 
|---|
| 36 |  ;  POP    - Exit Status, output variable ^%ZIS
 | 
|---|
| 37 |  ;  ZTDESC - Task Description, input variable ^%ZTLOAD
 | 
|---|
| 38 |  ;  ZTIO   - Task IO device, input variable ^%ZTLOAD
 | 
|---|
| 39 |  ;  ZTRTN  - Task routine entry point, input variable ^%ZTLOAD
 | 
|---|
| 40 |  ;  ZTSK   - Task number assigned, output variable ^%ZTLOAD
 | 
|---|
| 41 |  ;  Y      - Processed user input, output variable ^DIR
 | 
|---|
| 42 |  N %ZIS,DIR,DLI,DL,DTOUT,DUOUT,PLI,PL,POP,ZTDESC,ZTIO,ZTRTN,ZTSK,Y
 | 
|---|
| 43 |  ;Clears screen and presents explanation, asks if user wants to continue
 | 
|---|
| 44 |  W:$D(IOF) @IOF
 | 
|---|
| 45 |  W $P($T(SH),";",3),!
 | 
|---|
| 46 |  F DLI=1:1:19 S DL="DL"_DLI W !,$P($T(@DL),";",3)
 | 
|---|
| 47 |  S DIR(0)="Y",DIR("A")=$P($T(PMT1),";",3)
 | 
|---|
| 48 |  W ! D ^DIR
 | 
|---|
| 49 |  ;If user selects No, up-arrows out, or times out program is stopped
 | 
|---|
| 50 |  I Y=0!($D(DTOUT))!($D(DUOUT)) G EXIT
 | 
|---|
| 51 |  ;If user selects Yes, programs presents user with device selection.
 | 
|---|
| 52 |  W:$D(IOF) @IOF
 | 
|---|
| 53 |  W $P($T(SH),";",3),!
 | 
|---|
| 54 |  F PLI=1:1:6 S PL="PL"_PLI W !,$P($T(@PL),";",3)
 | 
|---|
| 55 |  W !
 | 
|---|
| 56 |  S %ZIS="Q" D ^%ZIS
 | 
|---|
| 57 |  ;Processing user device selection
 | 
|---|
| 58 |  I POP G EXIT
 | 
|---|
| 59 |  I $D(IO("Q")) D  K IO("Q") G EXIT
 | 
|---|
| 60 |  . S ZTDESC="Orderable Item Validation Report"
 | 
|---|
| 61 |  . S ZTRTN="EN^OREORV"
 | 
|---|
| 62 |  . S ZTIO=ION
 | 
|---|
| 63 |  . D ^%ZTLOAD I $D(ZTSK) W !?32,"REQUEST QUEUED"
 | 
|---|
| 64 |  U IO D EN
 | 
|---|
| 65 | EXIT ;Exit point for this program
 | 
|---|
| 66 |  D ^%ZISC
 | 
|---|
| 67 |  Q
 | 
|---|
| 68 | EN ;Process the File 101.43
 | 
|---|
| 69 |  ;TASKMAN entry point
 | 
|---|
| 70 |  ;^TMP($J,"OIC" is fully documented in OREORV1
 | 
|---|
| 71 |  K ^TMP($J,"OIC")
 | 
|---|
| 72 |  ;Builds temp global ^TMP($J,"OIC", flags active OI records w/o matching
 | 
|---|
| 73 |  ;source records.
 | 
|---|
| 74 |  D ^OREORV1
 | 
|---|
| 75 |  ;Print report from contents of ^TMP($J,"OIC"
 | 
|---|
| 76 |  D ^OREORV2
 | 
|---|
| 77 |  K ^TMP($J,"OIC")
 | 
|---|
| 78 |  Q
 | 
|---|
| 79 |  ;User interface text
 | 
|---|
| 80 | SH ;;Orderable Items File Record Validation
 | 
|---|
| 81 | DL1 ;;Brief Description:
 | 
|---|
| 82 | DL2 ;;This program scans the Orderable Items file, file # 101.43.
 | 
|---|
| 83 | DL3 ;;It take the value stored in the ID field and performs a set of tests.
 | 
|---|
| 84 | DL4 ;;
 | 
|---|
| 85 | DL5 ;;   1. It determines if the ID field is null.
 | 
|---|
| 86 | DL6 ;;   2. It determines if it has a source record IEN
 | 
|---|
| 87 | DL7 ;;   3. It determines if it has a source record package code
 | 
|---|
| 88 | DL8 ;;   4. It determines if the package code is formatted properly
 | 
|---|
| 89 | DL9 ;;   5. It determines if the package code is in the current spec*
 | 
|---|
| 90 | DL10 ;;      If package code is not in current spec*, it is included in the
 | 
|---|
| 91 | DL11 ;;      report for manual confirmation. It is not modified by this
 | 
|---|
| 92 | DL12 ;;      utility.
 | 
|---|
| 93 | DL13 ;;   6. It Validates records by matching to a source file record
 | 
|---|
| 94 | DL14 ;;      If no match found and record is active it is flagged inactive.
 | 
|---|
| 95 | DL15 ;;   7. It creates a report detailing its findings.
 | 
|---|
| 96 | DL16 ;;
 | 
|---|
| 97 | DL17 ;;* The source files the orderable item record is tested against are
 | 
|---|
| 98 | DL18 ;;defined in the OE/RR Version 3 Package Interface Specification July
 | 
|---|
| 99 | DL19 ;;2001
 | 
|---|
| 100 | PMT1 ;;Do you wish to run this program? Enter Yes or No
 | 
|---|
| 101 | PL1 ;;Select where you want the report to print to.
 | 
|---|
| 102 | PL2 ;;
 | 
|---|
| 103 | PL3 ;;Just hit enter to send the report to the screen.
 | 
|---|
| 104 | PL4 ;;Enter the name of the printer.
 | 
|---|
| 105 | PL5 ;;Queue the program to run at a later time.
 | 
|---|
| 106 | PL6 ;;Enter "^" to quit
 | 
|---|