source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SD08SUPP.m@ 635

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1SD08SUPP ;ALB/RLC- Stop Code/DSS Identifier Update 6/18/07
2 ;;5.3;Scheduling;**531**;AUG 13, 1993;Build 1
3 ;
4 ;** This patch is used as a Post-Init in a KIDS build to modify the
5 ;** the CLINIC STOP file [^DIC(40.7,] for a FY08 supplemental update.
6 ;
7EN ;** Add/inactivate/change/reactivate DSS IDs (stop codes)
8 ;** The following code executes if file modifications exist
9 ;
10 N SDVAR
11 D:$P($T(NEW+1),";;",2)'="QUIT" ADD
12 Q
13 ;
14 ;
15ADD ;** Add DSS IDs
16 ;
17 ; SDXX is in format:
18 ; STOP CODE NAME^AMIS #^RESTRICTION TYPE^REST. DATE^CDR #
19 ;
20 N SDX,SDXX
21 S SDVAR=1
22 D MES^XPDUTL("")
23 D BMES^XPDUTL(">>> Adding new Clinic Stop (DSS IDs) to CLINIC STOP File (#40.7)...")
24 ;
25 ;** NOTE: The following line is for DSS IDs that are not yet active
26 D BMES^XPDUTL(" [NOTE: This Stop Code CANNOT be used UNTIL 02/15/2008]")
27 S DIC(0)="L",DLAYGO=40.7,DIC="^DIC(40.7,"
28 F SDX=1:1 K DD,DO,DA S SDXX=$P($T(NEW+SDX),";;",2) Q:SDXX="QUIT" DO
29 .S DIC("DR")="1////"_$P(SDXX,"^",2)_$S('+$P(SDXX,U,5):"",1:";4////"_$P(SDXX,"^",5))
30 .S DIC("DR")=DIC("DR")_";5////"_$P(SDXX,"^",3)_";6///"_$P(SDXX,"^",4)
31 .S X=$P(SDXX,"^",1)
32 .I '$D(^DIC(40.7,"C",$P(SDXX,"^",2))) D FILE^DICN,MESS Q
33 K DIC,DLAYGO,X
34 Q
35 ;
36RESTR ;** Change Restriction Data
37 ;
38 ; SDXX is in format:
39 ; STOP CODE NAME^STOP CODE NUMBER^RESTRICTION TYPE^RESTRICTION DATE
40 ;
41 N SDX,SDXX,SDDA
42 S SDVAR=3
43 D MES^XPDUTL("")
44 D BMES^XPDUTL(">>> Changing Restriction Data in CLINIC STOP File (#40.7)...")
45 F SDX=1:1 K DD,DO,DA S SDXX=$P($T(REST+SDX),";;",2) Q:SDXX="QUIT" D
46 .S SDDA=+$O(^DIC(40.7,"C",$P(SDXX,U,2),0))
47 .I $D(^DIC(40.7,SDDA,0)) D
48 ..I $P(SDXX,U,2)=571 S DA=SDDA,DR="5////"_$P(SDXX,U,3)_";6///@",DIE="^DIC(40.7," D ^DIE,MESR Q
49 ..S DA=SDDA,DR="5////"_$P(SDXX,U,3)_";6///"_$P(SDXX,U,4),DIE="^DIC(40.7,"
50 ..D ^DIE,MESR
51 K DIE,DR,DA,X
52 Q
53 ;
54MESS ;** Add message
55 N ECXADMSG
56 I +$G(SDVAR) D HDR(SDVAR)
57 D MES^XPDUTL(" ")
58 S ECXADMSG="Added: "_$P(SDXX,"^",2)_" "_$P(SDXX,"^")
59 I $P(SDXX,"^",5)'="" S ECXADMSG=ECXADMSG_" [CDR#: "_$P(SDXX,"^",5)_"]"
60 D MES^XPDUTL(ECXADMSG)
61 I $P(SDXX,"^",3)'="" S ECXADMSG=" Restricted Type: "_$P(SDXX,"^",3)_" Restricted Date: "_$P(SDXX,"^",4)
62 D MES^XPDUTL(ECXADMSG)
63 K SDVAR
64 Q
65 ;
66MESR ;** Restricting Stop Code
67 N SDNMSG,SDNMSG1
68 I +$G(SDVAR) D HDR(SDVAR)
69 D MES^XPDUTL(" ")
70 S SDNMSG="Changed: "_$P(SDXX,U,2)_" "_$P(SDXX,U)_" "_$P(SDXX,U,5)_" "_$P(SDXX,U,6)
71 S SDNMSG1=" to: "_$P(SDXX,U,3)_" "_$P(SDXX,U,4)
72 D MES^XPDUTL(SDNMSG)
73 D MES^XPDUTL(SDNMSG1)
74 K SDVAR
75 Q
76 ;
77HDR(SDVAR) ;- Header
78 Q:'$G(SDVAR)
79 N SDHDR
80 S SDHDR=$P($T(@("HDR"_SDVAR)),";;",2)
81 D BMES^XPDUTL(SDHDR)
82 Q
83 ;
84 ;
85HDR1 ;; Stop Code Name
86 ;
87HDR2 ;; CDR Stop Code Name
88 ;
89HDR3 ;; Stop Code Name Rest. Type Date
90 ;
91NEW ;DSS IDs to add- ex ;;STOP CODE NAME^NUMBER^RESTRICTION TYPE^RESTRICTION DATE^CDR
92 ;;DIABETIC RETINAL SCREENING^718^P^2/15/2008
93 ;;QUIT
Note: See TracBrowser for help on using the repository browser.