source: WorldVistAEHR/trunk/r/AUTOMATED_MED_INFO_EXCHANGE-DVBA-DVBC/DVBA58PI.m@ 1361

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1DVBA58PI ;ALB/JER - Post Init Exam file Update ; 08/07/03 11:41am
2 ;;2.7;AMIE;**58**;AUG 7,2003
3 ;
4 ; This is the post-install for DVBA*2.7*58 to inactivate the old
5 ; entries and create new entries in the AMIE EXAM file (#396.6).
6 ;
7EN ;
8 D BMES^XPDUTL("DVBA*2.7*58 Post Installation --")
9 D MES^XPDUTL(" Update to AMIE EXAM file (#396.6).")
10 D MES^XPDUTL(" ")
11 I '$D(^DVB(396.6)) D BMES^XPDUTL("Missing AMIE EXAM (#396.6) file") Q
12 I $D(^DVB(396.6)) D
13 .D INACT
14 .D NEW
15 Q
16 ;
17INACT ;inactivate exams
18 N LINE,IEN,EXM,PNM,BDY,ROU,STAT,WKS,DIE,DR,DA,X,Y,DVBAI
19 D BMES^XPDUTL("Inactivating AMIE EXAM file entries..")
20 F DVBAI=1:1 S LINE=$P($T(TXTOLD+DVBAI),";;",2) Q:LINE="QUIT" D
21 .D GET K X,Y,DA
22 .I $P($G(^DVB(396.6,IEN,0)),"^",1)'=EXM D Q
23 ..D BMES^XPDUTL(" *** Warning - Entry #"_IEN)
24 ..D MES^XPDUTL(" for exam "_EXM)
25 ..D MES^XPDUTL(" could not be inactivated.")
26 .S DIE="^DVB(396.6,",DA=IEN,DR=".5///I" D ^DIE
27 .D BMES^XPDUTL(" Entry #"_IEN_" for exam "_EXM)
28 .D MES^XPDUTL(" successfully inactivated.")
29 D MES^XPDUTL(" ")
30 Q
31 ;
32NEW ;add new exam
33 N LINE,IEN,EXM,PNM,BDY,ROU,STAT,WKS,DIC,DIE,DR,DA,X,Y,DINUM,DVBAI
34 D BMES^XPDUTL("Adding new AMIE EXAM file entries...")
35 F DVBAI=1:1 S LINE=$P($T(TXTNEW+DVBAI),";;",2) Q:LINE="QUIT" D
36 .D GET K X,Y,DA
37 .D BMES^XPDUTL(" Attempting to add Entry #"_IEN_"...")
38 .I $D(^DVB(396.6,IEN,0)) D Q
39 ..D MES^XPDUTL(" You have an Entry #"_IEN_".")
40 ..D MES^XPDUTL(" Updating "_EXM_".")
41 ..S DIE="^DVB(396.6,",DA=IEN,DR=".01///"_EXM_";.07///"_WKS_";.5///"_STAT_";2///"_BDY_";6///"_PNM_";7///"_ROU
42 ..D ^DIE
43 .S DIC="^DVB(396.6,",DIC(0)="LZ",X=EXM,DINUM=IEN
44 .S DIC("DR")=".07///"_WKS_";.5///"_STAT_";2///"_BDY_";6///"_PNM_";7///"_ROU
45 .K DD,DO D FILE^DICN
46 .I +Y=IEN D Q
47 ..D MES^XPDUTL(" Successfully added Entry #"_IEN)
48 ..D MES^XPDUTL(" for exam "_EXM_".")
49 .I +Y=-1 D
50 ..D MES^XPDUTL(" *** Warning - Unable to add Entry #"_IEN)
51 ..D MES^XPDUTL(" for exam "_EXM_".")
52 Q
53GET ;get exam data
54 S (IEN,EXM,PNM,BDY,ROU,STAT,WKS)=""
55 S IEN=$P(LINE,";",1) ;ien
56 S EXM=$P(LINE,";",2) ;exam name
57 S PNM=$P(LINE,";",3) ;print name
58 S BDY=$P(LINE,";",4) ;body system
59 S ROU=$P(LINE,";",5) ;routine name
60 S STAT=$P(LINE,";",6) ;status
61 S WKS=$P(LINE,";",8) ;worksheet number
62 Q
63 ;
64 ; Entries to be inactivated.
65 ; format: ien;exam name;;;routine;status;;wks#
66TXTOLD ;
67 ;;120;HAND, THUMB, AND FINGERS;HAND, THUMB, AND FINGERS; ; ;DVBCWHT;I; ;1420
68 ;;QUIT
69 ;
70 ;
71 ; New exam to activate
72 ; format: ien;exam name;print name;body system;routine;status;;wks#
73TXTNEW ;
74 ;;181;HAND, THUMB, AND FINGERS;HAND/THUMB/FINGERS;MUSCULOSKELETAL;DVBCWHT3;A; ;1420
75 ;;QUIT
Note: See TracBrowser for help on using the repository browser.