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

PXBGIMM.m

Go to the documentation of this file.
PXBGIMM ;ISL/PKR - Gather immunization data.  Follow the convention established by PXBGCPT. ;7/24/96  14:00
 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
 ;
IMM(VISIT) ;Gather the entries in the V Immunization file.
 N DA,DIC,DIQ,DR,IEN
 ;
 K ^TMP("PXBU",$J)
 I $D(^AUPNVIMM("AD",VISIT)) D
 . S IEN=0
 . F  S IEN=$O(^AUPNVIMM("AD",VISIT,IEN)) Q:IEN'>0  D
 .. S ^TMP("PXBU",$J,"IMM",IEN)=""
 ;
 N CONTRA,ENCDT,ENCPRV,IMM,IMMUN,PATIENT,REACTION,SERIES,TEMP
 I $D(^TMP("PXBU",$J,"IMM")) D
 . S IEN=0
 . F  S IEN=$O(^TMP("PXBU",$J,"IMM",IEN)) Q:IEN'>0  D
 .. K TEMP
 .. S DIC=9000010.11,DA=IEN
 .. S DR=".01;.02;.04;.06;.07;1201;1204;811"
 .. S DIQ="TEMP(",DIQ(0)="E"
 .. D EN^DIQ1
 .. S IMM=$G(TEMP(9000010.11,DA,.01,"E"))
 .. S PATIENT=$G(TEMP(9000010.11,DA,.02,"E"))
 .. S SERIES=$G(TEMP(9000010.11,DA,.04,"E"))
 .. S REACTION=$G(TEMP(9000010.11,DA,.06,"E"))
 .. S CONTRA=$G(TEMP(9000010.11,DA,.07,"E"))
 .. S ENCDT=$G(TEMP(9000010.11,DA,1201,"E"))
 .. S ENCPRV=$G(TEMP(9000010.11,DA,1204,"E"))
 .. S IMMUN(IMM,IEN)=IMM_U_PATIENT_U_SERIES_U_REACTION_U_CONTRA_U_ENCDT_U_ENCPRV
 ;
 N PXBC
 S PXBC=0
 I $D(IMMUN) D
 . S IMM=""
 . F  S IMM=$O(IMMUN(IMM)) Q:IMM=""  D
 .. S IEN=0
 .. F  S IEN=$O(IMMUN(IMM,IEN)) Q:IEN=""  D
 ... S PXBC=PXBC+1
 ... S PXBKY(IMM,IEN)=IMMUN(IMM,IEN)
 ... S PXBSAM(PXBC)=IMMUN(IMM,IEN)
 ... S PXBSKY(PXBC,IEN)=IMMUN(IMM,IEN)
 ;
 K ^TMP("PXBU",$J)
 S PXBCNT=PXBC
 Q