VistA Analysis » VistA Reference » RPCs » TIU SET DOCUMENT TEXT

TIU SET DOCUMENT TEXT

This RPC buffers the transmittal of text (i.e., the body of TIU Documents)from the Client to the Server. It allows documents of indefinite size tobe filed, without risk of an allocate error on the M Server.

Properties

Property Value
Label SETTEXT
MUMPS Implementation TIUSRVPT
Return Type SINGLE VALUE

Input Parameters

Name Type Maximum Data Length Required Description
TIUDA LITERAL   true This is the IEN of the TIU Document in the TIU DOCUMENT file (#8925).
TIUX LIST   true This is the array in which the body of the TIU Document is being passed,as: TIUX("HDR")=<# of Current Page>^<Total # of Pages> TIUX("TEXT",1,0)=<Line 1 of document body> TIUX("TEXT",2,0)=<Line 2 of document body> TIUX("TEXT",3,0)=<Line 3 of document body> . . . . . . TIUX("TEXT",i,0)=<Line i of document body>
SUPPRESS LITERAL   true Optional parameter. Default is 0 (no). Boolean flag that indicates whether to commit the data (as in the Save w/osignature action in CPRS), or to simply save it in the EDIT BUFFER for thedocument (as in the auto-save function).

MUMPS Method Description

Property Value
Method SETTEXT^TIUSRVPT
Method Comment Save Text - use Buffered I/O
Input Parameters TIUDA, TIUX, SUPPRESS
Code
 N PAGES,PAGE S TIUY=0,SUPPRESS=$G(SUPPRESS,0)
I $S(+$G(TIUDA)'>0:1,'$D(^TIU(8925,+TIUDA,0)):1,1:0) D Q
. S TIUY="0^0^0^Attempt to file data in a Nonexistent Entry."
. D ERROR(TIUY)
S PAGE=$P($G(TIUX("HDR")),U),PAGES=$P($G(TIUX("HDR")),U,2)
I $S('PAGE:1,'PAGES:1,1:0) D Q
. S TIUY="0^0^0^Invalid text block header"
. D ERROR(TIUY)
I PAGE=1 K ^TIU(8925,+TIUDA,"TEMP")
M ^TIU(8925,+TIUDA,"TEMP")=TIUX("TEXT")
I 'SUPPRESS,(PAGE=PAGES),$D(^TIU(8925,TIUDA,"TEMP")) D
. N TIUC,TIUI,TIU,TIUD12,TIUAU,TIUEC S (TIUC,TIUI)=0
. F S TIUI=$O(^TIU(8925,TIUDA,"TEMP",TIUI)) Q:+TIUI'>0 D
. . S TIUC=TIUC+1
. I TIUC>0 S ^TIU(8925,TIUDA,"TEMP",0)="^^"_TIUC_U_TIUC_U_DT_"^^"
. D GETTIU^TIULD(.TIU,TIUDA)
. K ^TIU(8925,TIUDA,"TEXT")
. S TIUC=0 F S TIUC=$O(^TIU(8925,"DAD",TIUDA,TIUC)) Q:+TIUC'>0 D
. . I +$$ISADDNDM^TIULC1(+TIUC) Q
. . K ^TIU(8925,+TIUC,"TEXT")
. D MERGTEXT^TIUEDI1(+TIUDA,.TIU)
. K ^TIU(8925,TIUDA,"TEMP")
. ; If user is neither author or expected cosigner, file VBC Line count
. S TIUD12=$G(^TIU(8925,TIUDA,12)),TIUAU=$P(TIUD12,U,2),TIUEC=$P(TIUD12,U,8)
. I (TIUAU]""),(DUZ'=TIUAU) D
. . I (TIUEC]""),(DUZ=TIUEC) Q
. . D LINES(TIUDA)
S TIUY=TIUDA_U_PAGE_U_PAGES

CPRS

File Type Description
Pascal File rTIU.pas


Document generated on August 31st 2022, 2:55:43 pm