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

PXKFIMM1.m

Go to the documentation of this file.
PXKFIMM1 ;ISL/JVS - IMMUNIAZTIONS ROUTINE #2 ;11/5/96  14:29
 ;;1.0;PCE PATIENT CARE ENCOUNTER;**11**;Aug 12, 1996
 ;
 ;
CPT ;
 N PXKSEQ1
 I PXKFGAD=1 D CPTADD
 I PXKFGDE=1 D CPTDEL
 Q
CPTADD ;
 S PXKSEQ1=PXKSEQ+PXKXX
 S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,0,"AFTER")=$P($P(PXKPXD(PXKX),"^",2),";")_"^"_$G(PXKAV(0,2))_"^"_$G(PXKAV(0,3))
 S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,12,"AFTER")=$G(PXKAFT(12))
 S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,812,"AFTER")=$G(PXKAFT(812))
 S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,"IEN")=""
 Q
CPTDEL ;
 S PXKSEQ1=PXKSEQ+PXKXX
 S (XPFG,XP)=0 F  Q:XPFG  S XP=$O(^AUPNVIMM("AD",PXKVST,XP)) Q:XP=""  D
 .I $P(^AUPNVIMM(XP,0),"^",1)=$P($P(PXKPXD(PXKX),"^",2),";") D
 ..S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,0,"BEFORE")=$G(^AUPNVIMM(XP,0))
 ..S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,12,"BEFORE")=$G(^AUPNVIMM(XP,12))
 ..S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,812,"BEFORE")=$G(^AUPNVIMM(XP,812))
 ..S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,"IEN")=XP
 ..S XPFG=1
 I '$G(XPFG) Q
 S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,0,"AFTER")="@"
 S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,12,"AFTER")=""
 S ^TMP("PXKSAVE",$J,"IMM",PXKSEQ1,812,"AFTER")=""
 K XPFG,XP
 Q