Create relationship based on column value from CSV

Hi All ,

I am facing issue while creating nodes based on column values

Snippet of csv file is below.

med_name , dis_name
medA , diseaseA
medB, diseaseA
medC, diseaseB

Here I want to create nodes which will have relationship
medicine->[IS_MEDICINE_FOR]->disease
In above case 2 nodes medA and medB will have relationship with diseaseA node and medC will have separate relationship with diseaseB.
I tried to below query but it create different separate relationship for each medA->diseaseA as one pair and medB->diseaseA as one pair but I want node of diseaseA to be get created only once.

Below is query I have tried.I also tried merge but nothing worked.

load csv with headers from "file:///med_dis.csv" as row
    create (m1:Medicines{label:row.med_name})-[r:IS_MEDICINE_FOR]->(d1:Diseases{label:row.dis_name})

Any help for same will be much appreciated.

Hey i am having similar kind of problem

what will be the query if :

med 1- dis a

med 1- dis b

med 2 - dis c

med 3 - dis c