Customizing Features for Your Practice > Using PracticeScript > Using Functions
The Practice Answers category contains thirteen subcategories:
Appointment related
Ledger related
Contract related
Tx Plan related
User Form related
Note related
Document related
Image related
Insurance related
Staff productivity related
Office related
Charting related
HIPAA related
The Appointment related subcategory contains the following functions:
ApptDate
Function |
ApptDate |
Location in PracticeScript |
Functions->Practice Answers->Appointment related |
Purpose |
Calculates the date of a patient's appointment (if any) in the past or the future. |
Format |
ApptDate(PatientID, OptionalStartDate, OptionalEndDate, OptionalListOfCodes) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. OptionalStartDate is the start of the date range to begin looking for appointments. If not specified or if 0 is specified, today's date is assumed. OptionalEndDate is the end of the date range to begin looking for appointments. If not specified or if 0 is specified, the largest possible date is assumed. OptionalListOfCodes allows up to 7 numeric expressions that represent ADA treatment codes. If specified, the appointment must have at least one of the treatment codes scheduled for a match to occur. |
Evaluates to |
The date of an appointment for the patient that meets all of the criteria. Unlike the NextApptDate() function, the appointment can already be checked out. If no matching appointment date is found, 0 is returned. |
Example |
ApptDate(Patient.PersonID, FirstOfMonth(), EndOfMonth(), 4910) <> 0 |
HasPendingAppt
Function |
HasPendingAppt |
Location in PracticeScript |
Functions->Practice Answers->Appointment related |
Purpose |
Determines if the patient has any pending appointments with the specified criteria. |
Format |
HasPendingAppt(PatientID,OptionalListOfCodes) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient. PersonID found at Fields->Data fields->Patient Info->Internal ID. OptionalListOfCodes allows up to 7 numeric expressions that represent ADA treatment codes. If specified, the appointment must have at least one of the treatment codes scheduled for a match to occur. |
Evaluates to |
TRUE (1) if the patient has a pending appointment that meets all of the criteria. If no matching pending appointment can be found, FALSE (0) is returned. |
Example |
HasPendingAppt(Patient.PersonID, 2140, 2150, 2160, 2161) HasPendingAppt(Patient.PersonID, 4910) = 0 |
NextApptDate
Function |
NextApptDate |
Location in PracticeScript |
Functions->Practice Answers->Appointment related |
Purpose |
Calculates the date of a patient's next appointment (if any). |
Format |
NextApptDate(PatientID, OptionalStartDate, OptionalEndDate, OptionalListOfCodes) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient PersonID found at Fields->Data fields->Patient Info->Internal ID. OptionalStartDate is the start of the date range to begin looking for appointments. If not specified or if 0 is specified, today's date is assumed. OptionalEndDate is the end of the date range to begin looking for appointments. If not specified or if 0 is specified, the largest possible date is assumed. OptionalListOfCodes allows up to 7 numeric expressions that represent ADA treatment codes. If specified, the appointment must have at least one of the treatment codes scheduled for a match to occur. |
Evaluates to |
The date of an appointment for the patient that meets all of the criteria. In addition to the criteria, the appointment cannot already be checked out. If no matching appointment date is found, 0 is returned. |
Example |
NextApptDate(Patient.PersonID, 0, 0, 2140, 2150, 2160, 2161) <> 0 NextApptDate(Patient.PersonID, Today(), EndOfMonth(), 4910) <> 0 NextApptDate(Patient.PersonID) = 0 NextApptDate(Patient.PersonID) - Today() |
NextNonRecallApptDate
Function |
NextNonRecallApptDate |
Location in PracticeScript |
Functions->Practice Answers->Appointment related |
Purpose |
Calculates the date of a patient's next non-recall appointment (if any). |
Format |
NextNonRecallApptDate(PatientID, OptionalStartDate, OptionalEndDate, OptionalListOfCodes) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. OptionalStartDate is the start of the date range to begin looking for appointments. If not specified or if 0 is specified, today's date is assumed. OptionalEndDate is the end of the date range to begin looking for appointments. If not specified or if 0 is specified, the largest possible date is assumed. OptionalListOfCodes allows up to 7 numeric expressions that represent ADA treatment codes. If specified, the appointment must have at least one of the treatment codes scheduled for a match to occur. |
Evaluates to |
The date of an appointment for the patient that meets all of the criteria. In addition to the criteria, the appointment cannot already be checked out, and the "Recall appointment" option cannot be checked. If no matching appointment date can be found, 0 is returned. |
Example |
NextNonRecallApptDate(Patient.PersonID) = 0 NextNonRecallApptDate(Patient.PersonID) - Today() |
NextRecallApptDate
Function |
NextRecallApptDate |
Location in PracticeScript |
Functions->Practice Answers->Appointment related |
Purpose |
Calculates the date of a patient's next recall appointment (if any). |
Format |
NextRecallApptDate(PatientID, OptionalStartDate, OptionalEndDate, OptionalListOfCodes) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. OptionalStartDate is the start of the date range to begin looking for appointments. If not specified or if 0 is specified, today's date is assumed. OptionalEndDate is the end of the date range to begin looking for appointments. If not specified or if 0 is specified, the largest possible date is assumed. OptionalListOfCodes allows up to 7 numeric expressions that represent ADA treatment codes. If specified, the appointment must have at least one of the treatment codes scheduled for a match to occur. |
Evaluates to |
The date of an appointment for the patient that meets all of the criteria. In addition to the criteria, the appointment cannot already be checked out, and the "Recall appointment" option must be selected. If no matching appointment date can be found, 0 is returned. |
Example |
NextRecallApptDate(Patient.PersonID) = 0 NextRecallApptDate(Patient.PersonID) - Today() |
The Ledger related subcategory contains the following functions:
HasTxCodeInLedger
Function |
HasTxCodeInLedger |
Location in PracticeScript |
Functions->Practice Answers->Ledger related |
Purpose |
Determines if a patient has had a particular procedure posted to the ledger. |
Format |
HasTxCodeInLedger(PatientID, OptionalStartDate, OptionalEndDate, OptionalToothNum,ListOfCodes) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient. PersonID found at Fields->Data fields->Patient Info->Internal ID. OptionalStartDate is the start of the date range to search the ledger. If not specified or if 0 is specified, the earliest possible date is assumed. OptionalEndDate is the end of the date range to search the ledger. If not specified or if 0 is specified, the largest possible date is assumed. OptionalToothNum, if specified, is the tooth number on which the tx code was performed. If not specified (or if 0 is specified), any tooth number matches. ListOfCodes allows up to 6 numeric expressions that represent ADA treatment codes to search the ledger for. At least one code must be specified. |
Evaluates to |
TRUE (1) if a transaction code that meets the criteria is found in the patient's ledger. FALSE (0) is returned if the code could not be found. |
Example |
HasTxCodeInLedger(Patient.PersonID, 0, 0, 0, 2140, 2150, 2160, 2161) <> 0 HasTxCodeInLedger(Patient.PersonID, 0, 0, 15, 2140, 2150, 2160, 2161) <> 0 |
LedgerToText
Function |
LedgerToText |
Location in Practice Script |
Functions->Practice Answers->Ledger related |
Purpose |
Converts transactions in the ledger to a block of text that can be read by a human. Most commonly used in the definition of a Document Merge Variable. This allows letters to be generated that include the treatment performed during a specified time period. |
Format |
LedgerToText(PatientID, StartDate, EndDate, ListOnlyTx,IncludeADACodes, IncludeTooth#,IncludeSurfaces, IncludeAmount,FormatAsTable, IncludeHeading) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. StartDate, if specified, is the beginning date range to consider. Only transactions on or after this date are included in the result. If this parameter is 0, the earliest date in the ledger is used. EndDate, if specified, is the ending date range to consider. Only transactions on or before this date are included in the result. If this parameter is 0, the last date in the ledger is used. ListOnlyTx, if specified, determines if only treatment codes are included, or if payments and adjustments will also be listed. If ListOnlyTx is FALSE, all entries are included. Otherwise, only dental and medical procedures are included. IncludeADACodes, if specified, determines if the ADA codes for each entry are included in the output. If IncludeADACodes is FALSE, the ADA code will not be part of the output. Otherwise, it is included. IncludeTooth#, if specified, determines if the tooth number (or quadrant) of the procedure are included in the output. If IncludeTooth# is FALSE, the tooth number (or quadrant) will not be part of the output. Otherwise, it is included. IncludeSurfaces, if specified, determines if the tooth surfaces of the procedure is included in the output. If IncludeSurfaces is FALSE, the surface letters will not be part of the output. Otherwise, they are included. IncludeAmount, if specified, determines if the dollar value associated with the transaction is included in the output. If IncludeAmount is FALSE, the amount will not be part of the output. Otherwise, it is included. FormatAsTable, if specified, determines how the output is to appear. IncludeHeading, if specified, controls whether the resulting text includes labels for each column. If IncludeHeading is FALSE, column headings are not part of the resulting text. This parameter has no effect if the previous parameter, FormatAsTable, is FALSE. |
Evaluates to |
A string of text that represents the procedures in the ledger that belong to the patient. The text may be in free-form text format (if FormatAsTable is FALSE), or in a table format. The table format will have columns separated by TAB characters. |
Example |
Assuming that two fillings were done on the patient today: LedgerToText(Patient.PersonID, Today(), Today(), TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE) LedgerToText(Patient.PersonID, Today(), Today(), TRUE, FALSE, TRUE, TRUE, FALSE, FALSE) |
DateOfLastTxInLedger
Function |
DateOfLastTxInLedger |
Location in PracticeScript |
Functions->Practice Answers->Ledger related |
Purpose |
Determines the date a patient had a particular procedure posted to the ledger (if any). |
Format |
DateOfLastTxInLedger(PatientID, OptionalStartDate, OptionalEndDate, OptionalToothNum,ListOfCodes) OptionalStartDate is the start of the date range to search the ledger. If not specified or if 0 is specified, the earliest possible date is assumed. OptionalEndDate is the end of the date range to search the ledger. If not specified or if 0 is specified, the largest possible date is assumed. OptionalToothNum, if specified, is the tooth number on which the tx code was performed. If not specified or if 0 is specified, any tooth number will match. ListOfCodes allows up to 6 numeric expressions that represent ADA treatment codes for which to search the ledger. At least one code must be specified. |
Evaluates to |
The date that the procedure was done. If a match cannot be found, 0 is returned. If more than one matching procedure can be found, the date of the most recent procedure is returned. |
Example |
DateOfLastTxInLedger(Patient.PersonID, FirstOfMonth(), 0, 0, 2140, 2150, 2160, 2161) <> 0 Today() - DateOfLastTxInLedger(Patient.PersonID, 0, 0, 0, 2140, 2150, 2160, 2161) NOTE: If the patient has never had an amalgam done, this will evaluate to a very large number (DateOfLastTxInLedger() is 0, so the number is the same as Today()). DateOfLastTxInLedger(Patient.PersonID, 0, 0, 15, 2140, 2150, 2160, 2161) = 0 |
The Contract related subcategory contains two syntaxes available for you to define contract-related experts:
How many contracts of status X does patient have?:
HasContract(PatientIDHere, StartCreateDateHereOrZero, EndCreateDateHereOrZero, ContractStatusOrBlankForAll)
Date of last scheduled payment or claim:
LastContractPmtDate(ContractIDHere, TabTypeHere)
The Tx Plan related subcategory contains the following functions:
TxPlanAccepted
Function |
TxPlanAccepted |
Location in PracticeScript |
Functions->Practice Answers->Tx plan related |
Purpose |
Determines if a treatment plan was accepted by a patient. |
Format |
TxPlanAccepted(PatientID, OptionalStartDate, OptionalEndDate) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. OptionalStartDate is the start of the date range to search for the treatment plan. If not specified or if 0 is specified, the earliest possible date is assumed. OptionalEndDate is the end of the date range to search for the treatment plan. If not specified or if 0 is specified, the largest possible date is assumed. |
Evaluates to |
TRUE (1) if a treatment plan was accepted by the patient during the specified date range. |
Example |
TxPlanAccepted(Patient.PersonID, FirstOfYear(), Today()) TxPlanAccepted(Patient.PersonID, Patient.FirstTreated, Patient.FirstTreated + 90) |
TxPlanCreated
Function |
TxPlanCreated |
Location in PracticeScript |
Functions->Practice Answers->Tx plan related |
Purpose |
Determines if a treatment plan has been created for a patient. |
Format |
TxPlanCreated(PatientID, OptionalStartDate, OptionalEndDate) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. OptionalStartDate is the start of the date range to search for the treatment plan. If not specified or if 0 is specified, the earliest possible date is assumed. OptionalEndDate is the end of the date range to search for the treatment plan. If not specified or if 0 is specified, the largest possible date is assumed. |
Evaluates to |
TRUE (1) if a treatment plan had been created for the patient during the specified date range. FALSE (0) is returned if a treatment plan was not created. |
Example |
TxPlanCreated(Patient.PersonID, FirstOfYear(), Today()) TxPlanCreated(Patient.PersonID, Patient.FirstTreated, Patient.FirstTreated) |
TxPlanInProgress
Function |
TxPlanInProgress |
Location in PracticeScript |
Functions->Practice Answers->Tx plan related |
Purpose |
Determines if a treatment plan is currently in progress. |
Format |
TxPlanInProgress(PatientID, OptionalStartDate, OptionalEndDate) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. OptionalStartDate is the start of the date range to search for acceptance date of the treatment plan. If not specified or if 0 is specified, the earliest possible date is assumed. OptionalEndDate is the end of the date range to search for the acceptance date of the treatment plan. If not specified or if 0 is specified, the largest possible date is assumed. |
Evaluates to |
TRUE (1) if a treatment plan had been accepted and is currently in progress (i.e., appointments have been scheduled). The date range, if specified, represents the date that the treatment plan was accepted. FALSE (0) is returned if a treatment plan is not currently in progress (i.e., it was never created, it was never accepted, or it has already been completed). |
Example |
TxPlanInProgress(Patient.PersonID, FirstOfYear(LastYear()), EndOfYear(LastYear())) |
The User Form related subcategory contains the following functions:
FormVal
Function |
FormVal |
Location in PracticeScript |
Functions->Practice Answer->User Form related |
Purpose |
Determines the value of a field on a User Defined form. |
Format |
FormVal(PatientID, FormName, QuestionLabel, OptionalStartDate, OptionalEndDate) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. FormName is a character string that is the name of the form you are looking for. FormName needs to match the Form name field found on the Form Definition window when defining the form. The Form name is also displayed in the Description column of the User Forms Pick List. QuestionLabel is the character string that is the label for the specific question on the form. QuestionLabel needs to match the Question field found on the Question Definition window when defining the fields on a form. The Question label is also displayed in the Form contents window on the Form Definition window. There are also two hidden question labels that ALWAYS exist on a form. They are "Entry date," which is the date the form was added to the chart, and "Version," which is the version number of the form. You may specify "Entry date" or "Version" for the question label if you need to. OptionalStartDate is the start of the date range to search for when the form was added to the chart. If not specified or if 0 is specified, the earliest possible date is assumed. OptionalEndDate is the end of the date range to search for when the form was added to the chart. If not specified or if 0 is specified, the largest possible date is assumed. |
Evaluates to |
If the specified form is found, the value of FormVal() depends on the type of the question. If the question is a number, it evaluates to the number that is in the field. If the question is a single line text field, FormVal() evaluates to a string. Multiple-choice questions evaluate to strings that represent the value. If the question is a option, FormVal() is 1 if the box is selected, or 0 if the box was not selected. If the form does not exist for the patient or if the question label does not exist on the form, the return value is 0. |
Example |
FormVal(Patient.PersonID, "TMJ Exam", "Clicking or popping") = 1 |
LastFormDate
Function |
LastFormDate |
Location in PracticeScript |
Functions->Practice Answer->User Form related |
Purpose |
Determines the date of the last time (if any) a particular User Defined form was added to the patient's chart. |
Format |
LastFormDate(PatientID, FormName, OptionalStartDate, OptionalEndDate) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. FormName is a character string that is the name of the form you are looking for. FormName needs to match the Form name field found on the Form Definition window when defining the form. The Form name is also displayed in the Description column of the User Forms Pick List. OptionalStartDate is the start of the date range to search for when the form was added to the chart. If not specified or if 0 is specified, the earliest possible date is assumed. OptionalEndDate is the end of the date range to search for when the form was added to the chart. If not specified or if 0 is specified, the largest possible date is assumed. |
Evaluates to |
The date that the form was most recently added to the patient's chart. If the form was NOT added in the date range specified, 0 is returned. |
Example |
LastFormDate(Patient.PersonID, "TMJ Exam") = 0 |
The Note related subcategory contains the following functions:
NoteDate
Function |
NoteDate |
Location in PracticeScript |
Functions->Practice Answers->Note related |
Purpose |
Calculates the date that a clinical note was added to the patient's chart (if ever) |
Format |
NoteDate(PatientID, SummaryTextToSearch, ExactMatch? OptionalStartDate, OptionalEndDate) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. SummaryTextToSearch is a string of characters used to search. The function is looking for a note that has a Note Summary that matches SummaryTextToSearch if not specified or if 0 is specified for this parameter, any note present in the specified date range is considered a match. ExactMatch? specifies whether the SummaryTextToSearch must match the Note Summary exactly. If ExactMatch? is TRUE (1), it must be an exact character match (with the exception of case - upper and lower case can be different). If ExactMatch? is FALSE (0), the note is considered a match if SummaryTextToSearch can be found anywhere in the Note Summary. OptionalStartDate is the start of the date range to begin looking for notes. If not specified or if 0 is specified, the earliest possible date is assumed. OptionalEndDate is the end of the date range to begin looking for notes. If not specified or if 0 is specified, the largest possible date is assumed. |
Evaluates to |
The number of days between 01-01-2000 and the date that the note was added to the patient's chart. If no note matching the criteria is found, 0 is returned. If more than one note matches the search criteria, the date of the most recent note is returned. |
Example |
NoteDate(Patient.PersonID, "Recall", FALSE) NoteDate(Patient.PersonID, "Recall", TRUE) NoteDate(Patient.PersonID, "Review", FALSE, Yesterday(), Yesterday()) = 0 |
NoteText
Function |
NoteText |
Location in PracticeScript |
Functions->Practice Answers->Note related |
Purpose |
Returns the contents of a clinical note in the patient's chart. |
Format |
NoteText(PatientID, SummaryTextToSearch, ExactMatch? OptionalStartDate, OptionalEndDate, IncludeSummary?, IncludeBody?) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. SummaryTextToSearch is a string of characters used to search. The function is looking for a note that has a Note Summary that matches SummaryTextToSearch. If not specified or if 0 is specified for this parameter, any note present in the specified date range is considered a match. ExactMatch? Specifies whether the SummaryTextToSearch must match the Note Summary exactly. If ExactMatch? Is TRUE (1), it must be an exact character match (with the exception of case - upper and lower case can be different). If ExactMatch? Is FALSE (0), the note is considered a match if SummaryTextToSearch can be found anywhere in the Note Summary. OptionalStartDate is the start of the date range to begin looking for notes. If not specified or if 0 is specified, the earliest possible date is assumed. OptionalEndDate is the end of the date range to begin looking for notes. If not specified or if 0 is specified, the largest possible date is assumed. IncludeSummary?, if TRUE (1), the Summary is included in the result. If not specified, TRUE is assumed. IncludeBody?, if TRUE (1), the body of the note is included in the result. If not specified, TRUE is assumed. |
Evaluates to |
A character string that is the contents of the specified note. Depending on the parameters passed to the function, the string contains the Summary, the note body, or both. If no note is found, the string is blank (a length of 0). If the summary and body are both included, they are separated by a colon (":"). |
Example |
NoteText(Patient.PersonID, "Recall", FALSE) NoteText(Patient.PersonID, "Recall", FALSE, LastWeek(), Today(), FALSE, TRUE) |
The Document related subcategory contains the following functions:
DocTitleLastPrint
Function |
DocTitleLastPrint |
Location in PracticeScript |
Functions->Practice Answers->Document related |
Purpose |
To determine the last date, if any, a particular document was printed. |
Format |
DocTitleLastPrint(PatientIDHere, TitleToSearchFor, ExactMatch?, OptionalStartDateRange, OptionalEndDateRange) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. |
Evaluates to |
The date of the most recent printing of the document for the patient. If none exists, 0 is returned. |
Example |
DocTitleLastPrint(Patient.PersonID, Accounts Recievable Letter #1, 0) |
DocCatLastPrint
Function |
DocCatLastPrint |
Location in PracticeScript |
Functions->Practice Answers->Document related |
Purpose |
Determines the last date a document in a specific category was printed (if ever). |
Format |
DocCatLastPrint(PatientIDHere, CategoryToSearchFor, OptionalStartDateRange, OptionalEndDateRange) PatientID is the internal ID of the patient. |
Evaluates to |
The date of the most recent printing of a document in a specific category. If none, 0 is returned. |
Example |
DocCatLastPrint(Patient.PersonID, A/R Letters) |
The Image related subcategory contains the following functions:
LastImageDate
Function |
LastImageDate |
Location in PracticeScript |
Functions->Practice Answers->Image related |
Purpose |
To determine the last date an intraoral camera image was taken for the patient (if any). |
Format |
LastImageDate(PatientID) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. |
Evaluates to |
The date of the most recent intra-oral camera image taken for the patient. If no intraoral camera images exist, 0 is returned. |
Example |
LastImageDate(Patient.PersonID) >= FirstOfYear() |
LastPortraitDate
Function |
LastPortraitDate |
Location in PracticeScript |
Functions->Practice Answers->Image related |
Purpose |
Determines the last date the patient's portrait was taken (if ever). |
Format |
LastPortraitDate(PatientID) |
Evaluates to |
The date of the most recent camera image taken of the patient's face. If no portrait has been taken, 0 is returned. |
Example |
Today() - LastPortraitDate(Patient.PersonID)) >= 730 NOTE: If the patient's portrait has never been taken, LastPortraitDate() evaluates to 0, and the left side of the expression is a large number always greater than 730; thus, the formula also evaluates to TRUE. |
The Insurance related subcategory contains the following function:
InsBenefitRemain
Function |
InsBenefitRemain |
Location in PracticeScript |
Functions->Practice Answers->Insurance Related |
Purpose |
Calculates the dollar amount of insurance benefits the patient has remaining in the year. |
Format |
InsBenefitRemain(PatientID, ConsiderSecondary) PatientID is the internal ID of the patient. Typically, this is the PracticeScript variable Patient.PersonID found at Fields->Data fields->Patient Info->Internal ID. ConsiderSecondary, if specified, determines if secondary insurance should be factored into the calculation. |
Evaluates to |
The dollar amount of remaining insurance benefits the patient has. Remaining benefit is defined as the Individual Annual Maximum minus the individual benefits used. If no benefits remain, 0 is returned. If the patient does not have insurance, minus 1 (-1) is returned. |
Example |
Assuming the patient's primary insurance has an annual maximum of $2,500, the secondary insurance has an annual maximum of $2,500, and the patient has used $2,000 in benefits: InsBenefitRemain(Patient.PersonID, FALSE) InsBenefitRemain(Patient.PersonID, TRUE) |
The Staff productivity related subcategory contains the following functions:
DaysWorked
Function |
DaysWorked |
Location in PracticeScript |
Functions->Practice Answers->Staff productivity related |
Purpose |
Calculates the number of days a particular staff member worked during a specified date range. |
Format |
DaysWorked(EmployeeID, StartDate, EndDate) EmployeeID is the ID number of the staff member. StartDate is the date the calculation is to begin. EndDate is the date the calculation is to end. |
Evaluates to |
The number of days the staff member worked during the specified period. A "Day worked" is defined as any day that has at least one dental or medical procedure posted to a patient's ledger using the EmployeeID as the Producer. |
Example |
DaysWorked(Emp.EmpID, FirstOfMonth(), Today()) |
MinutesWorked
Function |
MinutesWorked |
Location in PracticeScript |
Functions->Practice Answers->Staff productivity related |
Purpose |
Calculates the number of minutes a staff member worked during a specified date range. |
Format |
MinutesWorked(EmployeeID, StartDate, EndDate) EmployeeID is the ID number of the staff member. StartDate is the date the calculation is to begin. EndDate is the date the calculation is to end. |
Evaluates to |
The number of minutes the staff member worked during the specified period. The calculation is based on COMPLETED time card entries found in the Time Card system. If an entry has NOT been clocked out, but is included in the time period, it is ignored. |
Example |
MinutesWorked(Emp.EmpID, Today(), Today()) Emp.EmpID is the employee ID of the current employee record when processing a Staff member-based Analysis Expert cell. |
PatientsSeen
Function |
PatientsSeen |
Location in PracticeScript |
Functions->Practice Answers->Staff productivity related |
Purpose |
Calculates the number of patients a staff member has seen during a specified date range. |
Format |
PatientsSeen(EmployeeID, StartDate, EndDate) EmployeeID is the ID number of the staff member. StartDate is the date the calculation is to begin. EndDate is the date the calculation is to end. |
Evaluates to |
The number of patients the staff member worked on during the specified period. A "patient seen" is defined as any patient that has at least one dental or medical procedure posted to the ledger on a unique day using the EmployeeID as the Producer. If the same patient has been seen on more than one day, PatientsSeen() will count that patient more than once (once for each day seen). If two different staff members see a patient on the same day (e.g., the hygienist does a prophy and the doctor does an exam), the patient is counted for both staff members. |
Example |
PatientsSeen(Emp.EmpID, FirstOfMonth(), Today()) |
The Office related subcategory contains the following functions:
IncBusDay
Function |
IncBusDay |
Location in PracticeScript |
Functions->Practice Answers->Office related |
Purpose |
To increment the specified date by a specified number of business days (that is, days that the office is open for business). Can also be used to see if the office is open on a specified date. |
Format |
IncBusDay(BaseDate, NumDaysToIncrement) BaseDate is the date on which the calculation is based. NumDaysToIncrement is the number of business days to add to (or subtract from) BaseDate. |
Evaluates to |
A date that the office is known to be opened after adjusting BaseDate by the specified number of business days. |
Example |
IncBusDay(Today(), 2) Assuming the office is normally open Monday through Friday, and there are no holidays, this expression evaluates to Wednesday if today is a Monday. (Monday plus two working days = Wednesday.) If today is Thursday, this evaluates to the following Monday. (Thursday plus two working days = Monday.) IncBusDay(Today(), 0) = Today() |
NextOpenDay
Function |
NextOpenDay |
Location in PracticeScript |
Functions->Practice Answers->Office related |
Purpose |
Calculates the next business day that the office is open following the specified date. |
Format |
NextOpenDay(BaseDate) |
Evaluates to |
A date that the office is known to be open after adjusting BaseDate by 1. NextOpenDay() is functionally equivalent to IncBusDay(BaseDate, 1). For details about NextOpenDay() see the definition of IncBusDay(). |
Example |
NextOpenDay(Today()) |
PrevOpenDay
Function |
PrevOpenDay |
Location in PracticeScript |
Functions->Practice Answers->Office related |
Purpose |
Calculates the previous business day that the office is open prior to the specified date. |
Format |
PrevOpenDay(BaseDate) |
Evaluates to |
The most recent date the office was open prior to BaseDate. PrevOpenDay() is functionally equivalent to IncBusDay(BaseDate, -1). For details about PrevOpenDay(), see the definition of IncBusDay(). |
Example |
PrevOpenDay(Today()) |
The Charting related subcategory contains the following syntaxes used for building Contact Experts:
Last PSR score
Date of last PSR score
Date of last Perio exam
Teeth with pockets
Teeth with recession
Teeth with furcation
Teeth with attached gingiva
Teeth with mobility
Teeth with bleeding
Teeth with suppuration
Teeth with plaque
Teeth with calculus
HIPAA-related Contact Experts
The User Defined Contact Expert Pick List contains the following HIPAA-related Contact Experts:
HIPAA Acknowledgements in History
HIPAA Acknowledgements Not on File
HIPAA Authorizations in History
HIPAA Authorizations Not on File
HIPAA Complaints in History
HIPAA Consents in History
HIPAA Consents Not on File
HIPAA Disclosures in History
HIPAA Disclosures in Not on File
The syntaxes for these can be accessed from the Practice Answers function category.
To customize one of these experts:
From the User Defined Contact Expert Pick List, select the expert you want to customize, and click Edit. The User Defined Contact Expert Definition window is displayed.
Click Formula. The Include all records that match.. window is displayed.
In the Functions section, click the plus sign (+) next to Practice Answers to expand the list.
Scroll down and click the plus sign (+) next to HIPAA related to expand the list.
Use the functions in the list to edit the formula for the Contact Expert.
Click OK.
Prompt User for Info Functions