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

APCDPL3.m

Go to the documentation of this file.
APCDPL3 ; IHS/CMI/LAB - NO DESCRIPTION PROVIDED ;
 ;;2.0;IHS PCC SUITE;**5,10,11**;MAY 14, 2009;Build 58
 ;
 ;
 ;APCDP - problem ien
 ;APCDA - array name - not tested
 ; will pass back in APCDPL1(N)
P1(APCDP,APCDA) ;EP - send back array of one problem entry
 Q:'APCDP
 Q:'$D(^AUPNPROB(APCDP))
 I $G(APCDA)="" S APCDA="APCDPL1"
 K @APCDA
GATHER ;EP
 S APCDLINE=1,APCDX=""
 S APCDP0=^AUPNPROB(APCDP,0)
 S APCDX=$$SETSTR^VALM1(" Problem ID: ",APCDX,5,14),X=$S($P(^AUTTLOC($P(APCDP0,U,6),0),U,7)]"":$J($P(^(0),U,7),4),1:"??")_$P(APCDP0,U,7),APCDX=$$SETSTR^VALM1(X,APCDX,20,6)
 S APCDX=$$SETSTR^VALM1("DX:",APCDX,28,3),APCDX=$$SETSTR^VALM1($$VAL^XBDIQ1(9000011,APCDP,.01),APCDX,33,6),X="Status: "_$$EXTSET^XBFUNC(9000011,.12,$P(APCDP0,U,12)),APCDX=$$SETSTR^VALM1(X,APCDX,41,25)
 S APCDX=$$SETSTR^VALM1("Onset:",APCDX,65,6) I $P(APCDP0,U,13)]"" S APCDX=$$SETSTR^VALM1($$FDATE^VALM1($P(APCDP0,U,13)),APCDX,72,15)
 S @APCDA@(APCDLINE)=APCDX,APCDX=""
 S APCDLINE=APCDLINE+1,APCDX=$$VAL^XBDIQ1(9000011,APCDP,.05),@APCDA@(APCDLINE)="      Provider Narrative:  "_APCDX
NOTE S APCDC=0 I $O(^AUPNPROB(APCDP,11,0)) D
 .S (APCDC,APCDL)=0 F  S APCDL=$O(^AUPNPROB(APCDP,11,APCDL)) Q:APCDL'=+APCDL  I $O(^AUPNPROB(APCDP,11,APCDL,11,0)) S APCDLR=$P(^AUTTLOC($P(^AUPNPROB(APCDP,11,APCDL,0),U),0),U,7) D
 ..S APCDX=0 F  S APCDX=$O(^AUPNPROB(APCDP,11,APCDL,11,APCDX)) Q:APCDX'=+APCDX  D
 ...S APCDC=APCDC+1 I APCDC=1 S X="        "_"Notes:" S APCDLINE=APCDLINE+1,@APCDA@(APCDLINE)=X
 ...S X="           "_APCDLR_" Note #"_$P(^AUPNPROB(APCDP,11,APCDL,11,APCDX,0),U)_"  "_$S($P(^(0),U,5)]"":$$FMTE^XLFDT($P(^(0),U,5),5),1:"        ")_"  "_$P(^AUPNPROB(APCDP,11,APCDL,11,APCDX,0),U,3)
 ...S APCDLINE=APCDLINE+1,@APCDA@(APCDLINE)=X
 Q