Last Updated: 7/22/2025 8:42:49 PM

Intergy Version: 22.00.00.00

PatientOrderSet

Table Definition  Parent Tables  Child Tables

Table Definition

Description: This table stores patient order header information.

Field Datatype Default Null Option Comment
PatientOrderSetSID INTEGER ?   MANDATORY System-defined. System generated unique id using the "OMOrder" sequence.
PracticeID INTEGER ?   MANDATORY FK - Practice
PatientID INTEGER ?   MANDATORY FK - Patient.
ProviderID INTEGER ?   MANDATORY FK - From Provider. This is the ordering provider of the set of orders for the patient. It could be different from the encounter provider.
OrderSetType CHARACTER(6)   MANDATORY Indicates which type of OrderSet this is. Possible values: 'OMOrder', 'LabReq', 'Cardio'
EncounterSID INTEGER ?   OPTIONAL FK - Encounter. As of V4, Lab Orders will be stored in this table. Intergy and EHR PDA do not yet require Encounters for Lab Orders. Therefore, Encounter will not be required on this table. However, as a business rule to be enforced in code, all other order types must have an Encounter.
PatientOrderSetStatus CHARACTER(1)   MANDATORY Indicates status of the Patient Order Set. Possible values: re(Q)uested, (O)rdered, re(S)ulted, (C)losed, (V)oided).
SendToUser INTEGER ?   OPTIONAL FK - MMUser. User currently responsible for work on the order. This field is updated by the system.
RefDoctorID INTEGER ?   OPTIONAL FK - RefDoctor.
Priority INTEGER   MANDATORY User assigned Order Set priority.
DueDate DATE   OPTIONAL Order due date. The Order due date is user entered but defaulted based on the Order Group setup.
Comments CHAR(28000)   OPTIONAL User entered comments regarding the order set.
TimeStamp CHARACTER(14)   OPTIONAL System generated date/time stamp record was last written.
LastUser INTEGER ?   OPTIONAL User ID of user that last wrote the record.
CreateStamp CHARACTER(14)   OPTIONAL System generated date/time stamp record was created.
CreateUser INTEGER ?   OPTIONAL User ID of user that created the record.
EnteredByStamp CHARACTER(14)   OPTIONAL Date/Time of when this Order was entered into the system.
EnteredByUser INTEGER ?   OPTIONAL User who entered the data into the system.
ResultsRequired LOGICAL Logical_False   MANDATORY Indicates that results are required all of the line tems on the order. Possible values: (Y)es (N)o
DNOMOrderGroupSID INTEGER ?   OPTIONAL Denormalized from OMOrderGroup.OMOrderGroupSID. This is the "OrderSet's Type".
DNOMOrderSubGroupSID INTEGER ?   OPTIONAL Denormalized from OMOrderGroup.OMOrderGroupSID. This is the OrderSet's "SubType Code"
DNOpen LOGICAL Logical_True   MANDATORY Indicates that an order is Open. This data is maintained by database triggers. It will be very helpful in the OpenOrders browser in IEHR. Ordered, Requested, and Resulted orders will be considered Open. Void, Closed orders will be considered closed.
SupervisingProviderID INTEGER ?   OPTIONAL FK - Staff The provider responsible for approving the order before it is marked with an Ordered status.
CosignActionDate DATE   OPTIONAL The date that the current Cosign action status was set.
CosignActionStatus CHARACTER(1)   OPTIONAL This represents the last action that was performed by the supervisor for this Order. NULL - The Order does not require a Cosignature. The CosignActionDate will be NULL. 'W' - Waiting on supervisor to cosign the Order. 'A' - Approved by the Supervising Provider. 'C' - Approved with changes by the Supervising Provider. 'D' Denied by the Supervising Provider. The order should also be voided.
RequestTaskUser INTEGER ?   OPTIONAL FK - From MMUser User to receive the request task for the order.
SignStatus CHAR(1) Alpha_-_O   MANDATORY Sign Status of the Order. Possible values include - 'O' to indicate that Order is Open. This mostly applies to previously created orders in the System. 'U' to indicate that the Order is 'Unsigned'. Meaning saved in the System and is pending a review by Encounter Provider. 'S' to indicate that Order is 'Signed'. Meaning reviewed and/or saved by Encounter Provider.
SignStamp CHAR(14)   OPTIONAL Date/Time of when this Order was Signed by the user.
SignUser INTEGER 0   OPTIONAL User Id of the user that Signed the Order into the system.
RelayMethod CHAR(1)   OPTIONAL This represents how the Order was relayed to the User. Possible values are defined by the OrderRelayMethod LookupType.
RefAuthNumber CHAR(30)   OPTIONAL Referral authorization number.
PatientOrderCloseReason CHARACTER(6) Set_To_Empty_String   OPTIONAL Used for selecting the reason for closing an order that was not performed. Defined by OrderCloseReason LookupType.
CreateDateTimeUTC DATETIME-TZ   OPTIONAL This is a denormalized field based off the CreateStamp. This field contains the Date, Time and timezone offset.
EnteredByStampUTC DATETIME-TZ   OPTIONAL This is a denormalized field based off the EnteredByStamp. This field contains the Date, Time and timezone offset.
TimeStampUTC DATETIME-TZ   OPTIONAL This is a denormalized field based off the TimeStamp. This field contains the Date, Time and timezone offset.
OrderGroupType CHARACTER(6)   OPTIONAL System-defined categorization of Order Group's Type. Used to support logic only relevant to some Order Groups. Possible Values : (Ref)erral

