You can set up Tablet Rules that will automatically show appointment-specific forms. These can be very useful for collecting relevant information from patients before their appointment without having to manually add forms to their queue.
For example, if a patient is booked for a "back pain" appointment, they could automatically be presented with a Back Pain eForm.
Please Note: For all examples provided, Ocean is expecting an exact, case-sensitive, match on your appointment types/reasons. For example, Ocean considers "COPD" and "copd" to be two different terms. Ensure the values entered into your tablet rules are an exact match to your EMR appointment configuration.
For all examples provided below, pt.getReasonForVisit()
sources the information set under the appointment "Type" dropdown in the corresponding PS Suite and Med Access booking windows.
Replace instances of "apptType" with the corresponding value from your EMR.
Appointment type is:
If you need to match against a single appointment type.
pt.getReasonForVisit() != null && pt.getReasonForVisit() == "apptType"
Copy Rule
pt.getReasonForVisit() != null && pt.getReasonForVisit() == "COPD"
Appointment type is not:
If you need to exclude a single appointment type but match on all other types.
pt.getReasonForVisit() != null && pt.getReasonForVisit() != "apptType"
Copy Rule
Appointment type is one of:
Match on one or more appointment types.
pt.getReasonForVisit() != null && (pt.getReasonForVisit() == "apptType1" || pt.getReasonForVisit() == "apptType2")
Copy Rule
pt.getReasonForVisit() == ""
functions separated by ||
("or") operators.Appointment type is not one of:
Exclude one or more appointment types, but match on all other types.
pt.getReasonForVisit() != null && pt.getReasonForVisit() != "apptType1" && pt.getReasonForVisit() != "apptType2"
Copy Rule
pt.getReasonForVisit() != ""
functions separated by &&
("and") operators.Appointment type contains:
Match appointment type(s) by a partial or common value.
pt.getReasonForVisit() != null && pt.getReasonForVisit().includes("apptType")
Copy Rule
Example: If you have a series of appointments containing common terms — Virtual Follow-Up, Virtual COPD, Virtual Prescription — you can match against the common term "Virtual" to target all appointment types.
Please note: The includes()
function matches against all instances of the supplied value, meaning something like "Virtually" would also be considered a match as it contains the term "Virtual."
Appointment type does not contain:
Exclude appointment type(s) by a partial or common value.
pt.getReasonForVisit() != null && !pt.getReasonForVisit().includes("apptType")
Copy Rule
For all examples provided below, @ptVisitType
sources the information set under the appointment "Type" dropdown in the booking dialogue window.
Replace instances of "apptType" with the corresponding value from your EMR.
Appointment type is:
If you need to match against a single appointment type.
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType") == "apptType"
Copy Rule
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType") == "COPD"
Appointment type is not:
If you need to exclude a single appointment type but match on all other types.
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType") != "apptType"
Copy Rule
Appointment type is one of:
Match on one or more appointment types.
ScriptUtil.getKeyword("@ptVisitType") != null && (ScriptUtil.getKeyword("@ptVisitType") == "apptType1" || ScriptUtil.getKeyword("@ptVisitType") == "apptType2")
Copy Rule
ScriptUtil.getKeyword("@ptVisitType")
functions separated by ||
("or") operators.Appointment type is not one of:
Exclude one or more appointment types, but match on all other types.
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType") != "apptType1" && ScriptUtil.getKeyword("@ptVisitType") != "apptType2"
Copy Rule
ScriptUtil.getKeyword("@ptVisitType") != ""
functions separated by &&
("and") operators.Appointment type contains:
Match appointment type(s) by a partial or common value.
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType").includes("apptType")
Copy Rule
Example: If you have a series of appointments containing common terms — Virtual Follow-Up, Virtual COPD, Virtual Prescription — you can match against the common term "Virtual" to target all appointment types.
Please note: The includes()
function matches against all instances of the supplied value, meaning something like "Virtually" would also be considered a match, as it contains the term "Virtual."
Appointment type does not contain:
Exclude appointment type(s) by a partial or common value.
ScriptUtil.getKeyword("@ptVisitType") != null && !ScriptUtil.getKeyword("@ptVisitType").includes("apptType")
Copy Rule
For all examples provided below, @ptApptReason
sources the information set under the appointment "Reason" dropdown in the booking dialogue window.
Replace instances of "apptReason" with the corresponding value from your EMR.
Appointment reason is:
If you need to match against a single appointment reason.
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason") == "apptReason"
Copy Rule
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason") == "COPD"
Appointment reason is not:
If you need to exclude a single appointment reason but match on all other reasons.
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason") != "apptReason"
Copy Rule
Appointment reason is one of:
Match on one or more appointment reasons.
ScriptUtil.getKeyword("@ptApptReason") != null && (ScriptUtil.getKeyword("@ptApptReason") == "apptReason1" || ScriptUtil.getKeyword("@ptApptReason") == "apptReason2")
Copy Rule
ScriptUtil.getKeyword("@ptApptReason")
functions separated by ||
("or") operators.Appointment reason is not one of:
Exclude one or more appointment reasons, but match on all other reasons.
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason") != "apptReason1" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason2"
Copy Rule
ScriptUtil.getKeyword("@ptApptReason") != ""
functions separated by &&
("and") operators.Appointment reason contains:
Match appointment reason(s) by a partial or common value.
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason").includes("apptReason")
Copy Rule
Example: If you have a series of appointments containing common terms — Virtual Follow-Up, Virtual COPD, Virtual Prescription — you can match against the common term "Virtual" to target all appointment reasons.
Please note: The includes()
function matches against all instances of the supplied value, meaning something like "Virtually" would also be considered a match, as it contains the term "Virtual."
Appointment reason does not contain:
Exclude appointment reason(s) by a partial or common value.
ScriptUtil.getKeyword("@ptApptReason") != null && !ScriptUtil.getKeyword("@ptApptReason").includes("apptReason")
Copy Rule
For all examples provided below, pt.getReasonForVisit()
sources the information set under the appointment "Reason" and "Type" dropdowns in the booking dialogue window.pt.getReasonForVisit()
combines both values into a single entry connected with a dash. (See examples below.)
Replace instances of "apptType-apptReason" with the corresponding type and reason values from your EMR.
Appointment type and reason are:
If you need to match against an appointment with a specific type and reason.
pt.getReasonForVisit() != null && pt.getReasonForVisit() == "apptType-apptReason"
Copy Rule
pt.getReasonForVisit() != null && pt.getReasonForVisit() == "COPD-Follow Up"
Appointment type and reason are not:
If you need to exclude an appointment with a specific type and reason, but match on all other types and reasons.
pt.getReasonForVisit() != null && pt.getReasonForVisit() != "apptType-apptReason"
Copy Rule
Appointment type and reason are one of:
Match on one or more pairs of appointment types and reasons.
pt.getReasonForVisit() != null && (pt.getReasonForVisit() == "apptType-apptReason1" || pt.getReasonForVisit() == "apptType-apptReason2")
Copy Rule
pt.getReasonForVisit()
functions separated by ||
("or") operators.Appointment type and reason are not one of:
Exclude one or more pairs of appointment types and reasons, but match on all other types and reasons.
pt.getReasonForVisit() != null && (pt.getReasonForVisit() != "apptType-apptReason1" && pt.getReasonForVisit() != "apptType-apptReason2")
Copy Rule
pt.getReasonForVisit()
functions separated by &&
("and") operators.Appointment type and/or reason contains:
Match appointment type(s) and/or reason(s) by a partial or common value.
pt.getReasonForVisit() != null && pt.getReasonForVisit().includes("apptType-apptReason")
Copy Rule
Example: If you have a series of appointments containing common terms — Virtual-Follow-Up, Virtual-COPD, Virtual-Prescription — you can match against the common term "Virtual" to target all appointment types/reasons.
Please note: The includes()
function matches against all instances of the supplied value, meaning something like "Virtually" would also be considered a match, as it contains the term "Virtual."
Appointment type and/or reason does not contain:
Exclude appointment type(s) and reason(s) by a partial or common value.
pt.getReasonForVisit() != null && !pt.getReasonForVisit().includes("apptType-apptReason")
Copy Rule
For all examples provided below, ScriptUtil.getKeyword("@ptVisitType")
sources the information set under the appointment "Type" dropdown and ScriptUtil.getKeyword("@ptApptReason")
sources the information set under the appointment "Reason" dropdown in the booking dialogue window.
Replace instances of "apptType" and "apptReason" with the corresponding type and reason values from your EMR.
Appointment type and reason are:
If you need to match against an appointment with a specific type and reason.
pt.getReasonForVisit() != null && (ScriptUtil.getKeyword("@ptVisitType") == "apptType" && ScriptUtil.getKeyword("@ptApptReason") == "apptReason")
Copy Rule
pt.getReasonForVisit() != null && (ScriptUtil.getKeyword("@ptVisitType") == "COPD" && ScriptUtil.getKeyword("@ptApptReason") == "Follow Up")
Appointment type and reason are not:
If you need to exclude an appointment with a specific type and reason, but match on all other types and reasons.
pt.getReasonForVisit() != null && ScriptUtil.getKeyword("@ptVisitType") != "apptType" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason"
Copy Rule
Appointment type and reason are one of:
Match on one or more pairs of appointment types and reasons.
pt.getReasonForVisit() != null && ((ScriptUtil.getKeyword("@ptVisitType") == "apptType" && ScriptUtil.getKeyword("@ptApptReason") == "apptReason") || (ScriptUtil.getKeyword("@ptVisitType") == "apptType2" && ScriptUtil.getKeyword("@ptApptReason") == "apptReason2"))
Copy Rule
(ScriptUtil.getKeyword("@ptVisitType") == "apptType" && ScriptUtil.getKeyword("@ptApptReason") == "apptReason")
functions separated by ||
("or") operators.Appointment type and reason are not one of:
Exclude one or more pairs of appointment types and reasons, but match on all other types and reasons.
pt.getReasonForVisit() != null && ScriptUtil.getKeyword("@ptVisitType") != "apptType" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason" && ScriptUtil.getKeyword("@ptVisitType") != "apptType2" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason2"
Copy Rule
ScriptUtil.getKeyword("@ptVisitType") != "apptType" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason"
functions separated by &&
("and") operators.Appointment type and/or reason contains:
Match appointment type(s) and/or reason(s) by a partial or common value.
pt.getReasonForVisit() != null && (ScriptUtil.getKeyword("@ptVisitType").includes("apptType") && ScriptUtil.getKeyword("@ptApptReason").includes("apptReason"))
Copy Rule
Example: If you have a series of appointments containing common terms — Type: Virtual, Reason: Follow Up; Type: Virtual, Reason: COPD; Type: Virtual, Reason: Prescription — you can match against the common term "Virtual" to target all appointment types and reasons.
Please note: The includes()
function matches against all instances of the supplied value, meaning something like "Virtually" would also be considered a match, as it contains the term "Virtual."
Appointment type and/or reason does not contain:
Exclude appointment type(s) and reason(s) by a partial or common value.
pt.getReasonForVisit() != null && !ScriptUtil.getKeyword("@ptVisitType").includes("apptType") && !ScriptUtil.getKeyword("@ptApptReason").includes("apptReason")
Copy Rule
For all examples provided below, @ptVisitType
sources the information set under the appointment "Type" dropdown in the booking dialogue window.
Replace instances of "apptType" with the corresponding value from your EMR.
Appointment type is:
If you need to match against a single appointment type.
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType") == "apptType"
Copy Rule
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType") == "COPD"
Appointment type is not:
If you need to exclude a single appointment type but match on all other types.
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType") != "apptType"
Copy Rule
Appointment type is one of:
Match on one or more appointment types.
ScriptUtil.getKeyword("@ptVisitType") != null && (ScriptUtil.getKeyword("@ptVisitType") == "apptType1" || ScriptUtil.getKeyword("@ptVisitType") == "apptType2")
Copy Rule
ScriptUtil.getKeyword("@ptVisitType")
functions separated by ||
("or") operators.Appointment type is not one of:
Exclude one or more appointment types, but match on all other types.
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType") != "apptType1" && ScriptUtil.getKeyword("@ptVisitType") != "apptType2"
Copy Rule
ScriptUtil.getKeyword("@ptVisitType") != ""
functions separated by &&
("and") operators.Appointment type contains:
Match appointment type(s) by a partial or common value.
ScriptUtil.getKeyword("@ptVisitType") != null && ScriptUtil.getKeyword("@ptVisitType").includes("apptType")
Copy Rule
Example: If you have a series of appointments containing common terms — Virtual Follow-Up, Virtual COPD, Virtual Prescription — you can match against the common term "Virtual" to target all appointment types.
Please note: The includes()
function matches against all instances of the supplied value, meaning something like "Virtually" would also be considered a match, as it contains the term "Virtual."
Appointment type does not contain:
Exclude appointment type(s) by a partial or common value.
ScriptUtil.getKeyword("@ptVisitType") != null && !ScriptUtil.getKeyword("@ptVisitType").includes("apptType")
Copy Rule
For all examples provided below, @ptApptReason
sources the information set under the appointment "Reason" dropdown menu in the booking dialogue window.
The @ptApptReason
keyword cannot read any content written into the "Reason" text area.
Replace instances of "apptReason" with the corresponding value from your EMR.
Appointment reason is:
If you need to match against a single appointment reason.
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason") == "apptReason"
Copy Rule
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason") == "COPD"
Appointment reason is not:
If you need to exclude a single appointment reason but match on all other reasons.
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason") != "apptReason"
Copy Rule
Appointment reason is one of:
Match on one or more appointment reasons.
ScriptUtil.getKeyword("@ptApptReason") != null && (ScriptUtil.getKeyword("@ptApptReason") == "apptReason1" || ScriptUtil.getKeyword("@ptApptReason") == "apptReason2")
Copy Rule
ScriptUtil.getKeyword("@ptApptReason")
functions separated by ||
("or") operators.Appointment reason is not one of:
Exclude one or more appointment reasons, but match on all other reasons.
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason") != "apptReason1" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason2"
Copy Rule
ScriptUtil.getKeyword("@ptApptReason") != ""
functions separated by &&
("and") operators.Appointment reason contains:
Match appointment reason(s) by a partial or common value.
ScriptUtil.getKeyword("@ptApptReason") != null && ScriptUtil.getKeyword("@ptApptReason").includes("apptReason")
Copy Rule
Example: If you have a series of appointments containing common terms — Virtual Follow-Up, Virtual COPD, Virtual Prescription — you can match against the common term "Virtual" to target all appointment reasons.
Please note: The includes()
function matches against all instances of the supplied value, meaning something like "Virtually" would also be considered a match, as it contains the term "Virtual."
Appointment reason does not contain:
Exclude appointment reason(s) by a partial or common value.
ScriptUtil.getKeyword("@ptApptReason") != null && !ScriptUtil.getKeyword("@ptApptReason").includes("apptReason")
Copy Rule
For all examples provided below, pt.getReasonForVisit()
sources the information set under the appointment "Type" dropdown and "Reason" text area in the booking dialogue window.pt.getReasonForVisit()
combines both values into a single entry connected with a dash. (See examples below.)
The pt.getReasonForVisit()
function cannot read any information defined via the "Reason" dropdown menu.
Replace instances of "apptType-apptReason" with the corresponding type and reason values from your EMR.
Appointment type and reason are:
If you need to match against an appointment with a specific type and reason.
pt.getReasonForVisit() != null && pt.getReasonForVisit() == "apptType-apptReason"
Copy Rule
pt.getReasonForVisit() != null && pt.getReasonForVisit() == "COPD-Follow Up"
Appointment type and reason are not:
If you need to exclude an appointment with a specific type and reason, but match on all other types and reasons.
pt.getReasonForVisit() != null && pt.getReasonForVisit() != "apptType-apptReason"
Copy Rule
Appointment type and reason are one of:
Match on one or more pairs of appointment types and reasons.
pt.getReasonForVisit() != null && (pt.getReasonForVisit() == "apptType-apptReason1" || pt.getReasonForVisit() == "apptType-apptReason2")
Copy Rule
pt.getReasonForVisit()
functions separated by ||
("or") operators.Appointment type and reason are not one of:
Exclude one or more pairs of appointment types and reasons, but match on all other types and reasons.
pt.getReasonForVisit() != null && (pt.getReasonForVisit() != "apptType-apptReason1" && pt.getReasonForVisit() != "apptType-apptReason2")
Copy Rule
pt.getReasonForVisit()
functions separated by &&
("and") operators.Appointment type and/or reason contains:
Match appointment type(s) and/or reason(s) by a partial or common value.
pt.getReasonForVisit() != null && pt.getReasonForVisit().includes("apptType-apptReason")
Copy Rule
Example: If you have a series of appointments containing common terms — Virtual-Follow-Up, Virtual-COPD, Virtual-Prescription — you can match against the common term "Virtual" to target all appointment types/reasons.
Please note: The includes()
function matches against all instances of the supplied value, meaning something like "Virtually" would also be considered a match, as it contains the term "Virtual."
Appointment type and/or reason does not contain:
Exclude appointment type(s) and reason(s) by a partial or common value.
pt.getReasonForVisit() != null && !pt.getReasonForVisit().includes("apptType-apptReason")
Copy Rule
For all examples provided below, ScriptUtil.getKeyword("@ptVisitType")
sources the information set under the appointment "Type" dropdown and ScriptUtil.getKeyword("@ptApptReason")
sources the information set under the appointment "Reason" dropdown in the booking dialogue window.
The @ptApptReason
keyword cannot read any content written into the "Reason" text area.
Replace instances of "apptType" and "apptReason" with the corresponding type and reason values from your EMR.
Appointment type and reason are:
If you need to match against an appointment with a specific type and reason.
pt.getReasonForVisit() != null && (ScriptUtil.getKeyword("@ptVisitType") == "apptType" && ScriptUtil.getKeyword("@ptApptReason") == "apptReason")
Copy Rule
pt.getReasonForVisit() != null && (ScriptUtil.getKeyword("@ptVisitType") == "COPD" && ScriptUtil.getKeyword("@ptApptReason") == "Follow Up")
Appointment type and reason are not:
If you need to exclude an appointment with a specific type and reason, but match on all other types and reasons.
pt.getReasonForVisit() != null && ScriptUtil.getKeyword("@ptVisitType") != "apptType" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason"
Copy Rule
Appointment type and reason are one of:
Match on one or more pairs of appointment types and reasons.
pt.getReasonForVisit() != null && ((ScriptUtil.getKeyword("@ptVisitType") == "apptType" && ScriptUtil.getKeyword("@ptApptReason") == "apptReason") || (ScriptUtil.getKeyword("@ptVisitType") == "apptType2" && ScriptUtil.getKeyword("@ptApptReason") == "apptReason2"))
Copy Rule
(ScriptUtil.getKeyword("@ptVisitType") == "apptType" && ScriptUtil.getKeyword("@ptApptReason") == "apptReason")
functions separated by ||
("or") operators.Appointment type and reason are not one of:
Exclude one or more pairs of appointment types and reasons, but match on all other types and reasons.
pt.getReasonForVisit() != null && ScriptUtil.getKeyword("@ptVisitType") != "apptType" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason" && ScriptUtil.getKeyword("@ptVisitType") != "apptType2" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason2"
Copy Rule
ScriptUtil.getKeyword("@ptVisitType") != "apptType" && ScriptUtil.getKeyword("@ptApptReason") != "apptReason"
functions separated by &&
("and") operators.Appointment type and/or reason contains:
Match appointment type(s) and/or reason(s) by a partial or common value.
pt.getReasonForVisit() != null && (ScriptUtil.getKeyword("@ptVisitType").includes("apptType") && ScriptUtil.getKeyword("@ptApptReason").includes("apptReason"))
Copy Rule
Example: If you have a series of appointments containing common terms — Type: Virtual, Reason: Follow Up; Type: Virtual, Reason: COPD; Type: Virtual, Reason: Prescription — you can match against the common term "Virtual" to target all appointment types and reasons.
Please note: The includes()
function matches against all instances of the supplied value, meaning something like "Virtually" would also be considered a match, as it contains the term "Virtual."
Appointment type and/or reason does not contain:
Exclude appointment type(s) and reason(s) by a partial or common value.
pt.getReasonForVisit() != null && !ScriptUtil.getKeyword("@ptVisitType").includes("apptType") && !ScriptUtil.getKeyword("@ptApptReason").includes("apptReason")
Copy Rule
Appointment-based tablet rules are only available for integrated Ocean sites using PS Suite, Med Access, Accuro, or OSCAR Pro EMRs.
For more information on setting up tablet rules, and examples of helpful rules, please refer to the "Tablet Rules" guide.