source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWGN.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 784 bytes
Line 
1ORWGN ;;SLC/JDL- Group Notes
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**222**
3AUTHUSR(ORY) ;Does user has permission to access GN?
4 S ORY=0
5 I $D(^XUSEC("OR GN ACCESS",DUZ)) S ORY=1
6 Q
7 ;
8GNLOC(ORY,ORFROM,DIR) ;Is valid GN location? 1: true 0: false
9 ; .ORY=returned list, ORFROM=text to $O from, DIR=$O direction.
10 N IX,ORLST,CHKVAL,ORERR,ORX
11 K ^TMP("ORGN",$J)
12 S (ORLST,ORERR)="",CHKVAL=0
13 D GETLST^XPAR(.ORLST,"ALL","OR GN LOCATIONS","N",.ORERR)
14 I ORERR S ORY=ORERR Q
15 Q:$D(ORLST)=1
16 S IX=0 F S IX=$O(ORLST(IX)) Q:'IX D
17 . S CHKVAL=ORLST(IX)
18 . S:($$ACTLOC^ORWU(+CHKVAL)) ^TMP("ORGN",$J,$P(CHKVAL,U,2))=ORLST(IX)
19 N I,CNT S I=0,CNT=44,ORY=""
20 Q:$D(^TMP("ORGN",$J))<10
21 F Q:I'<CNT S ORFROM=$O(^TMP("ORGN",$J,ORFROM),DIR) Q:ORFROM="" D
22 . S I=I+1,ORY(I)=^TMP("ORGN",$J,ORFROM)
23 Q
Note: See TracBrowser for help on using the repository browser.