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

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

initial load of WorldVistAEHR

File size: 3.4 KB
RevLine 
[613]1PXCADXP2 ;ISL/dee & LEA/Chylton - Validates & Translates data from the PCE Device Interface into a call to V POV & update Problem List ; 9/12/01 12:16pm
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**115,130**;Aug 12, 1996
3 Q
4 ;
5PART2 ;
6 ;Problem Active
7 S PXCAITEM=$P(PXCADXPL,U,6)
8 I '(PXCAITEM="A"!(PXCAITEM="I")!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,6)="Problem Active flag bad^"_PXCAITEM
9 ;
10 ;Problem Onset Date
11 S PXCAITEM=$P(PXCADXPL,U,7)
12 I PXCAITEM]"",PXCAITEM>DT!(PXCAITEM<1800000)!($P(+PXCAITEM,".")'=PXCAITEM)!(PXCAITEM>+$P($P(PXCA("ENCOUNTER"),"^"),".")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,7)="Problem Onset Date is bad^"_PXCAITEM
13 ;
14 ;Problem Resolved Date
15 S PXCAITEM=$P(PXCADXPL,U,8)
16 I PXCAITEM]"",PXCAITEM>DT!(PXCAITEM<1800000)!($P(+PXCAITEM,".")'=PXCAITEM)!(PXCAITEM>+$P($P(PXCA("ENCOUNTER"),"^"),".")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,8)="Problem Resolved Date is bad^"_PXCAITEM
17 ;
18 ;SC Condition
19 S PXCAITEM=$P(PXCADXPL,U,9)
20 I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,9)="SC flag bad^"_PXCAITEM
21 ;
22 ;AO Condition
23 S PXCAITEM=$P(PXCADXPL,U,10)
24 I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,10)="AO flag bad^"_PXCAITEM
25 ;
26 ;IR Condition
27 S PXCAITEM=$P(PXCADXPL,U,11)
28 I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,11)="IR flag bad^"_PXCAITEM
29 ;
30 ;EC Condition
31 S PXCAITEM=$P(PXCADXPL,U,12)
32 I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,12)="EC flag bad^"_PXCAITEM
33 ;
34 ;PX*1*115 - MST Condition
35 S PXCAITEM=$P(PXCADXPL,U,15)
36 I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,15)="MST flag bad^"_PXCAITEM
37 ;
38 ;PX*1*115 - HNC Condition
39 S PXCAITEM=$P(PXCADXPL,U,16)
40 I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,16)="HNC flag bad^"_PXCAITEM
41 ;
42 S PXCAITEM=$P(PXCADXPL,U,17)
43 I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,17)="CV flag bad^"_PXCAITEM
44 ;
45 ;Narrative: Required for DX and for new Problem
46 S PXCAITEM=$P(PXCADXPL,"^",13),PXCAITM2=$L(PXCAITEM)
47 I PXCAITEM]"" D
48 . I PXCAITM2<2!(PXCAITM2>80) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,13)="Provider's Narrative must be 2-80 Characters^"_PXCAITEM
49 . E D
50 .. S PXCAITM3=+$$PROVNARR^PXAPI(PXCAITEM,9000010.07,$G(PXCACLEX))
51 .. I PXCAITM3'>0 S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,13)="Could not get pointer to Provider's NARRATIVE^"_PXCAITEM
52 .. E S $P(PXCADXPL,"^",13)=PXCAITM3
53 E D
54 .I PXCADIAG S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,13)="Provider's Narrative is required for DIAGNOSIS "
55 .I PXCAPROB,($P(PXCADXPL,"^",4)="") S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,13)=$P($G(PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,13)),"^",1)_"Provider's Narrative is required for a new PROBLEM"
56 ;
57 ;Narrative Category
58 S PXCAITEM=$P(PXCADXPL,"^",14),PXCAITM2=$L(PXCAITEM)
59 I PXCAITEM]"" D
60 . I PXCAITM2<2!(PXCAITM2>80) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,14)="Provider's NARRATIVE Category must be 2-80 Characters^"_PXCAITEM
61 . E D
62 .. S PXCAITM3=+$$PROVNARR^PXAPI(PXCAITEM,9000010.07)
63 .. I PXCAITM3'>0 S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,14)="Could not get pointer to Provider's NARRATIVE Category^"_PXCAITEM
64 .. E S $P(PXCADXPL,"^",14)=PXCAITM3
65 ;
66 Q
67 ;
Note: See TracBrowser for help on using the repository browser.