source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXBGXAM.m@ 1578

Last change on this file since 1578 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.2 KB
RevLine 
[613]1PXBGXAM ;ISL/PKR - Gather exam data. Follow the convention established by PXBGCPT. ;7/24/96 14:01
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
3 ;
4EXAM(VISIT) ;Gather the entries in the V Exam file.
5 N DA,DIC,DIQ,DR,IEN
6 ;
7 K ^TMP("PXBU",$J)
8 I $D(^AUPNVXAM("AD",VISIT)) D
9 . S IEN=0
10 . F S IEN=$O(^AUPNVXAM("AD",VISIT,IEN)) Q:IEN'>0 D
11 .. S ^TMP("PXBU",$J,"EXAM",IEN)=""
12 ;
13 N ENCDT,ENCPRV,EXAM,EXAMN,PATIENT,RESULT,TEMP
14 I $D(^TMP("PXBU",$J,"EXAM")) D
15 . S IEN=0
16 . F S IEN=$O(^TMP("PXBU",$J,"EXAM",IEN)) Q:IEN'>0 D
17 .. K TEMP
18 .. S DIC=9000010.13,DA=IEN
19 .. S DR=".01;.02;.04;1201;1204;811"
20 .. S DIQ="TEMP(",DIQ(0)="E"
21 .. D EN^DIQ1
22 .. S EXAMN=$G(TEMP(9000010.13,DA,.01,"E"))
23 .. S PATIENT=$G(TEMP(9000010.13,DA,.02,"E"))
24 .. S RESULT=$G(TEMP(9000010.13,DA,.04,"E"))
25 .. S ENCDT=$G(TEMP(9000010.13,DA,1201,"E"))
26 .. S ENCPRV=$G(TEMP(9000010.13,DA,1204,"E"))
27 .. S EXAM(EXAMN,IEN)=EXAMN_U_PATIENT_U_RESULT_U_ENCDT_U_ENCPRV
28 ;
29 N PXBC
30 S PXBC=0
31 I $D(EXAM) D
32 . S EXAMN=""
33 . F S EXAMN=$O(EXAM(EXAMN)) Q:EXAMN="" D
34 .. S IEN=0
35 .. F S IEN=$O(EXAM(EXAMN,IEN)) Q:IEN="" D
36 ... S PXBC=PXBC+1
37 ... S PXBKY(EXAMN,IEN)=EXAM(EXAMN,IEN)
38 ... S PXBSAM(PXBC)=EXAM(EXAMN,IEN)
39 ... S PXBSKY(PXBC,IEN)=EXAM(EXAMN,IEN)
40 ;
41 K ^TMP("PXBU",$J)
42 S PXBCNT=PXBC
43 Q
Note: See TracBrowser for help on using the repository browser.