--DROP TABLE ELGA_PersonalRelationship CASCADE; CREATE TABLE ELGA_PersonalRelationship ( ELGA_PersonalRelationship_id int NOT NULL PRIMARY KEY, code varchar(255) NOT NULL, codeSystem varchar(255) NOT NULL, displayName varchar(255) NOT NULL ); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (1, 'AUNT', '2.16.840.1.113883.5.111', 'aunt'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (2, 'CHILD', '2.16.840.1.113883.5.111', 'child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (3, 'CHLDADOPT', '2.16.840.1.113883.5.111', 'adopted child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (4, 'CHLDFOST', '2.16.840.1.113883.5.111', 'foster child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (5, 'CHLDINLAW', '2.16.840.1.113883.5.111', 'child in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (6, 'COUSN', '2.16.840.1.113883.5.111', 'cousin'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (7, 'DAU', '2.16.840.1.113883.5.111', 'natural daughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (8, 'DAUADOPT', '2.16.840.1.113883.5.111', 'adopted daughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (9, 'DAUC', '2.16.840.1.113883.5.111', 'daughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (10, 'DAUFOST', '2.16.840.1.113883.5.111', 'foster daughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (11, 'DAUINLAW', '2.16.840.1.113883.5.111', 'daughter in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (12, 'DOMPART', '2.16.840.1.113883.5.111', 'domestic partner'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (13, 'FAMMEMB', '2.16.840.1.113883.5.111', 'family member'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (14, 'FRND', '2.16.840.1.113883.5.111', 'unrelated friend'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (15, 'FTH', '2.16.840.1.113883.5.111', 'father'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (16, 'FTHINLAW', '2.16.840.1.113883.5.111', 'father-in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (17, 'GGRPRN', '2.16.840.1.113883.5.111', 'great grandparent'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (18, 'GRNDCHILD', '2.16.840.1.113883.5.111', 'grandchild'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (19, 'GRPRN', '2.16.840.1.113883.5.111', 'grandparent'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (20, 'MTH', '2.16.840.1.113883.5.111', 'mother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (21, 'MTHINLAW', '2.16.840.1.113883.5.111', 'mother-in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (22, 'NBOR', '2.16.840.1.113883.5.111', 'neighbor'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (23, 'NCHILD', '2.16.840.1.113883.5.111', 'natural child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (24, 'NIENEPH', '2.16.840.1.113883.5.111', 'niece/nephew'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (25, 'PRN', '2.16.840.1.113883.5.111', 'parent'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (26, 'PRNINLAW', '2.16.840.1.113883.5.111', 'parent in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (27, 'ROOM', '2.16.840.1.113883.5.111', 'roommate'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (28, 'SIB', '2.16.840.1.113883.5.111', 'sibling'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (29, 'SIGOTHR', '2.16.840.1.113883.5.111', 'significant other'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (30, 'SON', '2.16.840.1.113883.5.111', 'natural son'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (31, 'SONADOPT', '2.16.840.1.113883.5.111', 'adopted son'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (32, 'SONC', '2.16.840.1.113883.5.111', 'son'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (33, 'SONFOST', '2.16.840.1.113883.5.111', 'foster son'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (34, 'SONINLAW', '2.16.840.1.113883.5.111', 'son in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (35, 'SPS', '2.16.840.1.113883.5.111', 'spouse'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (36, 'HUSB', '2.16.840.1.113883.5.111', 'husband'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (37, 'WIFE', '2.16.840.1.113883.5.111', 'wife'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (38, 'STPCHLD', '2.16.840.1.113883.5.111', 'step child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (39, 'STPDAU', '2.16.840.1.113883.5.111', 'stepdaughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (40, 'STPSON', '2.16.840.1.113883.5.111', 'stepson'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (41, 'UNCLE', '2.16.840.1.113883.5.111', 'uncle'); --DROP TABLE ELGA_PersonalRelationship CASCADE; CREATE TABLE ELGA_PersonalRelationship ( ELGA_PersonalRelationship_id int NOT NULL PRIMARY KEY, code varchar(255) NOT NULL, codeSystem varchar(255) NOT NULL, displayName varchar(255) NOT NULL ); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (1, 'FAMMEMB', '2.16.840.1.113883.5.111', 'family member'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (2, 'SPS', '2.16.840.1.113883.5.111', 'spouse'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (3, 'HUSB', '2.16.840.1.113883.5.111', 'husband'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (4, 'WIFE', '2.16.840.1.113883.5.111', 'wife'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (5, 'PRN', '2.16.840.1.113883.5.111', 'parent'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (6, 'FTH', '2.16.840.1.113883.5.111', 'father'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (7, 'MTH', '2.16.840.1.113883.5.111', 'mother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (8, 'NPRN', '2.16.840.1.113883.5.111', 'natural parent'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (9, 'NFTH', '2.16.840.1.113883.5.111', 'natural father'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (10, 'NMTH', '2.16.840.1.113883.5.111', 'natural mother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (11, 'PRNINLAW', '2.16.840.1.113883.5.111', 'parent in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (12, 'FTHINLAW', '2.16.840.1.113883.5.111', 'father-in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (13, 'MTHINLAW', '2.16.840.1.113883.5.111', 'mother-in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (14, 'STPPRN', '2.16.840.1.113883.5.111', 'step parent'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (15, 'STPFTH', '2.16.840.1.113883.5.111', 'stepfather'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (16, 'STPMTH', '2.16.840.1.113883.5.111', 'stepmother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (17, 'SIB', '2.16.840.1.113883.5.111', 'sibling'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (18, 'BRO', '2.16.840.1.113883.5.111', 'brother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (19, 'SIS', '2.16.840.1.113883.5.111', 'sister'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (20, 'HSIB', '2.16.840.1.113883.5.111', 'half sibling'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (21, 'HBRO', '2.16.840.1.113883.5.111', 'half brother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (22, 'HSIS', '2.16.840.1.113883.5.111', 'half sister'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (23, 'NSIB', '2.16.840.1.113883.5.111', 'natural sibling'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (24, 'NBRO', '2.16.840.1.113883.5.111', 'natural brother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (25, 'NSIS', '2.16.840.1.113883.5.111', 'natural sister'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (26, 'SIBINLAW', '2.16.840.1.113883.5.111', 'sibling in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (27, 'BROINLAW', '2.16.840.1.113883.5.111', 'brother-in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (28, 'SISINLAW', '2.16.840.1.113883.5.111', 'sister-in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (29, 'STPSIB', '2.16.840.1.113883.5.111', 'stepsibling'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (30, 'STPBRO', '2.16.840.1.113883.5.111', 'stepbrother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (31, 'STPSIS', '2.16.840.1.113883.5.111', 'stepsister'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (32, 'CHILD', '2.16.840.1.113883.5.111', 'child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (33, 'NCHILD', '2.16.840.1.113883.5.111', 'natural child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (34, 'CHLDADOPT', '2.16.840.1.113883.5.111', 'adopted child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (35, 'CHLDFOST', '2.16.840.1.113883.5.111', 'foster child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (36, 'CHLDINLAW', '2.16.840.1.113883.5.111', 'child in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (37, 'STPCHLD', '2.16.840.1.113883.5.111', 'step child'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (38, 'DAUC', '2.16.840.1.113883.5.111', 'daughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (39, 'DAU', '2.16.840.1.113883.5.111', 'natural daughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (40, 'DAUADOPT', '2.16.840.1.113883.5.111', 'adopted daughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (41, 'DAUFOST', '2.16.840.1.113883.5.111', 'foster daughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (42, 'DAUINLAW', '2.16.840.1.113883.5.111', 'daughter in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (43, 'STPDAU', '2.16.840.1.113883.5.111', 'stepdaughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (44, 'SONC', '2.16.840.1.113883.5.111', 'son'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (45, 'SON', '2.16.840.1.113883.5.111', 'natural son'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (46, 'SONADOPT', '2.16.840.1.113883.5.111', 'adopted son'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (47, 'SONFOST', '2.16.840.1.113883.5.111', 'foster son'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (48, 'SONINLAW', '2.16.840.1.113883.5.111', 'son in-law'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (49, 'STPSON', '2.16.840.1.113883.5.111', 'stepson'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (50, 'GRPRN', '2.16.840.1.113883.5.111', 'grandparent'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (51, 'GRFTH', '2.16.840.1.113883.5.111', 'grandfather'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (52, 'GRMTH', '2.16.840.1.113883.5.111', 'grandmother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (53, 'GGRPRN', '2.16.840.1.113883.5.111', 'great grandparent'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (54, 'GGRFTH', '2.16.840.1.113883.5.111', 'great grandfather'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (55, 'GGRMTH', '2.16.840.1.113883.5.111', 'great grandmother'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (56, 'GRNDCHILD', '2.16.840.1.113883.5.111', 'grandchild'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (57, 'GRNDDAU', '2.16.840.1.113883.5.111', 'granddaughter'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (58, 'GRNDSON', '2.16.840.1.113883.5.111', 'grandson'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (59, 'AUNT', '2.16.840.1.113883.5.111', 'aunt'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (60, 'UNCLE', '2.16.840.1.113883.5.111', 'uncle'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (61, 'NIENEPH', '2.16.840.1.113883.5.111', 'niece/nephew'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (62, 'COUSN', '2.16.840.1.113883.5.111', 'cousin'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (63, 'FRND', '2.16.840.1.113883.5.111', 'unrelated friend'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (64, 'SIGOTHR', '2.16.840.1.113883.5.111', 'significant other'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (65, 'ROOM', '2.16.840.1.113883.5.111', 'roommate'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (66, 'DOMPART', '2.16.840.1.113883.5.111', 'domestic partner'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (67, 'NBOR', '2.16.840.1.113883.5.111', 'neighbor'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (68, 'SPON', '2.16.840.1.113883.5.111', 'sponsored dependent'); INSERT INTO ELGA_PersonalRelationship (ELGA_PersonalRelationship_id, code, codeSystem, displayName) VALUES (69, 'GUARD', '2.16.840.1.113883.5.111', 'guardian');