gt-health / GT-FHIR

Georgia Tech FHIR Server Web Page
36 stars 28 forks source link

Typecasting Issue #118

Open Rokshan2016 opened 6 years ago

Rokshan2016 commented 6 years ago

Hi @myungchoi I am founding typecasting error when I am trying to send some thing from the GT FHIR url , Like the patient id =1

Checked the console in tomcat server , to see exactly what is the error is , so the primary error is actually typecasting error in query.

In Concept table , the Vocabulary Id column is defined as ‘character’ where in Vocabulary table, the Vocabulary Id is defined as ‘integer’. I run the same query in postgre sql ( edit with typecasting). And it works fine.

So I think ,there is some mismatch in the gt fhir entities.

Any suggestion will be helpful.

micriley commented 6 years ago

Hi. Can you provide an example of the specific URL used?

Rokshan2016 commented 6 years ago

yes postgre4

Rokshan2016 commented 6 years ago

postgre2 This is the error.

Rokshan2016 commented 6 years ago

That, I don't think, it valid for a String - as it is trying to use an auto-increment sequence for the key value

In Vocabulary entity it is not meant

public class Vocabulary {  
   
  @Id
  @GeneratedValue(strategy=GenerationType.IDENTITY)
  @Column(name="vocabulary_id", updatable=false)
  @Access(AccessType.PROPERTY)
  private String id;

So best guess is that Hibernate, when it is creating the table, is detecting that error and changing the type to integer - but when it creates the foreign key reference in Concept, it is only looking at the Java type and setting the key to varchar

micriley commented 6 years ago

Ah thanks! This is probably the issue. What version of OMOP are you running, and which release of GT-FHIR are you using?

Rokshan2016 commented 6 years ago

FHIR DSTU2 and OMOP v5.

I did not make any change. Just simply cloned from the git

myungchoi commented 6 years ago

vocabulary_id in OMOP v5 is character varying. If you just want to run GT-FHIR, there is docker version of GT-FHIR that you can use to run. It also has sample patients there. Please check https://github.com/gt-health/smart-platform-docker

You can build and run images from smart-postgres and smart-fhir. You need to change the env file an xml configuration files to fit in your environment.