Code Monkey home page Code Monkey logo

Comments (4)

rorydavidson avatar rorydavidson commented on June 20, 2024

Hi,
the error shows that it can't find the files. Where have you extracted the SNOMED CT release to?

from snomed-ct-database.

Enrico68 avatar Enrico68 commented on June 20, 2024

Hi,

I've re-extracted the SnomedCT_RF2Release_INT_20150131.zip in /Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131and change the location in load-postgresql.sql :

/* loads the SNOMED CT 'Full' release - replace filenames with relevant locations of base SNOMED CT release files*/
/* Filenames may need to change depending on the release you wish to upload, currently set to January 2015 release */

use snomedct;

COPY curr_concept_f(id, effectivetime, active, moduleid, definitionstatusid) 
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Terminology/sct2_Concept_Full_INT_20150131.txt' 
WITH DELIMITER '~';
CSV HEADER;


COPY curr_description_f(id, effectivetime, active, moduleid, conceptid, languagecode, typeid, term, casesignificanceid)
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Terminology/sct2_Description_Full-en_INT_20150131.txt' 
WITH DELIMITER '~';
CSV HEADER;


COPY curr_textdefinition_f(id, effectivetime, active, moduleid, conceptid, languagecode, typeid, term, casesignificanceid)
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Terminology/sct2_TextDefinition_Full-en_INT_20150131.txt'
WITH DELIMITER '~';
CSV HEADER;


COPY curr_relationship_f(id, effectivetime, active, moduleid, sourceid, destinationid, relationshipgroup, typeid,characteristictypeid, modifierid)
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Terminology/sct2_Relationship_Full_INT_20150131.txt'
WITH DELIMITER '~';
CSV HEADER;


COPY curr_stated_relationship_f(id, effectivetime, active, moduleid, sourceid, destinationid, relationshipgroup, typeid,  characteristictypeid, modifierid)
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Terminology/sct2_StatedRelationship_Full_INT_20150131.txt'  
WITH DELIMITER '~';
CSV HEADER;

COPY curr_langrefset_f(id, effectivetime, active, moduleid, refsetid, referencedcomponentid, acceptabilityid)
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Refset/Language/der2_cRefset_LanguageFull-en_INT_20150131.txt' 
WITH DELIMITER '~';
CSV HEADER;

COPY curr_associationrefset_d(id, effectivetime, active, moduleid, refsetid, referencedcomponentid, targetcomponentid)
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Refset/Content/der2_cRefset_AssociationReferenceFull_INT_20150131.txt'
WITH DELIMITER '~';
CSV HEADER;


COPY curr_attributevaluerefset_f(id, effectivetime, active, moduleid, refsetid, referencedcomponentid, valueid)
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Refset/Content/der2_cRefset_AttributeValueFull_INT_20150131.txt'
WITH DELIMITER '~';
CSV HEADER;

COPY curr_simplemaprefset_f(id, effectivetime, active, moduleid, refsetid,  referencedcomponentid, maptarget);
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Refset/Crossmap/der2_sRefset_SimpleMapFull_INT_20150131.txt'
WITH DELIMITER '~';
CSV HEADER;

COPY curr_simplerefset_f(id, effectivetime, active, moduleid, refsetid, referencedcomponentid)
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Refset/Content/der2_Refset_SimpleFull_INT_20150131.txt' 
WITH DELIMITER '~';
CSV HEADER;

COPY curr_complexmaprefset_f(id, effectivetime, active, moduleid, refsetid, referencedcomponentid, mapGroup, mapPriority, mapRule,  mapAdvice, mapTarget, correlationId)
FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_20150131/Full/Refset/Map/der2_iissscRefset_ComplexMapFull_INT_20150131.txt'
WITH DELIMITER '~';
CSV HEADER;

But still the same errors :

psql -d snomedct -f load-postgresql.sql

psql:load-postgresql.sql:4: ERROR:  syntax error at or near "use"
LINE 3: use snomedct;
        ^
psql:load-postgresql.sql:8: ERROR:  value too long for type character varying(18)
CONTEXT:  COPY curr_concept_f, line 1, column id: "id   effectiveTime   active  moduleId    definitionStatusId"
psql:load-postgresql.sql:9: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:14: ERROR:  value too long for type character varying(18)
CONTEXT:  COPY curr_description_f, line 1, column id: "id   effectiveTime   active  moduleId    conceptId   languageCode    typeId  term    caseSignificanceId"
psql:load-postgresql.sql:15: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:20: ERROR:  value too long for type character varying(18)
CONTEXT:  COPY curr_textdefinition_f, line 1, column id: "id    effectiveTime   active  moduleId    conceptId   languageCode    typeId  term    caseSignificanceId"
psql:load-postgresql.sql:21: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:26: ERROR:  value too long for type character varying(18)
CONTEXT:  COPY curr_relationship_f, line 1, column id: "id  effectiveTime   active  moduleId    sourceId    destinationId   relationshipGroup   typeId  characteristicTypeI..."
psql:load-postgresql.sql:27: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:32: ERROR:  relation "curr_stated_relationship_f" does not exist
psql:load-postgresql.sql:33: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:37: ERROR:  value too long for type character varying(18)
CONTEXT:  COPY curr_langrefset_f, line 1, column id: "id    effectiveTime   active  moduleId    refsetId    referencedComponentId   acceptabilityId"
psql:load-postgresql.sql:38: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:42: ERROR:  value too long for type character varying(18)
CONTEXT:  COPY curr_associationrefset_d, line 1, column id: "id effectiveTime   active  moduleId    refsetId    referencedComponentId   targetComponentId"
psql:load-postgresql.sql:43: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:48: ERROR:  value too long for type character varying(18)
CONTEXT:  COPY curr_attributevaluerefset_f, line 1, column id: "id  effectiveTime   active  moduleId    refsetId    referencedComponentId   valueId"
psql:load-postgresql.sql:49: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:51: ERROR:  syntax error at or near ";"
LINE 1: ...ive, moduleid, refsetid,  referencedcomponentid, maptarget);
                                                                      ^
psql:load-postgresql.sql:53: ERROR:  syntax error at or near "FROM"
LINE 1: FROM '/Users/enricopirani/download/SnomedCT_RF2Release_INT_2...
        ^
psql:load-postgresql.sql:54: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:58: ERROR:  value too long for type character varying(18)
CONTEXT:  COPY curr_simplerefset_f, line 1, column id: "id  effectiveTime   active  moduleId    refsetId    referencedComponentId"
psql:load-postgresql.sql:59: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^
psql:load-postgresql.sql:63: ERROR:  value too long for type character varying(18)
CONTEXT:  COPY curr_complexmaprefset_f, line 1, column id: "id  effectiveTime   active  moduleId    refsetId    referencedComponentId   mapGroup    mapPriority mapRule mapAdvi..."
psql:load-postgresql.sql:64: ERROR:  syntax error at or near "CSV"
LINE 1: CSV HEADER;
        ^

from snomed-ct-database.

jmpolitzer avatar jmpolitzer commented on June 20, 2024

@Enrico68 I'm running into the same issue. Were you ever able to solve this?

from snomed-ct-database.

rorydavidson avatar rorydavidson commented on June 20, 2024

The repo has been updated now. Please have a go again.

from snomed-ct-database.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.