source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPTF1.m@ 1133

Last change on this file since 1133 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 5.1 KB
RevLine 
[613]1DGPTF1 ;ALB/JDS - PTF ENTRY/EDIT ; 11/24/03 3:29pm
2 ;;5.3;Registration;**69,114,195,397,342,415,565**;Aug 13, 1993
3 ;
4 I '$D(IOF) S IOP="HOME" D ^%ZIS K IOP
5 S:'$D(IOST) IOST="C" S DGVI="""""",DGVO=DGVI I $D(IOST(0)) S:$D(^%ZIS(2,IOST(0),5)) I=^(5) S:$L($P(I,U,4)) DGVI=$P(I,U,4) S:$L($P(I,U,5)) DGVO=$P(I,U,5) I $L(DGVI_DGVO)>4 S X=132 X ^%ZOSF("RM")
6WR G GET:'$D(A)!('$D(B)) W @IOF,HEAD,?72,@DGVI,"<101>",@DGVO
7FAC I $D(DGCST) W !?40,"Census Status: ",$P($P($P(^DD(45,6,0),"^",3),+DGCST_":",2),";")
8 W !! S Z=1 D Z W " Facility: " S Z=$P(B(0),U,3)_$P(B(0),U,5),Z1=23 D Z1
9MAR S Z=2 D Z W " Marit Stat: ",$S($D(^DIC(11,+$P(A(0),U,5),0)):$P(^(0),U,1),1:"")
10SA W !," Source of Adm: ",$S($D(^DIC(45.1,+B(101),0)):$P(^(0),U,5),1:"")
11 N VADM D DEM^VADPT
12 W ?39,"Ethnic: " D
13 .I 'VADM(11) W "" Q
14 .N NODE,NUM,ETHNIC,I
15 .S I=0
16 .F NUM=0:1 S I=+$O(VADM(11,I)) Q:'I D
17 ..S X=$$PTR2CODE^DGUTL4(+VADM(11,I),2,4)
18 ..S ETHNIC=$S(X="":"?",1:X)
19 ..S X=$$PTR2CODE^DGUTL4(+$G(VADM(11,I,1)),3,4)
20 ..S ETHNIC=ETHNIC_$S(X="":"?",1:X)
21 ..I NUM S ETHNIC=","_ETHNIC
22 ..W ETHNIC
23 W ?55,"Race: " D
24 .I 'VADM(12) W "" Q
25 .N NODE,NUM,RACE,I
26 .S I=0
27 .F NUM=0:1 S I=+$O(VADM(12,I)) Q:'I D
28 ..S X=$$PTR2CODE^DGUTL4(+VADM(12,I),1,4)
29 ..S RACE=$S(X="":"?",1:X)
30 ..S X=$$PTR2CODE^DGUTL4(+$G(VADM(12,I,1)),3,4)
31 ..S RACE=RACE_$S(X="":"?",1:X)
32 ..I NUM S RACE=","_RACE
33 ..W RACE
34 K VADM
35 W !," Source of Pay: " S L=";"_$P(^DD(45,22,0),U,3),L1=";"_$P(B(101),U,3)_":" W $P($P(L,L1,2),";",1)
36SEX S SEX=$P(A(0),U,2) W ?39," Sex: ",$S(SEX="M":"MALE",SEX="F":"FEMALE",1:"")
37 W !,"Trans Facility: ",$P(B(101),U,5)_$P(B(101),U,6)
38DOB S DOB=$P(A(0),U,3),Y=DOB D D^DGPTUTL W ?39," Date of Birth: ",Y
39CAT I DGPTFMT<2 W !," Cat of Ben: ",$S($D(^DIC(45.82,+$P(B(101),U,4),0)):$E($P(^(0),U,2),1,26),1:"")
40 W:$X>50 !
41 W " Admit Elig: "_$S(+$P(B(101),U,8):$P($G(^DIC(8,+$P(B(101),U,8),0)),U),1:"UNKNOWN") W ?50,"SCI: " S L=";"_$P(^DD(2,57.4,0),U,3),L1=";"_$P(A(57),U,4)_":" W $P($P(L,L1,2),";",1)
42VIET W ! S Z=3 D Z W "Vietnam SRV: " S L=$P(A(.321),U,1),Z=$S(L="Y":"YES",L="N":"NO",1:"UNKNOWN"),Z1=28 D Z1
43ST S Z=4 D Z W " State: ",$S($D(^DIC(5,+$P(A(.11),U,5),0)):$P(^(0),U,1),1:"")
44POW W !?11,"POW: " S L=$P(A(.52),U,5) W $S(L="Y":"YES",L="N":"NO",1:"UNKNOWN")
45ZIP W ?45,"Zip Code: ",$P(A(.11),U,6)
46POS W !,?6," POW SRV: " S L=$P(A(.52),U,6) W $E($S($D(^DIC(22,+L,0)):$P(^(0),U,1),1:""),1,23)
47COU W ?47,"County: ",$S($D(^DIC(5,+$P(A(.11),U,5),1,+$P(A(.11),U,7),0)):$P(^(0),U,1),1:"")
48ION W !," Ion Rad Exp: " S L=$P(A(.321),U,3) W $S(L="Y":"YES",L="N":"NO",1:"UNKNOWN")
49METH S L=$P(A(.321),U,12) W:L'="" ?38,"Exposure Method: ",$S(L="N":"Nagasaki/Hiroshima",L="T":"Nuclear Testing",L="B":"Both",1:"")
50AO W !," Agent Or exp: " S L=$P(A(.321),U,2) W $S(L="Y":"YES",L="N":"NO",1:"UNKNOWN")
51AOLOC S L=$P(A(.321),U,13) W:L'="" ?36,"Exposure Location: ",$S(L="V":"Vietnam",L="K":"Korean DMZ",1:"")
52MST W !," Claims MST: " S L=$P(A("MST"),U) W $S(L="Y":"YES",L="N":"NO",L="D":"DECLINED TO ANSWER",1:"UNKNOWN") ; added 6/17/98 for MST enhancement
53NTR W ?39," N/T Radium: " S L=A("NTR") W $S(L'="":L,1:"UNKNOWN")
54CV S L=$S($P(A("CV"),U,1)>0:1,1:0)
55 W !,"Combat Veteran: ",$S(L:"YES",1:"NO")
56 I L S Y=$P(A("CV"),U,2) D D^DGPTUTL W ?45,"End Date: ",Y
57 ;
58 D EN^DGPTF4 K A,B Q:DGPR
59 ;
60JUMP F I=$Y:1:20 W !
61 G 101^DGPTFJC:DGN S (DGZM0,DGZS0)=0
62 R "Enter: <RET> for <MAS>,",!,"1-7 to edit,'^N' for screen N, or '^' to abort: <MAS>// ",X:DTIME S:'$T X="^",DGPTOUT=""
63 G ^DGPTFM:X="",Q:X="^"
64 I X?1"^".E S DGPTSCRN=101 G ^DGPTFJ
65 G PR:X?.N&($L(X)>2)
66 I X["-" S K=X,X="" F I=1:1 S J=$P(K,",",I) Q:J']"" I +J<8 S:J'["-" X=X_J_"," I J["-"&(+J) I +J<+$P(J,"-",2) F L=+J:1:+$P(J,"-",2) S:L<8 X=X_L_","
67 I X'[",",1234567'[X G PR
68 F I=1:1 S J=$P(X,",",I) Q:'J G:J<1!(J>7)!(J'?1N) PR
69 I X<1!(X>7) G PR
70 S (PT(1),PT(2))="",DGJUMP=X,DA=PTF,DIE="^DGPT(",DR="[DG101"_$E("F",DGPTFE)_"]" D ^DIE
71 ;--
72 N DGPMCA,DGPMAN D PM^DGPTUTL
73 I '$G(DGADM) S DGADM=+^DGPT(PTF,0)
74 D MT^DGPTUTL
75GET F I=.32,.52,57,.521,0,.321,.11,.3 S A(I)="" S:$D(^DPT(DFN,I))&('DGST) A(I)=^(I) I DGN S:$D(^DGP(45.84,PTF,$S('I:10,1:I))) A(I)=^($S('I:10,1:I))
76 ; The following line added for MST enhancement 4/21/99
77 S A("MST")=$P($$GETSTAT^DGMSTAPI(DFN),U,2,5)
78 K DGNTARR
79 S A("NTR")=$S($$GETCUR^DGNTAPI(DFN,"DGNTARR")>0:DGNTARR("INTRP"),1:"")
80 K DGNTARR
81 F I=0,101,70 S B(I)="" S:$D(^DGPT(PTF,I)) B(I)=^(I)
82 S DGDD=+B(70),DGFC=+$P(B(0),U,3)
83 S A("CV")=$$CVEDT^DGCV(DFN,$P($G(B(0)),U,2))
84 K PT G DGPTF1
85PR W !,"Enter '^' to stop the display and edit of data",!,"'^N' to jump to screen #N (screen # appears in upper right of screen '<N>')",!,"<RET> to continue on to the next screen or 1-7 to edit:"
86 W !?10,"1-Facility, Source of admis, Payment, Transf facil, and Cat. of Benef",!?10,"2-Marital Stat, Race, Ethnicity, Sex, SCI, DOB"
87 W !?10,"3-Agent Orange, Prisoner of War, Ionizing Radiation, MST, N/T Radium",!?10,"4-State, County, Zip code"
88 W !?10,"5-Discharge date, type & specialty",!?10,"6-Outpatient treat & VA Auspices",!?10,"7-Receiving Facility, ASIH Days & C&P Status"
89 W !,"You may also enter any combination of the above, separated by commas(ex:1,3,5)",!
90 R !!,"Enter <RET> : ",X:DTIME G WR
91Q G Q^DGPTF
92 Q
93Z I 'DGN S Z=$S(IOST="C-QUME"&($L(DGVI)'=2):Z,1:"["_Z_"]") W @DGVI,Z,@DGVO
94 E W " "
95 Q
96Z1 F I=1:1:(Z1-$L(Z)) S Z=Z_" "
97 W Z
Note: See TracBrowser for help on using the repository browser.