source: FOIAVistA/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOQRART.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1PSOQRART ;HINES/RMS- TIU OBJECT FOR REMOTE ALLERGIES VIA RDI ; 30 Nov 2007 7:56 AM
2 ;;7.0;OUTPATIENT PHARMACY;**294**;DEC 1997;Build 13
3 ;
4 ;Reference to CKP^GMTSUP supported by DBIA 4231
5 ;References to ORRDI1 supported by DBIA 4659
6ENHS ;ENTRY POINT FOR HEALTH SUMMARY OF REMOTE ALLERGY/ADR DATA
7 N PSOQHDR,PSOQRET,PSOQART,PSOQRART,PSOQFAC,PSOQREAC,PSOQRDI,PSOQDOWN
8 Q:'$G(DFN)
9 S PSOQHDR=$$HAVEHDR^ORRDI1 I '+$G(PSOQHDR) D Q
10 . D CKP^GMTSUP Q:$D(GMTSQIT)
11 . W !,"Remote Data from HDR not available"
12 . D CKP^GMTSUP Q:$D(GMTSQIT)
13 D Q:$G(PSOQDOWN)
14 . I $D(^XTMP("ORRDI","OUTAGE INFO","DOWN")) H $$GET^XPAR("ALL","ORRDI PING FREQ")/2
15 . I $D(^XTMP("ORRDI","OUTAGE INFO","DOWN")) S PSOQDOWN=1 D
16 .. D CKP^GMTSUP Q:$D(GMTSQIT)
17 .. W !,"WARNING: Connection to Remote Data Currently Down",!
18 .. D CKP^GMTSUP Q:$D(GMTSQIT)
19 D ;RDI/HDR CALL ENCAPSULATION
20 . D SAVDEV^%ZISUTL("PSOQHFS")
21 . S PSOQRET=$$GET^ORRDI1(DFN,"ART")
22 . D USE^%ZISUTL("PSOQHFS")
23 . D RMDEV^%ZISUTL("PSOQHFS")
24 I PSOQRET=-1 D Q
25 . D CKP^GMTSUP Q:$D(GMTSQIT)
26 . W !,"Connection to Remote Data Not Available"
27 . D CKP^GMTSUP Q:$D(GMTSQIT)
28 I '$D(^XTMP("ORRDI","ART",DFN))!('+PSOQRET) D Q
29 . D CKP^GMTSUP Q:$D(GMTSQIT)
30 . W !,"No Remote Allergy/ADR Data available for this patient"
31 . D CKP^GMTSUP Q:$D(GMTSQIT)
32 D CKP^GMTSUP Q:$D(GMTSQIT)
33 W !,"FACILITY",?40,"ALLERGY/ADR",!,"--------",?40,"-----------"
34 D CKP^GMTSUP Q:$D(GMTSQIT)
35 F PSOQART=1:1:PSOQRET D
36 . S PSOQFAC=$G(^XTMP("ORRDI","ART",DFN,PSOQART,"FACILITY",0))
37 . S PSOQREAC=$G(^XTMP("ORRDI","ART",DFN,PSOQART,"REACTANT",0))
38 . Q:$$YESCHK
39 . Q:PSOQFAC']""!(PSOQREAC']"")
40 . S PSOQREAC=$P(PSOQREAC,U,2)
41 . S PSOQRART(PSOQFAC,PSOQREAC)=""
42 S PSOQFAC="" F S PSOQFAC=$O(PSOQRART(PSOQFAC)) Q:PSOQFAC']"" D ;
43 . S PSOQREAC="" F S PSOQREAC=$O(PSOQRART(PSOQFAC,PSOQREAC)) Q:PSOQREAC']"" D ;
44 .. D CKP^GMTSUP Q:$D(GMTSQIT)
45 .. W !,PSOQFAC,?40,PSOQREAC
46 .. D CKP^GMTSUP Q:$D(GMTSQIT)
47 Q
48YESCHK() ;DO NOT INCLUDE IF A 'YES' ASSESSMENT
49 I $P(PSOQREAC,U,2)'="YES" Q 0
50 I $P(PSOQREAC,U,2)="YES" I $P(PSOQREAC,U,3)["99VA8" Q 1
51 Q 1 ;STOP IF THERE IS ANY PROBLEMATIC DATA
52 ;----------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.