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

Intergy Version: 22.00.00.00

RefDoctor

Table Definition  Parent Tables  Child Tables

Table Definition

Description: This table is used to record the referring doctors.

Field Datatype Default Null Option Comment
RefDoctorID INTEGER ?   MANDATORY FK
RecordStatus CHARACTER(1)   MANDATORY User selected record status for the referring doctor. RecordStatus is defined in the LookupCode table for the lookup type 'RecordStatus'. Codes for lookup type 'RecordStatus' are not user definable. Valid codes are (A)ctive and (I)nactive.
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.
DNSortName CHAR(170)   MANDATORY Denormalized name for providing sorted name list. Write trigger maintains this field. Field used to improve performance of referring provider searches.
Class CHARACTER(6)   OPTIONAL User entered referring provider class. Field is supported by the lookup type RefProviderClass.
DNFirstName CHAR(35)   OPTIONAL Denormalized for performance reasons from the Provider table. Do not write to this field. The write triggers will keep field up-to-date.
DNMiddleName CHAR(35)   OPTIONAL Denormalized for performance reasons from the Provider table. Do not write to this field. The write triggers will keep field up-to-date.
DefaultSpecialtyCode CHARACTER(10)   OPTIONAL User entered. Specialty code. If it is a taxonomy specialty code, the first two characters must represent the provider type as validated by the lookup type mentioned. Field is supported by the lookup types:[TaxonomyProviderType]. Values are defined in the LookupCode table for the above lookup types.
RefGroupID INTEGER ?   OPTIONAL System generated unique id using the Entity sequence.
MarketingRepUserID INTEGER ?   OPTIONAL FK - From MMUser Marketing Representative/Agent. Used in RIS and other specialities. OBSOLETE in 3.50.01
FirstReferral DATE ?   OPTIONAL Marketing First Referral Date OBSOLETE in 3.50.01
BirthMonth INTEGER ?   OPTIONAL Referring Doctor's birth month
BirthDay INTEGER ?   OPTIONAL Referring Doctor's birth day number of month.
BirthYear INTEGER ?   OPTIONAL Referring doctor's birth year.
Note CHARACTER(28000)   OPTIONAL User entered. Body of referring doctor note.

Parent Tables
Parent TableJoin PhraseWhen deleting parent record...
MMUser RefDoctor.MarketingRepUserID = MMUser.MMUserSID RESTRICT if RefDoctor exists
Specialty RefDoctor.DefaultSpecialtyCode = Specialty.SpecialtyCode SET NULL if RefDoctor exists
Provider RefDoctor.RefDoctorID = Provider.ProviderID RESTRICT if RefDoctor exists

Child Tables
Child TableJoin PhraseWhen deleting RefDoctor record...
Ailment Ailment.UBOperatingProviderID = RefDoctor.RefDoctorID RESTRICT if Ailment exists
Ailment Ailment.UBAttendingProviderID = RefDoctor.RefDoctorID RESTRICT if Ailment exists
CardioOrder CardioOrder.RefDoctorID = RefDoctor.RefDoctorID SET NULL if CardioOrder exists
OBPregnancy OBPregnancy.PrimaryProviderID = RefDoctor.RefDoctorID SET NULL if OBPregnancy exists
PatientRefDocSpecialty PatientRefDocSpecialty.RefDoctorID = RefDoctor.RefDoctorID CASCADE if PatientRefDocSpecialty exists
PatientOrderSet PatientOrderSet.RefDoctorID = RefDoctor.RefDoctorID SET NULL if PatientOrderSet exists
OBPregnancy OBPregnancy.PediatricianID = RefDoctor.RefDoctorID SET NULL if OBPregnancy exists
CLWCorrespondence CLWCorrespondence.RefDoctorID = RefDoctor.RefDoctorID RESTRICT if CLWCorrespondence exists
PatientRx PatientRx.RefDoctorID = RefDoctor.RefDoctorID SET NULL if PatientRx exists
RISVisit RISVisit.RefDoctorID = RefDoctor.RefDoctorID RESTRICT if RISVisit exists
InpatientVisit InpatientVisit.DischargeRefProviderID = RefDoctor.RefDoctorID RESTRICT if InpatientVisit exists
Ailment Ailment.UBOtherProviderID = RefDoctor.RefDoctorID RESTRICT if Ailment exists
Ailment Ailment.RefDoctorID = RefDoctor.RefDoctorID RESTRICT if Ailment exists
Patient Patient.RefDoctorID = RefDoctor.RefDoctorID RESTRICT if Patient exists
LabOrder LabOrder.RefDoctorID = RefDoctor.RefDoctorID RESTRICT if LabOrder exists