source: WorldVistAEHR/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XPAR2.m@ 810

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

initial load of WorldVistAEHR

File size: 1.7 KB
RevLine 
[613]1XPAR2 ;SLC/KCM - Supporting Calls - Update
2 ;;7.3;TOOLKIT;**26**;Apr 25, 1995
3 ;
4DOADD ; 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
16DOCHG ; 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
26DOREP ; 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
36CHKWP ; 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
41DODEL ; 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
Note: See TracBrowser for help on using the repository browser.