How can I mark the specific day such as day 0 if the patient has already done in day 0?

Viewed 72

I've created table for patient, record and schedule.

Patient table:

Patient ID Patient Name
1 John Doe

On that specific patient we have a record on the clinic, so:

Record ID Patient ID Date of exposure
1 1 Sep 19, 2022

Under that record I want to set a schedule date for each day. (There are day 0, day 7 and day 21).

Schedule ID Record ID Day 0 Day 7 Day 21
1 1 Sep 19, 2022 Sep 26, 2022 Oct 10, 2022

I'm stuck here. How can I mark the day as done if the patient is already done in day 0?

ID Day 0 Day 7 Day 21 Day 0 Status Day 7 Status Day 21 Status
1 Sept 19, 2022 Sept 26, 2022 Oct 10, 2022 Done Done Done

This doesn't work. How can I mark the specific day if the patient is already done with it?

1 Answers

I would try split this up into 3 different tables: Patient, Schedule and Status.

Patient will hold the ID as a primary key the other tables will use the PatientID as a Foreign Key.

Patient
PatientID ETC..
Schedule
PatientID* Day 0 Day 7 Day 21
Status
PatientID* Day 0 Day 7 Day 21

I can still access everything I want by linking with the PatientID

Honestly, your way works perfectly fine it just looks a little bit weird and messy but it 100% works and is viable.

Related