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

Intergy Version: 22.00.00.00

PatientRx

Table Definition  Parent Tables  Child Tables

Table Definition

Description: This table record a prescription for a patient.

Field Datatype Default Null Option Comment
RxSID INTEGER ?   MANDATORY System generated unique id using the RX sequence.
PracticeID INTEGER ?   MANDATORY FK
StaffID INTEGER ?   OPTIONAL FK
PatientID INTEGER ?   MANDATORY FK
DrugCode CHARACTER(6)   MANDATORY FK
SigCode CHARACTER(6)   OPTIONAL FK
RenewedRXNumber INTEGER ?   OPTIONAL FK
RxType CHARACTER(1)   OPTIONAL
DateWritten DATE   OPTIONAL User entered date that the physician wrote the prescription.
RxDirections CHAR(1000)   OPTIONAL User entered directions for taking the prescribed drug.
Quantity DECIMAL(10,3)   OPTIONAL User entered quantity of the drug prescribed .
Refills INTEGER 0   OPTIONAL User entered number of allowable refills.
DaysSupplied INTEGER 0   OPTIONAL User entered number of days supplied.
DispenseAsWritten CHARACTER(1)   OPTIONAL User entered flag to indicate if a generic drug is allowable. This is supported by the Confirmation Lookup.
RxDiscontinuedDate DATE   OPTIONAL User entered date that the prescription was stopped. This indicates that the patient has finished the prescription and is no longer taking the drug.
RxSendMode CHARACTER(1)   OPTIONAL User entered mode that the prescription will be sent to the pharmacy. Acceptable values are: P - Print , E - Electronic, T - Telephoned , D - Dispensed As Sample, H - Hand Written , O - Other and A - Administered
RxDURDone CHARACTER(1)   OPTIONAL System set flag to indicate the the drug utilization requirements have been done. Acceptable values are: 1 - DUR done , 2 - Formulary and 3 - Both
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.
PharmacyRxNumber CHARACTER(15)   OPTIONAL System set RxNumber that the pharmacy has assigned to the prescription. This value will only be filled in if the pharmacy electronically sends this information.
PharmacyID INTEGER ?   OPTIONAL System generated unique id using the Entity sequence.
OrigRxNumber INTEGER ?   MANDATORY FK
RxStatus CHARACTER(2)   OPTIONAL System defined. Status of prescription. Field is supported by the lookup types:[RXStatus]. Values are defined in the LookupCode table for the above lookup types.
PRNFlag CHARACTER(1)   OPTIONAL User-entered indicator to specify if the prescription has refills or is only prescribed on as as needed basis. Supported by lookup type Confirmation.
SIGDescription CHARACTER(60)   OPTIONAL Incoming SIG description. This is denormalized here since incoming descriptions cannot be matched 100% against the descriptions in the SIG table.
QuantityUnitOfMeasure CHARACTER(10)   OPTIONAL Units of measure associated with the quantity of the prescribed drug. Defined by LookupType: RxQuantityUOM & DoseUnitOfMeasure
EncounterSID INTEGER ?   OPTIONAL System generated unique id using Encounter sequence.
RefDoctorID INTEGER ?   OPTIONAL FK - Referring provider associated with a patient reported prescription
AllowLapse LOGICAL Logical_True   OPTIONAL Flag set to indicate whether a patient reported prescription should lapse. If the value is YES or ? then the prescription will lapse depending on the days supplied, quantity etc values. If the value is explicitly NO this prescription will never lapse. This feature may be useful during the DUR check.
RxDUROverrideReason CHARACTER(5000)   OPTIONAL DUR Override Reason Comment
ReIssueFromRxSID INTEGER ?   OPTIONAL Unique identifier of PatientRx record that was re-issued to create this record. This is an FK to PatientRx.
ReIssueToRxSID INTEGER ?   OPTIONAL Unique identifier of PatientRx record that was created when this record was re-issued. This is a FK to PatientRx.
SupervisingProviderID INTEGER ?   OPTIONAL FK - Staff The provider responsible for approving the prescription before it is issued.
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 Rx. NULL - The Rx does not require a Cosignature. The CosignActionDate will be NULL. 'W' - Waiting on supervisor to cosign the Rx. 'A' - Approved by the Supervising Provider. 'C' - Approved with Changes by the Supervising Provider. 'D' Denied by the Supervising Provider. The Rx will also be voided.
PrinterSID INTEGER ?   OPTIONAL FK - SystemPrinter Used to remember the printer selection of the initial provider. This allows the printer to be properly defaulted for the supervising provider.
AdminSite CHAR(20)   OPTIONAL The location on the body where the drug was administered. Based on lookup type: VacAdminSite
LotNumber CHARACTER(50)   OPTIONAL Lot number in which the drug was shipped from the manufacturer.
ExpirationDate DATE   OPTIONAL Date by which the drug must be administered.
Manufacturer CHARACTER(50)   OPTIONAL The name of the company that manufactured the drug. Based on lookup type: VacManufacturers
AdminTime INTEGER ?   OPTIONAL For administered drugs, the time the drug was administered.
RxReferenceNumber CHAR(35) Set_To_Empty_String   OPTIONAL This is the Message Reference Number received from the pharmacy. It gets populated on the "Denied with NEWRX to follow" refill request workflow. It needs to be stored because the Message Reference Number is sent back to the pharmacy on the NEWRX request resulting from the "Denied with NEWRX to follow" refill request.
HighRiskMed CHAR(1) No_Value__N_   OPTIONAL Rx High-risk Medication Indicator. This data is set by the user. Currently this will be a Y/N field. In the future we may want to add a third option that point to the reason that the medication is high risk.
AdminRoute CHAR(20)   OPTIONAL The route of the drug that was administered. Based on lookup type: RxRoute
FormularyPerformed LOGICAL Logical_False   OPTIONAL Indicates if a Formulary has been run for this drug.
OriginalDrugName CHAR(62)   OPTIONAL This field stores the name of the drug at the time it was prescribed. It is necessary to keep history in the cases when Drug.DNSortName changes during a drug update.
PharmacyNotes CHAR(210)   OPTIONAL Used to enter notes to the pharmacy.
ConcatenateSIGDirections LOGICAL Logical_True   OPTIONAL This flag indicates whether SIG Description and Rx Directions should be concatenated when sending Rx electronically.
RxGUID CHAR(36)   OPTIONAL Unique ID for the prescription. In case of EPCS prescription, this will be Dr. First SourcePrescriptionID which will be same as 10.6 MessageID.
PriorAuthorizationNumber CHAR(35)   OPTIONAL Prior Authorization Number.
RxNormCode CHAR(10)   OPTIONAL The RxNorm Code - Holds the utilized RxNormCode whether the drug is Generic or Branded.
PatientRxGUID CHAR(36)   OPTIONAL Unique ID for the prescription. In case of Electronic prescription, this will be MessageID in 10.6 message header.
CancelRxGUID CHAR(36)   OPTIONAL Unique ID for electronically cancelled prescription.
NDC CHAR(30) Set_To_Empty_String   OPTIONAL FK to DrugNDCDetail. NDC code that was selected at the time of issuing the medication.
GenericRxNormCode CHAR(10)   OPTIONAL The Generic RxNorm code.
PAReferenceID CHARACTER(36)   OPTIONAL
PAStatus CHARACTER(5)   OPTIONAL Lookup Type PriorAuthorizationStatus. If the status is Requested, the user selected to send a PAInitiationRequest. If the PAReferenceID exists, the PAInitiationRequest was sent.
CreateDateTimeUTC DATETIME-TZ   OPTIONAL This is a denormalized field based off the CreateStamp. This field contains the Date, Time and timezone offset.
EMCalcRiskLevel INTEGER ?   OPTIONAL Medication Risk Level used for calculation of E&M Risk. Essentially a Medcin defined or override Risk Level in E&M Calculator
RxChangeResponseGUID CHAR(36)   OPTIONAL MessageID of the outgoing RxChangeResponse for Prescriber Authorization and Prior Authorization Change Requests.
TimeStampUTC DATETIME-TZ   OPTIONAL This is a denormalized field based off the TimeStamp. This field contains the Date, Time and timezone offset.
ConfidentialityLevel CHAR(2) Alpha_-_N   OPTIONAL The field will hold Confidentiality Level of a Medication (based on InteropConfLevel LookupType).
PPIID CHARACTER(20)   OPTIONAL The optional PPI ID associated with this Rx. Only applicable for electronic Rx.
SendRxText CHARACTER(1)   OPTIONAL To remember patient's consent for RxInform. It is associated with this Rx only. Only applicable for electronic Rx. "", "Y", "N" will indicate Consent not taken, Consent 'Yes' and Consent 'No' respectively.

