OHDSI Home | Forums | Wiki | Github

Modifying table constraints - Allowed/Not allowed?

Hello,

Are we free to modify CDM table constraints to suit our data requirements?

For example, I would like to change length of “Concept_code” field under concept from 50 to 255 as we are creating our custom concepts ?

Might be an elementary question, but just thought of checking with you all as I often see in forum where it is important to maintain the CDM standards as it is to enable reproducibility of our results.

Thanks
Selva

@Chris_Knoll - Can you please help me with this?

Hi, Selva,
You should try to stick with the CDM schema standard. Codes are supposed to be shorted ‘codified’ identifiers for the particualr concept (like Diabetes, diabetic (brittle) (congenital) (familial) (mellitus) (severe) (slight) (without complication) is coded as 250.0. So you may be using the column improperly if you want to put something with a length of 255 in it.

Unfortunately, ‘Standards’ are seldom ‘convienent’. The challenge of representing your data in CDM form is to map the essence of your data using the standard forms that are defined in the CDM. There may be others on the forum that would be able to talk about specific experiences on this.

1 Like

Hello @Chris_Knoll. Thanks for the response.

Another quick question. I am trying to create custom concepts for survey data.

.

However I am encountering the above error. Can you please help me understand what might be the reason?

Since, am creating custom concepts, I use two rows for the same concept. One is 2000000001 maps to 2000000001 and the other is 2000000001 maps from 2000000001. However this doesn’t allow me to insert ‘Maps from’ in the relationship_id field of concept table. Is there any other table other than concept_relationship called 'relationship" where I have to key in this “Maps from” value?

Thanks
Selva

There is a table called ‘relationship’ that has the ‘Maps to’ value as a relationship_id.

Hello @SELVA_MUTHU_KUMARAN,

It’s “Mapped from”, not “Maps from”.

Yes, I fixed it recently. Thanks @rookie_crewkie

t