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

PXCAPL1.m

Go to the documentation of this file.
  1. PXCAPL1 ;ISL/dee & LEA/Chylton - PCE Device Interface data edits Prob List ;06 Oct 2013 5:46 PM
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**33,115,130,168,199**;Aug 12, 1996;Build 51
  1. ;
  1. ; Translates data from the PCE Device Interface into a call to
  1. ; update Problem List
  1. ;
  1. Q
  1. ; PXCAPROB Copy of a Problem node of the PXCA array
  1. ; PXCAPRV Pointer to the provider (200)
  1. ; PXCAINDX Count of the number of problems for one provider
  1. ; PXCAPL The parameter array passed to Problem List
  1. ; PXCARES The result back from Problem List
  1. ; PXCANUMB Count of the total number of problems
  1. ;
  1. PROBLIST ;Problem List
  1. Q:'$D(^AUPNPROB)!($T(UPDATE^GMPLUTL)="")
  1. N PXCAPRV,PXCAINDX,PXCANUMB
  1. S PXCANUMB=0
  1. S PXCAPRV=""
  1. F S PXCAPRV=$O(PXCA("PROBLEM",PXCAPRV)) Q:PXCAPRV'>0 D
  1. . S PXCAINDX=0
  1. . F S PXCAINDX=$O(PXCA("PROBLEM",PXCAPRV,PXCAINDX)) Q:PXCAINDX']"" D
  1. .. S PXCANUMB=PXCANUMB+1
  1. .. Q:$D(PXCA("ERROR","PROBLEM",PXCAPRV,PXCAINDX))
  1. .. N PXCAPROB,PXCAPL,PXCARES
  1. .. S PXCAPROB=PXCA("PROBLEM",PXCAPRV,PXCAINDX)
  1. .. S PXCAPL("PROBLEM")=$P(PXCAPROB,"^",10)
  1. .. S PXCAPL("NARRATIVE")=$P(PXCAPROB,"^",1)
  1. .. S PXCAPL("PATIENT")=PXCAPAT
  1. .. S PXCAPL("STATUS")=$S($P(PXCAPROB,"^",3)="1":"A",$P(PXCAPROB,"^",3)="0":"I",1:"A")
  1. .. S PXCAPL("PROVIDER")=PXCAPRV
  1. .. S PXCAPL("LOCATION")=PXCAHLOC
  1. .. S PXCAPL("SC")=$P(PXCAPROB,"^",5)
  1. .. S PXCAPL("AO")=$P(PXCAPROB,"^",6)
  1. .. S PXCAPL("IR")=$P(PXCAPROB,"^",7)
  1. .. S PXCAPL("EC")=$P(PXCAPROB,"^",8)
  1. .. ;PX*1*115 Add MST & HNC
  1. .. S PXCAPL("MST")=$P(PXCAPROB,"^",13)
  1. .. S PXCAPL("HNC")=$P(PXCAPROB,"^",14)
  1. .. S PXCAPL("CV")=$P(PXCAPROB,"^",15)
  1. .. S PXCAPL("SHAD")=$P(PXCAPROB,"^",16)
  1. .. S PXCAPL("DIAGNOSIS")=$P(PXCAPROB,"^",9)
  1. .. I +$G(PXCAVSIT)>0 S PXCAPL("DX_DATE_OF_INTEREST")=$$CSDATE^PXDXUTL(PXCAVSIT)
  1. .. S PXCAPL("RESOLVED")=$P(PXCAPROB,"^",4)
  1. .. S PXCAPL("ONSET")=$P(PXCAPROB,"^",2)
  1. .. S PXCAPL("COMMENT")=$P(PXCAPROB,"^",11)
  1. .. S PXCAPL("LEXICON")=$P(PXCAPROB,"^",12)
  1. .. D UPDATE^GMPLUTL(.PXCAPL,.PXCARES)
  1. .. I $G(PXCARES)'>0 D
  1. ... I PXCARES(0)'="Duplicate problem" S PXKERROR("PL",PXCANUMB,0,0)="Problem Not Stored = "_$G(PXCARES(0))_" For Provider = "_PXCAPRV_" and index = "_PXCAINDX
  1. ... S PXCA("WARNING","PROBLEM",PXCAPRV,PXCAINDX,0)="PROBLEM Not Stored^"_$G(PXCARES(0))
  1. Q
  1. ;