source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDY5STOP.m@ 700

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

initial load of WorldVistAEHR

File size: 6.1 KB
RevLine 
[613]1SDY5STOP ;ALB/CAW,GTS,ESD,JAM,GT - Stop Code/DSS Identifier Update 8/2/2004
2 ;;5.3;Scheduling;**388**;AUG 13, 1993
3 ;
4 ;** This patch is used as a Post-Init in a KIDS build to modify the
5 ;** the DSS Identifier file [^DIC(40.7,]
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 D:$P($T(CHNG+1),";;",2)'="QUIT" CHANGE
13 Q
14 ;
15 ;
16ADD ;** Add DSS IDs
17 ;
18 ; SDXX is in format:
19 ; STOP CODE NAME^AMIS #^RESTRICTION TYPE^REST. DATE^CDR #
20 ;
21 N SDX,SDXX
22 S SDVAR=1
23 D MES^XPDUTL("")
24 D BMES^XPDUTL(">>> Adding new Clinic Stops (DSS IDs) to CLINIC STOP File (#40.7)...")
25 ;
26 ;** NOTE: The following line is for DSS IDs that are not yet active
27 D BMES^XPDUTL(" [NOTE: These Stop Codes CANNOT be used UNTIL 10/1/04]")
28 S DIC(0)="L",DLAYGO=40.7,DIC="^DIC(40.7,"
29 F SDX=1:1 K DD,DO,DA S SDXX=$P($T(NEW+SDX),";;",2) Q:SDXX="QUIT" DO
30 .S DIC("DR")="1////"_$P(SDXX,"^",2)_$S('+$P(SDXX,U,5):"",1:";4////"_$P(SDXX,"^",5))
31 .S DIC("DR")=DIC("DR")_";5////"_$P(SDXX,"^",3)_";6///"_$P(SDXX,"^",4)
32 .S X=$P(SDXX,"^",1)
33 .I '$D(^DIC(40.7,"C",$P(SDXX,"^",2))) D FILE^DICN,MESS Q
34 .;I $D(^DIC(40.7,"C",$P(SDXX,"^",2))) D EDIT(SDXX),MESSEX
35 K DIC,DLAYGO,X
36 Q
37 ;
38EDIT(SDXX) ;- Edit fields w/new values if stop code record already exists
39 ;
40 Q:$G(SDXX)=""
41 N DA,DIE,DLAYGO,DR
42 S DA=+$O(^DIC(40.7,"C",+$P(SDXX,"^",2),0))
43 Q:'DA
44 S DIE="^DIC(40.7,",DR=".01////"_$P(SDXX,"^")_";1////"_$P(SDXX,"^",2)_";2////@"_$S('+$P(SDXX,U,5):"",1:";4////"_$P(SDXX,"^",5))_";5////"_$P(SDXX,"^",3)_";6///"_$P(SDXX,"^",4)
45 D ^DIE
46 Q
47 ;
48CHANGE ;** Change DSS ID names
49 ;
50 ; SDXX is in format:
51 ; STOP CODE NAME^AMIS #^^NEW STOP CODE NAME
52 ;
53 N SDX,SDXX,SDDA
54 S SDVAR=1
55 D MES^XPDUTL("")
56 D BMES^XPDUTL(">>> Changing Clinic Stop (DSS ID) names in CLINIC STOP File (#40.7)...")
57 F SDX=1:1 K DD,DO,DA S SDXX=$P($T(CHNG+SDX),";;",2) Q:SDXX="QUIT" DO
58 .S SDDA=+$O(^DIC(40.7,"C",$P(SDXX,U,2),0))
59 .I $D(^DIC(40.7,SDDA,0)) DO
60 ..S DA=SDDA,DR=".01///"_$P(SDXX,U,4),DIE="^DIC(40.7,"
61 ..D ^DIE,MESC
62 K DIE,DR,DA
63 Q
64 ;
65MESS ;** Add message
66 N ECXADMSG
67 I +$G(SDVAR) D HDR(SDVAR)
68 D MES^XPDUTL(" ")
69 S ECXADMSG="Added: "_$P(SDXX,"^",2)_" "_$P(SDXX,"^")
70 I $P(SDXX,"^",5)'="" S ECXADMSG=ECXADMSG_" [CDR#: "_$P(SDXX,"^",5)_"]"
71 D MES^XPDUTL(ECXADMSG)
72 I $P(SDXX,"^",3)'="" S ECXADMSG=" Restricted Type: "_$P(SDXX,"^",3)_" Restricted Date: "_$P(SDXX,"^",4)
73 D MES^XPDUTL(ECXADMSG)
74 K SDVAR
75 Q
76 ;
77MESSEX ;** Display message if stop code already exists
78 N ECXADMSG
79 I +$G(SDVAR) D HDR(SDVAR)
80 D MES^XPDUTL(" ")
81 S ECXADMSG=" "_$P(SDXX,"^",2)_" "_$P(SDXX,"^")_" already exists."
82 D MES^XPDUTL(ECXADMSG)
83 K SDVAR
84 Q
85 ;
86MESC ;** Change message
87 N SDCMSG,SDCMSG1
88 I +$G(SDVAR) D HDR(SDVAR)
89 D MES^XPDUTL(" ")
90 S SDCMSG="Changed: "_$P(SDXX,U,2)_" "_$P(SDXX,U)
91 S SDCMSG1=" to: "_$P(SDXX,U,2)_" "_$P(SDXX,U,4)
92 D MES^XPDUTL(SDCMSG)
93 D MES^XPDUTL(SDCMSG1)
94 K SDVAR
95 Q
96 ;
97HDR(SDVAR) ;- Header
98 Q:'$G(SDVAR)
99 N SDHDR
100 S SDHDR=$P($T(@("HDR"_SDVAR)),";;",2)
101 D BMES^XPDUTL(SDHDR)
102 Q
103 ;
104 ;
105HDR1 ;; Stop Code Name
106 ;
107HDR2 ;; CDR Stop Code Name
108 ;
109HDR3 ;; Stop Code Name Rest. Type Date
110 ;
111NEW ;DSS IDs to add- ex ;;STOP CODE NAME^NUMBER^RESTRICTION TYPE^RESTRICTION DATE^CDR
112 ;;HBPC Nursing (RN / LP)^171^P^10/1/2004
113 ;;HBPC PHYSIC EXTND(NP,CNS,PA)^172^P^10/1/2004
114 ;;PMRS CWT/TWE FACE TO FACE^208^E
115 ;;COMP & PENS (C&P) EXAMS^450^S^10/1/2004
116 ;;TRANSPLANT^457^S^10/1/2004
117 ;;RESEARCH^474^S^10/1/2004
118 ;;COMPREHENSIVE FUNDOSCOPY EXAM^480^S^10/1/2004
119 ;;BRONCHOSCOPY^481^S^10/1/2004
120 ;;PTSD CLINICAL TEAM PTS IND^540^P^10/1/2004
121 ;;MH CWT/TWE FACE TO FACE^574^E
122 ;;ADMIN PAT ACTIVTIES (MASNONCT)^674^P^10/1/2004
123 ;;NON-VIDEO MONITORING ONLY^683^P^10/1/2004
124 ;;CARE OF CCS PROGRAM PATIENT^685^E
125 ;;PMRS CWT/SE FACE TO FACE^222^E^
126 ;;PMRS CWT/SE NON-F TO F (MASNONCT)^223^E
127 ;;PMRS CWT/TWE NON-F TO F (MASNONCT)^228^E
128 ;;MEDICAL PRE-PROCED EVAL^336^E^
129 ;;MOVE PROGRAM IND^372^E^
130 ;;MOVE PROGRAM GRP^373^E^
131 ;;LOCALLY DEFINED^451^S^10/1/2004
132 ;;LOCALLY DEFINED^452^S^10/1/2004
133 ;;LOCALLY DEFINED^453^S^10/1/2004
134 ;;LOCALLY DEFINED^454^S^10/1/2004
135 ;;LOCALLY DEFINED^455^S^10/1/2004
136 ;;LOCALLY DEFINED^456^S^10/1/2004
137 ;;LOCALLY DEFINED^458^S^10/1/2004
138 ;;LOCALLY DEFINED^459^S^10/1/2004
139 ;;LOCALLY DEFINED^460^S^10/1/2004
140 ;;LOCALLY DEFINED^461^S^10/1/2004
141 ;;LOCALLY DEFINED^462^S^10/1/2004
142 ;;LOCALLY DEFINED^463^S^10/1/2004
143 ;;LOCALLY DEFINED^464^S^10/1/2004
144 ;;LOCALLY DEFINED^465^S^10/1/2004
145 ;;LOCALLY DEFINED^466^S^10/1/2004
146 ;;LOCALLY DEFINED^467^S^10/1/2004
147 ;;LOCALLY DEFINED^468^S^10/1/2004
148 ;;LOCALLY DEFINED^469^S^10/1/2004
149 ;;LOCALLY DEFINED^470^S^10/1/2004
150 ;;LOCALLY DEFINED^471^S^10/1/2004
151 ;;LOCALLY DEFINED^472^S^10/1/2004
152 ;;LOCALLY DEFINED^473^S^10/1/2004
153 ;;LOCALLY DEFINED^475^S^10/1/2004
154 ;;LOCALLY DEFINED^476^S^10/1/2004
155 ;;LOCALLY DEFINED^477^S^10/1/2004
156 ;;LOCALLY DEFINED^478^S^10/1/2004
157 ;;LOCALLY DEFINED^479^S^10/1/2004
158 ;;LOCALLY DEFINED^482^S^10/1/2004
159 ;;LOCALLY DEFINED^483^S^10/1/2004
160 ;;LOCALLY DEFINED^484^S^10/1/2004
161 ;;LOCALLY DEFINED^485^S^10/1/2004
162 ;;MH CWT/SE FACE TO FACE^568^E^
163 ;;MH CWT/SE NON-F TO F (MAS NONCT^569^E^
164 ;;MH CWT/TWE NON-F TO F (MAS NONCT^570^E^
165 ;;SEND-OUT PROCS RADIOLOGY^643^P^10/1/2004
166 ;;STATE HOME ADULT DAY HLTHCARE^658^P^10/1/2004
167 ;;QUIT
168 ;
169CHNG ;DSS ID name changes- example ;;STOP CODE NAME^NUMBER^^NEW NAME
170 ;;HBPC - RN/RNP/PA//^171^^HBPC Nursing (RN / LP)
171 ;;HBPC - NURSE EXTENDER^172^^HBPC PHYSIC EXTND(NP,CNS,PA)
172 ;;PM&RS COMPENSATED WORK THERAPY^208^^PMRS CWT/TWE FACE TO FACE
173 ;;COMP & PENS (C&P) EXAMS^450^^COMP & PENS (C&P) EXAMS
174 ;;TRANSPLANT^457^^TRANSPLANT
175 ;;RESEARCH^474^^RESEARCH
176 ;;COMPREHENSIVE FUNDOSCOPY EXAM^480^^COMPREHENSIVE FUNDOSCOPY EXAM
177 ;;BRONCHOSCOPY^481^^BRONCHOSCOPY
178 ;;PCT POST-TRAUMATIC STRESS-IND^540^^PTSD CLINICAL TEAM PTS IND
179 ;;MH COMP WORK THERAPY (CWT) GRP^574^^MH CWT/TWE FACE TO FACE
180 ;;ADMIN PT ORIENT NONCTMAS PRI^674^^ADMIN PAT ACTIVTIES (MASNONCT)
181 ;;NONVIDEO HOME TELEHEALTH MONITOR ONLY (NONCOUNT)^683^^NON-VIDEO MONITORING ONLY
182 ;;CCS OFFICE VISIT^685^^CARE OF CCS PROGRAM PATIENT
183 ;;QUIT
Note: See TracBrowser for help on using the repository browser.