From d6777a973c3eb5f327441dcf996cab88d432d367 Mon Sep 17 00:00:00 2001 From: Alexander Watzinger Date: Fri, 10 Jan 2025 12:34:09 +0100 Subject: [PATCH] Bones: SQL for skull and teeth types --- install/upgrade/bones.sql | 227 ++++++++++++++++++++++++-------------- 1 file changed, 147 insertions(+), 80 deletions(-) diff --git a/install/upgrade/bones.sql b/install/upgrade/bones.sql index ee18a8c5b..cf6a67092 100644 --- a/install/upgrade/bones.sql +++ b/install/upgrade/bones.sql @@ -3,94 +3,161 @@ BEGIN; -- Feature bone inventory (#1473) INSERT INTO model.entity (cidoc_class_code, openatlas_class_name, name) VALUES ('E55', 'type_tools', 'Bone inventory'), - ('E55', 'type_tools', 'Inventory: Skull'), - ('E55', 'type_tools', 'Inventory: Teeth'), - ('E55', 'type_tools', 'Inventory: Shoulder girdle'), - ('E55', 'type_tools', 'Inventory: Arms and hands'), - ('E55', 'type_tools', 'Inventory: Axial skeleton'), - ('E55', 'type_tools', 'Inventory: Pelvis'), - ('E55', 'type_tools', 'Inventory: Legs and feet'); + ('E55', 'type_tools', 'Skull'), + ('E55', 'type_tools', 'Teeth'), + ('E55', 'type_tools', 'Shoulder girdle'), + ('E55', 'type_tools', 'Arms and hands'), + ('E55', 'type_tools', 'Axial skeleton'), + ('E55', 'type_tools', 'Pelvis'), + ('E55', 'type_tools', 'Legs and feet'); INSERT INTO web.type_none_selectable (entity_id) VALES (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Bone inventory'), - (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Inventory: Skull'), - (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Inventory: Teeth'), - (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Inventory: Shoulder girdle'), - (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Inventory: Arms and hands'), - (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Inventory: Axial skeleton'), - (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Inventory: Pelvis'), - (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Inventory: Legs and feet'); + (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Skull'), + (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Teeth'), + (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Shoulder girdle'), + (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Arms and hands'), + (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Axial skeleton'), + (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Pelvis'), + (SELECT id FROM model.entiy WHERE openatlas_class_name = 'type_tools' AND name = 'Legs and feet'); INSERT INTO model.link (property_code, domain_id, range_id) VALUES - ('P127', (SELECT id FROM model.entity WHERE name='Inventory: Skull'), (SELECT id FROM model.entity WHERE name='Bone inventory')), - ('P127', (SELECT id FROM model.entity WHERE name='Inventory: Teeth'), (SELECT id FROM model.entity WHERE name='Bone inventory')), - ('P127', (SELECT id FROM model.entity WHERE name='Inventory: Shoulder girdle'), (SELECT id FROM model.entity WHERE name='Bone inventory')), - ('P127', (SELECT id FROM model.entity WHERE name='Inventory: Arms and hands'), (SELECT id FROM model.entity WHERE name='Bone inventory')), - ('P127', (SELECT id FROM model.entity WHERE name='Inventory: Axial skeleton'), (SELECT id FROM model.entity WHERE name='Bone inventory')), - ('P127', (SELECT id FROM model.entity WHERE name='Inventory: Pelvis'), (SELECT id FROM model.entity WHERE name='Bone inventory')), - ('P127', (SELECT id FROM model.entity WHERE name='Inventory: Legs and feet'), (SELECT id FROM model.entity WHERE name='Bone inventory')), + ('P127', (SELECT id FROM model.entity WHERE name='Skull'), (SELECT id FROM model.entity WHERE name='Bone inventory')), + ('P127', (SELECT id FROM model.entity WHERE name='Teeth'), (SELECT id FROM model.entity WHERE name='Bone inventory')), + ('P127', (SELECT id FROM model.entity WHERE name='Shoulder girdle'), (SELECT id FROM model.entity WHERE name='Bone inventory')), + ('P127', (SELECT id FROM model.entity WHERE name='Arms and hands'), (SELECT id FROM model.entity WHERE name='Bone inventory')), + ('P127', (SELECT id FROM model.entity WHERE name='Axial skeleton'), (SELECT id FROM model.entity WHERE name='Bone inventory')), + ('P127', (SELECT id FROM model.entity WHERE name='Pelvis'), (SELECT id FROM model.entity WHERE name='Bone inventory')), + ('P127', (SELECT id FROM model.entity WHERE name='Legs and feet'), (SELECT id FROM model.entity WHERE name='Bone inventory')), -- Skull INSERT INTO model.entity (cidoc_class_code, openatlas_class_name, name, description) VALUES - ('E55', 'type_tools', ''), + ('E55', 'type_tools', 'Frontal'), + ('E55', 'type_tools', 'Orbit R'), + ('E55', 'type_tools', 'Orbit L'), + ('E55', 'type_tools', 'Parietal R'), + ('E55', 'type_tools', 'Parietal L'), + ('E55', 'type_tools', 'Temporal R'), + ('E55', 'type_tools', 'Squama R'), + ('E55', 'type_tools', 'Petrous R'), + ('E55', 'type_tools', 'Mastoid R'), + ('E55', 'type_tools', 'Temporal L'), + ('E55', 'type_tools', 'Squama L'), + ('E55', 'type_tools', 'Petrous L'), + ('E55', 'type_tools', 'Mastoid L'), + ('E55', 'type_tools', 'Occipital'), + ('E55', 'type_tools', 'Pars squama'), + ('E55', 'type_tools', 'Pars lateralis R'), + ('E55', 'type_tools', 'Pars lateralis L'), + ('E55', 'type_tools', 'Pars basilaris R'), + ('E55', 'type_tools', 'Pars basilaris L'), + ('E55', 'type_tools', 'Sphenoid'), + ('E55', 'type_tools', 'Ala major R'), + ('E55', 'type_tools', 'Ala minor R'), + ('E55', 'type_tools', 'Ala major L'), + ('E55', 'type_tools', 'Ala minor L'), + ('E55', 'type_tools', 'Sphenoid body'), + ('E55', 'type_tools', 'Maxilla R'), + ('E55', 'type_tools', 'Maxilla L'), + ('E55', 'type_tools', 'Nasal R'), + ('E55', 'type_tools', 'Nasal L'), + ('E55', 'type_tools', 'Lacrimale R'), + ('E55', 'type_tools', 'Lacrimale L'), + ('E55', 'type_tools', 'Ethmoid'), + ('E55', 'type_tools', 'Zygomatic R'), + ('E55', 'type_tools', 'Zygomatic L'), + ('E55', 'type_tools', 'Vomer'), + ('E55', 'type_tools', 'Palate R'), + ('E55', 'type_tools', 'Palate L'), + ('E55', 'type_tools', 'Inferior conchae R'), + ('E55', 'type_tools', 'Inferior conchae L'), + ('E55', 'type_tools', 'Mandible R'), + ('E55', 'type_tools', 'Ramus R'), + ('E55', 'type_tools', 'ondyle R'), + ('E55', 'type_tools', 'Mandible L'), + ('E55', 'type_tools', 'Ramus L'), + ('E55', 'type_tools', 'ondyle L'), + ('E55', 'type_tools', 'Auditory ossicles'), + ('E55', 'type_tools', 'Stapes R'), + ('E55', 'type_tools', 'Incus R'), + ('E55', 'type_tools', 'Malleus R'), + ('E55', 'type_tools', 'Stapes L'), + ('E55', 'type_tools', 'Incus L'), + ('E55', 'type_tools', 'Malleus L'), + ('E55', 'type_tools', 'Cricoid cartilage'), + ('E55', 'type_tools', 'Thyroid'), + ('E55', 'type_tools', 'Hyoid'), + ('E55', 'type_tools', 'TMJ R'), + ('E55', 'type_tools', 'TMJ L'); + +-- Teeth +INSERT INTO model.entity (cidoc_class_code, openatlas_class_name, name, description) VALUES + ('E55', 'type_tools', 'Permanent teeth'), + ('E55', 'type_tools', 'Maxilla'), + ('E55', 'type_tools', 'Right side'), + ('E55', 'type_tools', 'I1 R (11)'), + ('E55', 'type_tools', 'I2 R (12)'), + ('E55', 'type_tools', 'C R (13)'), + ('E55', 'type_tools', 'PM1 R (14)'), + ('E55', 'type_tools', 'PM2 R (15)'), + ('E55', 'type_tools', 'M1 R (16)'), + ('E55', 'type_tools', 'M2 R (17)'), + ('E55', 'type_tools', 'M3 R (18)'), + ('E55', 'type_tools', 'Left side'), + ('E55', 'type_tools', 'I1 L (21)'), + ('E55', 'type_tools', 'I2 L (22)'), + ('E55', 'type_tools', 'C L (23)'), + ('E55', 'type_tools', 'PM1 L (24)'), + ('E55', 'type_tools', 'PM2 L (25)'), + ('E55', 'type_tools', 'M1 L (26)'), + ('E55', 'type_tools', 'M2 L (27)'), + ('E55', 'type_tools', 'M3 L (28)'), + ('E55', 'type_tools', 'Mandible'), + ('E55', 'type_tools', 'Left side'), + ('E55', 'type_tools', 'I1 L (31)'), + ('E55', 'type_tools', 'I2 L (32)'), + ('E55', 'type_tools', 'C L (33)'), + ('E55', 'type_tools', 'PM1 L (34)'), + ('E55', 'type_tools', 'PM2 L (35)'), + ('E55', 'type_tools', 'M1 L (36)'), + ('E55', 'type_tools', 'M2 L (37)'), + ('E55', 'type_tools', 'M3 L (38)'), + ('E55', 'type_tools', 'Right side'), + ('E55', 'type_tools', 'I1 R (41)'), + ('E55', 'type_tools', 'I2 R (42)'), + ('E55', 'type_tools', 'C R (43)'), + ('E55', 'type_tools', 'PM1 R (44)'), + ('E55', 'type_tools', 'PM2 R (45)'), + ('E55', 'type_tools', 'M1 R (46)'), + ('E55', 'type_tools', 'M2 R (47)'), + ('E55', 'type_tools', 'M3 R (48)'), + ('E55', 'type_tools', 'Deciduous'), + ('E55', 'type_tools', 'Maxilla'), + ('E55', 'type_tools', 'Right side'), + ('E55', 'type_tools', 'I1 R (51)'), + ('E55', 'type_tools', 'I2 R (52)'), + ('E55', 'type_tools', 'C R (53)'), + ('E55', 'type_tools', 'M1 R (54)'), + ('E55', 'type_tools', 'M2 R (55)'), + ('E55', 'type_tools', 'Left side'), + ('E55', 'type_tools', 'I1 L (61)'), + ('E55', 'type_tools', 'I2 L (62)'), + ('E55', 'type_tools', 'C L (63)'), + ('E55', 'type_tools', 'M1 L (64)'), + ('E55', 'type_tools', 'M2 L (65)'), + ('E55', 'type_tools', 'Mandible'), + ('E55', 'type_tools', 'Left side'), + ('E55', 'type_tools', 'I1 L (71)'), + ('E55', 'type_tools', 'I2 L (72)'), + ('E55', 'type_tools', 'C L (73)'), + ('E55', 'type_tools', 'M1 L (74)'), + ('E55', 'type_tools', 'M2 L (75)'), + ('E55', 'type_tools', 'Right side'), + ('E55', 'type_tools', 'I1 R (81)'), + ('E55', 'type_tools', 'I2 R (82)'), + ('E55', 'type_tools', 'C R (83)'), + ('E55', 'type_tools', 'M1 R (84)'), + ('E55', 'type_tools', 'M2 R (85)'); --- Work in progress - Frontal - Orbit R - Orbit L - Parietal R - Parietal L - Temporal R - Squama R - Petrous R - Mastoid R - Temporal R - Squama L - Petrous L - Mastoid L - Occipital - Pars squama - Pars lateralis R - Pars lateralis L - Pars basilaris R - Pars basilaris L - Sphenoid - Ala major R - Ala minor R - Ala major L - Ala minor L - Sphenoid body - Maxilla R - Maxilla L - Nasal R - Nasal L - Lacrimale R - Lacrimale L - Ethmoid - Zygomatic R - Zygomatic L - Vomer - Palate R - Palate L - Inferior conchae R - Inferior conchae L - Mandible R - Ramus R - Condyle R - Mandible L - Ramus L - Condyle L - Auditory ossicles - Stapes R - Incus R - Malleus R - Stapes L - Incus L - Malleus L - Cricoid cartilage - Thyroid - Hyoid - TMJ R - TMJ L END;