source: FOIAVistA/trunk/r/ONCOLOGY-ONC/ONCOAIQ.m@ 1635

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1ONCOAIQ ;WASH ISC/SRR,MLH-CHECK REQUIRED FIELDS & EDIT ;7/20/93 10:26
2 ;;2.11;ONCOLOGY;;Mar 07, 1995
3 ;
4CK ;Check data
5Q ;Q ;QUIT UNTIL PATCHED
6 K DR S P=1,ER=0 F I=0:1:3 S X(I)=$G(^ONCO(165.5,D0,I))
7 ;node 0
8 S X0=X(0),XD0=$P(X0,U,2),DR=""
9X0 F J=3:1:7 I $P(X0,U,J)="" S DR=DR_".0"_J_";",ER=ER+1
10 I $P(X0,U,11)="" S DR=DR_2_";",ER=ER+1
11 F J=12:1:15 I $P(X0,U,J)="" S DR=DR_"2."_(J-11)_";",ER=ER+1
12 F J=16:1:19 I $P(X0,U,J)="" S DR=DR_$S(J=16:3,1:J-12)_";",ER=ER+1
13X1 S X1=X(1) F J=1:1:5 I $P(X1,U,J)="" S ER=ER+1 S:J<4 DR=DR_(J+7)_";" I J>3 S DR=DR_$S(J=4:16,1:11)_";"
14X2 S X2=X(2),X=18 F J=1,3,5,6,8 S X=X+2 I $P(X2,U,J)="" S DR=DR_X_";",ER=ER+1
15 F J=9:1:14 I $P(X2,U,J)="" S DR=DR_(J+20)_";",ER=ER+1
16 F J=15,16 I $P(X2,U,J)="" S DR=DR_$S(J=15:34.1,1:34.2)_";",ER=ER+1
17 F J=17,18,20 I $P(X2,U,J)="" S DR=DR_(J+18)_";",ER=ER+1
18 S X=37 F J=25:1:27 S X=X+.1 I $P(X2,U,J)="" S DR=DR_X_";",ER=ER+1
19X3 S X3=X(3) F J=27,28,26 I $P(X3,U,J)="" S DR=DR_$S(J=27:58.1,J=28:59,1:58)_";",ER=ER+1
20 S X=50.2 F J=6,7,10,13,16,19,25 S X=X+1 I $P(X3,U,J)="" S DR=DR_$S(J'=7:X,1:51.3)_";",ER=ER+1
21 I 'ER R !?30,"Data OK=",Z:3 G EX
22 W !?25,"Empty PRIMARY fields = ",ER,!!
23 IF P D G EX:$D(Y),X0
24 . N X S DIE="^ONCO(165.5,",DA=D0,ONCOL=0
25 . L +^ONCO(165.5,DA):0 I $T D ^DIE L -^ONCO(165.5,DA) S P=0,ER=0,DR="",ONCOL=1
26 . I 'ONCOL W !,"This primary is being edited by another user."
27 . K ONCOL
28 . Q
29 ;END IF
30 ;
31CK1 ;Check Patient data
32 S ER=0,P=1 F I=0,1 S X(I)=$G(^ONCO(160,XD0,I))
33 S X0=X(0),X1=X(1)
34XP0 F J=5:1:8 I $P(X0,U,J)="" S DR=DR_(J+2)_";",ER=ER+1
35 I $P(X1,U)=0 F J=3:1:5 I $P(X1,U,J)="" S DR=DR_(J+16)_";",ER=ER+1
36 I ER,P D
37 .W !?25,"Patient file Errors: = ",ER
38 .S DIE="^ONCO(160,",DA=XD0,ONCOL=0
39 .L +^ONCO(160,DA):0 I $T D ^DIE L -^ONCO(160,DA) S ONCOL=1
40 .I 'ONCOL W !,"This primary being edited by another user."
41 .K ONCOL
42 .G EX:$D(Y)=0 S ER=0,P=0 G XP0
43 S ER=0,FU=$P($G(^ONCO(160,XD0,"F",0)),U,3) I FU="" S ER=1 W !?15,"You must register at least ONE Last Contact/Followup",! G EX
44 S XX=$O(^ONCO(160,XD0,"F","AA",0)) I XX'="" S XD1=$O(^(XX,0)),LC=^ONCO(160,XD0,"F",XD1,0) F J=1:1:6 I $P(LC,U,J)="" S ER=ER+1
45 I ER W !,?10,"Errors in Oncology Patient/Follow-up: ",ER
46EX ;EXIT
47 I ER S $P(^ONCO(165.5,D0,7),U,2)=0 W !?20,"ABSTRACT Status RESET to Incomplete ",!!
48 K DR,DIE,J,C,DA,ER,P,ONCOD
49 Q
Note: See TracBrowser for help on using the repository browser.