DVBA183P ;ALB/MJB - PATCH DVBA*2.7*183 INSTALL UTILITIES ; 3/4/2010
;;2.7;AMIE;**183**;Apr 10, 1995;Build 8
;
;No direct entry allowed
Q
;
PRE ;Main entry point for Pre-install items
;
;
;
AMIE ;Updates for the AMIE EXAM (#396.6) file
;
;Used to inactivate old entries and create new entries for designated
;worksheet updates
;
D BMES^XPDUTL(" Update to AMIE EXAM (#396.6) file...")
D MES^XPDUTL(" ")
I '$D(^DVB(396.6)) D BMES^XPDUTL("Missing AMIE EXAM (#396.6) file") Q
I $D(^DVB(396.6)) D
.D INACT
.D NEW
Q
;
;
INACT ;Inactivate old (current) exams
;
N LINE,IEN,EXM,PNM,BDY,ROU,STAT,WKS,DIE,DR,DA,X,Y,DVBAI
;
D BMES^XPDUTL(" Inactivating AMIE EXAM (#396.6) file entries...")
F DVBAI=1:1 S LINE=$P($T(TXTOLD+DVBAI),";;",2) Q:LINE="QUIT" D
.D GET K X,Y,DA
.I $P($G(^DVB(396.6,IEN,0)),"^",1)'=EXM D Q
..D BMES^XPDUTL(" *** Warning - Entry #"_IEN)
..D MES^XPDUTL(" for exam "_EXM)
..D MES^XPDUTL(" could not be inactivated.")
.S DIE="^DVB(396.6,",DA=IEN,DR=".5///I" D ^DIE
.D BMES^XPDUTL(" Entry #"_IEN_" for exam "_EXM)
.D MES^XPDUTL(" successfully inactivated.")
D MES^XPDUTL(" ")
Q
;
;
NEW ;Add new exam entries
;
N LINE,IEN,EXM,PNM,BDY,ROU,STAT,WKS,DIC,DIC,DR,DA,X,Y,DINUM,DVBAI
;
D BMES^XPDUTL(" Adding new AMIE EXAM (#396.6) file entries...")
F DVBAI=1:1 S LINE=$P($T(TXTNEW+DVBAI),";;",2) Q:LINE="QUIT" D
.D GET K X,Y,DA
.D BMES^XPDUTL(" Attempting to add Entry #"_IEN_"...")
.I $D(^DVB(396.6,IEN,0)) D Q
..D MES^XPDUTL(" You have an Entry #"_IEN_".")
..D MES^XPDUTL(" Updating "_EXM_".")
..S DIE="^DVB(396.6,",DA=IEN,DR=".01///"_EXM_";.07///"_WKS_";.5///"_STAT_";2///"_BDY_";6///"_PNM_";7///"_ROU
..D ^DIE
.S DIC="^DVB(396.6,",DIC(0)="LZ",X=EXM,DINUM=IEN
.S DIC("DR")=".07///"_WKS_";.5///"_STAT_";2///"_BDY_";6///"_PNM_";7///"_ROU
.K DD,DO D FILE^DICN
.I +Y=IEN D Q
..D MES^XPDUTL(" Successfully added Entry #"_IEN)
..D MES^XPDUTL(" for exam "_EXM_".")
.I +Y=-1 D
..D MES^XPDUTL(" *** Warning - Unable to add Entry #"_IEN)
..D MES^XPDUTL(" for exam "_EXM_".")
Q
;
;
GET ;Get exam data
;
S (IEN,EXM,PNM,BDY,ROU,STAT,WKS)=""
S IEN=$P(LINE,";",1) ;ien
S EXM=$P(LINE,";",2) ;exam name
S PNM=$P(LINE,";",3) ;print name
S BDY=$P(LINE,";",4) ;body system
S ROU=$P(LINE,";",5) ;routine name
S STAT=$P(LINE,";",6) ;status
S WKS=$P(LINE,";",8) ;worksheet number
Q
;
; Entries to be inactivated
; format: ien;exam name;;;routine;status;;wks#
TXTOLD ;
;;100;AID AND ATTENDANCE OR HOUSEBOUND EXAMINATION;A&A/HOUSEBOUND;17;DVBCWAH;I; ;1720
;;113;BRAIN AND SPINAL CORD;BRAIN/SPINAL CORD;23;DVBCWBS;I; ;1210
;;124;ACROMEGALY;ACROMEGALY;12;DVBCWAC;I; ;0420
;;154;ARTERIES, VEINS AND MISCELLANEOUS;ARTERIES/VEINS;6;DVBCWVN;I; ;0105
;;157;ARRHYTHMIAS;ARRHYTHMIAS;6;DVBCWAM;I; ;0115
;;190;PRISONER OF WAR PROTOCOL EXAMINATION;PRISONER OF WAR EXAM;17;DVBCWPA;I; ;1705
;;196;INITIAL EVALUATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD);STRESS DISORDER;14;DVBCWPF;I; ;0910
;;212;BONES (FRACTURES AND BONE DISEASE);BONES;2;DVBCWB2;I; ;1410
;;213;CHRONIC FATIGUE SYNDROME;CHRONIC FATIGUE SYNDROME;20;DVBCWFS2;I; ;1810
;;227;TRAUMATIC BRAIN INJURY (TBI);TRAUMATIC BRAIN INJURY;13;DVBCTBI4;I; ;1240
;;119;GYNECOLOGICAL CONDITIONS AND DISORDERS OF THE BREAST;GYNECOLOGIC/BREAST;9;DVBCWGY;I; ;0705
;;108;DENTAL AND ORAL;DENTAL AND ORAL;21;DVBCWDO;I; ;020
;;208;HAND, THUMB, AND FINGERS;HAND/THUMB/FINGERS;2;DVBCWHT8;I; ;1420
;;217;FIBROMYALGIA;FIBROMYALGIA;2;DVBCWFI2;I; ;1445
;;224;GENITOURINARY EXAMINATION;GU EXAMS;8;DVBCWGE4;I; ;0605
;;QUIT
;
; New exam(s) to activate
; format: ien;exam name;print name;body system;routine;status;;wks#
TXTNEW ;
;;238;AID AND ATTENDANCE OR HOUSEBOUND EXAMINATION;A&A/HOUSEBOUND;17;DVBCWAH2;A; ;1720
;;239;BRAIN AND SPINAL CORD;BRAIN/SPINAL CORD;23;DVBCWBS2;A; ;1210
;;240;ACROMEGALY;ACROMEGALY;12;DVBCWAC2;A; ;0420
;;241;ARTERIES, VEINS AND MISCELLANEOUS;ARTERIES/VEINS;6;DVBCWVN2;A; ;0105
;;242;ARRHYTHMIAS;ARRHYTHMIAS;6;DVBCWAM2;A; ;0115
;;243;PRISONER OF WAR PROTOCOL EXAMINATION;PRISONER OF WAR EXAM;17;DVBCWPA3;A; ;1705
;;244;BONES (FRACTURES AND BONE DISEASE);BONES;2;DVBCWB4;A; ;1410
;;245;CHRONIC FATIGUE SYNDROME;CHRONIC FATIGUE SYNDROME;20;DVBCWFS4;A; ;1810
;;246;TRAUMATIC BRAIN INJURY (TBI);TRAUMATIC BRAIN INJURY;13;DVBCWTB1;A; ;1240
;;247;INITIAL EVALUATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD);STRESS DISORDER;14;DVBCWPF4;A; ;0910
;;248;GYNECOLOGICAL CONDITIONS AND DISORDERS OF THE BREAST;GYNECOLOGIC/BREAST;9;DVBCWGY2;A; ;0705
;;252;DENTAL AND ORAL;DENTAL AND ORAL;21;DVBCWDO2;A; ;0205
;;249;HAND, THUMB, AND FINGERS;HAND/THUMB/FINGERS;2;DVBCWHTF;A; ;1420
;;250;FIBROMYALGIA;FIBROMYALGIA;2;DVBCWFI4;A; ;1445
;;251;GENITOURINARY EXAMINATION;GU EXAMS;8;DVBCWGE6;A; ;0605
;;QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBA183P 4921 printed Dec 13, 2024@01:39:22 Page 2
DVBA183P ;ALB/MJB - PATCH DVBA*2.7*183 INSTALL UTILITIES ; 3/4/2010
+1 ;;2.7;AMIE;**183**;Apr 10, 1995;Build 8
+2 ;
+3 ;No direct entry allowed
+4 QUIT
+5 ;
PRE ;Main entry point for Pre-install items
+1 ;
+2 ;
+3 ;
AMIE ;Updates for the AMIE EXAM (#396.6) file
+1 ;
+2 ;Used to inactivate old entries and create new entries for designated
+3 ;worksheet updates
+4 ;
+5 DO BMES^XPDUTL(" Update to AMIE EXAM (#396.6) file...")
+6 DO MES^XPDUTL(" ")
+7 IF '$DATA(^DVB(396.6))
DO BMES^XPDUTL("Missing AMIE EXAM (#396.6) file")
QUIT
+8 IF $DATA(^DVB(396.6))
Begin DoDot:1
+9 DO INACT
+10 DO NEW
End DoDot:1
+11 QUIT
+12 ;
+13 ;
INACT ;Inactivate old (current) exams
+1 ;
+2 NEW LINE,IEN,EXM,PNM,BDY,ROU,STAT,WKS,DIE,DR,DA,X,Y,DVBAI
+3 ;
+4 DO BMES^XPDUTL(" Inactivating AMIE EXAM (#396.6) file entries...")
+5 FOR DVBAI=1:1
SET LINE=$PIECE($TEXT(TXTOLD+DVBAI),";;",2)
if LINE="QUIT"
QUIT
Begin DoDot:1
+6 DO GET
KILL X,Y,DA
+7 IF $PIECE($GET(^DVB(396.6,IEN,0)),"^",1)'=EXM
Begin DoDot:2
+8 DO BMES^XPDUTL(" *** Warning - Entry #"_IEN)
+9 DO MES^XPDUTL(" for exam "_EXM)
+10 DO MES^XPDUTL(" could not be inactivated.")
End DoDot:2
QUIT
+11 SET DIE="^DVB(396.6,"
SET DA=IEN
SET DR=".5///I"
DO ^DIE
+12 DO BMES^XPDUTL(" Entry #"_IEN_" for exam "_EXM)
+13 DO MES^XPDUTL(" successfully inactivated.")
End DoDot:1
+14 DO MES^XPDUTL(" ")
+15 QUIT
+16 ;
+17 ;
NEW ;Add new exam entries
+1 ;
+2 NEW LINE,IEN,EXM,PNM,BDY,ROU,STAT,WKS,DIC,DIC,DR,DA,X,Y,DINUM,DVBAI
+3 ;
+4 DO BMES^XPDUTL(" Adding new AMIE EXAM (#396.6) file entries...")
+5 FOR DVBAI=1:1
SET LINE=$PIECE($TEXT(TXTNEW+DVBAI),";;",2)
if LINE="QUIT"
QUIT
Begin DoDot:1
+6 DO GET
KILL X,Y,DA
+7 DO BMES^XPDUTL(" Attempting to add Entry #"_IEN_"...")
+8 IF $DATA(^DVB(396.6,IEN,0))
Begin DoDot:2
+9 DO MES^XPDUTL(" You have an Entry #"_IEN_".")
+10 DO MES^XPDUTL(" Updating "_EXM_".")
+11 SET DIE="^DVB(396.6,"
SET DA=IEN
SET DR=".01///"_EXM_";.07///"_WKS_";.5///"_STAT_";2///"_BDY_";6///"_PNM_";7///"_ROU
+12 DO ^DIE
End DoDot:2
QUIT
+13 SET DIC="^DVB(396.6,"
SET DIC(0)="LZ"
SET X=EXM
SET DINUM=IEN
+14 SET DIC("DR")=".07///"_WKS_";.5///"_STAT_";2///"_BDY_";6///"_PNM_";7///"_ROU
+15 KILL DD,DO
DO FILE^DICN
+16 IF +Y=IEN
Begin DoDot:2
+17 DO MES^XPDUTL(" Successfully added Entry #"_IEN)
+18 DO MES^XPDUTL(" for exam "_EXM_".")
End DoDot:2
QUIT
+19 IF +Y=-1
Begin DoDot:2
+20 DO MES^XPDUTL(" *** Warning - Unable to add Entry #"_IEN)
+21 DO MES^XPDUTL(" for exam "_EXM_".")
End DoDot:2
End DoDot:1
+22 QUIT
+23 ;
+24 ;
GET ;Get exam data
+1 ;
+2 SET (IEN,EXM,PNM,BDY,ROU,STAT,WKS)=""
+3 ;ien
SET IEN=$PIECE(LINE,";",1)
+4 ;exam name
SET EXM=$PIECE(LINE,";",2)
+5 ;print name
SET PNM=$PIECE(LINE,";",3)
+6 ;body system
SET BDY=$PIECE(LINE,";",4)
+7 ;routine name
SET ROU=$PIECE(LINE,";",5)
+8 ;status
SET STAT=$PIECE(LINE,";",6)
+9 ;worksheet number
SET WKS=$PIECE(LINE,";",8)
+10 QUIT
+11 ;
+12 ; Entries to be inactivated
+13 ; format: ien;exam name;;;routine;status;;wks#
TXTOLD ;
+1 ;;100;AID AND ATTENDANCE OR HOUSEBOUND EXAMINATION;A&A/HOUSEBOUND;17;DVBCWAH;I; ;1720
+2 ;;113;BRAIN AND SPINAL CORD;BRAIN/SPINAL CORD;23;DVBCWBS;I; ;1210
+3 ;;124;ACROMEGALY;ACROMEGALY;12;DVBCWAC;I; ;0420
+4 ;;154;ARTERIES, VEINS AND MISCELLANEOUS;ARTERIES/VEINS;6;DVBCWVN;I; ;0105
+5 ;;157;ARRHYTHMIAS;ARRHYTHMIAS;6;DVBCWAM;I; ;0115
+6 ;;190;PRISONER OF WAR PROTOCOL EXAMINATION;PRISONER OF WAR EXAM;17;DVBCWPA;I; ;1705
+7 ;;196;INITIAL EVALUATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD);STRESS DISORDER;14;DVBCWPF;I; ;0910
+8 ;;212;BONES (FRACTURES AND BONE DISEASE);BONES;2;DVBCWB2;I; ;1410
+9 ;;213;CHRONIC FATIGUE SYNDROME;CHRONIC FATIGUE SYNDROME;20;DVBCWFS2;I; ;1810
+10 ;;227;TRAUMATIC BRAIN INJURY (TBI);TRAUMATIC BRAIN INJURY;13;DVBCTBI4;I; ;1240
+11 ;;119;GYNECOLOGICAL CONDITIONS AND DISORDERS OF THE BREAST;GYNECOLOGIC/BREAST;9;DVBCWGY;I; ;0705
+12 ;;108;DENTAL AND ORAL;DENTAL AND ORAL;21;DVBCWDO;I; ;020
+13 ;;208;HAND, THUMB, AND FINGERS;HAND/THUMB/FINGERS;2;DVBCWHT8;I; ;1420
+14 ;;217;FIBROMYALGIA;FIBROMYALGIA;2;DVBCWFI2;I; ;1445
+15 ;;224;GENITOURINARY EXAMINATION;GU EXAMS;8;DVBCWGE4;I; ;0605
+16 ;;QUIT
+17 ;
+18 ; New exam(s) to activate
+19 ; format: ien;exam name;print name;body system;routine;status;;wks#
TXTNEW ;
+1 ;;238;AID AND ATTENDANCE OR HOUSEBOUND EXAMINATION;A&A/HOUSEBOUND;17;DVBCWAH2;A; ;1720
+2 ;;239;BRAIN AND SPINAL CORD;BRAIN/SPINAL CORD;23;DVBCWBS2;A; ;1210
+3 ;;240;ACROMEGALY;ACROMEGALY;12;DVBCWAC2;A; ;0420
+4 ;;241;ARTERIES, VEINS AND MISCELLANEOUS;ARTERIES/VEINS;6;DVBCWVN2;A; ;0105
+5 ;;242;ARRHYTHMIAS;ARRHYTHMIAS;6;DVBCWAM2;A; ;0115
+6 ;;243;PRISONER OF WAR PROTOCOL EXAMINATION;PRISONER OF WAR EXAM;17;DVBCWPA3;A; ;1705
+7 ;;244;BONES (FRACTURES AND BONE DISEASE);BONES;2;DVBCWB4;A; ;1410
+8 ;;245;CHRONIC FATIGUE SYNDROME;CHRONIC FATIGUE SYNDROME;20;DVBCWFS4;A; ;1810
+9 ;;246;TRAUMATIC BRAIN INJURY (TBI);TRAUMATIC BRAIN INJURY;13;DVBCWTB1;A; ;1240
+10 ;;247;INITIAL EVALUATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD);STRESS DISORDER;14;DVBCWPF4;A; ;0910
+11 ;;248;GYNECOLOGICAL CONDITIONS AND DISORDERS OF THE BREAST;GYNECOLOGIC/BREAST;9;DVBCWGY2;A; ;0705
+12 ;;252;DENTAL AND ORAL;DENTAL AND ORAL;21;DVBCWDO2;A; ;0205
+13 ;;249;HAND, THUMB, AND FINGERS;HAND/THUMB/FINGERS;2;DVBCWHTF;A; ;1420
+14 ;;250;FIBROMYALGIA;FIBROMYALGIA;2;DVBCWFI4;A; ;1445
+15 ;;251;GENITOURINARY EXAMINATION;GU EXAMS;8;DVBCWGE6;A; ;0605
+16 ;;QUIT