source: Scheduling/trunk/m/BSDX30.m@ 1675

Last change on this file since 1675 was 1625, checked in by Tariq Hamkari, 11 years ago

Ayman Ghaith : adding the correct routines which not has the transactions.

File size: 2.5 KB
RevLine 
[1625]1BSDX30 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; [7/6/12 11:03am]
2 ;;1.7;BSDX;;Jun 01, 2013;Build 24
[1161]3 ; Licensed under LGPL
[614]4 ;
5 ;
6SPACED(BSDXY,BSDXDIC,BSDXVAL) ;EP
7 ;Entry point for debugging
8 ;
[1625]9 ; D DEBUG^%Serenji("SPACE^BSDX30(.BSDXY,BSDXDIC,BSDXVAL)")
[614]10 Q
11 ;
12SPACE(BSDXY,BSDXDIC,BSDXVAL) ;EP
13 ;Update ^DISV with most recent lookup value BSDXVAL from file BSDXDIC
14 ;BSDXDIC is the data global in the form GLOBAL(
15 ;BSDXVAL is the entry number (IEN) in the file
16 ;
17 ;Return Status = 1 if success, 0 if fail
18 ;
19 S BSDXY="^BSDXTMP("_$J_")"
20 N BSDX1,BSDXRES
21 S BSDXI=0
22 S X="ETRAP^BSDX30",@^%ZOSF("TRAP")
23 I (BSDXDIC="")!('+$G(BSDXVAL)) D ERR(BSDXI+1,99) Q
24 S BSDXDIC="^"_BSDXDIC
25 S ^BSDXTMP($J,0)="T00020ERRORID"_$C(30)
26 ;Note: Naked reference below is immediately preceded
27 ;by the full global reference per SAC 2.2.2.8
28 I $D(@(BSDXDIC_"BSDXVAL,0)")),'$D(^(-9)) D
29 . S ^DISV(DUZ,BSDXDIC)=BSDXVAL
30 . S BSDXRES=1
31 E S BSDXRES=0
32 S BSDXI=BSDXI+1
33 S ^BSDXTMP($J,BSDXI)=BSDXRES_$C(30)_$C(31)
34 Q
35 ;
36ERR(BSDXI,BSDXERR) ;Error processing
37 S BSDXI=BSDXI+1
38 S ^BSDXTMP($J,BSDXI)=BSDXERR_$C(30)
39 S BSDXI=BSDXI+1
40 S ^BSDXTMP($J,BSDXI)=$C(31)
41 Q
42 ;
43ETRAP ;EP Error trap entry
44 I '$D(BSDXI) N BSDXI S BSDXI=999
45 S BSDXI=BSDXI+1
46 D ERR(99,0)
47 Q
48 ;
49EHRPTD(BSDXY,BSDXWID,BSDXDFN) ;
50 ;
[1625]51 ; D DEBUG^%Serenji("EHRPT^BSDX30(.BSDXY,BSDXWID,BSDXDFN)")
[614]52 Q
53 ;
54EHRPT(BSDXY,BSDXWID,BSDXDFN) ;
55 ;
56 ;Return Status = 1 if success, 0 if error
57 ;
58 S BSDXY="^BSDXTMP("_$J_")"
59 N BSDX1,BSDXRES
60 S BSDXI=0,BSDXRES=1
61 S X="ETRAP^BSDX30",@^%ZOSF("TRAP")
62 S ^BSDXTMP($J,0)="T00020ERRORID"_$C(30)
63 I '+BSDXDFN D ERR(BSDXI+1,0) Q
64 ;
65 D PEVENT(BSDXWID,BSDXDFN) ;Raise patient selected event
66 ;
67 S BSDXI=BSDXI+1
68 S ^BSDXTMP($J,BSDXI)=BSDXRES_$C(30)_$C(31)
69 Q
70 ;
71PEVENT(BSDXWID,DFN) ;EP - Raise patient selection event to EHR
[1625]72 ; VEN/SMH v1.7 3120706 - Not used in VISTA.
73 ; No way right now to synchronize with CPRS.
74 ; Code commented out for now.
[614]75 ;
76 ;Change patient context to patient DFN
77 ;on all EHR client sessions associated with user DUZ
78 ;and workstation BSDXWID.
79 ;
80 ;If BSDXWID is "", the context change is sent to
81 ;all EHR client sessions belonging to user DUZ.
82 ;
[1625]83 ;Q:'$G(DUZ)
[614]84 ;N X
85 ;S X="CIANBUTL" X ^%ZOSF("TEST") Q:'$T
86 ;S X="CIANBEVT" X ^%ZOSF("TEST") Q:'$T
[1625]87 ;N UID,BRET
88 ;S BRET=0,UID=0
89 ;F S BRET=$$NXTUID^CIANBUTL(.UID,1) Q:'UID D
90 ;. Q:DUZ'=$$GETVAR^CIANBUTL("DUZ",,,UID)
91 ;. I BSDXWID'="" Q:BSDXWID'=$TR($$GETVAR^CIANBUTL("WID",,,UID),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
92 ;. D QUEUE^CIANBEVT("CONTEXT.PATIENT",+DFN,UID)
93 ;Q
Note: See TracBrowser for help on using the repository browser.