PXRMXXT ; SLC/DLT - Formatting for extract print templates ;29-Feb-2012 09:27;DU
;;2.0;CLINICAL REMINDERS;**1001**;Feb 04, 2005;Build 21
;IHS/CIA/MGH Patch 1001 Modified to use health record number
;
;======================================================================
FORMATB ;Format body of report that prints the findings
; Variables that need to be deleted from the template logic follow
; PXRME,PXRMB,PXRMSEX,PXRMFD
D DELVAR^PXRMXXT
N DFN,VADM,VA
S PXRME=^PXRMXT(810.3,D0,1,D1,0)
S DFN=+$P(PXRME,"^",1)
D DEM^VADPT
S PXRMB=$$FMTE^XLFDT(+VADM(3),"2D")
I '$L(PXRMB) S PXRMB="Missing DOB"
;IHS/CIA/MGH Modified to use health record number
S PXRMHRCN=$$HRCN^PXRMXXT(DFN,+$G(DUZ(2)))
S PXRMSSN=$P(VADM(2),"^",2)
S PXRMSEX=$P(VADM(5),"^",1)
S PXRMFD=$$FMTE^XLFDT($P(PXRME,"^",6),"2D")
S PXRMENCT=$S($P(PXRME,"^",8)="I":"Inpatient ",1:"Outpatient")
Q
;
PDEM ;Print SSN with dashes
;IHS/MSC/MGH Patch 1001Modified to use health record number
;W PXRMSSN
W PXRMHRCN
Q
HRCN(DFN,SITE) ;EP
; IHS/MSC/MGH Patch 1001 Return chart number for patient at this site
N TEST,TEST1
Q $P($G(^AUPNPAT(DFN,41,SITE,0)),U,2)
;
PFIND ;Print findings data from the template
W " "_PXRMENCT_" "_$E(PXRMFD,1,8)
Q
;
DELVAR ;Delete variables used in the processing
K PXRME,PXRMB,PXRMSEX,PXRMFD,PXRMSSN,PXRMFD,PXRMENCT
Q
;
PXRMXXT ; SLC/DLT - Formatting for extract print templates ;29-Feb-2012 09:27;DU
+1 ;;2.0;CLINICAL REMINDERS;**1001**;Feb 04, 2005;Build 21
+2 ;IHS/CIA/MGH Patch 1001 Modified to use health record number
+3 ;
+4 ;======================================================================
FORMATB ;Format body of report that prints the findings
+1 ; Variables that need to be deleted from the template logic follow
+2 ; PXRME,PXRMB,PXRMSEX,PXRMFD
+3 DO DELVAR^PXRMXXT
+4 NEW DFN,VADM,VA
+5 SET PXRME=^PXRMXT(810.3,D0,1,D1,0)
+6 SET DFN=+$PIECE(PXRME,"^",1)
+7 DO DEM^VADPT
+8 SET PXRMB=$$FMTE^XLFDT(+VADM(3),"2D")
+9 IF '$LENGTH(PXRMB)
SET PXRMB="Missing DOB"
+10 ;IHS/CIA/MGH Modified to use health record number
+11 SET PXRMHRCN=$$HRCN^PXRMXXT(DFN,+$GET(DUZ(2)))
+12 SET PXRMSSN=$PIECE(VADM(2),"^",2)
+13 SET PXRMSEX=$PIECE(VADM(5),"^",1)
+14 SET PXRMFD=$$FMTE^XLFDT($PIECE(PXRME,"^",6),"2D")
+15 SET PXRMENCT=$SELECT($PIECE(PXRME,"^",8)="I":"Inpatient ",1:"Outpatient")
+16 QUIT
+17 ;
PDEM ;Print SSN with dashes
+1 ;IHS/MSC/MGH Patch 1001Modified to use health record number
+2 ;W PXRMSSN
+3 WRITE PXRMHRCN
+4 QUIT
HRCN(DFN,SITE) ;EP
+1 ; IHS/MSC/MGH Patch 1001 Return chart number for patient at this site
+2 NEW TEST,TEST1
+3 QUIT $PIECE($GET(^AUPNPAT(DFN,41,SITE,0)),U,2)
+4 ;
PFIND ;Print findings data from the template
+1 WRITE " "_PXRMENCT_" "_$EXTRACT(PXRMFD,1,8)
+2 QUIT
+3 ;
DELVAR ;Delete variables used in the processing
+1 KILL PXRME,PXRMB,PXRMSEX,PXRMFD,PXRMSSN,PXRMFD,PXRMENCT
+2 QUIT
+3 ;