Difference between revisions of "Global Search"

From VistApedia
Jump to: navigation, search
 
Line 4: Line 4:
  
 
and then needs an IF for each constant bit after the slot.
 
and then needs an IF for each constant bit after the slot.
 
 
  
  
Line 13: Line 11:
  
 
SET IEN=0 FOR  SET IEN=$O(^PXD(811.8,IEN)) QUIT:IEN'=+IEN  <blah blah>
 
SET IEN=0 FOR  SET IEN=$O(^PXD(811.8,IEN)) QUIT:IEN'=+IEN  <blah blah>
 
 
  
  
Line 22: Line 18:
  
 
SET SUB="" FOR SET SUB=$O(^PXD(811.8,"B",SUB)) QUIT:SUB=""  <blah blah>
 
SET SUB="" FOR SET SUB=$O(^PXD(811.8,"B",SUB)) QUIT:SUB=""  <blah blah>
 
 
  
  
Line 29: Line 23:
  
 
^PXD(811.8,D0,100,D1,0)=  (#.01) XML DATA [1W] ^
 
^PXD(811.8,D0,100,D1,0)=  (#.01) XML DATA [1W] ^
 
 
 
 
  
 
the comma+comma maps to D0 (the IEN in the REMINDER EXCHANGE FILE)
 
the comma+comma maps to D0 (the IEN in the REMINDER EXCHANGE FILE)
  
 
and the 7 maps to D1 (the line number in the Word Processing field )
 
and the 7 maps to D1 (the line number in the Word Processing field )
 
 
 
  
 
I doubt that you only want to change the pattern ="<USER>PRD, USER</USER>" when it is on the 7th line and ignore it if it is only any other line.
 
I doubt that you only want to change the pattern ="<USER>PRD, USER</USER>" when it is on the 7th line and ignore it if it is only any other line.
 
 
 
  
 
So D0 and D1 are both IENs so the both loops need to be of the numeric kind which I will put into lines of a program for clear code:
 
So D0 and D1 are both IENs so the both loops need to be of the numeric kind which I will put into lines of a program for clear code:
 
 
 
  
 
SET D0=0 FOR  SET D0=$O(^PXD(811.8,D0)) QUIT:D0'=+D0  IF $DATA(^(D0,100))  DO
 
SET D0=0 FOR  SET D0=$O(^PXD(811.8,D0)) QUIT:D0'=+D0  IF $DATA(^(D0,100))  DO
Line 58: Line 39:
  
 
. . . SET ^PXD(811.8,D0,100,D1,0)="<USER>PRD,USER</USER>"   
 
. . . SET ^PXD(811.8,D0,100,D1,0)="<USER>PRD,USER</USER>"   
 +
 
== colorized ===
 
== colorized ===
 
<html>
 
<html>

Latest revision as of 11:42, 7 August 2020


Well, ZWRITE ^PXD(811.8,,100,7,0) has to have a FOR command and a variable each time there is a ,, (comma,comma) in the ZWRITE argument or where there is a ,:, (comma, colon, comma) to stand in for that "Slot".

and then needs an IF for each constant bit after the slot.


So ^PXD(811.8,:) is looping through an Internal Entry Number

maps to code for a 0..# numeric value loop like:

SET IEN=0 FOR SET IEN=$O(^PXD(811.8,IEN)) QUIT:IEN'=+IEN <blah blah>


and ^PXD(811.8,"B",) is looping through a crossreference of a file

maps to code for an empty string through an empty string (string value) loop like:

SET SUB="" FOR SET SUB=$O(^PXD(811.8,"B",SUB)) QUIT:SUB="" <blah blah>


^PXD(811.8,,100,7,0) maps to the global map level

^PXD(811.8,D0,100,D1,0)= (#.01) XML DATA [1W] ^

the comma+comma maps to D0 (the IEN in the REMINDER EXCHANGE FILE)

and the 7 maps to D1 (the line number in the Word Processing field )

I doubt that you only want to change the pattern ="<USER>PRD, USER</USER>" when it is on the 7th line and ignore it if it is only any other line.

So D0 and D1 are both IENs so the both loops need to be of the numeric kind which I will put into lines of a program for clear code:

SET D0=0 FOR SET D0=$O(^PXD(811.8,D0)) QUIT:D0'=+D0 IF $DATA(^(D0,100)) DO

. SET D1=0 FOR SET D1=$O(^PXD(811.8,D0,100,D1)) QUIT:D1'=+D1 DO

. . IF $G(^(D1,0))?1"<USER>".E1"</USER>" DO

. . . SET ^PXD(811.8,D0,100,D1,0)="<USER>PRD,USER</USER>"

colorized =

<html> <style type="text/css"> span { font-family: 'Courier New'; font-size: 10pt; color: #000000; } .sc0 { } .sc2 { font-style: italic; color: #8080C0; } .sc3 { font-weight: bold; } .sc4 { font-weight: bold; color: #FF0000; } .sc5 { font-weight: bold; color: #FF8040; } .sc6 { font-weight: bold; color: #008000; } .sc12 { font-weight: bold; color: #FF00FF; } .sc16 { color: #0080FF; } .sc24 { } </style>

SET D0=0 FOR SET D0=$O(^PXD(811.8,D0)) QUIT:D0'=+D0 IF $DATA(^(D0,100)) DO

. SET D1=0 FOR SET D1=$O(^PXD(811.8,D0,100,D1)) QUIT:D1'=+D1 DO

. . IF $G(^(D1,0))?1"<USER>".E1"</USER>" DO

. . . SET ^PXD(811.8,D0,100,D1,0)="<USER>PRD,USER</USER>"

</html>