P
PADL(expE, nResultSize [,
cPadCharacter])
PADR(expE, nResultSize [,
cPadCharacter])
PADC(expE, nResultSize [,
cPadCharacter])
Data Format Returned: Character
Returns a string from an expression, padded with spaces or characters
to a specified length on the left or right sides, or both. PADL( )
inserts padding on the left,
PADR( )
inserts padding on the right,
and PADC( )
inserts padding on both
sides.
Parameters
Variable | Description |
---|---|
expE | Specifies the expression to be padded. This expression can be any expression type except a logical or currency expression or a general or picture field. |
nResultSize | Specifies the total number of characters in the expression after it is padded. |
cPadCharacter |
Specifies the value to use for padding. This value is repeated as necessary to pad the expression to the specified number of characters. If you omit cPadCharacter, spaces (ASCII character 32) are used for padding. |
ParseAddress(expC,expN)
Data Format Returned: X
Attempts to parse a non-formatted address (i.e. free-text address entry) into its individual address elements (numbers, prefix, street name, street type and suffix) and return one of those elements. The element returned is determined by the second parameter (expN).
Parameters
Variable | Status | Description |
---|---|---|
expC | Required | The text of the non-formatted address. Typically, this would be a field name containing a non-formatted address. |
expN | Required |
Indicates the address element to return
|
PayAmt(expC1,expD,expN,expC2,expL1,expL2)
Data Format Returned: X
Returns a calculated total pay amount for a staff member for a given date, number of hours worked, pay scale, and other optional parameters.
Note: This function works only for hourly paid members.
Parameters
Variable | Status | Description |
---|---|---|
expC1 | Required | Staff ID of staff member to return pay amount for. |
expD | Required | Date to return pay amount for. |
expN | Required | Number of hours used in calculating total pay amount (based on hourly rate). |
expC2 | Optional | Pay scale code to return pay amount for. |
expL1 | Optional | If passed
as true (.T. ), total pay amount is hourly
rate X hours worked plus the pay rate associated with this staff member/pay
scale code (expC1/expC2) combination.
|
expL2 | Optional | If passed
as true (.T. ), the pay rate associated with
this staff member/pay scale code (expC1/expC2) is used as the hourly rate
in the calculation. |
PayRate(expC1,expD,expC2,expN1,expN2,expN3,expL)
Data Format Returned: X
Returns the pay rate for a staff member on a given date.
Parameters
Variable | Status | Description |
---|---|---|
expC1 | Required | Staff ID of staff member to return pay rate for. |
expD | Required | Date to return pay rate for. |
expC2 | Optional | Pay scale code to return pay rate for. If you are returning an hourly or salary pay rate, leave this parameter blank. |
expN1 | Optional |
Default pay rate to assume if no pay rate is found. Note: Note that if you are retrieving a pay scale rate, this parameter is ignored as the default pay rate associated with the pay scale code is returned if no pay rate record is found for the specified staff member and pay scale code. |
expN2 | Optional |
Pay rate record type to return. Options are:
If you do not pass a pay scale code and this parameter is blank or not passed, type 1 is assumed. |
expN3 | Optional |
If a parameter is passed by reference in this position, the return value of that variable will be the hourly/salary pay rate specification of the record found for this staff member.
|
expL | Optional | If passed as true, and the hourly/salary specification of the staff member pay rate record found is salary, the return value is zero. This can be used to prevent incorrect pay amount calculations in payroll reports. |
PhoneList(expC1,expC2,expC3,expC4,expN,expL)
Data Format Returned: R
Returns a multi-line list of phone numbers for a specific master record from a table or alias.
Parameters
Variable | Status | Description |
---|---|---|
expC1 | Required | Name of alias or table name containing phone numbers. This can be the name of an alias already in use, or can point to a physical table name, in which case the alias name does not have to be in use. |
expC2 | Optional | Phone number type qualifier, such as HOME, WORK, FAX, and so forth. If specified, only phone numbers matching the specified type are returned. |
expC3 | Required if expC1 is a table; Optional if expC1 is an alias | ID (record key) value for which to return phone numbers. |
expC4 | Optional | Expression
to return for each phone number found. If not passed, CODE + PHONE + EXT
is assumed.
|
expN | Optional | Maximum number of phone numbers to return. If not passed, all phone numbers (matching type expC2 if specified) are assumed. |
expL | Optional | If passed as true, a heading line will be generated at the top of the list. If a custom return expression is passed, this parameter is ignored as the headings may be irrelevant. |
PhoneList('occ_ph','',Contact.Cont_id)
returns the a multi-line list of phone numbers associated with each of
the contacts that are listed for each occupancy in the following format WORK 555-555-5555 x555
HOME 555-555-5555 x555
.
phonelist('occ_ph','WORK',Contact.Cont_id)
returns only phone numbers of type WORK
listed in the contacts of each
occupancy. If
you replace WORK
with HOME
, it would only show the contact numbers of the
type HOME
.
phonelist('occ_ph','',Contact.Cont_id,,1)
returns only 1 the first phone number listed for each contact.
phonelist('occ_ph','',Contact.Cont_id,"PHONE”+'
'+EXT",1)
returns a list of all contact numbers by occupancy,
but not list the actual type of phone number.
PROPER
Data Format Returned: C
Converts a field such that the first letter in each word is capitalized and the remaining characters are lower-case.
PROPER(lst.last)
would ensure that the last
name returned from the alias would start with a capital letter regardless
of how the name was entered into the field.
PtVictData(expC1,expC2,expC3)
Data Format Returned: X
Formats patient information for viewing based on currently logged in user security, by masking alpha and numeric characters in a result expression with a specified character. This will prevent unauthorized view of patient information by users who are not allowed to view personal information for reports other than the ones he/she has entered.
Parameters
Variable | Status | Description |
---|---|---|
expC1 | Required | The patient ID of the patient record to
check. This corresponds to the PTNT_ID field from the EMS_PTNT record.
|
expC2 | Required | The expression
to return. This must evaluate to a valid character expression. If the
expression uses fields in an alias other than the currently selected alias,
those fields must be noted in the ALIAS.FIELDNAME format.
|
expC3 | Optional | The character used to mask alpha and numeric characters in result expression from expC2. If no character is specified, an asterisk (*) is used. |
PtVictData(Ems_main_query.ptnt_id,"trim(Ems_main_query.Last)+iif(!empty(Ems_main_query.First),',
','')+trim(Ems_main_query.First)+' ' +Ems_main_query.Middle")
If you have an EMS patient whose name is John A. Smith and a person
with insufficient security attempts to print the EMS main report, the above
example returns the patient name as **** * *****
.
PtVictData(Ems_main_query.ptnt_id,"Ems_main_query.Pt_addr_1")
returns asterisks for the patient’s address.
PtVictData(Ems_main_query.ptnt_id,"Ems_main_query.Pt_addr_1",%)
returns the address as %
signs. So
if it was 108 3rd St, this would return %%% %%% %%
.
PtVictViewable(expC)
Data Format Returned: X
Determines if information for a patient record is viewable by the currently logged in user. This function can be used to prevent unauthorized view of patient information by users who are not allowed to view personal information for reports other than the ones he/she has entered.
Parameters
Variable | Status | Description |
---|---|---|
expC | Required | The patient ID of the patient record to
check. This corresponds to the PTNT_ID field from the EMS_PTNT record.
|