Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ACHSODP1

ACHSODP1.m

Go to the documentation of this file.
  1. ACHSODP1 ; IHS/ITSC/PMF - PRINT DCR REPORT (2/3) ; [ 10/16/2001 8:16 AM ]
  1. ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
  1. ;
  1. F I=1:1:9 S X=$P("D,N,R,ACHSPROV,DFN,T,O,A,ACHSDOS",",",I),@X=$P(ACHSACS,U,I)
  1. S (L(1),L(2))=""
  1. I DFN,$D(^DPT(DFN,0)) S X=$P(^(0),U),L(1)=$E(X,1,20) G A1
  1. ;
  1. S $P(L(1),U)=$S($P(^ACHSF(DUZ(2),"D",ACHSDIEN,0),U,3)=1:"* BLANKET DOCUMENT *",$P(^(0),U,3)=2:"** SPEC LOC DOC **",1:"")
  1. A1 ;
  1. I $D(^ACHSF(DUZ(2),"D",ACHSDIEN,0)) S X=$P(^(0),U),L(2)=ACHSDPFX_$E(100000+X,2,6)
  1. ;
  1. I ACHSPROV,$D(^AUTTVNDR(ACHSPROV,0)) S X=^(0),$P(L(2),U,2)=$P(X,U,3),X=$P(X,U),$P(L(1),U,2)=$E(X,1,25)
  1. ;
  1. S $P(L(1),U,3)=$E(100+$E(D,4,5),2,3)_$E(100+$E(D,6,7),2,3)_$E(D,2,3)
  1. ;
  1. I ACHSDOS S $P(L(1),U,3)=$P(L(1),U,3)_"/"_$E(100+$E(ACHSDOS,4,5),2,3)_$E(100+$E(ACHSDOS,6,7),2,3)
  1. S X=$$DOC^ACHS(0,4),$P(L(2),U,3)=$S(X=1:"HOSPITAL",X=2:"DENTAL",X=3:"OUTPAT",1:"")
  1. S X=$P($G(^ACHSF(DUZ(2),"D",ACHSDIEN,0)),U,17),$P(L(2),U,4)=$S(X="I":"IHS",1:"FI") I T="IP" S $P(L(2),U,4)=$P(L(2),U,4)_" NOT IN TOTALS"
  1. S $P(L(2),U,2)=$P(^AUTTVNDR(ACHSPROV,11),U)
  1. I T="P" S D=$S(O>0:1,O<0:2,1:0) S X="P "_$P(">^<",U,D)_" Obl"
  1. E S X=$P($T(@T),";;",2,99),D=$S(T="I":1,T="S":1,T="C":2,T="D":2,1:0)
  1. S $P(L(1),U,4)=X
  1. I T="ZA" S D=$S(O<0:2,1:1),$P(L(1),U,5)=$J(O,1,2) G A2
  1. I T="IP" S $P(L(1),U,5)=$J(O,1,2) ;G A3
  1. I T'="P" S:D=1 $P(L(1),U,5)=$J(O,1,2) S:D=2 $P(L(1),U,5)=$J(O*-1,1,2) G A2
  1. I O=0 S $P(L(1),U,4)="P = Obl"
  1. E S $P(L(1),U,5)=$J(O,1,2)
  1. A2 ;
  1. I D S:O<0 O=O*-1 S $P(ACHSSUM(R),U,D)=$P(ACHSSUM(R),U,D)+O
  1. A3 ;
  1. F J=1,2 W ! F I=1:1:5 W ?$P("0^22^49^62^69",U,I) W:I<5 $P(L(J),U,I) I I=5 S X=$P(L(J),U,5) W ?80-$L(X),X
  1. W !
  1. K ACHSPROV
  1. Q
  1. ;
  1. I ;;INIT
  1. C ;;C-CANC
  1. D ;;P-CANC
  1. S ;;SUPPL
  1. M ;;P-MEMO
  1. P ;;PAYMENT
  1. IP ;;INT-PMT
  1. ZA ;;ADJUST