source: FOIAVistA/trunk/r/SURGERY-SR/SRSCHK.m@ 808

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

initial load of FOIAVistA 6/30/08 version

File size: 869 bytes
Line 
1SRSCHK ;B'HAM ISC/MAM - CHECK FOR REQUIRED FIELDS ; 27 DEC 1991 12:30 PM
2 ;;3.0; Surgery ;;24 Jun 93
3 K NOWAY I '$O(^SRO(133,SRSITE,4,0)) Q
4 S (SRFIELD,CNT)=0 F S SRFIELD=$O(^SRO(133,SRSITE,4,SRFIELD)) Q:'SRFIELD S FIELD=$P(^SRO(133,SRSITE,4,SRFIELD,0),"^") D CHECK
5 I $D(NOWAY) W !!,"This case cannot be scheduled until the missing information has been entered.",!!,"Press RETURN to continue " R X:DTIME
6 Q
7CHECK ; check each field for data
8 S FNAME=$P(^DD(130,FIELD,0),"^"),GLOBAL=$P(^DD(130,FIELD,0),"^",4),Y=$P(GLOBAL,";",2) I Y=0 D MULT Q
9 S SUB=$P(GLOBAL,";"),PIECE=$P(GLOBAL,";",2) I $P($G(^SRF(SRTN,SUB)),"^",PIECE)="" S CNT=CNT+1 W:CNT=1 ! W !,"The field '"_FNAME_"' has not been entered." S NOWAY=1
10 Q
11MULT ; check multiple
12 S SUB=$P(GLOBAL,";") I '$O(^SRF(SRTN,SUB,0)) S CNT=CNT+1 W:CNT=1 ! W !,"The field '"_FNAME_"' has not been entered." S NOWAY=1
13 Q
Note: See TracBrowser for help on using the repository browser.