source: WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGQBIM.m@ 1042

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1MAGQBIM ;WOIFO/RMP - Import functions ;19 Nov 2001 1:23 PM
2 ;;3.0;IMAGING;**7,20**;Apr 12, 2006
3 ;; +---------------------------------------------------------------+
4 ;; | Property of the US Government. |
5 ;; | No permission to copy or redistribute this software is given. |
6 ;; | Use of unreleased versions of this software requires the user |
7 ;; | to execute a written test agreement with the VistA Imaging |
8 ;; | Development Office of the Department of Veterans Affairs, |
9 ;; | telephone (301) 734-0100. |
10 ;; | |
11 ;; | The Food and Drug Administration classifies this software as |
12 ;; | a medical device. As such, it may not be changed in any way. |
13 ;; | Modifications to this software may result in an adulterated |
14 ;; | medical device under 21CFR820, the use of which is considered |
15 ;; | to be a violation of US Federal Statutes. |
16 ;; +---------------------------------------------------------------+
17 ;;
18 ;
19 Q
20ENTRY(QP,QUE,QP2,ZN,RES) ;
21 K OUT,ERR,IEN
22 S IEN=$S($P(ZN,U,11)?1N.N:$P(ZN,U,11),1:QP)
23 D FIND^DIC(2006.041,"","@;.02","PQ",IEN,1,"","","","OUT","ERR")
24 I ($D(ERR)!($P($G(OUT("DILIST",0)),U)<1)) D Q
25 . D QSTAT^MAGQBTM(IEN,QUE_" Dequeue Failed on TrackId lookup.",QUE,$$PLACE^MAGBAPI(+$G(DUZ(2))))
26 . S RES="0"_U_QP2_U_" Dequeue Failed on TrackId lookup."
27 . Q
28 N VALUE
29 S VALUE=$P(OUT("DILIST",1,0),U,2)
30 S RES=QP_U_VALUE_U_$TR($P(ZN,U,10),"|",U)_U_IEN
31 S $P(RES,U,8)=+$P(ZN,U,9)
32 Q
33STAT(QP,TIME,MESS) ;
34 N TRACKID
35 K OUT,ERR,FDA
36 S FDA(2006.041,"+1,",.01)=QP
37 D FIND^DIC(2006.041,"","@;.02","PQ",QP,1,"","","","OUT","ERR")
38 Q:$D(ERR)
39 Q:$P(OUT("DILIST",0),U)<1
40 S TRACKID=$P(OUT("DILIST",1,0),U,2)
41 S FDA(2006.041,"+1,",.02)=TRACKID
42 S FDA(2006.041,"+1,",1)="BP QUEUE STATUS"
43 S FDA(2006.041,"+1,",2)=TIME
44 S FDA(2006.041,"+1,",3)=MESS
45 D UPDATE^DIE("U","FDA","","MAGIMP")
46 Q
47TIDL(QP,QUE,RES) ;
48 K OUT,ERR
49 S RES=0
50 D FIND^DIC(2006.041,"","@;.02","PQ",QP,1,"","","","OUT","ERR")
51 I ($D(ERR)!($P($G(OUT("DILIST",0)),U)<1)) D Q
52 . D QSTAT^MAGQBTM(QP,QUE_" Requeue Failed on TrackId lookup.",QUE,$$PLACE^MAGBAPI(+$G(DUZ(2))))
53 . Q
54 S RES=$P($G(OUT("DILIST",1,0)),U,2)
55 Q
Note: See TracBrowser for help on using the repository browser.