1 | SPNPRT10 ;SAN/CM- Print basic info patient list ; 11/5/99
|
---|
2 | ;;2.0;Spinal Cord Dysfunction;**11,12,13**;01/02/1997
|
---|
3 | ;
|
---|
4 | EN1 ; Main Entry Point
|
---|
5 | S SPNC=0 ;Line counter
|
---|
6 | N SPNLEXIT,SPNIO
|
---|
7 | S SPNLEXIT=0 D EN1^SPNPRTMT Q:SPNLEXIT ;Filters
|
---|
8 | F SPNG="SPNPAGE","SPNC","SPNNAME","SPNDFN" S:$D(@SPNG) ZTSAVE(SPNG)=""
|
---|
9 | W !!,"### This report is designed for 132 column viewing/printing ###"
|
---|
10 | W !,"### Set your terminal display to 132 columns ###"
|
---|
11 | W !,"### For screen viewing, answer DEVICE prompt with 0;132 ###"
|
---|
12 | W !,"### For file capture, answer DEVICE prompt with 0;132;9999 ###"
|
---|
13 | W !,"### For a hardcopy, answer with a 132 column printer or subtype ###",!
|
---|
14 | D DEVICE^SPNPRTMT("PRINT^SPNPRT10","SCD Basic Patient Data",.ZTSAVE) Q:SPNLEXIT
|
---|
15 | I SPNIO="Q" D EXIT Q ; Print was Queued
|
---|
16 | I IO'="" D PRINT D EXIT Q ; Print was not Queued
|
---|
17 | Q
|
---|
18 | EXIT ; Exit routine
|
---|
19 | K ^TMP($J,"SPN"),^TMP($J,"SPNPRT","AUTO"),^TMP($J,"SPNPRT","POST")
|
---|
20 | K SPNANS,SPNC,SPNG,SPNNAME,ZTSAVE,VADM,VAPA,VA
|
---|
21 | Q
|
---|
22 | PRINT ; Print main Body
|
---|
23 | U IO
|
---|
24 | K ^TMP($J,"SPN")
|
---|
25 | S SPNLEXIT=$G(SPNLEXIT) ; Ensure that the exit is set
|
---|
26 | N SPNDFN,SPNX
|
---|
27 | S (SPNDFN,SPNLPRT)=0
|
---|
28 | W !!?40,"************ BASIC PATIENT INFORMATION *************"
|
---|
29 | W !?62,$$FMTE^XLFDT($$NOW^XLFDT,"5D")
|
---|
30 | W !!,"Patient",?20,"SSN",?33,"DOB",?45,"Phone",?60,"Street Address 1",?88,"Street Address 2",?107,"City",?123,"St",?126,"Zip"
|
---|
31 | F S SPNDFN=$O(^SPNL(154,SPNDFN)) Q:SPNDFN<1 D Q:SPNLEXIT
|
---|
32 | . Q:SPNLEXIT
|
---|
33 | . Q:$G(^SPNL(154,SPNDFN,0))="" ; No Zero node
|
---|
34 | . I '$$EN2^SPNPRTMT(SPNDFN) Q ; Patient fail the filters
|
---|
35 | . S DFN=SPNDFN D DEM^VADPT
|
---|
36 | . S ^TMP($J,"SPN",VADM(1),SPNDFN)="" ; Sort the data
|
---|
37 | . D KVAR^VADPT
|
---|
38 | . Q
|
---|
39 | I $D(^TMP($J,"SPN")) D Q:SPNLEXIT ; Indicates the report had data
|
---|
40 | . S SPNNAME="" F S SPNNAME=$O(^TMP($J,"SPN",SPNNAME)) Q:SPNNAME="" Q:SPNLEXIT S SPNDFN=0 F S SPNDFN=$O(^TMP($J,"SPN",SPNNAME,SPNDFN)) Q:SPNDFN<1 D Q:SPNLEXIT
|
---|
41 | .. I $E(IOST,1)="C",(IOSL<26) S SPNC=SPNC+1 I SPNC=22 R !!,"Enter RETURN to continue or '^' to exit: ",SPNANS:DTIME
|
---|
42 | .. I $G(SPNANS)="^" S SPNLEXIT=1
|
---|
43 | .. I SPNC=22 S SPNC=0
|
---|
44 | .. D PATIENT(SPNDFN)
|
---|
45 | .. Q
|
---|
46 | . Q
|
---|
47 | E W !," ******* No Data for this report *******"
|
---|
48 | I $E(IOST,1)="C" N DIR S DIR(0)="E" D ^DIR K Y
|
---|
49 | D CLOSE^SPNPRTMT
|
---|
50 | K ^TMP($J,"SPN")
|
---|
51 | Q
|
---|
52 | PATIENT(SPNDFN) ;PRINT PATIENT DATA
|
---|
53 | ;INPUT:
|
---|
54 | ; SPNFDFN = patient DFN
|
---|
55 | ;
|
---|
56 | N SPNX
|
---|
57 | S DFN=SPNDFN D DEM^VADPT ; Get patient data
|
---|
58 | S DFN=SPNDFN D ADD^VADPT
|
---|
59 | W !,$E(VADM(1),1,19),?20,VA("PID"),?33,$$FMTE^XLFDT(VADM(3),"5DZ"),?45,$S(VAPA(8)'="":VAPA(8),1:""),?60,$S(VAPA(1)'="":$E(VAPA(1),1,28),1:""),?88,$S(VAPA(2)'="":$E(VAPA(2),1,19),1:""),?107,$S(VAPA(4)'="":VAPA(4),1:"")
|
---|
60 | W ?123,$S(VAPA(5)'="":$P(^DIC(5,$P(VAPA(5),U,1),0),U,2),1:""),?126,$S(VAPA(6)'="":VAPA(6),1:"")
|
---|
61 | D KVAR^VADPT ; Clean up VA Stuff
|
---|
62 | Q
|
---|