| 1 | PXRMXXT ; SLC/DLT - Formatting for extract print templates ;8/14/00 18:30
 | 
|---|
| 2 |  ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
 | 
|---|
| 3 |  ;
 | 
|---|
| 4 |  ;======================================================================
 | 
|---|
| 5 | FORMATB ;Format body of report that prints the findings
 | 
|---|
| 6 |  ; Variables that need to be deleted from the template logic follow
 | 
|---|
| 7 |  ;     PXRME,PXRMB,PXRMSEX,PXRMFD
 | 
|---|
| 8 |  D DELVAR^PXRMXXT
 | 
|---|
| 9 |  N DFN,VADM,VA
 | 
|---|
| 10 |  S PXRME=^PXRMXT(810.3,D0,1,D1,0)
 | 
|---|
| 11 |  S DFN=+$P(PXRME,"^",1)
 | 
|---|
| 12 |  D DEM^VADPT
 | 
|---|
| 13 |  S PXRMB=$$FMTE^XLFDT(+VADM(3),"2D")
 | 
|---|
| 14 |  I '$L(PXRMB) S PXRMB="Missing DOB"
 | 
|---|
| 15 |  S PXRMSSN=$P(VADM(2),"^",2)
 | 
|---|
| 16 |  S PXRMSEX=$P(VADM(5),"^",1)
 | 
|---|
| 17 |  S PXRMFD=$$FMTE^XLFDT($P(PXRME,"^",6),"2D")
 | 
|---|
| 18 |  S PXRMENCT=$S($P(PXRME,"^",8)="I":"Inpatient ",1:"Outpatient")
 | 
|---|
| 19 |  Q
 | 
|---|
| 20 |  ;
 | 
|---|
| 21 | PDEM ;Print SSN with dashes
 | 
|---|
| 22 |  W PXRMSSN
 | 
|---|
| 23 |  Q
 | 
|---|
| 24 |  ;
 | 
|---|
| 25 | PFIND ;Print findings data from the template
 | 
|---|
| 26 |  W " "_PXRMENCT_" "_$E(PXRMFD,1,8)
 | 
|---|
| 27 |  Q
 | 
|---|
| 28 |  ;
 | 
|---|
| 29 | DELVAR ;Delete variables used in the processing
 | 
|---|
| 30 |  K PXRME,PXRMB,PXRMSEX,PXRMFD,PXRMSSN,PXRMFD,PXRMENCT
 | 
|---|
| 31 |  Q
 | 
|---|
| 32 |  ;
 | 
|---|