Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRC5CON

PRC5CON.m

Go to the documentation of this file.
  1. PRC5CON ;WISC/PLT-IFCAP V5 STATION MERGE/CALM CODE SHEET CONVERSION ; 08/22/95 3:18 PM
  1. V ;;5.0;IFCAP;**27**;4/21/95
  1. ;QUIT ; invalid entry
  1. ;
  1. EN ;start station merge/convert CALM code sheet to FMS
  1. N PRCIVER,PRCRI,PRCFIXV,PRCOPT,PRC5INST,PRCQ21,PRCDUZ
  1. Q1 D EN^DDIOL(" ") S PRCFIXV="IFCAP"_$P($T(+2^PRCINIT),";",3)
  1. S PRCIVER=$$IVER("IFCAP",PRCFIXV)
  1. I +PRCIVER'=5 D EN^DDIOL("Your site must install IFCAP v5 before running this patch routine.") G EXIT
  1. D EN^DDIOL(" "),EN^DDIOL("If your site has substations and you are not a Conversion III site, run"),EN^DDIOL(" Options 1 & 2 only.")
  1. D EN^DDIOL("If your site has substations and you are a Conversion III site, run "),EN^DDIOL(" Options 1, 2, 3 & 4.")
  1. D EN^DDIOL("If your site has no substations and you are a Conversion III site, run"),EN^DDIOL(" Options 3 & 4.")
  1. D EN^DDIOL("If your site has no substations and you are not a Conversion III site,"),EN^DDIOL(" DO NOT run ANY Options.")
  1. D EN^DDIOL(" ")
  1. D SC^PRC0A(.X,.Y,"Select IFCAP V5 option","OM^1:Requests(1996-) Substation ENTER/EDIT;2:Purchase Orders(1996-) Substation ENTER/EDIT;3:Convert PO CALM Code Sheets(1996-) to FMS Documents;4:CALM Code Sheet Conversion Exception List","")
  1. G:X["^"!(X="") EXIT
  1. S PRCOPT=X
  1. I PRCOPT=3 D G:X["^"!(X="") Q1 S PRCQ21=Y G Q3
  1. . D YN^PRC0A(.X,.Y,"Submit the File 442 Conversion & Generating FMS Doc. to the TASK MANAGER","O","")
  1. . QUIT
  1. I PRCOPT=4 G Q3
  1. ;
  1. Q2 ;select auto/single
  1. D SC^PRC0A(.X,.Y,"Select "_$P("REQUESTS^PURCHASE ORDER","^",PRCOPT)_" Substation Option","OM^1:AUTO PROMPT TRANSACTION #;2:MANUAL SELECT TRANSACTION #","")
  1. G:X["^"!(X="") Q1
  1. S $P(PRCOPT,"^",2)=X
  1. Q3 D YN^PRC0A(.X,.Y,"Ready to run the selected option(s) '"_$TR(PRCOPT,"^","-")_"'","O","NO")
  1. G:X["^"!(X="")!(Y<1) Q1
  1. I +PRCOPT<3,'$O(^PRC(411,"UP","")) D EN^DDIOL("No substations are in file, use substation ENTER/EDIT to add first.") G Q1
  1. I +PRCOPT<3 D D EN^PRC5CON1:$P(PRCOPT,"^",2)=1,EN1^PRC5CON1:$P(PRCOPT,"^",2)=2 G Q1
  1. . S PRCDD=$S(PRCOPT-2:410,1:442)
  1. . QUIT
  1. I PRCOPT=4 D EN1 G Q1
  1. S PRCDUZ=DUZ
  1. I PRCQ21=1 D G EXIT
  1. . D EN^DDIOL("NOTE: Please schedule this task with a date '10/14/95'.")
  1. . D EN^DDIOL("IFCAP V5 CALM CODE SHEET CONVERSION SUBMITTED TO TASK MANAGER AT "_$$NOW^PRC5A)
  1. . S A=$$TASK^PRC0B2("EN^PRC5CON2~IFCAP V5 CALM CODE SHEET CONVERSION","PRCDUZ",1)
  1. . I A D EN^DDIOL("IFCAP V5 CALM CODE SHEET CONVERSION HAS TASK NUMBER "_$P(A,"^"))
  1. . QUIT
  1. D:DT>2951013 EN^PRC5CON2
  1. I DT<2951014 D EN^DDIOL("It is too early to run the CALM code sheet conversion."),EN^DDIOL("Please run after 10/13/95.")
  1. EXIT ;
  1. QUIT
  1. ;
  1. EN1 ;calm code sheet conversion exception list
  1. S PRCRI(420.92)=$O(^PRCU(420.92,"B","PRCCALM","")) D:'PRCRI(420.92)
  1. I 'PRCRI(420.92) D EN^DDIOL("Nothing in file. You must run this list after Option 3 has completed")
  1. D
  1. . N L,DIC,FLDS,BY,FR,TO,DHD
  1. . S L=0,DIC=420.92,FLDS="4;""""",BY="@NUMBER",FR=PRCRI(420.92),TO=FR
  1. . S DHD="CALM CODE SHEET CONVERSION EXCEPTION LIST"
  1. . D EN1^DIP
  1. . QUIT
  1. QUIT
  1. ;
  1. ;prca=package name .01 in file 9.4, prcb=fix value .01 in file 420.92
  1. IVER(PRCA,PRCB) ;get initial version #
  1. N A
  1. S A="",PRCRI(420.92)=$O(^PRCU(420.92,"B",PRCB,0)) I PRCRI(420.92) D
  1. . S A=$P(^PRCU(420.92,PRCRI(420.92),0),"^",2),A=$P(A,"/",2)
  1. . QUIT
  1. I A="" S PRCRI(9.4)=$O(^DIC(9.4,"B",PRCA,0)) I PRCRI(9.4) D
  1. . S A=$P(^DIC(9.4,PRCRI(9.4),"VERSION"),"^",1)
  1. . QUIT
  1. QUIT +A