Number of Copies
|
Page 2 Selection Select field: xx.copies Operator: IG Prompt: NUMBER OF COPIES (or as desired) Default: “1” or any number desired, or leave blank
Page 3 Computed field xx.copies DAT=PINT VAL=””
Page 3 Footnote AL PRINT (D(27)_"&l"_c.xx.copies_"X")^! (the “&l” is the lowercase letter l, not a number one)
|
Ways to check for nil
|
Usually used in an IF statement 1. Concatenate a period. Example: IF{@field_.=.<space>"do this";"do that"} Meaning if the value of a period added to your field is still a period then the field has no value. This works in rules and calculations as well as reports.
2. Use Length/Locate command Example: IF{L(@field)=0<space>"do this";"do that"}
3. Use @Not(@field) in an IF statement
4. p2 report writer selection Select field: your field Operator: EQ Value: ""
5. To check a variable use 'VAR such as IF{'VAR<space>"do this";"do that"}
|
Page Orientation
|
Portrait: Chars/Line up to 132 Landscape: Chars/Line 133-200
|
Length/Locate
|
L(A) – returns length of string, if value of A is nil then returns 0 L(A,B) – returns position where B is found in A, if B not found in A then returns length L(A,B)’=L(A) – checks for B’s existence within A L(A)=0 – checks for existence of A
Examples: If @field value is ACETAMINOPHEN L(@field) = 13 L(@field,”AMINO”) = 4 L(@field,”ACID”) = 13 IF{L(@field,”AMINO”)’=L(@field) “FOUND”;”DOESN’T CONTAIN”} IF{L(@field)=0 “DOESN’T EXIST”}
|
Sort by day of week
|
To sort by day of week according to how they fall from Sunday through Saturday on the calendar convert the date to the number that corresponds to the day of the week. Sunday is 1, Monday is 2, etc. Create computed field and use as a sort field. DAT=PINT LEN=1 VAL=%Z.day.from.date(@your.date.field)
|
ADM.PAT patient select
|
If detail DPM is ADM.PAT.adm.patient.file the only select need to identify the patient is @urn. No index is needed.
|
Date field entry
|
In addition to using the T convention when entering a date, MB can be used for Month Begin and ME for Month End. If today is Jan 15, 2007 and you enter MB-1 the date 12/01/06 will appear. ME-1 will get you 12/31/06.
|
Download - delimited
|
• p1 – Lines per page equal to page size (turns off page form feed), no banner • Footnotes – SFF NO, EFF NO, FD ASCII code (e.g. FD 44 for a comma) • Table of ASCII codes • Place fields on picture with no spaces between • Create report headers by placing header names in an HR line separated by the delimiter • Create detail lines longer than 200 by using NL=NO line attribute and specify record length in RL footnote
|
Download methods
|
1. Download any report that is lined up in columns – no footnotes needed 2. Download a delimited file (using any delimiter) to a download name without an extension 3. Download a comma delimited file to a download name with .csv extension (when opening with Excel this will autoformat into columns without the import wizard)
|
Avoid quotes in downloads
|
When doing a download the report writer puts quotes ("text qualifiers") around all non-numeric fields. To avoid this define the field as a numeric type. Do any necessary conversions of the field in the VAL. Example: DAT=INT LEN=10 VAL=%Z.date.out(@your.field,"",10)
|
Using %Z.time.add
|
%Z.time.add(internal date,time in HHMM, mins to add - may be negative)
Returns Q(YYYYMMDD,HHMM)
To get each piece send it to a variable and specify the piece as in VAR|0 for date and VAR|1 for time.
|