source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWCIRN.m@ 1608

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

revised back to 6/30/08 version

File size: 2.9 KB
Line 
1ORWCIRN ; slc/dcm,REV - Functions for GUI CIRN ACTIONS ;22-NOV-1999 07:27:24
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**10,101,109,132,141,160,208,239,215**;October 28, 1997
3 ;
4FACLIST(ORY,ORDFN) ; Return list of remote facilities for patient
5 ;Check to see if CIRN PD/MPI installed
6 N X,ORSITES,I,IFN,LOCAL,CTR,HDRFLG
7 S X="MPIF001" X ^%ZOSF("TEST")
8 I '$T S ORY(0)="-1^CIRN MPI not installed." Q
9 S X="VAFCTFU1" X ^%ZOSF("TEST")
10 I '$T S ORY(0)="-1^Remote data view not installed." Q
11 S X=$$GET^XPAR("ALL","ORWRP CIRN REMOTE DATA ALLOW",1,"I")
12 I 'X S ORY(0)="-1^Remote access not allowed" Q
13 D TFL^VAFCTFU1(.ORY,ORDFN)
14 S I=0 F S I=$O(ORY(I)) Q:'I I $P(ORY(I),"^",5)="OTHER",'($P(ORY(I),"^")="200HD") K ORY(I) ;Screen out Type 'OTHER' locations
15 S HDRFLG=0
16 I $$GET^XPAR("ALL","ORWRP CIRN SITES ALL",1,"I") D
17 . S (CTR,I)=0
18 . F S I=$O(ORY(I)) Q:'I S $P(ORY(I),"^",5)=1,CTR=CTR+1 D
19 .. I $P(ORY(I),"^")=200 S $P(ORY(I),"^",2)="DEPT. OF DEFENSE"
20 .. I $P(ORY(I),"^")="200HD" D
21 ... I +$$GET^XPAR("ALL","ORWRP HDR ON",1,"I")=0 K ORY(I) S CTR=CTR-1 Q
22 ... S HDRFLG=I ; Remove commented out code to enable HDR + 1 other site.
23 D GETLST^XPAR(.ORSITES,"ALL","ORWRP CIRN SITES","I")
24 S (CTR,I)=0,LOCAL=$P($$SITE^VASITE,"^",3)
25 F S I=$O(ORY(I)) Q:'I D
26 . I +ORY(I)=+LOCAL K ORY(I) Q
27 . S IFN=$$IEN^XUAF4(ORY(I)),CTR=CTR+1
28 . I IFN,$G(ORSITES(IFN)) S $P(ORY(I),"^",5)=1 I $P(ORY(I),"^")=200 S $P(ORY(I),"^",2)="DEPT. OF DEFENSE"
29 . I IFN,$G(ORSITES(IFN)),$P(ORY(I),"^")="200HD" D
30 .. I +$$GET^XPAR("ALL","ORWRP HDR ON",1,"I")=0 K ORY(I) S CTR=CTR-1 Q
31 .. S HDRFLG=I ; Remove commented out code to enable HDR + 1 other site.
32 I '$L($O(ORY(""))) S ORY(0)="-1^Only local data exists for this patient"
33 I $G(HDRFLG),CTR'>1 K ORY(HDRFLG) S ORY(0)="-1^Only HDR has data for this patient"
34 Q
35RESTRICT(ORY,PATID) ;Check for sensitive patient
36 N DFN,ICN,SITE
37 I '$G(PATID) S ORY(1)="-1",ORY(2)="Invalid Patient ID" Q
38 S ICN=$P(PATID,";",2)
39 I 'ICN S ORY(1)="-1",ORY(2)="Invalid ICN" Q
40 S SITE=$$SITE^VASITE,SITE=$P(SITE,"^",2)_";"_$P(SITE,"^",3)
41 S DFN=+$$GETDFN^MPIF001(ICN)
42 I DFN<0 S ORY(1)="-1",ORY(2)="Patient not found on remote system ("_SITE_")" Q
43 D PTSEC^DGSEC4(.ORY,DFN)
44 Q
45CHKLNK(ORY) ;Check for active HL7 TCP link on local system
46 S ORY=$$STAT^HLCSLM
47 Q
48VISTAWEB(ORY) ;Check VistaWeb Parameter
49 S ORY=+$$GET^XPAR("ALL","ORWRP VISTAWEB",1,"I")
50 Q
51WEBCH(ORY,ORVALUE) ;Change value of ORWRP VISTAWEB parameter
52 D PUT^XPAR(DUZ_";VA(200,","ORWRP VISTAWEB",1,ORVALUE)
53 Q
54WEBADDR(ORY,PATID) ;Get VistaWeb Address
55 S ORY=$$GET^XPAR("ALL","ORWRP VISTAWEB ADDRESS",1,"I")
56 I ORY="" S ORY="https://vistaweb.med.va.gov" Q
57 I ORY="https://vistaweb.med.va.gov" Q
58 S ORY=ORY_"?q9gtw0="_$P($$SITE^VASITE,"^",3)_"&xqi4z="_PATID_"&yiicf="_DUZ
59 Q
60AUTORDV(ORY) ;Get parameter value for ORWRP CIRN AUTOMATIC
61 S ORY=+$$GET^XPAR("ALL","ORWRP CIRN AUTOMATIC",1,"I")
62 Q
63HDRON(ORY) ;Get parameter value for ORWRP HDR ON
64 S ORY=+$$GET^XPAR("ALL","ORWRP HDR ON",1,"I")
65 Q
Note: See TracBrowser for help on using the repository browser.