1 | XPAR2 ;SLC/KCM - Supporting Calls - Update
|
---|
2 | ;;7.3;TOOLKIT;**26**;Apr 25, 1995
|
---|
3 | ;
|
---|
4 | DOADD ; call Fileman to add a new entry
|
---|
5 | I $D(^XTV(8989.5,"AC",PAR,ENT,INST)) S ERR=$$ERR^XPARDD(89895006) Q
|
---|
6 | I $D(XPARCHK) D VALID^XPARDD(PAR,.VAL,"V",.ERR) Q:ERR
|
---|
7 | N FDA,FDAIEN,DIERR
|
---|
8 | S FDA(8989.5,"+1,",.01)=ENT
|
---|
9 | S FDA(8989.5,"+1,",.02)=PAR
|
---|
10 | S FDA(8989.5,"+1,",.03)=INST
|
---|
11 | S FDA(8989.5,"+1,",1)=VAL
|
---|
12 | D UPDATE^DIE("","FDA","FDAIEN","ERR")
|
---|
13 | I $D(DIERR) S ERR=$$ERR^XPARDD(89895009) Q ; filing error
|
---|
14 | N WPIEN S WPIEN=FDAIEN(1) D CHKWP
|
---|
15 | Q
|
---|
16 | DOCHG ; call Fileman to change VALUE field
|
---|
17 | N IEN,FDA,DIERR
|
---|
18 | S IEN=+$O(^XTV(8989.5,"AC",PAR,ENT,INST,0))
|
---|
19 | I 'IEN S ERR=$$ERR^XPARDD(89895008) Q ; instance not found
|
---|
20 | I $D(XPARCHK) D VALID^XPARDD(PAR,.VAL,"V",.ERR) Q:ERR
|
---|
21 | S FDA(8989.5,IEN_",",1)=VAL
|
---|
22 | D FILE^DIE("","FDA","ERR")
|
---|
23 | I $D(DIERR) S ERR=$$ERR^XPARDD(89895009) ; filing error
|
---|
24 | N WPIEN S WPIEN=IEN D CHKWP
|
---|
25 | Q
|
---|
26 | DOREP ; call Fileman to replace INSTANCE value with a new value
|
---|
27 | N IEN,FDA,DIERR
|
---|
28 | S IEN=+$O(^XTV(8989.5,"AC",PAR,ENT,INST,0))
|
---|
29 | I 'IEN S ERR=$$ERR^XPARDD(89895008) Q ; instance not found
|
---|
30 | I $D(XPARCHK) D VALID^XPARDD(PAR,.NEWINST,"I",.ERR) Q:ERR
|
---|
31 | I $D(^XTV(8989.5,"AC",PAR,ENT,NEWINST)) S ERR=$$ERR^XPARDD(89895006) Q
|
---|
32 | S FDA(8989.5,IEN_",",.03)=NEWINST
|
---|
33 | D FILE^DIE("","FDA","ERR")
|
---|
34 | I $D(DIERR) S ERR=$$ERR^XPARDD(89895009) ; filing error
|
---|
35 | Q
|
---|
36 | CHKWP ; check for word processing value and file
|
---|
37 | Q:$D(VAL)'=11 Q:$P($G(^XTV(8989.51,PAR,1)),"^",1)'="W"
|
---|
38 | D WP^DIE(8989.5,WPIEN_",",2,"","VAL","ERR")
|
---|
39 | I $D(DIERR) S ERR=$$ERR^XPARDD(89895009)
|
---|
40 | Q
|
---|
41 | DODEL ; call Fileman to delete this instance
|
---|
42 | N DA,DIK
|
---|
43 | S DA=$O(^XTV(8989.5,"AC",PAR,ENT,INST,0))
|
---|
44 | I 'DA S ERR="1^Parameter instance not found" Q
|
---|
45 | S DIK="^XTV(8989.5," D ^DIK
|
---|
46 | Q
|
---|