source: Scheduling/trunk/m/BSDX26.m@ 865

Last change on this file since 865 was 614, checked in by Sam Habiel, 15 years ago

Initial committ of scheduling package

File size: 1.4 KB
RevLine 
[614]1BSDX26 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
2 ;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007
3 ;
4 ;
5EDITAPTD(BSDXY,BSDXAPTID,BSDXNOTE) ;EP
6 ;Entry point for debugging
7 ;
8 ;D DEBUG^%Serenji("EDITAPT^BSDX26(.BSDXY,BSDXAPTID,BSDXNOTE)")
9 Q
10 ;
11EDITAPT(BSDXY,BSDXAPTID,BSDXNOTE) ;EP Edit appointment (only note text can be edited)
12 ;
13 N BSDXNOD,BSDXPATID,BSDXSTART,DIK,DA,BSDXID,BSDXI,BSDXZ,BSDXIENS
14 ;
15 D ^XBKVAR
16 S X="ETRAP^BSDX26",@^%ZOSF("TRAP")
17 S BSDXI=0
18 K ^BSDXTMP($J)
19 S BSDXY="^BSDXTMP("_$J_")"
20 S ^BSDXTMP($J,BSDXI)="T00020ERRORID"_$C(30)
21 S BSDXI=BSDXI+1
22 TSTART
23 I '+BSDXAPTID D ERR(BSDXI,"BSDX26: Invalid Appointment ID") Q
24 I '$D(^BSDXAPPT(BSDXAPTID,0)) D ERR(BSDXI,"BSDX26: Invalid Appointment ID") Q
25 ;Add WP field
26 ;I BSDXNOTE]"" S BSDXNOTE(.5)=BSDXNOTE,BSDXNOTE=""
27 S BSDXNOTE(.5)=BSDXNOTE,BSDXNOTE=""
28 I $D(BSDXNOTE(0)) S BSDXNOTE(.5)=BSDXNOTE(0) K BSDXNOTE(0)
29 I $D(BSDXNOTE(.5)) D
30 . D WP^DIE(9002018.4,BSDXAPTID_",",1,"","BSDXNOTE","BSDXMSG")
31 ;
32 ;Return Recordset
33 TCOMMIT
34 S BSDXI=BSDXI+1
35 S ^BSDXTMP($J,BSDXI)="-1"_$C(30)
36 S BSDXI=BSDXI+1
37 S ^BSDXTMP($J,BSDXI)=$C(31)
38 Q
39 ;
40 ;
41ERR(BSDXI,BSDXERR) ;Error processing
42 S BSDXI=BSDXI+1
43 TROLLBACK
44 S ^BSDXTMP($J,BSDXI)=BSDXERR_$C(30)
45 S BSDXI=BSDXI+1
46 S ^BSDXTMP($J,BSDXI)=$C(31)
47 Q
48 ;
49ETRAP ;EP Error trap entry
50 TROLLBACK
51 D ^%ZTER
52 I '$D(BSDXI) N BSDXI S BSDXI=999999
53 S BSDXI=BSDXI+1
54 D ERR(BSDXI,"BSDX26 Error: "_$G(%ZTERROR))
55 Q
Note: See TracBrowser for help on using the repository browser.