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

DVB121PI.m

Go to the documentation of this file.
  1. DVB121PI ;ALB/RLC - Post Init Exam file Update ; 12 FEB 2007
  1. ;;2.7;AMIE;**121**;AUG 7,2003;Build 9
  1. ;
  1. ; This is the post-install for DVBA*2.7*121 to inactivate the old
  1. ; entries and create new entries in the AMIE EXAM file (#396.6).
  1. ;
  1. EN ;
  1. D BMES^XPDUTL("DVBA*2.7*121 Post Installation --")
  1. D MES^XPDUTL(" Update to AMIE EXAM file (#396.6).")
  1. D MES^XPDUTL(" ")
  1. I '$D(^DVB(396.6)) D BMES^XPDUTL("Missing AMIE EXAM (#396.6) file") Q
  1. I $D(^DVB(396.6)) D
  1. .D INACT
  1. .D NEW
  1. Q
  1. ;
  1. INACT ;inactivate exams
  1. N LINE,IEN,EXM,PNM,BDY,ROU,STAT,WKS,DIE,DR,DA,X,Y,DVBAI
  1. D BMES^XPDUTL("Inactivating AMIE EXAM file entries..")
  1. F DVBAI=1:1 S LINE=$P($T(TXTOLD+DVBAI),";;",2) Q:LINE="QUIT" D
  1. .D GET K X,Y,DA
  1. .I $P($G(^DVB(396.6,IEN,0)),"^",1)'=EXM D Q
  1. ..D BMES^XPDUTL(" *** Warning - Entry #"_IEN)
  1. ..D MES^XPDUTL(" for exam "_EXM)
  1. ..D MES^XPDUTL(" could not be inactivated.")
  1. .S DIE="^DVB(396.6,",DA=IEN,DR=".5///I" D ^DIE
  1. .D BMES^XPDUTL(" Entry #"_IEN_" for exam "_EXM)
  1. .D MES^XPDUTL(" successfully inactivated.")
  1. D MES^XPDUTL(" ")
  1. Q
  1. ;
  1. NEW ;add new exam
  1. N LINE,IEN,EXM,PNM,BDY,ROU,STAT,WKS,DIC,DIE,DR,DA,X,Y,DINUM,DVBAI
  1. D BMES^XPDUTL("Adding new AMIE EXAM file entries...")
  1. F DVBAI=1:1 S LINE=$P($T(TXTNEW+DVBAI),";;",2) Q:LINE="QUIT" D
  1. .D GET K X,Y,DA
  1. .D BMES^XPDUTL(" Attempting to add Entry #"_IEN_"...")
  1. .I $D(^DVB(396.6,IEN,0)) D Q
  1. ..D MES^XPDUTL(" You have an Entry #"_IEN_".")
  1. ..D MES^XPDUTL(" Updating "_EXM_".")
  1. ..S DIE="^DVB(396.6,",DA=IEN,DR=".01///"_EXM_";.07///"_WKS_";.5///"_STAT_";2///"_BDY_";6///"_PNM_";7///"_ROU
  1. ..D ^DIE
  1. .S DIC="^DVB(396.6,",DIC(0)="LZ",X=EXM,DINUM=IEN
  1. .S DIC("DR")=".07///"_WKS_";.5///"_STAT_";2///"_BDY_";6///"_PNM_";7///"_ROU
  1. .K DD,DO D FILE^DICN
  1. .I +Y=IEN D Q
  1. ..D MES^XPDUTL(" Successfully added Entry #"_IEN)
  1. ..D MES^XPDUTL(" for exam "_EXM_".")
  1. .I +Y=-1 D
  1. ..D MES^XPDUTL(" *** Warning - Unable to add Entry #"_IEN)
  1. ..D MES^XPDUTL(" for exam "_EXM_".")
  1. Q
  1. GET ;get exam data
  1. S (IEN,EXM,PNM,BDY,ROU,STAT,WKS)=""
  1. S IEN=$P(LINE,";",1) ;ien
  1. S EXM=$P(LINE,";",2) ;exam name
  1. S PNM=$P(LINE,";",3) ;print name
  1. S BDY=$P(LINE,";",4) ;body system
  1. S ROU=$P(LINE,";",5) ;routine name
  1. S STAT=$P(LINE,";",6) ;status
  1. S WKS=$P(LINE,";",8) ;worksheet number
  1. Q
  1. ;
  1. ; Entries to be inactivated.
  1. ; format: ien;exam name;;;routine;status;;wks#
  1. TXTOLD ;
  1. ;;105;BONES (FRACTURES AND BONE DISEASE);BONES;2;DVBCWB;I; ;1410
  1. ;;146;CHRONIC FATIGUE SYNDROME;CHRONIC FATIGUE SYNDROME;20;DVBCWFS;I; ;1810
  1. ;;106;CRANIAL NERVES;CRANIAL NERVES;23;DVBCWCN;I; ;1205
  1. ;;123;CUSHING'S SYNDROME;CUSHING'S SYNDROME;12;DVBCWCS;I; ;0415
  1. ;;189;EYE EXAMINATION;EYE;3;DVBCWEEA;I; ;1330
  1. ;;140;FIBROMYALGIA;FIBROMYALGIA;2;DVBCWFI;I; ;1445
  1. ;;150;HIV-RELATED ILLNESS;HIV-RELATED ILLNESS;20;DVBCWHI;I; ;1815
  1. ;;195;LIVER, GALL BLADDER, AND PANCREAS;LIVER/GALL B/PANCREAS;7;DVBCWLLA;I; ;0305
  1. ;;122;LYMPHATIC DISORDERS;LYMPHATIC DISORDERS;22;DVBCWLY;I; ;0810
  1. ;;200;NOSE, SINUS, LARYNX, AND PHARYNX;NOSE/SINUS/LARYNX/PHARYNX;19;DVBCWNW2;I; ;1510
  1. ;;137;RECTUM AND ANUS;RECTUM AND ANUS;7;DVBCWRA;I; ;0320
  1. ;;QUIT
  1. ;
  1. ;
  1. ; New exam to activate
  1. ; format: ien;exam name;print name;body system;routine;status;;wks#
  1. TXTNEW ;
  1. ;;212;BONES (FRACTURES AND BONE DISEASE);BONES;2;DVBCWB2;A; ;1410
  1. ;;213;CHRONIC FATIGUE SYNDROME;CHRONIC FATIGUE SYNDROME;20;DVBCWFS2;A; ;1810
  1. ;;214;CRANIAL NERVES;CRANIAL NERVES;23;DVBCWCN2;A; ;1205
  1. ;;215;CUSHING'S SYNDROME;CUSHING'S SYNDROME;12;DVBCWCS2;A; ;0415
  1. ;;216;EYE EXAMINATION;EYE;3;DVBCWEE3;A; ;1330
  1. ;;217;FIBROMYALGIA;FIBROMYALGIA;2;DVBCWFI2;A; ;1445
  1. ;;218;HIV-RELATED ILLNESS;HIV-RELATED ILLNESS;20;DVBCWHI2;A; ;1815
  1. ;;219;LIVER, GALL BLADDER, AND PANCREAS;LIVER/GALL B/PANCREAS;7;DVBCWLL5;A; ;0305
  1. ;;220;LYMPHATIC DISORDERS;LYMPHATIC DISORDERS;22;DVBCWLY2;A; ;0810
  1. ;;221;NOSE, SINUS, LARYNX, AND PHARYNX;NOSE/SINUS/LARYNX/PHARYNX;19;DVBCWNW4;A; ;1510
  1. ;;222;RECTUM AND ANUS;RECTUM AND ANUS;7;DVBCWRA2;A; ;0320
  1. ;;QUIT