source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIURL1.m@ 1639

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

initial load of WorldVistAEHR

File size: 1.8 KB
RevLine 
[613]1TIURL1 ; SLC/JER - List Management Library ;11/26/00
2 ;;1.0;TEXT INTEGRATION UTILITIES;**100**;Jun 20, 1997
3 ; New rtn created 11/14/00 by splitting TIURL
4 ;
5UPIDDATA(TIUDA) ; Update (or kill) ^TMP("TIUR",$J,"IDDATA",TIUDA)
6 K ^TMP("TIUR",$J,"IDDATA",TIUDA)
7 Q:'$D(^TIU(8925,TIUDA))
8 S IDDATA=$$IDDATA^TIURECL1(TIUDA) ; =TIUDA^hasIDkid^IDdadDA^prmsort
9 I IDDATA S ^TMP("TIUR",$J,"IDDATA",TIUDA)=IDDATA
10 Q
11 ;
12UPPFIX(TIUDA,OLDPFIX) ; Returns prefix with indicators updated
13 ;for changes to record TIUDA (e.g. has new addendum).
14 ; Returned prefix has same level as received prefix OLDPFIX.
15 ; Returned prefix is set for UNEXPANDED state of record.
16 ; OLDPFIX may be that of a record at any level of the treeview,
17 ;in any state of expansion.
18 N ORIGPFIX,NEWPFIX
19 S ORIGPFIX=$$PREFIX^TIULA2(TIUDA,0)
20 I OLDPFIX["|_" S NEWPFIX=$P(OLDPFIX,"|_")_"|_"_ORIGPFIX
21 E S NEWPFIX=ORIGPFIX
22 Q NEWPFIX
23 ;
24SETPT(LINENO) ; Set prefix_patient column of ^TMP("TIUR",$J,LINENO,0)
25 ;after item prefix is changed (e.g. item has new addendum).
26 ; Updated prefix is at same level of treeview as received prefix,
27 ;has updated indicators, but is in UNEXPANDED state.
28 N CURPFIX,TEXT,TIUDA,IDDATA,NEWPFIX,ITEMNODE
29 S ITEMNODE=^TMP("TIURIDX",$J,LINENO)
30 S TIUDA=$P(ITEMNODE,U,2),CURPFIX=$P(ITEMNODE,U,3)
31 S NEWPFIX=$$UPPFIX(TIUDA,CURPFIX)
32 S TEXT=^TMP("TIUR",$J,LINENO,0)
33 S TEXT=$$SETTLPT^TIURECL1(TEXT,TIUDA,NEWPFIX)
34 S ^TMP("TIUR",$J,LINENO,0)=TEXT
35 S $P(^TMP("TIURIDX",$J,LINENO),U,3)=NEWPFIX
36 Q
37 ;
38ITEM(TIUDA) ; Find which item in the list is occupied by TIUDA
39 N TIUI,TIUY S (TIUI,TIUY)=0
40 F S TIUI=$O(^TMP("TIURIDX",$J,TIUI)) Q:+TIUI'>0!+TIUY D
41 . I $P(^TMP("TIURIDX",$J,TIUI),U,2)=TIUDA S TIUY=TIUI
42 Q TIUY
43BREATHE(ITEM,ONCE) ; Collapse/Expand treeview on changes
44 D EC1^TIURECL(ITEM,1) ; Collapse or expand once
45 D:'+$D(ONCE) EC1^TIURECL(ITEM,1) ; if ONCE is not sent, do it again
46 Q
Note: See TracBrowser for help on using the repository browser.