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

PXCADXP2.m

Go to the documentation of this file.
  1. PXCADXP2 ;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
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**115**;Aug 12, 1996
  1. Q
  1. ;
  1. PART2 ;
  1. ;Problem Active
  1. S PXCAITEM=$P(PXCADXPL,U,6)
  1. I '(PXCAITEM="A"!(PXCAITEM="I")!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,6)="Problem Active flag bad^"_PXCAITEM
  1. ;
  1. ;Problem Onset Date
  1. S PXCAITEM=$P(PXCADXPL,U,7)
  1. 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
  1. ;
  1. ;Problem Resolved Date
  1. S PXCAITEM=$P(PXCADXPL,U,8)
  1. 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
  1. ;
  1. ;SC Condition
  1. S PXCAITEM=$P(PXCADXPL,U,9)
  1. I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,9)="SC flag bad^"_PXCAITEM
  1. ;
  1. ;AO Condition
  1. S PXCAITEM=$P(PXCADXPL,U,10)
  1. I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,10)="AO flag bad^"_PXCAITEM
  1. ;
  1. ;IR Condition
  1. S PXCAITEM=$P(PXCADXPL,U,11)
  1. I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,11)="IR flag bad^"_PXCAITEM
  1. ;
  1. ;EC Condition
  1. S PXCAITEM=$P(PXCADXPL,U,12)
  1. I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,12)="EC flag bad^"_PXCAITEM
  1. ;
  1. ;PX*1*115 - MST Condition
  1. S PXCAITEM=$P(PXCADXPL,U,15)
  1. I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,15)="MST flag bad^"_PXCAITEM
  1. ;
  1. ;PX*1*115 - HNC Condition
  1. S PXCAITEM=$P(PXCADXPL,U,16)
  1. I '(PXCAITEM=1!(PXCAITEM=0)!(PXCAITEM="")) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,16)="HNC flag bad^"_PXCAITEM
  1. ;
  1. ;Narrative: Required for DX and for new Problem
  1. S PXCAITEM=$P(PXCADXPL,"^",13),PXCAITM2=$L(PXCAITEM)
  1. I PXCAITEM]"" D
  1. . I PXCAITM2<2!(PXCAITM2>80) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,13)="Provider's Narrative must be 2-80 Characters^"_PXCAITEM
  1. . E D
  1. .. S PXCAITM3=+$$PROVNARR^PXAPI(PXCAITEM,9000010.07,$G(PXCACLEX))
  1. .. I PXCAITM3'>0 S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,13)="Could not get pointer to Provider's NARRATIVE^"_PXCAITEM
  1. .. E S $P(PXCADXPL,"^",13)=PXCAITM3
  1. E D
  1. .I PXCADIAG S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,13)="Provider's Narrative is required for DIAGNOSIS "
  1. .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"
  1. ;
  1. ;Narrative Category
  1. S PXCAITEM=$P(PXCADXPL,"^",14),PXCAITM2=$L(PXCAITEM)
  1. I PXCAITEM]"" D
  1. . I PXCAITM2<2!(PXCAITM2>80) S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,14)="Provider's NARRATIVE Category must be 2-80 Characters^"_PXCAITEM
  1. . E D
  1. .. S PXCAITM3=+$$PROVNARR^PXAPI(PXCAITEM,9000010.07)
  1. .. I PXCAITM3'>0 S PXCA("ERROR","DIAGNOSIS/PROBLEM",PXCAPRV,PXCAINDX,14)="Could not get pointer to Provider's NARRATIVE Category^"_PXCAITEM
  1. .. E S $P(PXCADXPL,"^",14)=PXCAITM3
  1. ;
  1. Q
  1. ;