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

PXBGSK.m

Go to the documentation of this file.
PXBGSK ;ISL/PKR - Gather skin test data.  Follow the convention established by PXBGCPT. ;7/24/96  14:01
 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
 ;
SK(VISIT) ;Gather the entries in the V Skin Test file.
 N DA,DIC,DIQ,DR,IEN
 ;
 K ^TMP("PXBU",$J)
 I $D(^AUPNVSK("AD",VISIT)) D
 . S IEN=0
 . F  S IEN=$O(^AUPNVSK("AD",VISIT,IEN)) Q:IEN'>0  D
 .. S ^TMP("PXBU",$J,"SK",IEN)=""
 ;
 N DATEREAD,ENCDT,ENCPRV,PATIENT,READING,RESULT,SERIES,SKINTEST,SKT,TEMP
 I $D(^TMP("PXBU",$J,"SK")) D
 . S IEN=0
 . F  S IEN=$O(^TMP("PXBU",$J,"SK",IEN)) Q:IEN'>0  D
 .. K TEMP
 .. S DIC=9000010.12,DA=IEN
 .. S DR=".01;.02;.04;.05;.06;1201;1204;811"
 .. S DIQ="TEMP(",DIQ(0)="E"
 .. D EN^DIQ1
 .. S SKT=$G(TEMP(9000010.12,DA,.01,"E"))
 .. S PATIENT=$G(TEMP(9000010.12,DA,.02,"E"))
 .. S RESULT=$G(TEMP(9000010.12,DA,.04,"E"))
 .. S READING=$G(TEMP(9000010.12,DA,.05,"E"))
 .. S DATEREAD=$G(TEMP(9000010.12,DA,.06,"E"))
 .. S ENCDT=$G(TEMP(9000010.12,DA,1201,"E"))
 .. S ENCPRV=$G(TEMP(9000010.12,DA,1204,"E"))
 .. S SKINTEST(SKT,IEN)=SKT_U_PATIENT_U_RESULT_U_READING_U_DATEREAD_U_ENCDT_U_ENCPRV
 ;
 N PXBC
 S PXBC=0
 I $D(SKINTEST) D
 . S SKT=""
 . F  S SKT=$O(SKINTEST(SKT)) Q:SKT=""  D
 .. S IEN=0
 .. F  S IEN=$O(SKINTEST(SKT,IEN)) Q:IEN=""  D
 ... S PXBC=PXBC+1
 ... S PXBKY(SKT,IEN)=SKINTEST(SKT,IEN)
 ... S PXBSAM(PXBC)=SKINTEST(SKT,IEN)
 ... S PXBSKY(PXBC,IEN)=SKINTEST(SKT,IEN)
 ;
 K ^TMP("PXBU",$J)
 S PXBCNT=PXBC
 Q