Parent Tables
Parent TableJoin PhraseWhen deleting parent record...
Staff PatientRx.PracticeID = Staff.PracticeID and
PatientRx.SupervisingProviderID = Staff.StaffID
RESTRICT if PatientRx exists
PatientRx PatientRx.ReIssueToRxSID = PatientRx.RxSID SET NULL if PatientRx exists
PatientRx PatientRx.ReIssueFromRxSID = PatientRx.RxSID SET NULL if PatientRx exists
RefDoctor PatientRx.RefDoctorID = RefDoctor.RefDoctorID SET NULL if PatientRx exists
Encounter PatientRx.EncounterSID = Encounter.EncounterSID NONE if PatientRx exists
PatientRx PatientRx.OrigRxNumber = PatientRx.RxSID NONE if PatientRx exists
PatientRx PatientRx.RenewedRXNumber = PatientRx.RxSID RESTRICT if PatientRx exists
Staff PatientRx.PracticeID = Staff.PracticeID and
PatientRx.StaffID = Staff.StaffID
RESTRICT if PatientRx exists
Patient PatientRx.PracticeID = Patient.PracticeID and
PatientRx.PatientID = Patient.PatientID
RESTRICT if PatientRx exists

Child Tables
Child TableJoin PhraseWhen deleting PatientRx record...
PriorAuthInfoResponse PriorAuthInfoResponse.RxSID = PatientRx.RxSID CASCADE if PriorAuthInfoResponse exists
PriorAuthInfo PriorAuthInfo.RxSID = PatientRx.RxSID CASCADE if PriorAuthInfo exists
RxChangeRequest RxChangeRequest.RxSID = PatientRx.RxSID RESTRICT if RxChangeRequest exists
PatientRxFill PatientRxFill.RxSID = PatientRx.RxSID CASCADE if PatientRxFill exists
PatientRxActivity PatientRxActivity.RxSID = PatientRx.RxSID CASCADE if PatientRxActivity exists
RxRequest RxRequest.RxSIDToBeIssued = PatientRx.RxSID SET NULL if RxRequest exists
PatientRx PatientRx.ReIssueToRxSID = PatientRx.RxSID SET NULL if PatientRx exists
PatientRx PatientRx.ReIssueFromRxSID = PatientRx.RxSID SET NULL if PatientRx exists
PatientRxDenial PatientRxDenial.OrigRxNumber = PatientRx.RxSID CASCADE if PatientRxDenial exists
PatientRxDenial PatientRxDenial.RenewedRxNumber = PatientRx.RxSID CASCADE if PatientRxDenial exists
PatientRx PatientRx.OrigRxNumber = PatientRx.RxSID NONE if PatientRx exists
PatientRx PatientRx.RenewedRXNumber = PatientRx.RxSID RESTRICT if PatientRx exists
RxDiagnosis RxDiagnosis.RxSID = PatientRx.RxSID CASCADE if RxDiagnosis exists
RxNote RxNote.RxSID = PatientRx.RxSID CASCADE if RxNote exists
RxRequest RxRequest.RxSIDToBeRenewed = PatientRx.RxSID SET NULL if RxRequest exists