[613] | 1 | DVBAUTL1 ;ALB/JLU;UTILITY ROUTINE;11/8/94
|
---|
| 2 | ;;2.7;AMIE;;Apr 10, 1995
|
---|
| 3 | ;
|
---|
| 4 | STATION(DFN) ;
|
---|
| 5 | ;this function call returns the station number of the patient in the
|
---|
| 6 | ;parameter or -1 if no station number.
|
---|
| 7 | ;
|
---|
| 8 | N X
|
---|
| 9 | I '$D(^DPT(DFN,.31)) Q -1
|
---|
| 10 | S X=$P(^DPT(DFN,.31),U,4)
|
---|
| 11 | I X="" Q -1
|
---|
| 12 | I '$D(^DIC(4,X,99)) Q -1
|
---|
| 13 | S X=$P(^DIC(4,X,99),U,1)
|
---|
| 14 | I X<1 Q -1
|
---|
| 15 | Q X
|
---|
| 16 | ;
|
---|
| 17 | EXIT ;this entry point is called from the DVBAPOST routine. It is used as
|
---|
| 18 | ;the kill statment at the end of the post init.
|
---|
| 19 | ;
|
---|
| 20 | I $D(V3) K CNT,LP1,V3,XMZ,XMY(DUZ),XMY(.5),XMSUB,XMDUZ
|
---|
| 21 | K STOP
|
---|
| 22 | Q
|
---|
| 23 | ;
|
---|
| 24 | SET1 ;sets the parameter file node to be used in the post init Keyword
|
---|
| 25 | ;population.
|
---|
| 26 | I '$D(CNT) S CNT=1
|
---|
| 27 | I $D(^DVB(396.1,0)) DO
|
---|
| 28 | .N DVBA
|
---|
| 29 | .S DVBA=$$IFNPAR^DVBAUTL3()
|
---|
| 30 | .I DVBA=0 DO
|
---|
| 31 | ..S DIC="^DVB(396.1,",DIC(0)="L"
|
---|
| 32 | ..K DD,D0
|
---|
| 33 | ..S X=$P(^DG(40.8,$$PRIM^VASITE,0),U,1)
|
---|
| 34 | ..D FILE^DICN
|
---|
| 35 | ..S DVBA=$S(Y=-1:0,1:+Y)
|
---|
| 36 | ..K DIC,DD,D0,Y,X
|
---|
| 37 | ..Q
|
---|
| 38 | .S ^DVB(396.1,DVBA,"POST")="DVBA;ADVB;DVBB;ADVB"
|
---|
| 39 | .S:$P(^DVB(396.1,DVBA,0),U,15)']"" $P(^(0),U,15)=1
|
---|
| 40 | .S:$P(^DVB(396.1,DVBA,0),U,18)']"" $P(^(0),U,18)=1
|
---|
| 41 | .S:$P(^DVB(396.1,DVBA,0),U,19)']"" $P(^(0),U,19)=1
|
---|
| 42 | Q
|
---|