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

PSOLLL6.m

Go to the documentation of this file.
  1. PSOLLL6 ;BHAM/BHW - LABEL TRAILER ;12/02/2002
  1. ;;7.0;OUTPATIENT PHARMACY;**120,141,135,162,161,305**;DEC 1997;Build 8
  1. ;
  1. I $G(PSOBLALL),$P(PPL,",",PI+1)'="" Q
  1. S PRCOPAY=$S('$D(PSOCPN):0,1:1)
  1. NARR ;NARRATIVES
  1. N LC S (PSSIXFL,PSSEVFL,LENGTH,OUT)=0,PTEXT="" F I=4,6,7 S LC(I)=0
  1. I $G(PSOIO("RNI"))]"" X PSOIO("RNI")
  1. S XFONT=$E(PSOFONT,2,99)
  1. I $D(^PS(59,PSOSITE,6))!($D(^PS(59,PSOSITE,7))) S T=PNM_" "_SSNP_" "_$G(PSONOW) D PRINT(T) S PSOY=PSOY+PSOYI
  1. F JJ=6,7 S TEXT="" D P(JJ) S PSOY=PSOY+PSOYI Q:OUT
  1. I $G(PSOIO("CNI"))]"" X PSOIO("CNI")
  1. I $G(PSOCHAMP),$G(PSOTRAMT) S T="REMIT $"_PSOTRAMT_" TO AGENT CASHIER." D PRINT(T) G END
  1. I 'PRCOPAY G END
  1. S OUT=0,TEXT=""
  1. I $D(^PS(59,PSOSITE,4)) S T=PNM_" "_SSNP_" "_$G(PSONOW) D PRINT(T) S PSOY=PSOY+PSOYI D P(4)
  1. END ;
  1. D NPP
  1. K DIWF,DIWL,DIWR,EDT,LLL,PRCOPAY,PSNACNT,PSNOADDR,PSNOBOTH,PSNONARR,PSNOSUSP,PSNTHREE,PSOLGTH,PSOSD,PSOTRAIL,PSOTRDFN,PSSEVFL,PSSIXFL,PSSPCNT,PSSSRX,PSSUFLG,RXX,SPDATE,SPNUM,SPPL,TTT,VAADDR1,VADM,VAEL,VAPA,VASTREET,ZZ,ZZZ W @IOF
  1. Q
  1. P(JJ) ;NARRATIVE PRINT CONTROL
  1. N TEXTLEN,PSOCNT
  1. S TEXTLEN=0,PSOCNT=0
  1. S ZZ=0 F S ZZ=$O(^PS(59,PSOSITE,JJ,ZZ)) Q:'ZZ S PSOCNT=PSOCNT+1 Q:PSOCNT>7 I $D(^(ZZ,0)) S TEXT=^(0),TEXTLEN=TEXTLEN+$L(TEXT) S:TEXTLEN>560 TEXTLEN=TEXTLEN-$L(TEXT),TEXT=$E(TEXT,1,560-TEXTLEN) Q:TEXT="" D Q:OUT
  1. . N IC
  1. . D STRT^PSOLLU1("SEC2",TEXT,.L)
  1. . I L(XFONT)>4.1 D Q
  1. .. S IC=0 F J=1:1:$L(TEXT," ") D STRT^PSOLLU1("SEC2",$P(TEXT," ",J)_" ",.L) I L(XFONT)>4.1 S IC=1
  1. .. I IC D Q:OUT
  1. ... F J=$L(TEXT):-1:1 S PTEXT=$E(TEXT,1,J) D STRT^PSOLLU1("SEC2",PTEXT,.L) D Q:OUT
  1. .... I L(XFONT)<4.1 D PRINT(PTEXT) S LC(JJ)=LC(JJ)+1,TEXT=$E(TEXT,J+1,512),J=$L(TEXT)+1,PTEXT="" I PSOY>PSOYM S OUT=1
  1. .... Q
  1. ... Q
  1. .. I IC D:PTEXT]"" PRINT(PTEXT) S:PTEXT]"" LC(JJ)=LC(JJ)+1 S:PSOY>PSOYM OUT=1 Q
  1. .. F J=$L(TEXT," "):-1 S PTEXT=$P(TEXT," ",1,J) Q:OUT Q:'$L(PTEXT) D STRT^PSOLLU1("SEC2",PTEXT,.L) I L(XFONT)<4.1 D
  1. ... D PRINT(PTEXT) S LC(JJ)=LC(JJ)+1,TEXT=$P(TEXT," ",J+1,99) I PSOY>PSOYM S OUT=1
  1. ... ;Reset $L of TEXT +1 so J loop continues properly
  1. ... S J=$L(TEXT," ")+1
  1. ... Q
  1. .. Q
  1. . D PRINT(TEXT) S LC(JJ)=LC(JJ)+1,TEXT=""
  1. . I PSOY>PSOYM S OUT=1
  1. . Q
  1. I 'OUT I TEXT]"" D PRINT(TEXT) S LC(JJ)=LC(JJ)+1
  1. Q
  1. PRINT(T) ;
  1. I $G(PSOIO(PSOFONT))]"" X PSOIO(PSOFONT)
  1. I $G(PSOIO("ST"))]"" X PSOIO("ST")
  1. W T,!
  1. I $G(PSOIO("ET"))]"" X PSOIO("ET")
  1. Q
  1. ;
  1. NPP ; Notice of Privacy Practices
  1. N SKP S SKP=LC(6)+LC(7)
  1. S PSOX=0 F I=SKP:-1:LC(4) D PRINT("")
  1. I SKP,'LC(4) D PRINT(""),PRINT("")
  1. D:SKP<16 PRINT("")
  1. S SKP=PSOYI*$S(PSOLAN=2:4,1:2)+PSOY I SKP>PSOYM Q
  1. I $G(PSOLAN)=2 D Q
  1. . S T="La Notificacion relacionada con las Politicas de Privacidad del Departamento de Asuntos del Veterano, IB 10-163, contiene los" D PRINT(T)
  1. . S T="detalles acerca de sus derechos de privacidad y esta disponsible electronicamente en la siguiente direccion:" D PRINT(T)
  1. . S T="http://www1.domain.ext/Health/. Usted tambien puede conseguir una copia escribiendo a la Oficina de Privacidad del" D PRINT(T)
  1. . S T="Departamento de Asuntos de Salud del Veterano, (19F2), 810 Vermont Avenue NW, Washington, DC 20420." D PRINT(T)
  1. S T="The VA Notice of Privacy Practices, IB 10-163, which outlines your privacy rights, is available online at http://www1.domain.ext/Health/" D PRINT(T)
  1. S T="or you may obtain a copy by writing the VHA Privacy Office (19F2), 810 Vermont Avenue NW, Washington, DC 20420." D PRINT(T)
  1. Q