I think this the only way to lin different models with eachother. and I
would like to hear more about linking the models with each other if there
is anyone who can describe it to both of us.
On Wed, Jun 2, 2021 at 10:38 AM Ayush Bisht
wrote:
> thanks, .. it works for me.. but is there any other
thanks, .. it works for me.. but is there any other way to do these ??. as
PatientVaccineStatus already connected to Patient model, and Vaccine
connected to PatientVaccineStatus model. Can't we merged all the tables of
descendants to their parent model in this hierarchy fashion without linking
btw have you applied in your models what I told you to do?
On Wed, Jun 2, 2021 at 10:31 AM Ayush Bisht
wrote:
> yes, its true, but here it works as candidate key. so that we can identify
> the patient based in ICMR id's.
>
> On Tuesday, June 1, 2021 at 1:34:24 AM UTC-7 abubak...@gmail.com wrote:
yes, its true, but here it works as candidate key. so that we can identify
the patient based in ICMR id's.
On Tuesday, June 1, 2021 at 1:34:24 AM UTC-7 abubak...@gmail.com wrote:
> class Patient(models.Model):
> patient_id = models.CharField(max_length=60) # no need for adding
> patient i
class Patient(models.Model):
patient_id = models.CharField(max_length=60) # no need for adding
patient id because django automatically creates ids
patient_vaccine = models.ForeignKey(PatientVaccine,
related_name="patient_vaccine")
vaccine = models.ForeignKey(Vaccinet, related_name="vacc
class Vaccine(models.Model)
vaccine = models.ForeignKey(PatientVaccineStatus,
related_name="vaccine_status")
patient = models.ForeignKey(Patient, related_name="patient") # new line
apply this line and your patient model will be linked with Vaccine model
On Tue, Jun 1, 2021 at 11:06 AM Ay
class Patient(models.Model):
patient_id = models.CharField(max_length=60)
class PatientVaccineStatus(models.Model):
patient = models.ForeignKey(Patient,
related_name="patient_vaccine_status")
class Vaccine(models.Model)
vaccine = models.ForeignKey(PatientVaccineStatus,
related_
7 matches
Mail list logo