BEDDUTL1 ;GDIT/HS/BEE-BEDD Utility Routine 3 - Cache Calls ; 08 Nov 2011 12:00 PM
;;2.0;BEDD DASHBOARD;;Jun 04, 2014;Build 13
;
;This routine is included in the BEDD XML 1.0 install and is not in the KIDS
;
Q
;
DECADM(OBJID,OLDDEC) ;Retrieve new Decision to Admit Date
;
;Input:
; OBJID - Pointer to BEDD.EDVISIT
; OLDDEC - The original field value
;
NEW VIEN,BEDD,EXEC,CURDEC,DECADM
;
S (CURDEC,VIEN)=""
S EXEC="S BEDD=##CLASS(BEDD.EDVISIT).%OpenId(OBJID,0)" X EXEC
S EXEC="S VIEN=BEDD.VIEN" X EXEC
;
;Get the current Dec to Admit Date from PCC
I VIEN]"" S CURDEC=$$GET1^DIQ(9000010,VIEN_",",1116,"I")
;
S DECADM=$S(CURDEC]"":CURDEC,1:OLDDEC)
S:DECADM]"" DECADM=$TR($$FMTE^XLFDT($$DATE^BEDDUTIL(DECADM),"5Y"),"@"," ")
;
Q DECADM
BEDDUTL1 ;GDIT/HS/BEE-BEDD Utility Routine 3 - Cache Calls ; 08 Nov 2011 12:00 PM
+1 ;;2.0;BEDD DASHBOARD;;Jun 04, 2014;Build 13
+2 ;
+3 ;This routine is included in the BEDD XML 1.0 install and is not in the KIDS
+4 ;
+5 QUIT
+6 ;
DECADM(OBJID,OLDDEC) ;Retrieve new Decision to Admit Date
+1 ;
+2 ;Input:
+3 ; OBJID - Pointer to BEDD.EDVISIT
+4 ; OLDDEC - The original field value
+5 ;
+6 NEW VIEN,BEDD,EXEC,CURDEC,DECADM
+7 ;
+8 SET (CURDEC,VIEN)=""
+9 SET EXEC="S BEDD=##CLASS(BEDD.EDVISIT).%OpenId(OBJID,0)"
XECUTE EXEC
+10 SET EXEC="S VIEN=BEDD.VIEN"
XECUTE EXEC
+11 ;
+12 ;Get the current Dec to Admit Date from PCC
+13 IF VIEN]""
SET CURDEC=$$GET1^DIQ(9000010,VIEN_",",1116,"I")
+14 ;
+15 SET DECADM=$SELECT(CURDEC]"":CURDEC,1:OLDDEC)
+16 IF DECADM]""
SET DECADM=$TRANSLATE($$FMTE^XLFDT($$DATE^BEDDUTIL(DECADM),"5Y"),"@"," ")
+17 ;
+18 QUIT DECADM