source: FOIAVistA/tag/r/SCHEDULING-SD-SC/SDFORM.m@ 1641

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

initial load of FOIAVistA 6/30/08 version

File size: 1.0 KB
Line 
1SDFORM ;IOFO BAY PINES/ESW - FORMAT MESSAGES ;09/02/2004 2:10 PM [5/19/05 8:24am]
2 ;;5.3;Scheduling;**327**;Aug 13, 1993
3 ;This routine may be called to format a text up to four columns.
4 ;The returned value may be asigned to an array element used in
5 ;a message creation
6 ;================================================
7FORM(FIRST,FN,SECOND,SN,THIRD,TN,FOURTH,FRN) ;
8 ;
9 ;FIRST,SECOND,THIRD,FOURTH - names of variables containing text values or text strings
10 ; to be included in a formatted message
11 ;FN,SN,TN - numbers assigned for a text and spaces up to the next column
12 ;
13 ;Output: formatted text
14 ;
15 N FS,SS,TS,FNS,SNS,TNS
16 S:'$D(THIRD) THIRD=""
17 S:'$D(FOURTH) FOURTH=""
18 S:'$D(TN) TN=""
19 S:'$D(SN) SN=""
20 S:'$D(FRN) FRN=""
21 S FNS=FN-$L(FIRST) S:FNS'>0 FNS=1,FIRST=$E(FIRST,1,$L(FIRST)-1) S $P(FS," ",FNS)=""
22 S SNS=SN-$L(SECOND) S:SNS'>0 SNS=1,SECOND=$E(SECOND,1,$L(SECOND)-1) S $P(SS," ",SNS)=""
23 S TNS=TN-$L(THIRD) S:TNS'>0 TNS=1,THIRD=$E(THIRD,1,$L(THIRD)-1) S $P(TS," ",TNS)=""
24 Q FIRST_FS_SECOND_SS_THIRD_TS_FOURTH
Note: See TracBrowser for help on using the repository browser.