Parent Tables
Parent TableJoin PhraseWhen deleting parent record...
MMUser PatientOrderSet.RequestTaskUser = MMUser.MMUserSID RESTRICT if PatientOrderSet exists
Staff PatientOrderSet.PracticeID = Staff.PracticeID and
PatientOrderSet.SupervisingProviderID = Staff.StaffID
RESTRICT if PatientOrderSet exists
Provider PatientOrderSet.ProviderID = Provider.ProviderID RESTRICT if PatientOrderSet exists
MMUser PatientOrderSet.SendToUser = MMUser.MMUserSID RESTRICT if PatientOrderSet exists
Patient PatientOrderSet.PracticeID = Patient.PracticeID and
PatientOrderSet.PatientID = Patient.PatientID
RESTRICT if PatientOrderSet exists
Encounter PatientOrderSet.EncounterSID = Encounter.EncounterSID SET NULL if PatientOrderSet exists
RefDoctor PatientOrderSet.RefDoctorID = RefDoctor.RefDoctorID SET NULL if PatientOrderSet exists

Child Tables
Child TableJoin PhraseWhen deleting PatientOrderSet record...
Charge Charge.PatientOrderSetSID = PatientOrderSet.PatientOrderSetSID RESTRICT if Charge exists
CardioOrder CardioOrder.PatientOrderSetSID = PatientOrderSet.PatientOrderSetSID SET NULL if CardioOrder exists
PatientOrderSetResult PatientOrderSetResult.PatientOrderSetSID = PatientOrderSet.PatientOrderSetSID CASCADE if PatientOrderSetResult exists
LabOrder LabOrder.PatientOrderSetSID = PatientOrderSet.PatientOrderSetSID SET NULL if LabOrder exists
PatientOMOrderSet PatientOMOrderSet.PatientOrderSetSID = PatientOrderSet.PatientOrderSetSID CASCADE if PatientOMOrderSet exists
CLWCorrespondence CLWCorrespondence.PatientOrderSetSID = PatientOrderSet.PatientOrderSetSID SET NULL if CLWCorrespondence exists
PatientOrderSetAttr PatientOrderSetAttr.PatientOrderSetSID = PatientOrderSet.PatientOrderSetSID CASCADE if PatientOrderSetAttr exists
PatientOMOrderLineItem PatientOMOrderLineItem.PatientOrderSetSID = PatientOrderSet.PatientOrderSetSID CASCADE if PatientOMOrderLineItem exists
PatientOrderSetActivity PatientOrderSetActivity.PatientOrderSetSID = PatientOrderSet.PatientOrderSetSID CASCADE if PatientOrderSetActivity exists