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

DVBA183P.m

Go to the documentation of this file.
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