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

DGPFLMD1.m

Go to the documentation of this file.
DGPFLMD1 ;ALB/RPM - PRF DISPLAY ACTIVE FLAG ASSIGNMENTS LM ; 5/18/04 9:33am
 ;;5.3;Registration;**425,554**;Aug 13, 1993
 ;
EN(DGARRY,DGPFAPI,DGCNT) ;
 ;
 N DGFLG
 N DGI
 N DGLINE
 N DGNARR
 N DGNUM
 N DGTEXT
 ;
 S (DGNUM,DGFLG,DGLINE)=0
 F  S DGFLG=$O(DGPFAPI(DGFLG)) Q:'DGFLG  D
 . S DGNUM=DGNUM+1
 . ;
 . ;blank line(s)
 . F DGI=1:1:$S(DGNUM>1:2,1:1) D
 . . S DGLINE=DGLINE+1
 . . D SET^DGPFLMU1(DGARRY,DGLINE," ",1,,,.DGCNT)
 . ;
 . ;Flag Name
 . S DGLINE=DGLINE+1
 . S DGTEXT=DGNUM_"."
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,1,IORVON,IORVOFF,.DGCNT)
 . S DGTEXT="Flag Name: "
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,5,,,.DGCNT)
 . S DGTEXT="<"_$P(DGPFAPI(DGFLG,"FLAG"),U,2)_">"
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,16,IORVON,IORVOFF,.DGCNT)
 . ;
 . ;Category
 . S DGLINE=DGLINE+1
 . S DGTEXT="Category: "_$P(DGPFAPI(DGFLG,"CATEGORY"),U,2)
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,6,,,.DGCNT)
 . ;
 . ;Flag Type
 . S DGLINE=DGLINE+1
 . S DGTEXT="Type: "_$P(DGPFAPI(DGFLG,"FLAGTYPE"),U,2)
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,10,,,.DGCNT)
 . ;
 . ;Assignment Narrative
 . S DGLINE=DGLINE+1
 . D SET^DGPFLMU1(DGARRY,DGLINE," ",1,,,.DGCNT)
 . S DGLINE=DGLINE+1
 . S DGTEXT="Assignment Narrative:"
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,1,IORVON,IORVOFF,.DGCNT)
 . S DGNARR=0
 . F  S DGNARR=$O(DGPFAPI(DGFLG,"NARR",DGNARR)) Q:'DGNARR  D
 . . S DGLINE=DGLINE+1
 . . S DGTEXT=$G(DGPFAPI(DGFLG,"NARR",DGNARR,0))
 . . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,1,,,.DGCNT)
 . ;
 . ;blank line
 . S DGLINE=DGLINE+1
 . D SET^DGPFLMU1(DGARRY,DGLINE," ",1,,,.DGCNT)
 . ;
 . ;assignment details header
 . S DGLINE=DGLINE+1
 . S DGTEXT="Assignment Details:"
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,1,IORVON,IORVOFF,.DGCNT)
 . ;
 . ;Assignment Date
 . S DGLINE=DGLINE+1
 . S DGTEXT="Initial Assignment: "_$$FMTE^XLFDT($P(DGPFAPI(DGFLG,"ASSIGNDT"),U),"D")
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,3,,,.DGCNT)
 . ;
 . ;Approved By
 . S DGLINE=DGLINE+1
 . S DGTEXT="Approved By: "_$P(DGPFAPI(DGFLG,"APPRVBY"),U,2)
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,10,,,.DGCNT)
 . ;
 . ;Review Date
 . S DGLINE=DGLINE+1
 . S DGTEXT="Next Review Date: "_$S($P(DGPFAPI(DGFLG,"REVIEWDT"),U)>0:$$FMTE^XLFDT($P(DGPFAPI(DGFLG,"REVIEWDT"),U),"D"),1:"N/A")
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,5,,,.DGCNT)
 . ;
 . ;Owner Site
 . S DGLINE=DGLINE+1
 . S DGTEXT="Owner Site: "_$P(DGPFAPI(DGFLG,"OWNER"),U,2)
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,11,,,.DGCNT)
 . ;
 . ;Originating Site
 . S DGLINE=DGLINE+1
 . S DGTEXT="Originating Site: "_$P(DGPFAPI(DGFLG,"ORIGSITE"),U,2)
 . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,5,,,.DGCNT)
 . ;
 . ;Progress Note Linked - only defined if Owner of assignment
 . I $D(DGPFAPI(DGFLG,"TIULINK")) D
 . . S DGLINE=DGLINE+1
 . . S DGTEXT="Progress Note Linked: "_$S(+$P(DGPFAPI(DGFLG,"TIULINK"),U):"YES",1:"NO")
 . . D SET^DGPFLMU1(DGARRY,DGLINE,DGTEXT,1,,,.DGCNT)
 ; 
 Q