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

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1PXCADXPL ;ISL/dee & LEA/Chylton - Validates & Translates data from the PCE Device Interface into a call to V POV & update Problem List ;3/14/97
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**27,33,115**;Aug 12, 1996
3 Q
4 ;
5 ; Variables
6 ; PXCADXPL Copy of a DIAGNOSIS/PROBLEM node of the PXCA array
7 ; PXCAPRV Pointer to the provider (200)
8 ; PXCANUMB Count of the number of POVs
9 ; PXCAINDX Count of the number of Diagnoses for one provider
10 ; PXCADIAG Flag for this entry is a Diagnosis
11 ; PXCAPROB Flag for this entry is a Problem
12 ; PXCACLEX IEN to Clinical Lexicon
13 ; PXCAITEM,PXCAITM2,PXCAITM3 Temporaries for item being checked
14 ;
15DXPL(PXCA,PXCABULD,PXCAERRS) ;Validation routine for POV & Problem List together
16 I '$D(PXCA("DIAGNOSIS/PROBLEM")) Q
17 N PXCADXPL,PXCAPRV,PXCANUMB,PXCAINDX
18 N PXCAITEM,PXCAITM2,PXCAITM3
19 N PXCADIAG,PXCAPROB
20 S PXCAPRV=""
21 S PXCANUMB=+$O(^TMP(+$G(PXCAGLB),$J,"POV",""),-1)
22 F S PXCAPRV=$O(PXCA("DIAGNOSIS/PROBLEM",PXCAPRV)) Q:PXCAPRV']"" D
23 . I PXCAPRV>0 D
24 .. I '$$ACTIVPRV^PXAPI(PXCAPRV,PXCADT) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,0,0)="Provider is not active or valid^"_PXCAPRV
25 .. E I PXCABULD!PXCAERRS D ANOTHPRV^PXCAPRV(PXCAPRV)
26 . S PXCAINDX=0
27 . F S PXCAINDX=$O(PXCA("DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX)) Q:PXCAINDX']"" D
28 .. S PXCADXPL=$G(PXCA("DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX))
29 .. S PXCANUMB=PXCANUMB+1
30 .. S PXCADNUM(PXCAPRV,PXCAINDX)=PXCANUMB
31 .. I PXCADXPL="" S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,0)="DIAGNOSIS/PROBLEM data missing" Q
32 .. ;
33 .. D PART1^PXCADXP1 ;Pieces 1 through 5 and the NOTE
34 .. D PART2^PXCADXP2 ;Pieces 6 through 16
35 .. ;
36 .. ;What is it? I do not know.
37 .. I '(PXCADIAG!PXCAPROB) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,0)="DIAGNOSIS/PROBLEM is not used as a Diagnosis or as a Problem"
38 .. ;
39 .. ;Translate data for POV
40 .. I PXCADIAG&PXCABULD&'$D(PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX))!PXCAERRS D DX^PXCADX(PXCADXPL,PXCANUMB,PXCAPRV,PXCAERRS)
41 Q
42 ;
Note: See TracBrowser for help on using the repository browser.