Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (14 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

Location:
FOIAVistA/tag/r
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • FOIAVistA/tag/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAHLO2.m

    r628 r636  
    11RAHLO2 ;HIRMFO/GJC-File rpt (data from bridge program) ;10/30/97  09:02
    2  ;;5.0;Radiology/Nuclear Medicine;**55,80,84**;Mar 16, 1998;Build 13
    3  ;
    4  ;Integration Agreements
    5  ;----------------------
    6  ;$$FIND1^DIC(2051); UPDATE^DIE(2053); $$DT^XLFDT(10103); $$UP^XLFSTR(10104)
    7  ;
    8 ADENDUM ; This functions store new lines of text at the end of the existing
    9  ;impression and report text. If this report is being amended through the
    10  ;teleradiology service, add the addendum text to the IMPRESSION TEXT (#300)
    11  ;field only. Note: Only ADENDUM was edited for RA*5.0*84 gjc/09.18.07
    12  N A,COUNTER,I,J,NODE,ROOT,SUB,X,Y
    13  ;NODE = ^RARPT(RARPT,"I" -or- "R"  -> where the data is to be stored...
    14  ;ROOT = ^TMP("RARPT-REC",$J,RASUB  -> where the addendum data resides...
    15  F A="I","R" D  K I,J
    16  .S SUB=$S(A="I":"RAIMP",1:"RATXT"),ROOT=$NA(^TMP("RARPT-REC",$J,RASUB,SUB)) Q:'$O(@ROOT@(0))
    17  .S NODE=$NA(^RARPT(RARPT,A))
    18  .S COUNTER=+$O(@NODE@($C(32)),-1) ;last record #
    19  .;
    20  .;if there is existing text, add a null line for space.
    21  .I '($D(I)#2),(COUNTER>0) S COUNTER=COUNTER+1,@NODE@(COUNTER,0)=$C(32),I=""
    22  .;
    23  .S Y=0 F  S Y=$O(@ROOT@(Y)) Q:'Y  D
    24  ..S X=@ROOT@(Y)
    25  ..;if addendum text is to be the original text no spacer is needed ('Addendum:' tag applied)
    26  ..;if prior report or impression text exist, insert a blank as a spacer
    27  ..;^RARPT(RARPT,"I",1,0)="original impression"
    28  ..;^RARPT(RARPT,"I",2,0)="" <- insert a null line as a spacer
    29  ..;^RARPT(RARPT,"I",3,0)="Addendum: first line of addendum" ** NOTE 'Addendum:' tag **
    30  ..;^RARPT(RARPT,"I",4,0)="second line of addendum"
    31  ..;...
    32  ..;^RARPT(RARPT,"I",N,0)="Nth and last line of addendum"
    33  ..S COUNTER=COUNTER+1
    34  ..;set the first line of the addendum w/header: 'Addendum: '
    35  ..I '($D(J)#2) S X="Addendum: "_X,J=""
    36  ..S @NODE@(COUNTER,0)=X
    37  ..Q
    38  .S @NODE@(0)="^^"_COUNTER_"^"_COUNTER_"^"_$$DT^XLFDT()
    39  .Q
     2 ;;5.0;Radiology/Nuclear Medicine;**55,80**;Mar 16, 1998;Build 19
     3ADENDUM ; store new lines at the end of existing text
     4 F A="I","R" D
     5 . I $O(^TMP("RARPT-REC",$J,RASUB,$S(A="I":"RAIMP",1:"RATXT"),0)) D
     6 .. S RACNT=+$O(^RARPT(RARPT,A,9999999),-1),RASTRNDE=RACNT+1
     7 .. ; Check if the impression an/or report text sent with the addendum
     8 .. ; is to be the initial text added to the word processing multiples.
     9 .. ; RASTRNDE=the first subscript where impression/report data is to
     10 .. ; be stored.  If no existing impression/report text data, RASTRNDE
     11 .. ; equals one.  If one & RACNT equals one, don't add a blank line
     12 .. ; before adding addendum text.  If RASTRNDE & RACNT both >1, add
     13 .. ; the blank line.
     14 .. S I=0 F  S I=$O(^TMP("RARPT-REC",$J,RASUB,$S(A="I":"RAIMP",1:"RATXT"),I)) Q:I'>0  D
     15 ... S RACNT=RACNT+1,L=$G(^TMP("RARPT-REC",$J,RASUB,$S(A="I":"RAIMP",1:"RATXT"),I))
     16 ... S:I=$O(^TMP("RARPT-REC",$J,RASUB,$S(A="I":"RAIMP",1:"RATXT"),0)) L="Addendum: "_L ; if the first line, append 'addendum:'
     17 ... I (RASTRNDE=RACNT),(RACNT>1) S ^RARPT(RARPT,A,RACNT,0)=" ",RACNT=RACNT+1
     18 ... S ^RARPT(RARPT,A,RACNT,0)=L
     19 ... Q
     20 .. S ^RARPT(RARPT,A,0)="^^"_RACNT_"^"_RACNT_"^"_RADATE
     21 .. Q
     22 . Q
     23 K A,I,L,RACNT,RASTRNDE
    4024 Q
    41  ;
    4225ERR(A) ; Invalid impression/report text message.
    4326 ; Input: 'A' - either "I" for impression, or "R" for report
Note: See TracChangeset for help on using the changeset viewer.