Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.PersonIncompatibility ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Description ===== Records incompatabilities between individual providors and recipients. Healthcare (esp Home Care) usage. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **PersonIncompatibilityID** | char(20) | NOT NULL | | | | Person1ID | char(20) | NOT NULL | | | | Person2ID | char(20) | NOT NULL | | | | StaffID | char(20) | NULL | | | | EntryDate | date | NULL | | | | Description | char(50) | NULL | | | ===== Primary Key ===== * PersonIncompatibilityID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | staff | StaffID | [[database:tables:pears_staff|pears.staff (staffid)]] | ON DELETE SET NULL | | Person1 | Person1ID | [[database:tables:pears_person|pears.Person (personid)]] | NOT NULL; ON DELETE CASCADE | | Person2 | Person2ID | [[database:tables:pears_person|pears.Person (personid)]] | NOT NULL; ON DELETE CASCADE | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== * No indexes found. ===== Triggers ===== * No triggers found. ===== Original SQL ===== <code sql> -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."PersonIncompatibility" -- Table comment: Records incompatabilities between individual providors and recipients. Healthcare (esp Home Care) usage. -- Statement count: 5 CREATE TABLE "pears"."PersonIncompatibility" ( "PersonIncompatibilityID" char(20) NOT NULL ,"Person1ID" char(20) NOT NULL ,"Person2ID" char(20) NOT NULL ,"StaffID" char(20) NULL ,"EntryDate" date NULL ,"Description" char(50) NULL ,PRIMARY KEY ("PersonIncompatibilityID" ASC) ) go COMMENT ON TABLE "pears"."PersonIncompatibility" IS 'Records incompatabilities between individual providors and recipients. Healthcare (esp Home Care) usage.' go ALTER TABLE "pears"."PersonIncompatibility" ADD FOREIGN KEY "staff" ("StaffID" ASC) REFERENCES "pears"."staff" ("staffid") ON DELETE SET NULL go ALTER TABLE "pears"."PersonIncompatibility" ADD NOT NULL FOREIGN KEY "Person1" ("Person1ID" ASC) REFERENCES "pears"."Person" ("personid") ON DELETE CASCADE go ALTER TABLE "pears"."PersonIncompatibility" ADD NOT NULL FOREIGN KEY "Person2" ("Person2ID" ASC) REFERENCES "pears"."Person" ("personid") ON DELETE CASCADE go </code> database/tables/pears_personincompatibility.txt Last modified: 2026/08/07 19:24by 127.0.0.1