source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRC5CON.m@ 1582

Last change on this file since 1582 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1PRC5CON ;WISC/PLT-IFCAP V5 STATION MERGE/CALM CODE SHEET CONVERSION ; 08/22/95 3:18 PM
2V ;;5.0;IFCAP;**27**;4/21/95
3 ;QUIT ; invalid entry
4 ;
5EN ;start station merge/convert CALM code sheet to FMS
6 N PRCIVER,PRCRI,PRCFIXV,PRCOPT,PRC5INST,PRCQ21,PRCDUZ
7Q1 D EN^DDIOL(" ") S PRCFIXV="IFCAP"_$P($T(+2^PRCINIT),";",3)
8 S PRCIVER=$$IVER("IFCAP",PRCFIXV)
9 I +PRCIVER'=5 D EN^DDIOL("Your site must install IFCAP v5 before running this patch routine.") G EXIT
10 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.")
11 D EN^DDIOL("If your site has substations and you are a Conversion III site, run "),EN^DDIOL(" Options 1, 2, 3 & 4.")
12 D EN^DDIOL("If your site has no substations and you are a Conversion III site, run"),EN^DDIOL(" Options 3 & 4.")
13 D EN^DDIOL("If your site has no substations and you are not a Conversion III site,"),EN^DDIOL(" DO NOT run ANY Options.")
14 D EN^DDIOL(" ")
15 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","")
16 G:X["^"!(X="") EXIT
17 S PRCOPT=X
18 I PRCOPT=3 D G:X["^"!(X="") Q1 S PRCQ21=Y G Q3
19 . D YN^PRC0A(.X,.Y,"Submit the File 442 Conversion & Generating FMS Doc. to the TASK MANAGER","O","")
20 . QUIT
21 I PRCOPT=4 G Q3
22 ;
23Q2 ;select auto/single
24 D SC^PRC0A(.X,.Y,"Select "_$P("REQUESTS^PURCHASE ORDER","^",PRCOPT)_" Substation Option","OM^1:AUTO PROMPT TRANSACTION #;2:MANUAL SELECT TRANSACTION #","")
25 G:X["^"!(X="") Q1
26 S $P(PRCOPT,"^",2)=X
27Q3 D YN^PRC0A(.X,.Y,"Ready to run the selected option(s) '"_$TR(PRCOPT,"^","-")_"'","O","NO")
28 G:X["^"!(X="")!(Y<1) Q1
29 I +PRCOPT<3,'$O(^PRC(411,"UP","")) D EN^DDIOL("No substations are in file, use substation ENTER/EDIT to add first.") G Q1
30 I +PRCOPT<3 D D EN^PRC5CON1:$P(PRCOPT,"^",2)=1,EN1^PRC5CON1:$P(PRCOPT,"^",2)=2 G Q1
31 . S PRCDD=$S(PRCOPT-2:410,1:442)
32 . QUIT
33 I PRCOPT=4 D EN1 G Q1
34 S PRCDUZ=DUZ
35 I PRCQ21=1 D G EXIT
36 . D EN^DDIOL("NOTE: Please schedule this task with a date '10/14/95'.")
37 . D EN^DDIOL("IFCAP V5 CALM CODE SHEET CONVERSION SUBMITTED TO TASK MANAGER AT "_$$NOW^PRC5A)
38 . S A=$$TASK^PRC0B2("EN^PRC5CON2~IFCAP V5 CALM CODE SHEET CONVERSION","PRCDUZ",1)
39 . I A D EN^DDIOL("IFCAP V5 CALM CODE SHEET CONVERSION HAS TASK NUMBER "_$P(A,"^"))
40 . QUIT
41 D:DT>2951013 EN^PRC5CON2
42 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.")
43EXIT ;
44 QUIT
45 ;
46EN1 ;calm code sheet conversion exception list
47 S PRCRI(420.92)=$O(^PRCU(420.92,"B","PRCCALM","")) D:'PRCRI(420.92)
48 I 'PRCRI(420.92) D EN^DDIOL("Nothing in file. You must run this list after Option 3 has completed")
49 D
50 . N L,DIC,FLDS,BY,FR,TO,DHD
51 . S L=0,DIC=420.92,FLDS="4;""""",BY="@NUMBER",FR=PRCRI(420.92),TO=FR
52 . S DHD="CALM CODE SHEET CONVERSION EXCEPTION LIST"
53 . D EN1^DIP
54 . QUIT
55 QUIT
56 ;
57 ;prca=package name .01 in file 9.4, prcb=fix value .01 in file 420.92
58IVER(PRCA,PRCB) ;get initial version #
59 N A
60 S A="",PRCRI(420.92)=$O(^PRCU(420.92,"B",PRCB,0)) I PRCRI(420.92) D
61 . S A=$P(^PRCU(420.92,PRCRI(420.92),0),"^",2),A=$P(A,"/",2)
62 . QUIT
63 I A="" S PRCRI(9.4)=$O(^DIC(9.4,"B",PRCA,0)) I PRCRI(9.4) D
64 . S A=$P(^DIC(9.4,PRCRI(9.4),"VERSION"),"^",1)
65 . QUIT
66 QUIT +A
Note: See TracBrowser for help on using the repository browser.