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

PXBGPED.m

Go to the documentation of this file.
PXBGPED ;ISL/PKR - Gather patient education data.  Follow the convention established by PXBGCPT. ;7/24/96  14:00
 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
 ;
EDU(VISIT) ;Gather the entries in the V Health Factor file.
 N DA,DIC,DIQ,DR,IEN
 ;
 K ^TMP("PXBU",$J)
 I $D(^AUPNVPED("AD",VISIT)) D
 . S IEN=0
 . F  S IEN=$O(^AUPNVPED("AD",VISIT,IEN)) Q:IEN'>0  D
 .. S ^TMP("PXBU",$J,"PED",IEN)=""
 ;
 N ENCDT,ENCPRV,PATIENT,PEDA,TEMP,TOPIC,UNDSTD
 I $D(^TMP("PXBU",$J,"PED")) D
 . S IEN=0
 . F  S IEN=$O(^TMP("PXBU",$J,"PED",IEN)) Q:IEN'>0  D
 .. K TEMP
 .. S DIC=9000010.16,DA=IEN
 .. S DR=".01;.02;.06;1201;1204;811"
 .. S DIQ="TEMP(",DIQ(0)="E"
 .. D EN^DIQ1
 .. S TOPIC=$G(TEMP(9000010.16,DA,.01,"E"))
 .. S PATIENT=$G(TEMP(9000010.16,DA,.02,"E"))
 .. S UNDSTD=$G(TEMP(9000010.16,DA,.06,"E"))
 .. S ENCDT=$G(TEMP(9000010.16,DA,1201,"E"))
 .. S ENCPRV=$G(TEMP(9000010.16,DA,1204,"E"))
 .. S PEDA(TOPIC,IEN)=TOPIC_U_PATIENT_U_UNDSTD_U_ENCDT_U_ENCPRV
 ;
 N PXBC
 S PXBC=0
 I $D(PEDA) D
 . S TOPIC=""
 . F  S TOPIC=$O(PEDA(TOPIC)) Q:TOPIC=""  D
 .. S IEN=0
 .. F  S IEN=$O(PEDA(TOPIC,IEN)) Q:IEN=""  D
 ... S PXBC=PXBC+1
 ... S PXBKY(TOPIC,IEN)=PEDA(TOPIC,IEN)
 ... S PXBSAM(PXBC)=PEDA(TOPIC,IEN)
 ... S PXBSKY(PXBC,IEN)=PEDA(TOPIC,IEN)
 ;
 K ^TMP("PXBU",$J)
 S PXBCNT=PXBC
 Q