1 | IBDF18D ;ALB/CJM/AAS - ENCOUNTER FORM - form type utilities ;04-OCT-94
|
---|
2 | ;;3.0;AUTOMATED INFO COLLECTION SYS;**5**;APR 24, 1997
|
---|
3 | ;
|
---|
4 | FORMTYPE(SOURCE) ;creates an entry in the FORM DEFINITION TABLE
|
---|
5 | ; -- input SOURCE = the source of the form, ie
|
---|
6 | ; IB=1
|
---|
7 | ; PANDAS=2
|
---|
8 | ; TELEFORM=3
|
---|
9 | ; OTHER=99
|
---|
10 | ; -- Output Returns the ien of the table created, "" if not created
|
---|
11 | ;
|
---|
12 | Q:'SOURCE ""
|
---|
13 | N IBFORMID,ID,NODE,DIC,DIE,DA,DINUM,D0,DD,DIK,DINUM,DLAYGO
|
---|
14 | S ID=""
|
---|
15 | ;
|
---|
16 | L +^IBD(357.97,1,.01):3
|
---|
17 | S ID=$P($G(^IBD(357.97,1,0)),"^")
|
---|
18 | K DIC,D0,DD,DA,DO
|
---|
19 | S DIC="^IBD(357.95,",DIC(0)="L",DLAYGO=357.95
|
---|
20 | F ID=ID+1:1 L:$D(^IBD(357.95,(ID-1))) -^IBD(357.95,(ID-1)) I ID>0,'$D(^IBD(357.95,ID)) L +^IBD(357.95,ID):1 I $T,'$D(^IBD(357.95,ID)) S (X,DINUM)=ID D FILE^DICN I +Y>0 L -^IBD(357.95,ID) Q
|
---|
21 | S $P(^IBD(357.97,1,0),"^")=ID
|
---|
22 | L -^IBD(357.97,1,.01)
|
---|
23 | K DIC,DIE,DA,DINUM,DLAYGO,DO,D0,DD
|
---|
24 | S IBFORMID=$S(+Y<0:"",1:+Y) I 'IBFORMID D LOGERR^IBDF18E2(3570003)
|
---|
25 | ;
|
---|
26 | I IBFORMID D
|
---|
27 | .S $P(^IBD(357.95,IBFORMID,0),"^",3)=SOURCE,^IBD(357.95,IBFORMID,1,0)="^357.951I^0^0",^IBD(357.95,IBFORMID,2,0)="^357.952I^0^0",^IBD(357.95,IBFORMID,3,0)="^357.953^0^0"
|
---|
28 | .S DIK="^IBD(357.95,",DA=IBFORMID D IX1^DIK
|
---|
29 | K DIK,X,DA
|
---|
30 | Q IBFORMID
|
---|