PXBGHF ;ISL/PKR - Gather skin test data. Follow the convention established by PXBGCPT. ;7/24/96 14:00
;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
;
HF(VISIT) ;Gather the entries in the V Health Factor file.
N DA,DIC,DIQ,DR,IEN
;
K ^TMP("PXBU",$J)
I $D(^AUPNVHF("AD",VISIT)) D
. S IEN=0
. F S IEN=$O(^AUPNVHF("AD",VISIT,IEN)) Q:IEN'>0 D
.. S ^TMP("PXBU",$J,"HF",IEN)=""
;
N ENCDT,ENCPRV,HF,HFCTR,LVL,PATIENT,TEMP
I $D(^TMP("PXBU",$J,"HF")) D
. S IEN=0
. F S IEN=$O(^TMP("PXBU",$J,"HF",IEN)) Q:IEN'>0 D
.. K TEMP
.. S DIC=9000010.23,DA=IEN
.. S DR=".01;.02;.04;1201;1204;811"
.. S DIQ="TEMP(",DIQ(0)="E"
.. D EN^DIQ1
.. S HF=$G(TEMP(9000010.23,DA,.01,"E"))
.. S PATIENT=$G(TEMP(9000010.23,DA,.02,"E"))
.. S LVL=$G(TEMP(9000010.23,DA,.04,"E"))
.. S ENCDT=$G(TEMP(9000010.23,DA,1201,"E"))
.. S ENCPRV=$G(TEMP(9000010.23,DA,1204,"E"))
.. S HFCTR(HF,IEN)=HF_U_PATIENT_U_LVL_U_ENCDT_U_ENCPRV
;
N PXBC
S PXBC=0
I $D(HFCTR) D
. S HF=""
. F S HF=$O(HFCTR(HF)) Q:HF="" D
.. S IEN=0
.. F S IEN=$O(HFCTR(HF,IEN)) Q:IEN="" D
... S PXBC=PXBC+1
... S PXBKY(HF,IEN)=HFCTR(HF,IEN)
... S PXBSAM(PXBC)=HFCTR(HF,IEN)
... S PXBSKY(PXBC,IEN)=HFCTR(HF,IEN)
;
K ^TMP("PXBU",$J)
S PXBCNT=PXBC
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXBGHF 1266 printed Nov 22, 2024@17:36:35 Page 2
PXBGHF ;ISL/PKR - Gather skin test data. Follow the convention established by PXBGCPT. ;7/24/96 14:00
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
+2 ;
HF(VISIT) ;Gather the entries in the V Health Factor file.
+1 NEW DA,DIC,DIQ,DR,IEN
+2 ;
+3 KILL ^TMP("PXBU",$JOB)
+4 IF $DATA(^AUPNVHF("AD",VISIT))
Begin DoDot:1
+5 SET IEN=0
+6 FOR
SET IEN=$ORDER(^AUPNVHF("AD",VISIT,IEN))
if IEN'>0
QUIT
Begin DoDot:2
+7 SET ^TMP("PXBU",$JOB,"HF",IEN)=""
End DoDot:2
End DoDot:1
+8 ;
+9 NEW ENCDT,ENCPRV,HF,HFCTR,LVL,PATIENT,TEMP
+10 IF $DATA(^TMP("PXBU",$JOB,"HF"))
Begin DoDot:1
+11 SET IEN=0
+12 FOR
SET IEN=$ORDER(^TMP("PXBU",$JOB,"HF",IEN))
if IEN'>0
QUIT
Begin DoDot:2
+13 KILL TEMP
+14 SET DIC=9000010.23
SET DA=IEN
+15 SET DR=".01;.02;.04;1201;1204;811"
+16 SET DIQ="TEMP("
SET DIQ(0)="E"
+17 DO EN^DIQ1
+18 SET HF=$GET(TEMP(9000010.23,DA,.01,"E"))
+19 SET PATIENT=$GET(TEMP(9000010.23,DA,.02,"E"))
+20 SET LVL=$GET(TEMP(9000010.23,DA,.04,"E"))
+21 SET ENCDT=$GET(TEMP(9000010.23,DA,1201,"E"))
+22 SET ENCPRV=$GET(TEMP(9000010.23,DA,1204,"E"))
+23 SET HFCTR(HF,IEN)=HF_U_PATIENT_U_LVL_U_ENCDT_U_ENCPRV
End DoDot:2
End DoDot:1
+24 ;
+25 NEW PXBC
+26 SET PXBC=0
+27 IF $DATA(HFCTR)
Begin DoDot:1
+28 SET HF=""
+29 FOR
SET HF=$ORDER(HFCTR(HF))
if HF=""
QUIT
Begin DoDot:2
+30 SET IEN=0
+31 FOR
SET IEN=$ORDER(HFCTR(HF,IEN))
if IEN=""
QUIT
Begin DoDot:3
+32 SET PXBC=PXBC+1
+33 SET PXBKY(HF,IEN)=HFCTR(HF,IEN)
+34 SET PXBSAM(PXBC)=HFCTR(HF,IEN)
+35 SET PXBSKY(PXBC,IEN)=HFCTR(HF,IEN)
End DoDot:3
End DoDot:2
End DoDot:1
+36 ;
+37 KILL ^TMP("PXBU",$JOB)
+38 SET PXBCNT=PXBC
+39 QUIT