source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORQQPP.m@ 1704

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1ORQQPP ; slc/CLA - Functions which return patient postings ;12/15/97
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
3LIST(ORY,ORPT) ;return pt's patient posting list
4 Q:'$L($G(ORPT))
5 K ^TMP("TIUPPCV",$J)
6 D ENCOVER^TIUPP3(ORPT)
7 I MSG'=0 S ORY(1)="^No patient postings found."
8 N I,J,X,FMDT,MSG S I=0,J=1,X=""
9 F S I=$O(^TMP("TIUPPCV",$J,I)) Q:I<1 D
10 .S X=^(I),ORY(J)=$P(X,U)_U_$P(X,U,3)_U_$P(X,U,5),J=J+1
11 K ^TMP("TIUPPCV",$J)
12 Q
13PPIMM(ORY,ORPT) ;return pt's patient postings and immunizations
14 Q:'$L($G(ORPT))
15 K ^TMP("TIUPPCV",$J)
16 D ENCOVER^TIUPP3(ORPT)
17 I MSG'=0 S ORY(1)="^No patient postings found."
18 N I,ORJ,X,FMDT,MSG,IMM,IVDT,IEN
19 S I=0,ORJ=1,X=""
20 F S I=$O(^TMP("TIUPPCV",$J,I)) Q:I<1 D
21 .S X=^(I),ORY(ORJ)=$P(X,U)_";P"_U_$P(X,U,3)_U_$P(X,U,5),ORJ=ORJ+1
22 K ^TMP("TIUPPCV",$J),^TMP("PXI",$J)
23 I $L($T(IMMUN^PXRHS03))<1 S ORY(ORJ)=";I^Immunizations not available." Q
24 D IMMUN^PXRHS03(ORPT)
25 S IMM="",IVDT="",IEN=0
26 F S IMM=$O(^TMP("PXI",$J,IMM)) Q:IMM="" D
27 .F S IVDT=$O(^TMP("PXI",$J,IMM,IVDT)) Q:IVDT="" D
28 ..F S IEN=$O(^TMP("PXI",$J,IMM,IVDT,IEN)) Q:IEN<1 D
29 ...S ORJ=ORJ+1,X=$G(^TMP("PXI",$J,IMM,IVDT,IEN,0)) Q:'$L(X)
30 ...S ORY(ORJ)=IEN_";I"_U_IMM_U_$P(X,U,3)
31 S:'$L($G(ORY(ORJ))) ORY(ORJ)=";I^No immunizations found.^2900101"
32 K ^TMP("PXI",$J)
33 Q
Note: See TracBrowser for help on using the repository browser.